a90ebe955960f966d1cdea03acac4064de17b38a.svn-base 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362
  1. <template>
  2. <div ref="dashboardEditor" class="dashboard-editor-container">
  3. <div class="dashboard" style="margin-bottom: 10px;">
  4. <div class="dashboard-l">
  5. <div class="row1">
  6. <div class="row1-t">
  7. <div class="row1-t-l">
  8. <div class="img-l">统计范围:</div>
  9. <el-date-picker v-model="inputDatetime" :clearable="false" class="inputDatetime filter-item content" type="daterange" :picker-options="pickerOptions" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right" @change="changeDate" />
  10. </div>
  11. </div>
  12. <div class="row1-c">
  13. <div class="row1-c-l">
  14. <div class="title1">
  15. <div class="img-title">
  16. <img src="../../../assets/images/index/l1.png">
  17. </div>
  18. <span class="content">混料准确率</span>
  19. </div>
  20. <div class="row1-c-l-c">
  21. <span>
  22. <b>{{ row1.list[0].rateAvg }}</b>
  23. <br>昨日
  24. </span>
  25. </div>
  26. <div class="row1-c-l-b">
  27. <div><span>混料最高准确率:</span><b>{{ row1.list[0].rateMAX }}</b></div>
  28. <div><span>混料最低准确率:</span><b>{{ row1.list[0].rateMIN }}</b></div>
  29. </div>
  30. </div>
  31. <div class="row1-c-r">
  32. <div class="title1">
  33. <div class="img-title">
  34. <img src="../../../assets/images/index/l4.png">
  35. </div>
  36. <span class="content">撒料准确率</span>
  37. </div>
  38. <div class="row1-c-l-c">
  39. <span>
  40. <b>{{ row1.list[1].rateAvg }}</b>
  41. <br>昨日
  42. </span>
  43. </div>
  44. <div class="row1-c-l-b">
  45. <div><span>撒料最高准确率:</span><b>{{ row1.list[1].rateMAX }}</b></div>
  46. <div><span>撒料最低准确率:</span><b>{{ row1.list[1].rateMIN }}</b></div>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="row1-b">
  51. <div class="row1-b-l">
  52. <div class="title1">
  53. <div class="img-title">
  54. <img src="../../../assets/images/index/l3.png">
  55. </div>
  56. <span class="content">撒料正确率</span>
  57. </div>
  58. <div class="row1-c-l-c">
  59. <span>
  60. <b>{{ row1.list[2].rateAvg }}</b>
  61. <br>昨日
  62. </span>
  63. </div>
  64. <div class="row1-c-l-b">
  65. <div><span>撒料最高正确率:</span><b>{{ row1.list[2].rateMAX }}</b></div>
  66. <div><span>撒料最低正确率:</span><b>{{ row1.list[2].rateMIN }}</b></div>
  67. </div>
  68. </div>
  69. <div class="row1-b-r">
  70. <div class="title1">
  71. <div class="img-title">
  72. <img src="../../../assets/images/index/l2.png">
  73. </div>
  74. <span class="content">撒料偏差</span>
  75. </div>
  76. <div class="row1-c-l-c">
  77. <span>
  78. <b>{{ row1.list[3].rateAvg }}</b>
  79. <br>昨日
  80. </span>
  81. </div>
  82. <div class="row1-c-l-b">
  83. <div><span>撒料最高偏差:</span><b>{{ row1.list[3].rateMAX }}</b></div>
  84. <div><span>撒料最低偏差:</span><b>{{ row1.list[3].rateMIN }}</b>分钟</div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="row2">
  90. <div class="title">
  91. <div class="img-title" />
  92. <span class="content">今日计划统计</span>
  93. </div>
  94. <div class="todayPlan">
  95. <div>
  96. <div id="row2chartLine1" style="height: 185px;" />
  97. <div class="bottom">
  98. <div class="bottom-l">
  99. <div class="bottom-l-t">
  100. <b>{{ row2.chart1.chartLine_data.data1 }}</b>次
  101. </div>
  102. <div class="bottom-l-b">
  103. 完成车次
  104. </div>
  105. </div>
  106. <div class="bottom-r">
  107. <div class="bottom-r-t">
  108. <b>{{ row2.chart1.chartLine_data.data2 }}</b>次
  109. </div>
  110. <div class="bottom-r-b">
  111. 计划车次
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. <div>
  117. <div id="row2chartLine2" style="height: 185px;" />
  118. <div class="bottom">
  119. <div class="bottom-l">
  120. <div class="bottom-l-t">
  121. <b>{{ row2.chart2.chartLine_data.data1 }}</b>kg
  122. </div>
  123. <div class="bottom-l-b">
  124. 完成重量
  125. </div>
  126. </div>
  127. <div class="bottom-r">
  128. <div class="bottom-r-t">
  129. <b>{{ row2.chart2.chartLine_data.data2 }}</b>kg
  130. </div>
  131. <div class="bottom-r-b">
  132. 计划重量
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. <div class="row3" style="position: relative;">
  140. <div class="title">
  141. <div class="img-title" />
  142. <span class="content">成本统计</span>
  143. </div>
  144. <div v-if="row4.chart1.isChart" class="button">
  145. <div class="exportTable" @click="handleExport('row4chartLine1')">导出</div>
  146. <div class="exportTable" @click="handleTable('row4chartLine1')">切换表格</div>
  147. </div>
  148. <div v-if="row4.chart1.isChart" id="row4chartLine1" v-loading="row4.chart1.listLoading" style="background: #fff;height:310px;" />
  149. <div v-if="row4.chart1.isTable" class="table" style="position: absolute;width: 100%;">
  150. <div class="button">
  151. <div class="exportTable" @click="handleExport('row4chartLine1')">导出</div>
  152. <div class="exportTable" @click="handleChart('row4chartLine1')">切换图表</div>
  153. </div>
  154. <el-table
  155. :key="row4.chart1.table.tableKey"
  156. v-loading="row4.chart1.table.listLoading"
  157. element-loading-text="给我一点时间"
  158. :data="row4.chart1.table.list"
  159. border
  160. fit
  161. highlight-current-row
  162. style="width: 100%;margin-top: 10px;"
  163. height="300"
  164. :row-style="rowStyle"
  165. :cell-style="cellStyle"
  166. class="elTable table-fixed"
  167. >
  168. <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
  169. <el-table-column label="牧场" sortable min-width="110px" align="center" prop="名称" />
  170. <el-table-column label="公斤奶饲料成本(元)" sortable min-width="120px" align="center" prop="准确率" />
  171. </el-table>
  172. </div>
  173. </div>
  174. </div>
  175. <div class="dashboard-r">
  176. <div class="row1">
  177. <div class="row1Title">当前车辆数:{{ row2.carLength }}</div>
  178. <div id="car" ref="car" v-loading="row2.listLoading" class="car">
  179. <div id="carList" ref="carList" class="carList">
  180. <div v-for="(item,index) in row2.list" ref="listW" :key="index" class="listW">
  181. <div ref="list" class="list" :style="{'background': item.background,'color':item.color,'borderColor':item.borderColor}" @click="handleList(index,item)">
  182. <div class="list-t">
  183. <div class="list-t-t">
  184. <el-tooltip :content="item.tname" placement="top">
  185. <span>车辆:{{ item.tname }}</span>
  186. </el-tooltip>
  187. </div>
  188. <div class="list-t-t">
  189. <el-tooltip :content="item.fname" placement="top">
  190. <span v-if="item.inorout == 0">饲料:{{ item.fname }}</span>
  191. <span v-if="item.inorout == 1">栏舍:{{ item.fname }}</span>
  192. </el-tooltip>
  193. </div>
  194. <div class="list-t-t">
  195. <el-tooltip :content="item.remark" placement="top">
  196. <span>描述:{{ item.remark }}</span>
  197. </el-tooltip>
  198. </div>
  199. </div>
  200. <div class="list-b">
  201. <div class="list-b-l">
  202. <div class="left">
  203. <div class="num"><b>{{ item.doneweight }}</b>Kg</div>
  204. <div class="weight">完成重量</div>
  205. </div>
  206. <div class="right" />
  207. </div>
  208. <div class="list-b-l">
  209. <div class="left">
  210. <div class="num"><b>{{ item.leftweight }}</b>Kg</div>
  211. <div class="weight">剩余重量</div>
  212. </div>
  213. <div class="right" />
  214. </div>
  215. <div class="list-b-l">
  216. <div class="left">
  217. <div class="num"><b>{{ item.nowweight }}</b>Kg</div>
  218. <div class="weight">车辆当前载重</div>
  219. </div>
  220. <div class="right" />
  221. </div>
  222. <div class="list-b-l">
  223. <div class="left">
  224. <div class="num"><b>{{ item.lweight }}</b>Kg</div>
  225. <div class="weight">计划重量</div>
  226. </div>
  227. <div class="right" />
  228. </div>
  229. <div class="list-b-l">
  230. <div class="left">
  231. <div class="num"><b>{{ item.donerate }}</b></div>
  232. <div class="weight">完成度</div>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. <!-- <div v-if="item.isChecked" ref="checked" class="img-checked" /> -->
  238. </div>
  239. </div>
  240. </div>
  241. </div>
  242. <div class="row2">
  243. <div class="row2-l" style="position: relative;">
  244. <div class="title">
  245. <div class="img-title" />
  246. <span class="content">计划统计</span>
  247. </div>
  248. <div v-if="row3.chart1.isChart" class="button">
  249. <div class="exportTable" @click="handleExport('row3chartLine1')">导出</div>
  250. <div class="exportTable" @click="handleTable('row3chartLine1')">切换表格</div>
  251. </div>
  252. <div v-if="row3.chart1.isChart" id="row3chartLine1" v-loading="row3.chart1.listLoading" style="background: #fff;height:310px;" />
  253. <div v-if="row3.chart1.isTable" class="table" style="position: absolute;width: 100%;">
  254. <div class="button">
  255. <div class="exportTable" @click="handleExport('row3chartLine1')">导出</div>
  256. <div class="exportTable" @click="handleChart('row3chartLine1')">切换图表</div>
  257. </div>
  258. <el-table
  259. :key="row3.chart1.table.tableKey"
  260. v-loading="row3.chart1.table.listLoading"
  261. element-loading-text="给我一点时间"
  262. :data="row3.chart1.table.list"
  263. border
  264. fit
  265. highlight-current-row
  266. style="width: 100%;margin-top: 10px;"
  267. height="300"
  268. :row-style="rowStyle"
  269. :cell-style="cellStyle"
  270. class="elTable table-fixed"
  271. >
  272. <el-table-column label="牧场" sortable min-width="85px" align="center" prop="牧场" />
  273. <el-table-column label="计划执行重量(kg)" sortable min-width="90px" align="center" prop="实际量" />
  274. <el-table-column label="配方理论重量(kg)" sortable min-width="90px" align="center" prop="理论量" />
  275. <el-table-column label="计划准确率" sortable min-width="85px" align="center" prop="field1" />
  276. <el-table-column label="计划取消重量(kg)" sortable min-width="90px" align="center" prop="计划取消重量" />
  277. <el-table-column label="计划准确率(去除取消重量)" sortable min-width="100px" align="center" prop="field3" />
  278. <el-table-column label="计划正确数" sortable min-width="85px" align="center" prop="正确数" />
  279. <el-table-column label="计划数" sortable min-width="85px" align="center" prop="计划数" />
  280. <el-table-column label="计划正确率" sortable min-width="75px" align="center" prop="field2" />
  281. </el-table>
  282. </div>
  283. </div>
  284. <div class="row2-r" style="position: relative;">
  285. <div class="title">
  286. <div class="img-title" />
  287. <span class="content">泌乳牛干物质采食量</span>
  288. </div>
  289. <div v-if="row3.chart2.isChart" class="button">
  290. <div class="exportTable" @click="handleExport('row3chartLine2')">导出</div>
  291. <div class="exportTable" @click="handleTable('row3chartLine2')">切换表格</div>
  292. </div>
  293. <div v-if="row3.chart2.isChart" id="row3chartLine2" v-loading="row3.chart2.listLoading" style="background: #fff;height:310px;" />
  294. <div v-if="row3.chart2.isTable" class="table" style="position: absolute;width: 100%;">
  295. <div class="button">
  296. <div class="exportTable" @click="handleExport('row3chartLine2')">导出</div>
  297. <div class="exportTable" @click="handleChart('row3chartLine2')">切换图表</div>
  298. </div>
  299. <el-table
  300. :key="row3.chart2.table.tableKey"
  301. v-loading="row3.chart2.table.listLoading"
  302. element-loading-text="给我一点时间"
  303. :data="row3.chart2.table.list"
  304. border
  305. fit
  306. highlight-current-row
  307. style="width: 100%;margin-top: 10px;"
  308. height="300"
  309. :row-style="rowStyle"
  310. :cell-style="cellStyle"
  311. class="elTable table-fixed"
  312. >
  313. <el-table-column label="牧场" sortable min-width="110px" align="center" prop="名称" />
  314. <el-table-column label="泌乳牛干物质采食量(kg)" sortable min-width="110px" align="center" prop="准确率" />
  315. </el-table>
  316. </div>
  317. </div>
  318. </div>
  319. <div class="row3">
  320. <div class="row3-l" style="position: relative;">
  321. <div class="title">
  322. <div class="img-title" />
  323. <span class="content">混料实际重量统计</span>
  324. </div>
  325. <div v-if="row4.chart2.isChart" class="button">
  326. <div class="exportTable" @click="handleExport('row4chartLine2')">导出</div>
  327. <div class="exportTable" @click="handleTable('row4chartLine2')">切换表格</div>
  328. </div>
  329. <div v-if="row4.chart2.isChart" id="row4chartLine2" v-loading="row4.chart2.listLoading" style="background: #fff;height:310px;" />
  330. <div v-if="row4.chart2.isTable" class="table" style="position: absolute;width:100%;">
  331. <div class="button">
  332. <div class="exportTable" @click="handleExport('row4chartLine2')">导出</div>
  333. <div class="exportTable" @click="handleChart('row4chartLine2')">切换图表</div>
  334. </div>
  335. <el-table
  336. :key="row4.chart2.table.tableKey"
  337. v-loading="row4.chart2.table.listLoading"
  338. element-loading-text="给我一点时间"
  339. :data="row4.chart2.table.list"
  340. border
  341. fit
  342. highlight-current-row
  343. style="width: 100%;margin-top: 10px;"
  344. height="300"
  345. :row-style="rowStyle"
  346. :cell-style="cellStyle"
  347. class="elTable table-fixed"
  348. >
  349. <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
  350. <el-table-column label="牧场" sortable min-width="110px" align="center" prop="名称" />
  351. <el-table-column label="混料重量" sortable min-width="110px" align="center" prop="准确率" />
  352. </el-table>
  353. </div>
  354. </div>
  355. <div class="row3-r">
  356. <div class="title">
  357. <div class="img-title" />
  358. <span class="content">库存预警</span>
  359. <!-- <a style="float: right;color: #009C69;font-size: 12px;margin-right: 10px;" @click="handleMore">查看更多 &nbsp;>></a> -->
  360. </div>
  361. <div id="table" style="height: 330px;background: #fff;">
  362. <el-table
  363. :key="row4.table.tableKey"
  364. v-loading="row4.table.listLoading"
  365. element-loading-text="给我一点时间"
  366. :data="row4.table.list"
  367. border
  368. fit
  369. highlight-current-row
  370. style="width: 98%;background: #fff;margin-top: 10px;"
  371. height="320"
  372. :row-style="rowStyle"
  373. :cell-style="cellStyle"
  374. class="elTable table-fixed"
  375. >
  376. <el-table-column label="序号" type="index" min-width="80px" align="center" />
  377. <el-table-column label="饲料名称" min-width="80px" align="center" prop="feedname" />
  378. <el-table-column label="库存量(kg)" min-width="70px" align="center" prop="stockweight" />
  379. <el-table-column label="剩余使用天数" min-width="80px" align="center" prop="ldays" />
  380. </el-table>
  381. </div>
  382. </div>
  383. </div>
  384. </div>
  385. </div>
  386. </div>
  387. </template>
  388. <script>
  389. import { GetDataByName, GetReportform } from '@/api/common'
  390. import Cookies from 'js-cookie'
  391. import { parseTime } from '@/utils/index.js'
  392. import { json2excel } from '@/utils/index.js'
  393. import echarts from 'echarts'
  394. require('echarts/theme/macarons')
  395. export default {
  396. name: 'GroupDashboard',
  397. data() {
  398. return {
  399. ranchSelectionList: [{ id: 0, name: '集团' }, { id: 1, name: '牧场01' }, { id: 2, name: '牧场02' }],
  400. ranchSelection: 0,
  401. inputDatetime: [new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), new Date()],
  402. // inputDatetime: ['2021-07-01', '2021-07-07'],
  403. myDate: parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}') + '-' + parseTime(new Date(), '{y}-{m}-{d}'),
  404. pickerOptions: {
  405. shortcuts: [{
  406. text: '最近一周',
  407. onClick(picker) {
  408. const end = new Date()
  409. const start = new Date()
  410. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
  411. picker.$emit('pick', [start, end])
  412. }
  413. }, {
  414. text: '最近一个月',
  415. onClick(picker) {
  416. const end = new Date()
  417. const start = new Date()
  418. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
  419. picker.$emit('pick', [start, end])
  420. }
  421. }, {
  422. text: '最近一年',
  423. onClick(picker) {
  424. const end = new Date()
  425. const start = new Date()
  426. start.setTime(start.getTime() - 3600 * 1000 * 24 * 365)
  427. picker.$emit('pick', [start, end])
  428. }
  429. }]
  430. },
  431. date: parseTime(new Date(), '{y}-{m}-{d}'),
  432. row1: {
  433. getdataListParm: {
  434. name: 'getHomepageStrJT',
  435. page: 1,
  436. offset: 1,
  437. pagecount: 10,
  438. returntype: 'Map',
  439. parammaps: {
  440. pastureid: Cookies.get('pastureid')
  441. }
  442. },
  443. listLoading: false,
  444. list: [
  445. { 'rateAvg': '', 'rateMAX': '', 'rateMIN': '' },
  446. { 'rateAvg': '', 'rateMAX': '', 'rateMIN': '' },
  447. { 'rateAvg': '', 'rateMAX': '', 'rateMIN': '' },
  448. { 'rateAvg': '', 'rateMAX': '', 'rateMIN': '' }
  449. ],
  450. getdataListParm2: {
  451. name: 'getHomepageStrJTPlan',
  452. page: 1,
  453. offset: 1,
  454. pagecount: 10,
  455. returntype: 'Map',
  456. parammaps: {
  457. pastureid: Cookies.get('pastureid')
  458. }
  459. },
  460. list2: ''
  461. },
  462. row2: {
  463. chart1: {
  464. chartLine: null,
  465. chartLine_data: {}
  466. },
  467. chart2: {
  468. chartLine: null,
  469. chartLine_data: {}
  470. },
  471. list: [],
  472. total: 0,
  473. listLoading: false,
  474. getdataListParmList: {
  475. name: 'getHomepageLBListJT',
  476. page: 1,
  477. offset: 1,
  478. pagecount: '',
  479. returntype: 'Map',
  480. parammaps: {
  481. pastureid: Cookies.get('pastureid')
  482. }
  483. }
  484. },
  485. row3: {
  486. chartDate: [],
  487. chart1: {
  488. chartLine: null,
  489. chartLine_data: {},
  490. getdataListParm: {
  491. name: 'getJT1AccuracyAllJH',
  492. page: 1,
  493. offset: 1,
  494. pagecount: 10,
  495. returntype: 'Map',
  496. parammaps: {
  497. pastureid: Cookies.get('pastureid'),
  498. startTime: parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}'),
  499. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  500. inputDatetime: [new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), new Date()]
  501. }
  502. },
  503. list: [],
  504. total: 0,
  505. listLoading: false,
  506. isChart: true,
  507. isTable: false,
  508. table: {
  509. tableKey: 1,
  510. list: [],
  511. total: 0,
  512. listLoading: false
  513. }
  514. },
  515. chart2: {
  516. chartLine: null,
  517. chartLine_data: {},
  518. getdataListParm: {
  519. name: 'getFeedEffMRJT',
  520. page: 1,
  521. offset: 1,
  522. pagecount: 10,
  523. returntype: 'Map',
  524. parammaps: {
  525. pastureid: Cookies.get('pastureid'),
  526. startTime: parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}'),
  527. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  528. inputDatetime: [new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), new Date()]
  529. }
  530. },
  531. list: [],
  532. total: 0,
  533. listLoading: false,
  534. isChart: true,
  535. isTable: false,
  536. table: {
  537. tableKey: 1,
  538. list: [],
  539. total: 0,
  540. listLoading: false
  541. }
  542. }
  543. },
  544. row4: {
  545. chartDate: [],
  546. chart1: {
  547. chartLine: null,
  548. chartLine_data: {},
  549. getdataListParm: {
  550. name: 'getFeedEffCBAllJT',
  551. page: 1,
  552. offset: 1,
  553. pagecount: 10,
  554. returntype: 'Map',
  555. parammaps: {
  556. pastureid: Cookies.get('pastureid'),
  557. startTime: parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}'),
  558. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  559. inputDatetime: [new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), new Date()]
  560. }
  561. },
  562. list: [],
  563. total: 0,
  564. listLoading: false,
  565. isChart: true,
  566. isTable: false,
  567. table: {
  568. tableKey: 1,
  569. list: [],
  570. total: 0,
  571. listLoading: false
  572. }
  573. },
  574. chart2: {
  575. chartLine: null,
  576. chartLine_data: {},
  577. getdataListParm: {
  578. name: 'getAccuracActHLJT',
  579. page: 1,
  580. offset: 1,
  581. pagecount: 10,
  582. returntype: 'Map',
  583. parammaps: {
  584. pastureid: Cookies.get('pastureid'),
  585. startTime: parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}'),
  586. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  587. inputDatetime: [new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), new Date()]
  588. }
  589. },
  590. list: [],
  591. total: 0,
  592. listLoading: false,
  593. isChart: true,
  594. isTable: false,
  595. table: {
  596. tableKey: 1,
  597. list: [],
  598. total: 0,
  599. listLoading: false
  600. }
  601. },
  602. table: {
  603. getdataListParm: {
  604. name: 'getFsWarnListJT',
  605. page: 1,
  606. offset: 1,
  607. pagecount: 5,
  608. returntype: 'Map',
  609. parammaps: {
  610. pastureid: Cookies.get('pastureid')
  611. }
  612. },
  613. tableKey: 1,
  614. list: [],
  615. total: 0,
  616. listLoading: false,
  617. temp: {}
  618. }
  619. },
  620. rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
  621. cellStyle: { padding: 0 + 'px' }
  622. }
  623. },
  624. created() {
  625. this.getRow1List()
  626. this.getRow2List()
  627. this.getRow2List1()
  628. this.getRow3List1()
  629. this.getRow3List2()
  630. this.getRow4List1()
  631. this.getRow4List2()
  632. this.getRow4List3()
  633. },
  634. methods: {
  635. changeDate(item) {
  636. this.myDate = parseTime(this.inputDatetime[0], '{y}-{m}-{d}') + '-' + parseTime(this.inputDatetime[1], '{y}-{m}-{d}')
  637. this.getRow1List()
  638. },
  639. getRow1List() {
  640. this.row1.listLoading = true
  641. this.row1.getdataListParm.parammaps.startTime = parseTime(this.inputDatetime[0], '{y}-{m}-{d}')
  642. this.row1.getdataListParm.parammaps.stopTime = parseTime(this.inputDatetime[1], '{y}-{m}-{d}')
  643. GetDataByName(this.row1.getdataListParm).then(response => {
  644. if (response.data !== null && response.data.list !== null) {
  645. console.log('row1数据', response.data.list)
  646. for (let i = 0; i < response.data.list.length; i++) {
  647. if (response.data.list[i].rateAvg == undefined) {
  648. this.$set(response.data.list[i], 'rateAvg', '')
  649. }
  650. if (response.data.list[i].rateMAX == undefined) {
  651. this.$set(response.data.list[i], 'rateMAX', '')
  652. }
  653. if (response.data.list[i].rateMIN == undefined) {
  654. this.$set(response.data.list[i], 'rateMIN', '')
  655. }
  656. }
  657. this.row1.list = response.data.list
  658. console.log(this.row1.list, 'this.row1.list')
  659. } else {
  660. this.row1.list.data1.monRateHL = ''
  661. this.row1.list.data1.monRateSL = ''
  662. this.row1.list.data1.monRateSLR = ''
  663. this.row1.list.data1.yesRateHL = ''
  664. this.row1.list.data1.yesRateSL = ''
  665. this.row1.list.data1.yesRateSLR = ''
  666. this.row1.list.data1.temtime = ''
  667. this.row1.list.data1.montime = ''
  668. }
  669. setTimeout(() => {
  670. this.row1.listLoading = false
  671. }, 100)
  672. })
  673. },
  674. getRow2List() {
  675. this.row1.listLoading = true
  676. this.row1.getdataListParm.parammaps.startTime = parseTime(this.inputDatetime[0], '{y}-{m}-{d}')
  677. this.row1.getdataListParm.parammaps.stopTime = parseTime(this.inputDatetime[1], '{y}-{m}-{d}')
  678. GetDataByName(this.row1.getdataListParm2).then(response => {
  679. if (response.data !== null && response.data.list !== null) {
  680. this.row2.chart1.chartLine_data.data1 = parseFloat(response.data.list[0].doneTimes)
  681. this.row2.chart1.chartLine_data.data2 = parseFloat(response.data.list[0].planTimes)
  682. this.row2.chart2.chartLine_data.data1 = parseFloat(response.data.list[0].doneWeight)
  683. this.row2.chart2.chartLine_data.data2 = parseFloat(response.data.list[0].planWeight)
  684. this.roadRow1ChartLine1(this.row2.chart1.chartLine_data)
  685. this.roadRow1ChartLine2(this.row2.chart2.chartLine_data)
  686. } else {
  687. this.row2.chart1.chartLine_data.data1 = ''
  688. this.row2.chart1.chartLine_data.data2 = ''
  689. this.row2.chart2.chartLine_data.data1 = ''
  690. this.row2.chart2.chartLine_data.data2 = ''
  691. }
  692. setTimeout(() => {
  693. this.row1.listLoading = false
  694. }, 100)
  695. })
  696. },
  697. // 今日计划统计-完成车次
  698. roadRow1ChartLine1(chartLine_data) {
  699. console.log(chartLine_data, '======')
  700. if (this.row2.chart1.chartLine != null) {
  701. this.row2.chart1.chartLine.dispose()
  702. }
  703. this.row2.chart1.chartLine = echarts.init(document.getElementById('row2chartLine1'))
  704. if (chartLine_data.data2 == 0 || chartLine_data.data1 == 0) {
  705. chartLine_data.data1 = 0
  706. chartLine_data.data2 = 100
  707. }
  708. var option = {
  709. // 标题组件,包含主标题和副标题
  710. title: { show: true, x: 'center', textStyle: { fontSize: '15', color: 'green', fontWeight: 'bold' }},
  711. // 提示框组件
  712. tooltip: {
  713. show: false, trigger: 'item', formatter: '{a} <br/>{b}: {c} ({d}%)'
  714. },
  715. // 系列列表。每个系列通过 type 决定自己的图表类型
  716. series: [{
  717. name: '任务进度', type: 'pie', radius: ['80%', '70%'], avoidLabelOverlap: false, hoverAnimation: false, labelLine: { normal: { show: false }},
  718. data: [
  719. { value: chartLine_data.data1, name: '完成率', selected: false, label: { normal: { show: true, position: 'center', fontSize: 20, formatter: '{b}\n{d}%' }}},
  720. { value: chartLine_data.data2 - chartLine_data.data1, label: { normal: { show: false }}}
  721. ]
  722. }],
  723. color: ['#409EFF', '#B7DBFF']
  724. }
  725. this.row2.chart1.chartLine.setOption(option)
  726. window.onresize = function() {
  727. this.row2.chart1.chartLine.resize()
  728. }
  729. },
  730. // 今日计划统计-完成重量
  731. roadRow1ChartLine2(chartLine_data) {
  732. if (this.row2.chart2.chartLine != null) {
  733. this.row2.chart2.chartLine.dispose()
  734. }
  735. this.row2.chart2.chartLine = echarts.init(document.getElementById('row2chartLine2'))
  736. var option = {
  737. // 标题组件,包含主标题和副标题
  738. title: {
  739. show: true,
  740. x: 'center',
  741. textStyle: {
  742. fontSize: '15',
  743. color: 'green',
  744. fontWeight: 'bold'
  745. }
  746. },
  747. // 提示框组件
  748. tooltip: {
  749. // 是否显示提示框组件,包括提示框浮层和 axisPointe
  750. show: false,
  751. // 触发类型: item:数据项触发,axis:坐标轴触发
  752. trigger: 'item',
  753. formatter: '{a} <br/>{b}: {c} ({d}%)'
  754. },
  755. // 系列列表。每个系列通过 type 决定自己的图表类型
  756. series: [{
  757. // 系列名称,用于tooltip的显示,legend 的图例筛选,在 setOption 更新数据和配置项时用于指定对应的系列。
  758. name: '任务进度',
  759. type: 'pie',
  760. // 饼图的半径,数组的第一项是内半径,第二项是外半径
  761. radius: ['80%', '70%'],
  762. // 是否启用防止标签重叠策略,默认开启
  763. avoidLabelOverlap: false,
  764. hoverAnimation: false,
  765. // 标签的视觉引导线样式,在 label 位置 设置为'outside'的时候会显示视觉引导线
  766. labelLine: {
  767. normal: {
  768. show: false
  769. }
  770. },
  771. data: [{
  772. value: chartLine_data.data1, // 数据值
  773. name: '完成率', // 数据项名称
  774. selected: false, // 该数据项是否被选中
  775. // 单个扇区的标签配置
  776. label: {
  777. normal: {
  778. show: true, // 是显示标签
  779. position: 'center',
  780. fontSize: 20,
  781. // 标签内容格式器,支持字符串模板和回调函数两种形式,字符串模板与回调函数返回的字符串均支持用 \n 换行
  782. formatter: '{b}\n{d}%'
  783. }
  784. }
  785. }, {
  786. value: chartLine_data.data2 - chartLine_data.data1,
  787. label: {
  788. normal: {
  789. show: false
  790. }
  791. }
  792. }]
  793. }],
  794. color: ['#409EFF', '#B7DBFF']
  795. }
  796. this.row2.chart2.chartLine.setOption(option)
  797. window.onresize = function() {
  798. this.row2.chart2.chartLine.resize()
  799. }
  800. },
  801. // 今日执行计划监控
  802. getRow2List1() {
  803. this.row2.listLoading2 = true
  804. GetDataByName(this.row2.getdataListParmList).then(response => {
  805. if (response.data.list !== null) {
  806. for (let i = 0; i < response.data.list.length; i++) {
  807. this.$set(response.data.list[i], 'background', '#f3f9f7')
  808. this.$set(response.data.list[i], 'borderColor', '#009d6a')
  809. }
  810. this.row2.list = response.data.list
  811. this.row2.carLength = response.data.total
  812. } else {
  813. this.carLength = 0
  814. }
  815. setTimeout(() => {
  816. this.row2.listLoading2 = false
  817. }, 100)
  818. })
  819. },
  820. handleTable(item) {
  821. console.log(item)
  822. if (item == 'row3chartLine1') {
  823. console.log('计划统计表格')
  824. this.row3.chart1.isTable = true
  825. this.row3.chart1.isChart = false
  826. } else if (item == 'row3chartLine2') {
  827. console.log('泌乳牛采食量表格')
  828. this.row3.chart2.isTable = true
  829. this.row3.chart2.isChart = false
  830. } else if (item == 'row4chartLine1') {
  831. console.log('成本统计表格')
  832. this.row4.chart1.isTable = true
  833. this.row4.chart1.isChart = false
  834. } else if (item == 'row4chartLine2') {
  835. console.log('混料实际重量统计表格')
  836. this.row4.chart2.isTable = true
  837. this.row4.chart2.isChart = false
  838. }
  839. },
  840. handleChart(item) {
  841. console.log(item)
  842. // 显示切换图表
  843. if (item == 'row3chartLine1') {
  844. console.log('计划统计图表')
  845. this.row3.chart1.isTable = false
  846. this.row3.chart1.isChart = true
  847. this.getRow3List1()
  848. } else if (item == 'row3chartLine2') {
  849. console.log('泌乳牛采食量图表')
  850. this.row3.chart2.isTable = false
  851. this.row3.chart2.isChart = true
  852. this.getRow3List2()
  853. } else if (item == 'row4chartLine1') {
  854. console.log('成本统计图表')
  855. this.row4.chart1.isTable = false
  856. this.row4.chart1.isChart = true
  857. this.getRow4List1()
  858. } else if (item == 'row4chartLine2') {
  859. console.log('混料实际重量统计图表')
  860. this.row4.chart2.isTable = false
  861. this.row4.chart2.isChart = true
  862. this.getRow4List2()
  863. }
  864. },
  865. handleExport(item) {
  866. console.log(item)
  867. // 显示切换图表
  868. if (item == 'row3chartLine1') {
  869. console.log('计划统计')
  870. var excelDatasTabChart1 = [
  871. {
  872. tHeader: ['日期', '计划执行重量(kg)', '配方理论重量(kg)', '计划准确率', '计划取消重量(kg)', '计划准确率(去除取消重量)', '计划正确数', '计划数', '计划正确率'],
  873. filterVal: ['日期', '实际量', '理论量', 'field1', '计划取消重量', 'field3', '正确数', '计划数', 'field2'],
  874. tableDatas: this.row3.chart1.table.list,
  875. sheetName: '计划统计'
  876. }
  877. ]
  878. json2excel(excelDatasTabChart1, '计划统计', true, 'xlsx')
  879. }
  880. },
  881. // 计划统计
  882. getRow3List1() {
  883. this.row3.chart1.listLoading = true
  884. console.log(this.row3.chart1.getdataListParm.name, '计划统计接口')
  885. GetReportform(this.row3.chart1.getdataListParm).then(response => {
  886. if (response.data.list !== null) {
  887. this.row3.chart1.table.list = response.data.data
  888. this.row3.chart1.chartLine_data = response.data.list
  889. this.row3.chart1.total = response.data.total
  890. console.log('计划统计图数据', this.row3.chart1.chartLine_data)
  891. console.log('计划统计表数据', this.row3.chart1.table.list)
  892. this.roadRow3ChartLine1(this.row3.chart1.chartLine_data)
  893. } else {
  894. this.row3.chart1.table.list = []
  895. }
  896. setTimeout(() => {
  897. this.row3.chart1.listLoading = false
  898. }, 100)
  899. })
  900. },
  901. roadRow3ChartLine1(chartLine_data) {
  902. if (this.row3.chart1.chartLine != null) {
  903. this.row3.chart1.chartLine.dispose()
  904. }
  905. this.row3.chart1.chartLine = echarts.init(document.getElementById('row3chartLine1'))
  906. var option = {
  907. tooltip: { trigger: 'axis', axisPointer: { type: 'cross', crossStyle: { color: '#999' }}},
  908. legend: { data: ['计划准确率', '计划正确率', '计划准确率(去除取消重量)'] },
  909. xAxis: [{ type: 'category', data: chartLine_data.data1, axisPointer: { type: 'shadow' }}],
  910. yAxis: [{ type: 'value', name: '百分比', min: 0, max: 100, interval: 20, axisLabel: { formatter: '{value}' }}],
  911. series: [
  912. { name: '计划准确率', type: 'bar', itemStyle: { normal: { color: '#7ecf51' }}, data: chartLine_data.data2, markLine: { data: [{ type: 'average' }], symbol: ['none', 'none'], position: 'insideTopCenter', itemStyle: { normal: { lineStyle: { type: 'dotted', width: 3 }, label: { show: true, position: 'middle', formatter: '' }}}, large: true, effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }}},
  913. { name: '计划正确率', type: 'bar', itemStyle: { normal: { color: '#ff6600' }}, data: chartLine_data.data3, markLine: { data: [{ type: 'average' }], symbol: ['none', 'none'], position: 'insideTopCenter', itemStyle: { normal: { lineStyle: { type: 'dotted', width: 3 }, label: { show: true, position: 'middle', formatter: '' }}}, large: true, effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }}},
  914. { name: '计划准确率(去除取消重量)', type: 'bar', itemStyle: { normal: { color: '#61a5e8' }}, data: chartLine_data.data4, markLine: { data: [{ type: 'average' }], symbol: ['none', 'none'], position: 'insideTopCenter', itemStyle: { normal: { lineStyle: { type: 'dotted', width: 3 }, label: { show: true, position: 'middle', formatter: '' }}}, large: true, effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }}}
  915. ]
  916. }
  917. this.row3.chart1.chartLine.setOption(option)
  918. window.onresize = function() {
  919. this.row3.chart1.chartLine.resize()
  920. }
  921. },
  922. // 泌乳牛干物质采食量
  923. getRow3List2() {
  924. this.row3.chart2.listLoading = true
  925. GetReportform(this.row3.chart2.getdataListParm).then(response => {
  926. console.log('泌乳牛干物质采食量数据', response)
  927. if (response.data.list !== null) {
  928. for (let i = 0; i < response.data.data.length; i++) {
  929. if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
  930. response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
  931. }
  932. if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
  933. response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
  934. }
  935. }
  936. this.row3.chart2.table.list = response.data.data
  937. this.row3.chart2.chartLine_data = response.data.list
  938. this.row3.chart2.total = response.data.total
  939. if (this.row3.chart2.chartLine_data.data1.length == 0) {
  940. this.row3.chart2.chartLine_data.title = '暂无数据'
  941. } else {
  942. this.row3.chart2.chartLine_data.title = ''
  943. }
  944. this.roadRow3ChartLine2(this.row3.chart2.chartLine_data)
  945. } else {
  946. this.row3.chart2.list = []
  947. }
  948. setTimeout(() => {
  949. this.row3.chart2.listLoading = false
  950. }, 100)
  951. })
  952. },
  953. roadRow3ChartLine2(chartLine_data) {
  954. if (this.row3.chart2.chartLine != null) {
  955. this.row3.chart2.chartLine.dispose()
  956. }
  957. this.row3.chart2.chartLine = echarts.init(document.getElementById('row3chartLine2'))
  958. var option = {
  959. title: {
  960. text: ''
  961. },
  962. tooltip: {
  963. trigger: 'axis'
  964. },
  965. legend: {
  966. data: chartLine_data.data1,
  967. right: 10
  968. },
  969. grid: {
  970. top: '20%',
  971. left: '3%',
  972. right: '8%',
  973. containLabel: true
  974. },
  975. toolbox: {
  976. show: true,
  977. right: '2%',
  978. feature: {}
  979. },
  980. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
  981. yAxis: {
  982. type: 'value', name: 'kg', axisLabel: { formatter: '{value}' }
  983. },
  984. series: (function() {
  985. var serie = []
  986. for (var i = 0; i < chartLine_data.data3.length; i++) {
  987. var item = {
  988. name: chartLine_data.data1[i],
  989. type: 'line',
  990. data: chartLine_data.data3[i].data
  991. }
  992. serie.push(item)
  993. }
  994. return serie
  995. }())
  996. }
  997. this.row3.chart2.chartLine.setOption(option)
  998. window.onresize = function() {
  999. this.row3.chart2.chartLine.resize()
  1000. }
  1001. },
  1002. // 成本统计
  1003. getRow4List1() {
  1004. this.row4.chart1.listLoading = true
  1005. console.log(this.row4.chart1.getdataListParm.name)
  1006. GetReportform(this.row4.chart1.getdataListParm).then(response => {
  1007. if (response.data !== null && response.data.list !== null) {
  1008. console.log('成本统计数据', response.data.list)
  1009. this.row4.chart1.table.list = response.data.data
  1010. this.row4.chart1.chartLine_data = response.data.list
  1011. this.row4.chart1.total = response.data.total
  1012. } else {
  1013. this.row4.chart1.list = []
  1014. }
  1015. this.roadRow4ChartLine1(this.row4.chart1.chartLine_data)
  1016. setTimeout(() => {
  1017. this.row4.chart1.listLoading = false
  1018. }, 100)
  1019. })
  1020. },
  1021. roadRow4ChartLine1(chartLine_data) {
  1022. console.log(chartLine_data, '成本统计chartLine_data')
  1023. if (this.row4.chart1.chartLine != null) {
  1024. this.row4.chart1.chartLine.dispose()
  1025. }
  1026. this.row4.chart1.chartLine = echarts.init(document.getElementById('row4chartLine1'))
  1027. var option = {
  1028. title: {
  1029. text: ''
  1030. },
  1031. tooltip: {
  1032. trigger: 'axis'
  1033. },
  1034. legend: {
  1035. data: chartLine_data.data1,
  1036. right: 10
  1037. },
  1038. grid: {
  1039. top: '20%',
  1040. left: '5%',
  1041. right: '8%',
  1042. containLabel: true
  1043. },
  1044. toolbox: {
  1045. show: true,
  1046. right: '2%',
  1047. feature: {}
  1048. },
  1049. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
  1050. yAxis: {
  1051. type: 'value', name: 'kg', axisLabel: { formatter: '{value}' }
  1052. },
  1053. series: (function() {
  1054. var serie = []
  1055. for (var i = 0; i < chartLine_data.data3.length; i++) {
  1056. var item = {
  1057. name: chartLine_data.data1[i],
  1058. type: 'line',
  1059. data: chartLine_data.data3[i].data
  1060. }
  1061. serie.push(item)
  1062. }
  1063. return serie
  1064. }())
  1065. }
  1066. this.row4.chart1.chartLine.setOption(option)
  1067. window.onresize = function() {
  1068. this.row4.chart1.chartLine.resize()
  1069. }
  1070. },
  1071. // 混料实际重量统计
  1072. getRow4List2() {
  1073. this.row4.chart2.listLoading = true
  1074. GetReportform(this.row4.chart2.getdataListParm).then(response => {
  1075. if (response.data !== null && response.data.list !== null) {
  1076. console.log('混料实际重量统计数据', response.data.list)
  1077. this.row4.chart2.table.list = response.data.data
  1078. this.row4.chart2.chartLine_data = response.data.list
  1079. this.row4.chart2.total = response.data.total
  1080. } else {
  1081. this.row4.chart2.list = []
  1082. }
  1083. this.roadRow4ChartLine2(this.row4.chart2.chartLine_data)
  1084. setTimeout(() => {
  1085. this.row4.chart2.listLoading = false
  1086. }, 100)
  1087. })
  1088. },
  1089. roadRow4ChartLine2(chartLine_data) {
  1090. if (this.row4.chart2.chartLine != null) {
  1091. this.row4.chart2.chartLine.dispose()
  1092. }
  1093. this.row4.chart2.chartLine = echarts.init(document.getElementById('row4chartLine2'))
  1094. var option = {
  1095. title: {
  1096. text: ''
  1097. },
  1098. tooltip: {
  1099. trigger: 'axis'
  1100. },
  1101. legend: {
  1102. data: chartLine_data.data1,
  1103. right: 10
  1104. },
  1105. grid: {
  1106. top: '20%',
  1107. left: '5%',
  1108. right: '8%',
  1109. containLabel: true
  1110. },
  1111. toolbox: {
  1112. show: true,
  1113. right: '2%',
  1114. feature: {}
  1115. },
  1116. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
  1117. yAxis: {
  1118. type: 'value', name: 'kg', axisLabel: { formatter: '{value}' }
  1119. },
  1120. series: (function() {
  1121. var serie = []
  1122. for (var i = 0; i < chartLine_data.data3.length; i++) {
  1123. var item = {
  1124. name: chartLine_data.data1[i],
  1125. type: 'line',
  1126. data: chartLine_data.data3[i].data
  1127. }
  1128. serie.push(item)
  1129. }
  1130. return serie
  1131. }())
  1132. }
  1133. this.row4.chart2.chartLine.setOption(option)
  1134. window.onresize = function() {
  1135. this.row4.chart2.chartLine.resize()
  1136. }
  1137. },
  1138. getRow4List3() {
  1139. this.row4.table.listLoading = true
  1140. GetDataByName(this.row4.table.getdataListParm).then(response => {
  1141. if (response.data.list !== null) {
  1142. console.log('库存预警table数据', response.data.list)
  1143. this.row4.table.list = response.data.list
  1144. this.row4.table.total = response.data.total
  1145. } else {
  1146. this.row4.table.list = []
  1147. }
  1148. setTimeout(() => {
  1149. this.row4.table.listLoading = false
  1150. }, 100)
  1151. })
  1152. }
  1153. }
  1154. }
  1155. </script>
  1156. <style>
  1157. .app-main{background:#f5f5f5;}
  1158. </style>
  1159. <style lang="scss" scoped>
  1160. .dashboard-editor-container{padding-left: 10px;background: #f5f5f5;padding-bottom: 10px;}
  1161. // 公共
  1162. .img-t{position: absolute;left: 0;right: 0;margin: 30px auto;width: 31%;height: 31%;background-size: 100% 100%;}
  1163. .row1-c-l-c{
  1164. margin: 20px auto;border: 1px solid #eee;height: 40%;width: 50%;border-radius: 50%;text-align: center;display:table;
  1165. span{
  1166. height:100%;display:table-cell;vertical-align: middle;font-size:14px;color: #009C69;
  1167. b{padding-bottom: 10px;font-size: 16px;overflow: hidden;width: 100%;}
  1168. }
  1169. }
  1170. .row1-c-l-b{
  1171. width: 100%;text-align: center;display:table;font-size: 12px;
  1172. // div{
  1173. // font-size: 12px;height:100%;display:table-cell;vertical-align: middle;color: #323232;padding: 0 10px;width: 100%;
  1174. // span{text-align: right;width: 75%;display: block;float: left;}
  1175. // b{float: left;display: block;width: 25%;}
  1176. // }
  1177. }
  1178. .title{
  1179. height: 36px;padding-top: 7px;line-height: 36px;position: relative;
  1180. .img-title{
  1181. position: absolute;top: 10px; right:10px;bottom:0;left:20px;width: 30px;height: 30px;background: url(../../../assets/images/index/row-bg3.png) no-repeat;
  1182. }
  1183. .content{font-size: 18px;position: absolute;top: 7px;left: 55px;}
  1184. }
  1185. .title1{
  1186. height: 36px;padding-top: 7px;line-height: 36px;position: relative;
  1187. .img-title{
  1188. position: absolute;top: 10px; right:10px;bottom:0;left:10px;
  1189. width: 25px;height: 25px;
  1190. img{width: 25px;height: 25px;}
  1191. }
  1192. .content{font-size: 16px;position: absolute;top: 7px;left: 40px;}
  1193. }
  1194. .button{
  1195. height: 30px;
  1196. .exportTable{float: right;margin-right: 5px;}
  1197. }
  1198. .dashboard{
  1199. display: flex;margin-top: 10px;
  1200. .dashboard-l{
  1201. // width: 540px;
  1202. width: 30%;
  1203. .row1{
  1204. height: 520px;
  1205. .row1-t{
  1206. background: #fff; height: 50px; color: #f28b46;
  1207. .row1-t-l{
  1208. .img-l{float:left;padding: 16px 0 16px 10px;width: 100px;height: 18px;}
  1209. .content{float:left;width: 68%;font-size: 14px;margin-top: 5px;}
  1210. }
  1211. .row1-t-r{padding-right: 20px;text-align: right;line-height: 50px;}
  1212. }
  1213. .row1-c{
  1214. display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between;margin-top: 10px;
  1215. .row1-c-l{
  1216. background: #fff;width:49%;height:225px;border-radius:3px;margin-right: 1%;position: relative;
  1217. .img-t{width:49%;height:38%;background: url(../../../assets/images/index/t1.png) no-repeat; background-size: 100% 100%;}
  1218. }
  1219. .row1-c-r{
  1220. background: #fff;width:49%;height:225px;border-radius:3px;position: relative;
  1221. .img-t{width:49%;height:38%;background: url(../../../assets/images/index/t2.png) no-repeat; background-size: 100% 100%;}
  1222. }
  1223. }
  1224. .row1-b{
  1225. display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between;margin-top: 10px;
  1226. .row1-b-l{
  1227. background: #fff;width:49%;height:225px;border-radius:3px;margin-right:1%;position: relative;
  1228. .img-t{width:49%;height:38%;background: url(../../../assets/images/index/t4.png) no-repeat; background-size: 100% 100%;}
  1229. }
  1230. .row1-b-r{
  1231. background: #fff;width:49%;height:225px;border-radius:3px;position: relative;
  1232. .img-t{width:49%;height:38%;background: url(../../../assets/images/index/t3.png) no-repeat; background-size: 100% 100%;}
  1233. }
  1234. }
  1235. }
  1236. .row2{
  1237. margin-top:10px;height: 375px;background: #fff;
  1238. .img-title{background-position: 0 0;}
  1239. .todayPlan{
  1240. display: flex; flex-direction: row;margin-top: 10px;
  1241. div{
  1242. flex: 1;position: relative;
  1243. .bottom{
  1244. width: 99%;height: 70px;background: #f9f9f9;margin: 30px auto 5px;display: flex; flex-direction: row;
  1245. div{
  1246. flex: 1;height: 42px;color: #333333;
  1247. }
  1248. .bottom-l{
  1249. border-right: 1px solid #e0e0e0;margin-top: 15px;width: 100%;text-align: center;
  1250. .bottom-l-t{
  1251. height: 30px;
  1252. b{font-size: 18px;}
  1253. }
  1254. .bottom-l-b{font-size: 12px;}
  1255. }
  1256. .bottom-r{
  1257. margin-top: 15px;width: 100%;text-align: center;
  1258. .bottom-r-t{height: 30px;padding-left: 10px;}
  1259. .bottom-r-b{padding-left: 10px;font-size: 12px;}
  1260. }
  1261. }
  1262. }
  1263. }
  1264. }
  1265. .row3{
  1266. margin-top:10px;height: 375px;background: #fff;
  1267. .img-title{background-position: 0 -90px;}
  1268. }
  1269. }
  1270. .dashboard-r{
  1271. margin-left: 10px;flex:1;
  1272. .row1{
  1273. height: 520px;background: #fff;
  1274. .row1Title{float: right;height: 50px;line-height: 50px;margin-right: 50px;}
  1275. .img-title{background-position: 0 -240px;}
  1276. #row2chartLine3{height: 270px;margin-top: 10px;}
  1277. .carsLength{
  1278. padding: 13px 0 0 22px;line-height: 38px;font-size: 18px;font-weight: 700;
  1279. }
  1280. .car{
  1281. clear: both;
  1282. .carList{
  1283. padding:0 30px;overflow: auto;width: 100%;height: 470px;
  1284. .listW{
  1285. background: #f3f9f7; float: left;margin: 5px 5px;width: 32%;height: 120px;
  1286. .list{
  1287. width: 100%;height: 100%;border-radius: 5px;border:1px solid #000;
  1288. .list-t{
  1289. display: flex;
  1290. border-bottom: 1px solid #f1f1f1;
  1291. .list-t-t{
  1292. flex: 1 1;
  1293. width: 0;font-size: 12px;line-height: 22px;padding: 25px 5px 15px;text-align: center;
  1294. span{ display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  1295. }
  1296. }
  1297. .list-b{
  1298. display: flex; text-align: center;margin-top: 14px;color: #323232;
  1299. .list-b-l{
  1300. flex: 1;width: 0; height: 40px; position: relative;
  1301. .left{
  1302. .num{
  1303. font-size: 12px;
  1304. b{font-size: 12px;}
  1305. }
  1306. .weight{font-size: 12px;}
  1307. }
  1308. .right{
  1309. height: 30px;width: 1px;background: #e0e0e0;position: absolute;right: 0;top: 0;bottom: 0;margin-top:auto;margin-bottom:auto
  1310. }
  1311. }
  1312. }
  1313. }
  1314. }
  1315. }
  1316. }
  1317. }
  1318. .row2{
  1319. margin-top:10px;height: 375px;
  1320. display: flex; flex-direction: row;
  1321. .row2-l{
  1322. margin-right: 10px; background: #fff;height:375px;border-radius:3px;flex: 1;
  1323. .img-title{background-position: 0 -30px;}
  1324. }
  1325. .row2-r{
  1326. background: #fff;height:375px;border-radius:3px;flex: 1;
  1327. .img-title{background-position: 0 -60px;}
  1328. }
  1329. }
  1330. .row3{
  1331. margin-top:10px;height: 375px;
  1332. display: flex; flex-direction: row;
  1333. .row3-l{
  1334. margin-right: 10px; background: #fff;height:375px;border-radius:3px;flex: 1;
  1335. .img-title{background-position: 0 -120px;}
  1336. }
  1337. .row3-r{
  1338. background: #fff;height:375px;border-radius:3px;flex: 1;
  1339. .img-title{background-position: 0 -150px;}
  1340. }
  1341. }
  1342. }
  1343. }
  1344. </style>