afd9a1b10b8c7acd58a1851e2bbc4f8f41bda029.svn-base 89 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969
  1. <template>
  2. <div class="app-content">
  3. <div class="search">
  4. <el-date-picker
  5. ref="inputDatetime"
  6. v-model="table.getdataListParm.parammaps.inputDatetime"
  7. :clearable="false"
  8. class="inputDatetime filter-item"
  9. type="daterange"
  10. range-separator="至"
  11. start-placeholder="开始日期"
  12. end-placeholder="结束日期"
  13. style="width: 250px;"
  14. :picker-options="pickerOptions"
  15. @change="changeDate"
  16. />
  17. <el-button class="export" @click="handleDownload">导出</el-button>
  18. </div>
  19. <div class="table">
  20. <h4>混料</h4>
  21. <el-table
  22. :key="table.tableKey"
  23. v-loading="table.listLoading"
  24. element-loading-text="给我一点时间"
  25. :data="table.list"
  26. border
  27. fit
  28. highlight-current-row
  29. style="width: 100%;"
  30. :row-style="rowStyle"
  31. :cell-style="tableCellStyle"
  32. class="elTable table-fixed"
  33. >
  34. <el-table-column label="牧场" min-width="110px" align="center">
  35. <template slot-scope="{row}">
  36. <a @click="clickPasture(row)">{{ row.pasturename }}</a>
  37. </template>
  38. </el-table-column>
  39. <el-table-column label="理论重量" min-width="110px" align="center" prop="理论重量" />
  40. <el-table-column label="实际重量" min-width="110px" align="center" prop="实际重量" />
  41. <el-table-column label="计划混料操作数" min-width="110px" align="center" prop="计划混料操作数" />
  42. <el-table-column label="已混料操作数" min-width="110px" align="center" prop="已混料操作数" />
  43. <el-table-column label="混料操作率" min-width="110px" align="center" prop="混料操作率" />
  44. <el-table-column label="混料误差值" min-width="110px" align="center" prop="混料误差值" />
  45. <el-table-column label="混料准确率" min-width="110px" align="center" prop="混料准确率" />
  46. <el-table-column label="混料自动跳转次数" min-width="110px" align="center" prop="混料自动跳转次数" />
  47. <el-table-column label="混料手动跳转次数" min-width="110px" align="center" prop="混料手动跳转次数" />
  48. <el-table-column label="取消次数" min-width="110px" align="center" prop="取消次数" />
  49. <el-table-column label="标准差" min-width="110px" align="center" prop="方差" />
  50. </el-table>
  51. <h4>撒料</h4>
  52. <el-table
  53. :key="table2.tableKey"
  54. v-loading="table2.listLoading"
  55. element-loading-text="给我一点时间"
  56. :data="table2.list"
  57. border
  58. fit
  59. highlight-current-row
  60. style="width: 100%;"
  61. :row-style="rowStyle"
  62. :cell-style="tableCellStyle"
  63. class="elTable table-fixed"
  64. >
  65. <el-table-column label="牧场" min-width="110px" align="center">
  66. <template slot-scope="{row}">
  67. <a @click="clickPasture(row)">{{ row.pasturename }}</a>
  68. </template>
  69. </el-table-column>
  70. <el-table-column label="理论重量" min-width="110px" align="center" prop="理论重量" />
  71. <el-table-column label="实际重量" min-width="110px" align="center" prop="实际重量" />
  72. <el-table-column label="计划撒料操作数" min-width="110px" align="center" prop="计划撒料操作数" />
  73. <el-table-column label="已撒料操作数" min-width="110px" align="center" prop="已撒料操作数" />
  74. <el-table-column label="撒料操作率" min-width="110px" align="center" prop="撒料操作率" />
  75. <el-table-column label="撒料误差值" min-width="110px" align="center" prop="撒料误差值" />
  76. <el-table-column label="撒料准确率" min-width="110px" align="center" prop="撒料准确率" />
  77. <el-table-column label="撒料自动跳转次数" min-width="110px" align="center" prop="撒料自动跳转次数" />
  78. <el-table-column label="撒料手动跳转次数" min-width="110px" align="center" prop="撒料手动跳转次数" />
  79. <el-table-column label="标准差" min-width="110px" align="center" prop="方差" />
  80. </el-table>
  81. </div>
  82. <div id="chartDate" style="height: 90px;" />
  83. <div class="AnalysisChart">
  84. <el-row :gutter="10">
  85. <el-col :span="2"><h4>图表查询时间:</h4></el-col>
  86. <el-col :span="22" style="margin-bottom: 40px;">
  87. <el-date-picker v-model="chartDate" :clearable="false" style="width: 250px;margin-right: 10px;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" />
  88. <el-button class="successBorder" @click="handleChartDate">确认</el-button>
  89. </el-col>
  90. </el-row>
  91. <el-row :gutter="10">
  92. <!-- 计划统计 -->
  93. <el-col :span="12" style="position: relative;">
  94. <h4 style="text-align:center;">计划统计</h4>
  95. <div>
  96. <el-date-picker v-model="chart1.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 250px;" class="inputDatetime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" @change="changeChartDate('chart1')" />
  97. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart1')">导出</el-button>
  98. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart1')">切换表格</el-button>
  99. </div>
  100. <div id="chartLine1" style="width:100%;height:400px;" />
  101. <div v-if="chart1.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
  102. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart1')">导出</el-button>
  103. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart1')">切换图表</el-button>
  104. <el-table
  105. :key="chart1.table.tableKey"
  106. v-loading="chart1.table.listLoading"
  107. element-loading-text="给我一点时间"
  108. :data="chart1.table.list"
  109. border
  110. fit
  111. highlight-current-row
  112. style="width: 100%;"
  113. height="430"
  114. :row-style="rowStyle"
  115. :cell-style="cellStyle"
  116. class="elTable table-fixed"
  117. >
  118. <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
  119. <el-table-column label="计划执行重量(kg)" sortable min-width="110px" align="center" prop="实际量" />
  120. <el-table-column label="配方理论重量(kg)" sortable min-width="110px" align="center" prop="理论量" />
  121. <el-table-column label="计划准确率" sortable min-width="110px" align="center" prop="field1" />
  122. <el-table-column label="计划取消重量(kg)" sortable min-width="110px" align="center" prop="计划取消重量" />
  123. <el-table-column label="计划准确率(去除取消重量)" sortable min-width="110px" align="center" prop="field3" />
  124. <el-table-column label="计划正确数" sortable min-width="110px" align="center" prop="正确数" />
  125. <el-table-column label="计划数" sortable min-width="110px" align="center" prop="计划数" />
  126. <el-table-column label="计划正确率" sortable min-width="110px" align="center" prop="field2" />
  127. </el-table>
  128. </div>
  129. </el-col>
  130. <!-- 牛群准确率 -->
  131. <el-col :span="12" style="position: relative;">
  132. <h4 style="text-align:center;">牛群准确率</h4>
  133. <div>
  134. <el-date-picker v-model="chart2.getdataListParm.parammaps.inputDatetime" style="width: 250px;" class="inputDatetime filter-item" :clearable="false" type="daterange" range-separator="至" start-placeholder="开始日期" :picker-options="pickerOptions" end-placeholder="结束日期" @change="changeChartDate('chart2')" />
  135. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart2')">导出</el-button>
  136. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart2')">切换表格</el-button>
  137. </div>
  138. <div id="chartLine2" style="width:100%;height:400px;" />
  139. <div v-if="chart2.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
  140. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart2')">导出</el-button>
  141. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart2')">切换图表</el-button>
  142. <el-table
  143. :key="chart2.table.tableKey"
  144. v-loading="chart2.table.listLoading"
  145. element-loading-text="给我一点时间"
  146. :data="chart2.table.list"
  147. border
  148. fit
  149. highlight-current-row
  150. style="width: 100%;"
  151. height="430"
  152. :row-style="rowStyle"
  153. :cell-style="cellStyle"
  154. class="elTable table-fixed"
  155. >
  156. <el-table-column label="日期" sortable min-width="90px" align="center" prop="日期" />
  157. <el-table-column label="配方名称" sortable min-width="90px" align="center" prop="名称" />
  158. <el-table-column label="计划重量(kg)" sortable min-width="100px" align="center" prop="理论量" />
  159. <el-table-column label="实际重量(kg)" sortable min-width="100px" align="center" prop="实际量" />
  160. <el-table-column label="准确率" sortable min-width="90px" align="center" prop="准确率" />
  161. </el-table>
  162. </div>
  163. </el-col>
  164. </el-row>
  165. <el-row :gutter="10">
  166. <!-- 混料次数统计 -->
  167. <el-col :span="12" style="position: relative;">
  168. <h4 style="text-align:center;">混料次数统计</h4>
  169. <div>
  170. <el-date-picker v-model="chart3.getdataListParm.parammaps.inputDatetime" style="width: 250px;" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" :picker-options="pickerOptions" end-placeholder="结束日期" @change="changeChartDate('chart3')" />
  171. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart3')">导出</el-button>
  172. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart3')">切换表格</el-button>
  173. </div>
  174. <div id="chartLine3" style="width:100%;height:400px;" />
  175. <div v-if="chart3.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
  176. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart3')">导出</el-button>
  177. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart3')">切换图表</el-button>
  178. <el-table
  179. :key="chart3.table.tableKey"
  180. v-loading="chart3.table.listLoading"
  181. element-loading-text="给我一点时间"
  182. :data="chart3.table.list"
  183. border
  184. fit
  185. highlight-current-row
  186. style="width: 100%;"
  187. height="430"
  188. :row-style="rowStyle"
  189. :cell-style="cellStyle"
  190. class="elTable table-fixed"
  191. >
  192. <el-table-column label="日期" sortable min-width="90px" align="center" prop="日期" />
  193. <el-table-column label="牲畜类别" sortable min-width="90px" align="center" prop="名称" />
  194. <el-table-column label="计划重量(kg)" sortable min-width="100px" align="center" prop="理论量" />
  195. <el-table-column label="实际重量(kg)" sortable min-width="100px" align="center" prop="实际量" />
  196. <el-table-column label="准确率" sortable min-width="90px" align="center" prop="准确率" />
  197. </el-table>
  198. </div>
  199. </el-col>
  200. <!-- 混料准确率统计 -->
  201. <el-col :span="12" style="position: relative;">
  202. <h4 style="text-align:center;">混料准确率统计</h4>
  203. <div>
  204. <el-date-picker v-model="chart4.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 250px;" class="inputDatetime" type="daterange" range-separator="至" start-placeholder="开始日期" :picker-options="pickerOptions" end-placeholder="结束日期" @change="changeChartDate('chart4')" />
  205. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart4')">导出</el-button>
  206. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart4')">切换表格</el-button>
  207. </div>
  208. <div id="chartLine4" style="width:100%;height:400px;" />
  209. <div v-if="chart4.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
  210. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart4')">导出</el-button>
  211. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart4')">切换图表</el-button>
  212. <el-table
  213. :key="chart4.table.tableKey"
  214. v-loading="chart4.table.listLoading"
  215. element-loading-text="给我一点时间"
  216. :data="chart4.table.list"
  217. border
  218. fit
  219. highlight-current-row
  220. style="width: 100%;"
  221. height="430"
  222. :row-style="rowStyle"
  223. :cell-style="cellStyle"
  224. class="elTable table-fixed"
  225. >
  226. <el-table-column label="日期" sortable min-width="90px" align="center" prop="日期" />
  227. <el-table-column label="车次" sortable min-width="90px" align="center" prop="名称" />
  228. <el-table-column label="计划重量(kg)" sortable min-width="100px" align="center" prop="理论量" />
  229. <el-table-column label="实际重量(kg)" sortable min-width="100px" align="center" prop="实际量" />
  230. <el-table-column label="准确率" sortable min-width="90px" align="center" prop="准确率" />
  231. </el-table>
  232. </div>
  233. </el-col>
  234. </el-row>
  235. <el-row :gutter="10">
  236. <!-- 栏舍平均撒料时间统计 -->
  237. <el-col :span="12" style="position: relative;">
  238. <h4 style="text-align:center;">栏舍平均撒料时间统计</h4>
  239. <div>
  240. <el-date-picker v-model="chart5.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 250px;" class="inputDatetime" type="daterange" range-separator="至" start-placeholder="开始日期" :picker-options="pickerOptions" end-placeholder="结束日期" @change="changeChartDate('chart5')" />
  241. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart5')">导出</el-button>
  242. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart5')">切换表格</el-button>
  243. </div>
  244. <div id="chartLine5" style="width:100%;height:400px;" />
  245. <div v-if="chart5.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
  246. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart5')">导出</el-button>
  247. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart5')">切换图表</el-button>
  248. <el-table
  249. :key="chart5.table.tableKey"
  250. v-loading="chart5.table.listLoading"
  251. element-loading-text="给我一点时间"
  252. :data="chart5.table.list"
  253. border
  254. fit
  255. highlight-current-row
  256. style="width: 100%;"
  257. height="430"
  258. :row-style="rowStyle"
  259. :cell-style="cellStyle"
  260. class="elTable table-fixed"
  261. >
  262. <el-table-column label="日期" sortable min-width="100px" align="center" prop="日期" />
  263. <el-table-column label="自动跳转次数" sortable min-width="130px" align="center" prop="field1" />
  264. <el-table-column label="手动跳转次数" sortable min-width="130px" align="center" prop="field2" />
  265. <el-table-column label="自动跳转理论重量" sortable min-width="110px" align="center" prop="理论自动" />
  266. <el-table-column label="自动跳转实际重量" sortable min-width="110px" align="center" prop="实际自动" />
  267. <el-table-column label="自动跳转准确率" sortable min-width="110px" align="center" prop="field3" />
  268. <el-table-column label="手动跳转理论重量" sortable min-width="110px" align="center" prop="理论手动" />
  269. <el-table-column label="手动跳转实际重量" sortable min-width="110px" align="center" prop="实际手动" />
  270. <el-table-column label="手动跳转准确率" sortable min-width="110px" align="center" prop="field4" />
  271. </el-table>
  272. </div>
  273. </el-col>
  274. <el-col :span="12" style="position: relative;">
  275. <h4 style="text-align:center;">混料计划取消次数</h4>
  276. <div>
  277. <el-date-picker v-model="chart6.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 250px;" class="inputDatetime" type="daterange" range-separator="至" start-placeholder="开始日期" :picker-options="pickerOptions" end-placeholder="结束日期" @change="changeChartDate('chart6')" />
  278. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart6')">导出</el-button>
  279. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart6')">切换表格</el-button>
  280. </div>
  281. <div id="chartLine6" style="width:100%;height:400px;" />
  282. <div v-if="chart6.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
  283. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart6')">导出</el-button>
  284. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart6')">切换图表</el-button>
  285. <el-table
  286. :key="chart6.table.tableKey"
  287. v-loading="chart6.table.listLoading"
  288. element-loading-text="给我一点时间"
  289. :data="chart6.table.list"
  290. border
  291. fit
  292. highlight-current-row
  293. style="width: 100%;"
  294. height="430"
  295. :row-style="rowStyle"
  296. :cell-style="cellStyle"
  297. class="elTable table-fixed"
  298. >
  299. <el-table-column label="日期" sortable min-width="100px" align="center" prop="日期" />
  300. <el-table-column label="自动跳转次数" sortable min-width="130px" align="center" prop="field1" />
  301. <el-table-column label="手动跳转次数" sortable min-width="130px" align="center" prop="field2" />
  302. <el-table-column label="自动跳转理论重量" sortable min-width="110px" align="center" prop="理论自动" />
  303. <el-table-column label="自动跳转实际重量" sortable min-width="110px" align="center" prop="实际自动" />
  304. <el-table-column label="自动跳转准确率" sortable min-width="110px" align="center" prop="field3" />
  305. <el-table-column label="手动跳转理论重量" sortable min-width="110px" align="center" prop="理论手动" />
  306. <el-table-column label="手动跳转实际重量" sortable min-width="110px" align="center" prop="实际手动" />
  307. <el-table-column label="手动跳转准确率" sortable min-width="110px" align="center" prop="field4" />
  308. </el-table>
  309. </div>
  310. </el-col>
  311. </el-row>
  312. </div>
  313. <el-dialog :title="textMap[pasture.dialogStatus]" :destroy-on-close="true" :visible.sync="pasture.dialogFormVisible" :close-on-click-modal="false" width="90%">
  314. <div class="app-pasture">
  315. <div class="search">
  316. <span style="margin-left: 10px;">统计类型:</span>
  317. <el-radio v-model="pasture.radio" label="1" @change="changeRadio">配方名称</el-radio>
  318. <el-radio v-model="pasture.radio" label="2" @change="changeRadio">栏舍名称</el-radio>
  319. <el-radio v-model="pasture.radio" label="3" @change="changeRadio">牲畜类别</el-radio>
  320. <el-radio v-model="pasture.radio" label="4" @change="changeRadio">车次</el-radio>
  321. <el-checkbox v-model="pasture.checked" style="margin-right: 10px;" @change="changeChecked">按日期统计</el-checkbox>
  322. <el-input v-if="pasture.isFormulaName" v-model="pasture.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 245px;" placeholder="配方名称" />
  323. <el-input v-if="pasture.isHouseName" v-model="pasture.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 245px;" placeholder="栏舍名称" />
  324. <el-input v-if="pasture.isLivestockType" v-model="pasture.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 245px;" placeholder="牲畜名称" />
  325. <el-input v-if="pasture.isTrainNumber" v-model="pasture.table.getdataListParm.parammaps.sort" class="filter-item" style="width: 150px;" placeholder="车次" />
  326. <el-input v-if="pasture.isTrainNumber" v-model="pasture.table.getdataListParm.parammaps.times" class="filter-item" style="width: 150px;" placeholder="班次" />
  327. <el-input v-if="pasture.isTrainNumber" v-model="pasture.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 150px;" placeholder="TMR名称" />
  328. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  329. </div>
  330. <div class="table">
  331. <h4>混料</h4>
  332. <el-table
  333. :key="pasture.table.tableKey"
  334. v-loading="pasture.table.listLoading"
  335. element-loading-text="给我一点时间"
  336. :data="pasture.table.list"
  337. border
  338. fit
  339. highlight-current-row
  340. style="width: 100%;"
  341. :row-style="rowStyle"
  342. :cell-style="cellStyle"
  343. class="elTable table-fixed"
  344. >
  345. <el-table-column v-if="pasture.checked" label="日期" min-width="110px" align="center" prop="日期" />
  346. <el-table-column v-if="pasture.isFormulaName" label="配方名称" min-width="110px" align="center" prop="配方名称" />
  347. <el-table-column v-if="pasture.isHouseName" label="栏舍名称" min-width="110px" align="center" prop="栏舍名称" />
  348. <el-table-column v-if="pasture.isLivestockType" label="牲畜类别" min-width="110px" align="center" prop="牲畜类别" />
  349. <el-table-column v-if="pasture.isTrainNumber" label="车次" min-width="110px" align="center" prop="车次" />
  350. <el-table-column v-if="pasture.isTrainNumber" label="班次" min-width="110px" align="center" prop="班次" />
  351. <el-table-column v-if="pasture.isTrainNumber" label="TMR名称" min-width="110px" align="center" prop="TMR名称" />
  352. <el-table-column v-if="pasture.isTrainNumber" label="驾驶员" min-width="110px" align="center" prop="驾驶员" />
  353. <el-table-column label="理论重量" min-width="110px" align="center" prop="理论重量" />
  354. <el-table-column label="实际重量" min-width="110px" align="center" prop="实际重量" />
  355. <el-table-column label="计划混料操作数" min-width="110px" align="center" prop="计划混料操作数" />
  356. <el-table-column label="已混料操作数" min-width="110px" align="center" prop="已混料操作数" />
  357. <el-table-column label="混料操作率" min-width="110px" align="center" prop="混料操作率" />
  358. <el-table-column label="混料误差值" min-width="110px" align="center" prop="混料误差值" />
  359. <el-table-column label="混料准确率" min-width="110px" align="center" prop="混料准确率" />
  360. <el-table-column label="混料自动跳转次数" min-width="110px" align="center" prop="混料自动跳转次数" />
  361. <el-table-column label="混料手动跳转次数" min-width="110px" align="center" prop="混料手动跳转次数" />
  362. <el-table-column label="取消次数" min-width="110px" align="center" prop="取消次数" />
  363. <el-table-column label="方差" min-width="110px" align="center" prop="方差" />
  364. </el-table>
  365. <h4>撒料</h4>
  366. <el-table
  367. :key="pasture.table2.tableKey"
  368. v-loading="pasture.table2.listLoading"
  369. element-loading-text="给我一点时间"
  370. :data="pasture.table2.list"
  371. border
  372. fit
  373. highlight-current-row
  374. style="width: 100%;"
  375. :row-style="rowStyle"
  376. :cell-style="cellStyle"
  377. class="elTable table-fixed"
  378. >
  379. <el-table-column v-if="pasture.checked" label="日期" min-width="110px" align="center" prop="日期" />
  380. <el-table-column v-if="pasture.isFormulaName" label="配方名称" min-width="110px" align="center" prop="配方名称" />
  381. <el-table-column v-if="pasture.isHouseName" label="栏舍名称" min-width="110px" align="center" prop="栏舍名称" />
  382. <el-table-column v-if="pasture.isLivestockType" label="牲畜类别" min-width="110px" align="center" prop="牲畜类别" />
  383. <el-table-column v-if="pasture.isTrainNumber" label="车次" min-width="110px" align="center" prop="车次" />
  384. <el-table-column v-if="pasture.isTrainNumber" label="班次" min-width="110px" align="center" prop="班次" />
  385. <el-table-column v-if="pasture.isTrainNumber" label="TMR名称" min-width="110px" align="center" prop="TMR" />
  386. <el-table-column v-if="pasture.isTrainNumber" label="驾驶员" min-width="110px" align="center" prop="驾驶员" />
  387. <el-table-column label="理论重量" min-width="110px" align="center" prop="理论重量" />
  388. <el-table-column label="实际重量" min-width="110px" align="center" prop="实际重量" />
  389. <el-table-column label="计划撒料操作数" min-width="110px" align="center" prop="计划撒料操作数" />
  390. <el-table-column label="已撒料操作数" min-width="110px" align="center" prop="已撒料操作数" />
  391. <el-table-column label="撒料操作率" min-width="110px" align="center" prop="撒料操作率" />
  392. <el-table-column label="撒料误差值" min-width="110px" align="center" prop="撒料误差值" />
  393. <el-table-column label="撒料准确率" min-width="110px" align="center" prop="撒料准确率" />
  394. <el-table-column label="撒料自动跳转次数" min-width="110px" align="center" prop="撒料自动跳转次数" />
  395. <el-table-column label="撒料手动跳转次数" min-width="110px" align="center" prop="撒料手动跳转次数" />
  396. </el-table>
  397. </div>
  398. </div>
  399. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  400. <el-button class="cancelClose" @click="pasture.dialogFormVisible = false; ">关闭</el-button>
  401. </div>
  402. </el-dialog>
  403. </div>
  404. </template>
  405. <script>
  406. import echarts from 'echarts'
  407. require('echarts/theme/macarons')
  408. import { GetDataByName, GetReportform } from '@/api/common'
  409. import Cookies from 'js-cookie'
  410. import { parseTime } from '@/utils/index.js'
  411. import Pagination from '@/components/Pagination'
  412. import { json2excel } from '@/utils/index.js'
  413. import { MessageBox } from 'element-ui'
  414. export default {
  415. name: 'Tab1',
  416. components: { Pagination },
  417. data() {
  418. return {
  419. pickerMinDate: '',
  420. pickerOptions: {
  421. onPick: ({ maxDate, minDate }) => {
  422. this.pickerMinDate = minDate.getTime()
  423. if (maxDate) {
  424. this.pickerMinDate = ''
  425. }
  426. },
  427. // 限制不能选择今天之后的日期
  428. disabledDate: (time) => {
  429. if (this.pickerMinDate !== '') {
  430. const one = 31 * 24 * 3600 * 1000
  431. const minTime = this.pickerMinDate - one
  432. let maxTime = this.pickerMinDate + one
  433. if (maxTime > new Date()) {
  434. maxTime = new Date()
  435. }
  436. return time.getTime() < minTime || time.getTime() > maxTime
  437. }
  438. return time.getTime() > Date.now()
  439. }
  440. },
  441. table: {
  442. getdataListParm: {
  443. name: 'getAccuracyJTHALL',
  444. page: 1,
  445. offset: 1,
  446. pagecount: '',
  447. returntype: 'Map',
  448. parammaps: {
  449. pastureid: Cookies.get('pastureid'),
  450. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  451. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  452. inputDatetime: [new Date(), new Date()],
  453. fname: '',
  454. sort: '',
  455. times: ''
  456. }
  457. },
  458. tableKey: 1,
  459. list: [],
  460. total: 0,
  461. listLoading: true,
  462. temp: {}
  463. },
  464. table2: {
  465. getdataListParm: {
  466. name: 'getAccuracyJTSALL',
  467. page: 1,
  468. offset: 1,
  469. pagecount: '',
  470. returntype: 'Map',
  471. parammaps: {
  472. pastureid: Cookies.get('pastureid'),
  473. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  474. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  475. inputDatetime: [new Date(), new Date()],
  476. fname: '',
  477. sort: '',
  478. times: ''
  479. }
  480. },
  481. tableKey: 2,
  482. list: [],
  483. total: 0,
  484. listLoading: true,
  485. temp: {}
  486. },
  487. chartDate: [],
  488. // 计划统计
  489. chart1: {
  490. chartLine: null,
  491. chartLine_data: {},
  492. getdataListParm: {
  493. name: 'getJT1AccuracyAllJH',
  494. page: 1,
  495. offset: 1,
  496. pagecount: '',
  497. returntype: 'Map',
  498. parammaps: {
  499. pastureid: Cookies.get('pastureid'),
  500. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  501. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  502. inputDatetime: [new Date(), new Date()]
  503. }
  504. },
  505. tableKey: 1,
  506. list: [],
  507. total: 0,
  508. listLoading: true,
  509. statisticsList: [],
  510. chart1Data3: [],
  511. isChart: true,
  512. isTable: false,
  513. table: {
  514. tableKey: 1,
  515. list: [],
  516. total: 0,
  517. listLoading: false
  518. }
  519. },
  520. // 牛群准确率
  521. chart2: {
  522. chartLine: null,
  523. chartLine_data: {},
  524. getdataListParm: {
  525. name: 'getJT1AccuracyAllNQ',
  526. page: 1,
  527. offset: 1,
  528. pagecount: '',
  529. returntype: 'Map',
  530. parammaps: {
  531. pastureid: Cookies.get('pastureid'),
  532. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  533. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  534. inputDatetime: [new Date(), new Date()]
  535. }
  536. },
  537. tableKey: 1,
  538. list: [],
  539. total: 0,
  540. listLoading: true,
  541. isChart: true,
  542. isTable: false,
  543. table: {
  544. tableKey: 1,
  545. list: [],
  546. total: 0,
  547. listLoading: false
  548. }
  549. },
  550. // 混料次数统计
  551. chart3: {
  552. chartLine: null,
  553. chartLine_data: {},
  554. getdataListParm: {
  555. name: 'getJT1AccuracyAllHL',
  556. page: 1,
  557. offset: 1,
  558. pagecount: '',
  559. returntype: 'Map',
  560. parammaps: {
  561. pastureid: Cookies.get('pastureid'),
  562. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  563. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  564. inputDatetime: [new Date(), new Date()]
  565. }
  566. },
  567. tableKey: 1,
  568. list: [],
  569. total: 0,
  570. listLoading: true,
  571. statisticsList: [],
  572. chart1Data3: [],
  573. isChart: true,
  574. isTable: false,
  575. table: {
  576. tableKey: 1,
  577. list: [],
  578. total: 0,
  579. listLoading: false
  580. }
  581. },
  582. // 混料准确率统计
  583. chart4: {
  584. chartLine: null,
  585. chartLine_data: {},
  586. getdataListParm: {
  587. name: 'getJT1AccuracyAllHLRate',
  588. page: 1,
  589. offset: 1,
  590. pagecount: '',
  591. returntype: 'Map',
  592. parammaps: {
  593. pastureid: Cookies.get('pastureid'),
  594. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  595. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  596. inputDatetime: [new Date(), new Date()]
  597. }
  598. },
  599. tableKey: 1,
  600. list: [],
  601. total: 0,
  602. listLoading: true,
  603. statisticsList: [],
  604. chart4Data3: [],
  605. isChart: true,
  606. isTable: false,
  607. table: {
  608. tableKey: 1,
  609. list: [],
  610. total: 0,
  611. listLoading: false
  612. }
  613. },
  614. // 栏舍平均撒料时间统计
  615. chart5: {
  616. chartLine: null,
  617. chartLine_data: {},
  618. getdataListParm: {
  619. name: 'getAccuracyAllLSJT',
  620. page: 1,
  621. offset: 1,
  622. pagecount: '',
  623. returntype: 'Map',
  624. parammaps: {
  625. pastureid: Cookies.get('pastureid'),
  626. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  627. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  628. inputDatetime: [new Date(), new Date()]
  629. }
  630. },
  631. tableKey: 1,
  632. list: [],
  633. total: 0,
  634. listLoading: true,
  635. isChart: true,
  636. isTable: false,
  637. table: {
  638. tableKey: 1,
  639. list: [],
  640. total: 0,
  641. listLoading: false
  642. }
  643. },
  644. // 混料准确率统计
  645. chart6: {
  646. chartLine: null,
  647. chartLine_data: {},
  648. getdataListParm: {
  649. name: 'getJT1AccuracyAllQX',
  650. page: 1,
  651. offset: 1,
  652. pagecount: '',
  653. returntype: 'Map',
  654. parammaps: {
  655. pastureid: Cookies.get('pastureid'),
  656. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  657. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  658. inputDatetime: [new Date(), new Date()]
  659. }
  660. },
  661. tableKey: 1,
  662. list: [],
  663. total: 0,
  664. listLoading: true,
  665. statisticsList: [],
  666. chart4Data3: [],
  667. isChart: true,
  668. isTable: false,
  669. table: {
  670. tableKey: 1,
  671. list: [],
  672. total: 0,
  673. listLoading: false
  674. }
  675. },
  676. pasture: {
  677. dialogFormVisible: false,
  678. dialogStatus: '',
  679. radio: '1',
  680. isFormulaName: true, // 配方名称
  681. isHouseName: false, // 栏舍名称
  682. isLivestockType: false, // 牲畜类别
  683. isTrainNumber: false, // 车次
  684. checked: false, // 按日期统计
  685. table: {
  686. getdataListParm: {
  687. name: 'getAccuracyHFT',
  688. page: 1,
  689. offset: 1,
  690. pagecount: '',
  691. returntype: 'Map',
  692. parammaps: {
  693. pastureid: '',
  694. startTime: '',
  695. stopTime: '',
  696. fname: '',
  697. sort: '',
  698. times: ''
  699. }
  700. },
  701. tableKey: 1,
  702. list: [],
  703. total: 0,
  704. listLoading: true,
  705. temp: {}
  706. },
  707. table2: {
  708. getdataListParm: {
  709. name: 'getAccuracySFT',
  710. page: 1,
  711. offset: 1,
  712. pagecount: '',
  713. returntype: 'Map',
  714. parammaps: {
  715. pastureid: '',
  716. startTime: '',
  717. stopTime: '',
  718. fname: '',
  719. sort: '',
  720. times: ''
  721. }
  722. },
  723. tableKey: 2,
  724. list: [],
  725. total: 0,
  726. listLoading: true,
  727. temp: {}
  728. }
  729. },
  730. textMap: {
  731. pasture: '牧场'
  732. },
  733. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  734. cellStyle: { padding: 0 + 'px' }
  735. }
  736. },
  737. created() {
  738. this.getTimeFn()
  739. this.getList()
  740. this.getList2()
  741. this.getChart1()
  742. this.getChart2()
  743. this.getChart3()
  744. this.getChart4()
  745. this.getChart5()
  746. this.getChart6()
  747. },
  748. methods: {
  749. getTimeFn() {
  750. const that = this
  751. const start = new Date()
  752. const end = new Date()
  753. const start2 = new Date()
  754. const end2 = new Date()
  755. start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
  756. end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 1)
  757. that.table.getdataListParm.parammaps.inputDatetime[0] = parseTime(start2, '{y}-{m}-{d}')
  758. that.table.getdataListParm.parammaps.inputDatetime[1] = parseTime(end2, '{y}-{m}-{d}')
  759. that.table.getdataListParm.parammaps.startTime = parseTime(start2, '{y}-{m}-{d}')
  760. that.table.getdataListParm.parammaps.stopTime = parseTime(end2, '{y}-{m}-{d}')
  761. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
  762. that.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
  763. that.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
  764. that.chart1.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  765. that.chart1.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  766. that.chart1.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  767. that.chart1.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  768. that.chart2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  769. that.chart2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  770. that.chart2.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  771. that.chart2.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  772. that.chart3.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  773. that.chart3.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  774. that.chart3.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  775. that.chart3.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  776. that.chart4.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  777. that.chart4.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  778. that.chart4.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  779. that.chart4.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  780. that.chart5.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  781. that.chart5.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  782. that.chart5.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  783. that.chart5.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  784. },
  785. getList() {
  786. this.table.listLoading = true
  787. GetDataByName(this.table.getdataListParm).then(response => {
  788. console.log('汇总统计/混料table数据', response.data.list)
  789. if (response.data.list !== null) {
  790. this.table.list = response.data.list
  791. } else {
  792. this.table.list = []
  793. }
  794. setTimeout(() => {
  795. this.table.listLoading = false
  796. }, 100)
  797. })
  798. },
  799. // 汇总统计/撒料
  800. getList2() {
  801. this.table2.listLoading = true
  802. GetDataByName(this.table2.getdataListParm).then(response => {
  803. console.log('汇总统计/撒料table数据', response.data.list)
  804. if (response.data.list !== null) {
  805. this.table2.list = response.data.list
  806. } else {
  807. this.table2.list = []
  808. }
  809. setTimeout(() => {
  810. this.table2.listLoading = false
  811. }, 100)
  812. })
  813. },
  814. changeDate() {
  815. console.log(this.$refs.inputDatetime.value)
  816. const startTime = this.$refs.inputDatetime.value[0]
  817. const stopTime = this.$refs.inputDatetime.value[1]
  818. this.table.getdataListParm.parammaps.startTime = parseTime(startTime, '{y}-{m}-{d}')
  819. this.table.getdataListParm.parammaps.stopTime = parseTime(stopTime, '{y}-{m}-{d}')
  820. this.table2.getdataListParm.parammaps.startTime = parseTime(startTime, '{y}-{m}-{d}')
  821. this.table2.getdataListParm.parammaps.stopTime = parseTime(stopTime, '{y}-{m}-{d}')
  822. this.getList()
  823. this.getList2()
  824. },
  825. tableCellStyle({ row, column, rowIndex, columnIndex }) {
  826. if (columnIndex === 0 && row.pastureid !== '-1') {
  827. return {
  828. textDecoration: 'underline'
  829. }
  830. }
  831. return {
  832. textDecoration: 'none'
  833. }
  834. },
  835. clickPasture(row) {
  836. console.log(row)
  837. if (row.pastureid !== '-1') {
  838. this.pasture.dialogStatus = 'pasture'
  839. this.pasture.dialogFormVisible = true
  840. this.pasture.table.getdataListParm.parammaps.pastureid = row.pastureid
  841. this.pasture.table2.getdataListParm.parammaps.pastureid = row.pastureid
  842. this.getTabList()
  843. this.getTabList2()
  844. }
  845. },
  846. // 切换统计类型
  847. changeRadio() {
  848. console.log(this.pasture.radio)
  849. this.pasture.table.getdataListParm.parammaps.sort = ''
  850. this.pasture.table.getdataListParm.parammaps.times = ''
  851. this.pasture.table.getdataListParm.parammaps.fname = ''
  852. if (this.pasture.radio == '1') {
  853. console.log('配方名称')
  854. this.pasture.isFormulaName = true
  855. this.pasture.isHouseName = false
  856. this.pasture.isLivestockType = false
  857. this.pasture.isTrainNumber = false
  858. this.pasture.table.getdataListParm.name = 'getAccuracyHFT'
  859. this.pasture.table.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  860. this.pasture.table.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  861. this.pasture.table.getdataListParm.offset = 1
  862. this.getTabList()
  863. this.pasture.table2.getdataListParm.name = 'getAccuracySFT'
  864. this.pasture.table2.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  865. this.pasture.table2.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  866. this.pasture.table2.getdataListParm.offset = 1
  867. this.getTabList2()
  868. } else if (this.pasture.radio == '2') {
  869. console.log('栏舍名称')
  870. this.pasture.isFormulaName = false
  871. this.pasture.isHouseName = true
  872. this.pasture.isLivestockType = false
  873. this.pasture.isTrainNumber = false
  874. this.pasture.table.getdataListParm.name = 'getAccuracyHNS'
  875. this.pasture.table.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  876. this.pasture.table.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  877. this.pasture.table.getdataListParm.offset = 1
  878. this.getTabList()
  879. this.pasture.table2.getdataListParm.name = 'getAccuracySNS'
  880. this.pasture.table2.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  881. this.pasture.table2.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  882. this.pasture.table2.getdataListParm.offset = 1
  883. this.getTabList2()
  884. } else if (this.pasture.radio == '3') {
  885. console.log(' 牲畜类别')
  886. this.pasture.isFormulaName = false
  887. this.pasture.isHouseName = false
  888. this.pasture.isLivestockType = true
  889. this.pasture.isTrainNumber = false
  890. this.pasture.table.getdataListParm.name = 'getAccuracyHSC'
  891. this.pasture.table.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  892. this.pasture.table.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  893. this.pasture.table.getdataListParm.offset = 1
  894. this.getTabList()
  895. this.pasture.table2.getdataListParm.name = 'getAccuracySSC'
  896. this.pasture.table2.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  897. this.pasture.table2.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  898. this.pasture.table2.getdataListParm.offset = 1
  899. this.getTabList2()
  900. } else if (this.pasture.radio == '4') {
  901. console.log('车次')
  902. this.pasture.isFormulaName = false
  903. this.pasture.isHouseName = false
  904. this.pasture.isLivestockType = false
  905. this.pasture.isTrainNumber = true
  906. this.pasture.table.getdataListParm.name = 'getAccuracyHCC'
  907. this.pasture.table.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  908. this.pasture.table.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  909. this.pasture.table.getdataListParm.offset = 1
  910. this.getTabList()
  911. this.pasture.table2.getdataListParm.name = 'getAccuracySCC'
  912. this.pasture.table2.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  913. this.pasture.table2.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  914. this.pasture.table2.getdataListParm.offset = 1
  915. this.getTabList2()
  916. }
  917. },
  918. changeChecked() {
  919. if (this.pasture.radio == '1') {
  920. console.log('配方名称')
  921. this.pasture.isFormulaName = true
  922. this.pasture.isHouseName = false
  923. this.pasture.isLivestockType = false
  924. this.pasture.isTrainNumber = false
  925. this.pasture.table.getdataListParm.name = 'getAccuracyHFT'
  926. this.pasture.table.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  927. this.pasture.table.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  928. this.pasture.table.getdataListParm.offset = 1
  929. this.getTabList()
  930. this.pasture.table2.getdataListParm.name = 'getAccuracySFT'
  931. this.pasture.table2.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  932. this.pasture.table2.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  933. this.pasture.table2.getdataListParm.offset = 1
  934. this.getTabList2()
  935. } else if (this.pasture.radio == '2') {
  936. console.log('栏舍名称')
  937. this.pasture.isFormulaName = false
  938. this.pasture.isHouseName = true
  939. this.pasture.isLivestockType = false
  940. this.pasture.isTrainNumber = false
  941. this.pasture.table.getdataListParm.name = 'getAccuracyHNS'
  942. this.pasture.table.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  943. this.pasture.table.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  944. this.pasture.table.getdataListParm.offset = 1
  945. this.getTabList()
  946. this.pasture.table2.getdataListParm.name = 'getAccuracySNS'
  947. this.pasture.table2.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  948. this.pasture.table2.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  949. this.pasture.table2.getdataListParm.offset = 1
  950. this.getTabList2()
  951. } else if (this.pasture.radio == '3') {
  952. console.log(' 牲畜类别')
  953. this.pasture.isFormulaName = false
  954. this.pasture.isHouseName = false
  955. this.pasture.isLivestockType = true
  956. this.pasture.isTrainNumber = false
  957. this.pasture.table.getdataListParm.name = 'getAccuracyHSC'
  958. this.pasture.table.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  959. this.pasture.table.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  960. this.pasture.table.getdataListParm.offset = 1
  961. this.getTabList()
  962. this.pasture.table2.getdataListParm.name = 'getAccuracySSC'
  963. this.pasture.table2.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  964. this.pasture.table2.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  965. this.pasture.table2.getdataListParm.offset = 1
  966. this.getTabList2()
  967. } else if (this.pasture.radio == '4') {
  968. console.log('车次')
  969. this.pasture.isFormulaName = false
  970. this.pasture.isHouseName = false
  971. this.pasture.isLivestockType = false
  972. this.pasture.isTrainNumber = true
  973. this.pasture.table.getdataListParm.name = 'getAccuracyHCC'
  974. this.pasture.table.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  975. this.pasture.table.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  976. this.pasture.table.getdataListParm.offset = 1
  977. this.getTabList()
  978. this.pasture.table2.getdataListParm.name = 'getAccuracySCC'
  979. this.pasture.table2.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  980. this.pasture.table2.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  981. this.pasture.table2.getdataListParm.offset = 1
  982. this.getTabList2()
  983. }
  984. },
  985. handleSearch() {
  986. if (this.pasture.radio == '1') {
  987. console.log('配方名称/查询')
  988. this.pasture.isFormulaName = true
  989. this.pasture.isHouseName = false
  990. this.pasture.isLivestockType = false
  991. this.pasture.isTrainNumber = false
  992. this.pasture.table.getdataListParm.name = 'getAccuracyHFT'
  993. this.getTabList()
  994. this.pasture.table2.getdataListParm.name = 'getAccuracySFT'
  995. this.getTabList2()
  996. } else if (this.pasture.radio == '2') {
  997. console.log('栏舍名称/查询')
  998. this.pasture.isFormulaName = false
  999. this.pasture.isHouseName = true
  1000. this.pasture.isLivestockType = false
  1001. this.pasture.isTrainNumber = false
  1002. this.pasture.table.getdataListParm.name = 'getAccuracyHNS'
  1003. this.getTabList()
  1004. this.pasture.table2.getdataListParm.name = 'getAccuracySNS'
  1005. this.getTabList2()
  1006. } else if (this.pasture.radio == '3') {
  1007. console.log(' 牲畜类别/查询')
  1008. this.pasture.isFormulaName = false
  1009. this.pasture.isHouseName = false
  1010. this.pasture.isLivestockType = true
  1011. this.pasture.isTrainNumber = false
  1012. this.pasture.table.getdataListParm.name = 'getAccuracyHSC'
  1013. this.getTabList()
  1014. this.pasture.table2.getdataListParm.name = 'getAccuracySSC'
  1015. this.getTabList2()
  1016. } else if (this.pasture.radio == '4') {
  1017. console.log('车次/查询')
  1018. this.pasture.isFormulaName = false
  1019. this.pasture.isHouseName = false
  1020. this.pasture.isLivestockType = false
  1021. this.pasture.isTrainNumber = true
  1022. this.pasture.table.getdataListParm.name = 'getAccuracyHCC'
  1023. this.getTabList()
  1024. this.pasture.table2.getdataListParm.name = 'getAccuracySCC'
  1025. this.getTabList2()
  1026. }
  1027. },
  1028. // 汇总统计/混料
  1029. getTabList() {
  1030. this.pasture.table.listLoading = true
  1031. this.pasture.table.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  1032. this.pasture.table.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  1033. GetDataByName(this.pasture.table.getdataListParm).then(response => {
  1034. console.log('汇总统计/混料table数据', response.data.list)
  1035. if (response.data.list !== null) {
  1036. this.pasture.table.list = response.data.list
  1037. } else {
  1038. this.pasture.table.list = []
  1039. }
  1040. setTimeout(() => {
  1041. this.pasture.table.listLoading = false
  1042. }, 100)
  1043. })
  1044. },
  1045. // 汇总统计/撒料
  1046. getTabList2() {
  1047. this.pasture.table2.listLoading = true
  1048. this.pasture.table2.getdataListParm.parammaps.startTime = this.table.getdataListParm.parammaps.startTime
  1049. this.pasture.table2.getdataListParm.parammaps.stopTime = this.table.getdataListParm.parammaps.stopTime
  1050. GetDataByName(this.pasture.table2.getdataListParm).then(response => {
  1051. console.log('汇总统计/撒料table数据', response.data.list)
  1052. if (response.data.list !== null) {
  1053. this.pasture.table2.list = response.data.list
  1054. } else {
  1055. this.pasture.table2.list = []
  1056. }
  1057. setTimeout(() => {
  1058. this.pasture.table2.listLoading = false
  1059. }, 100)
  1060. })
  1061. },
  1062. // 表总查询
  1063. handleChartDate() {
  1064. console.log('点击了确认时间')
  1065. MessageBox.confirm('是否调整以下所有图表查询时间?', {
  1066. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  1067. }).then(() => {
  1068. var that = this
  1069. var startTime = parseTime(this.chartDate[0], '{y}-{m}-{d}')
  1070. var stopTime = parseTime(this.chartDate[1], '{y}-{m}-{d}')
  1071. that.chart1.getdataListParm.parammaps.inputDatetime = this.chartDate
  1072. that.chart1.getdataListParm.parammaps.startTime = startTime
  1073. that.chart1.getdataListParm.parammaps.stopTime = stopTime
  1074. that.getChart1()
  1075. that.chart2.getdataListParm.parammaps.inputDatetime = this.chartDate
  1076. that.chart2.getdataListParm.parammaps.startTime = startTime
  1077. that.chart2.getdataListParm.parammaps.stopTime = stopTime
  1078. that.getChart2()
  1079. that.chart3.getdataListParm.parammaps.inputDatetime = this.chartDate
  1080. that.chart3.getdataListParm.parammaps.startTime = startTime
  1081. that.chart3.getdataListParm.parammaps.stopTime = stopTime
  1082. that.getChart3()
  1083. that.chart4.getdataListParm.parammaps.inputDatetime = this.chartDate
  1084. that.chart4.getdataListParm.parammaps.startTime = startTime
  1085. that.chart4.getdataListParm.parammaps.stopTime = stopTime
  1086. that.getChart4()
  1087. that.chart5.getdataListParm.parammaps.inputDatetime = this.chartDate
  1088. that.chart5.getdataListParm.parammaps.startTime = startTime
  1089. that.chart5.getdataListParm.parammaps.stopTime = stopTime
  1090. that.getChart5()
  1091. that.chart6.getdataListParm.parammaps.inputDatetime = this.chartDate
  1092. that.chart6.getdataListParm.parammaps.startTime = startTime
  1093. that.chart6.getdataListParm.parammaps.stopTime = stopTime
  1094. that.getChart6()
  1095. })
  1096. },
  1097. // 计划统计
  1098. getChart1() {
  1099. this.chart1.listLoading = true
  1100. GetReportform(this.chart1.getdataListParm).then(response => {
  1101. if (response.data.list !== null) {
  1102. this.chart1.table.list = response.data.data
  1103. this.chart1.chartLine_data = response.data.list
  1104. // this.chart1.chartLine_data = {
  1105. // 'data1': ['1牧', '2牧', '3牧', '4牧', '5牧', '6牧', '7牧', '8牧', '9牧', '10牧', '11牧', '12牧'], // x轴
  1106. // 'data2': [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3], // 计划准确率
  1107. // 'data3': [2.6, 5.9, 9.0, 30, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3], // 计划正确率
  1108. // 'data4': [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]// 计划准确率(去除取消重量)
  1109. // }
  1110. this.chart1.total = response.data.total
  1111. console.log('计划统计图数据', this.chart1.chartLine_data)
  1112. console.log('计划统计表数据', this.chart1.table.list)
  1113. this.roadChartLine1(this.chart1.chartLine_data)
  1114. } else {
  1115. this.chart1.list = []
  1116. }
  1117. setTimeout(() => {
  1118. this.chart1.listLoading = false
  1119. }, 100)
  1120. })
  1121. },
  1122. roadChartLine1(chartLine_data) {
  1123. if (this.chart1.chartLine != null) {
  1124. this.chart1.chartLine.dispose()
  1125. }
  1126. this.chart1.chartLine = echarts.init(document.getElementById('chartLine1'))
  1127. var option = {
  1128. tooltip: {
  1129. trigger: 'axis',
  1130. axisPointer: {
  1131. type: 'cross',
  1132. crossStyle: {
  1133. color: '#999'
  1134. }
  1135. }
  1136. },
  1137. legend: {
  1138. data: ['计划准确率', '计划正确率', '计划准确率(去除取消重量)']
  1139. },
  1140. xAxis: [{ type: 'category', data: chartLine_data.data1, axisPointer: { type: 'shadow' }}],
  1141. yAxis: [{ type: 'value', name: '百分比', min: 0, max: 100, interval: 20, axisLabel: { formatter: '{value}' }}],
  1142. series: [{ name: '计划准确率', type: 'bar', itemStyle: { normal: { color: '#7ecf51' }},
  1143. data: chartLine_data.data2,
  1144. markLine: {
  1145. data: [{ type: 'average' }],
  1146. symbol: ['none', 'none'],
  1147. position: 'insideTopCenter',
  1148. itemStyle: {
  1149. normal: {
  1150. lineStyle: { type: 'dotted', width: 3 },
  1151. label: { show: true, position: 'middle', formatter: '' }
  1152. }
  1153. },
  1154. large: true,
  1155. effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }
  1156. }
  1157. },
  1158. {
  1159. name: '计划正确率',
  1160. type: 'bar',
  1161. itemStyle: {
  1162. normal: {
  1163. color: '#ff6600'
  1164. }
  1165. },
  1166. data: chartLine_data.data3,
  1167. markLine: {
  1168. data: [{ type: 'average' }],
  1169. symbol: ['none', 'none'],
  1170. position: 'insideTopCenter',
  1171. itemStyle: {
  1172. normal: {
  1173. lineStyle: { type: 'dotted', width: 3 },
  1174. label: { show: true, position: 'middle', formatter: '' }
  1175. }
  1176. },
  1177. large: true,
  1178. effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }
  1179. }
  1180. },
  1181. {
  1182. name: '计划准确率(去除取消重量)',
  1183. type: 'bar',
  1184. itemStyle: {
  1185. normal: {
  1186. color: '#61a5e8'
  1187. }
  1188. },
  1189. data: chartLine_data.data4,
  1190. markLine: {
  1191. data: [{ type: 'average' }],
  1192. symbol: ['none', 'none'],
  1193. position: 'insideTopCenter',
  1194. itemStyle: {
  1195. normal: {
  1196. lineStyle: { type: 'dotted', width: 3 },
  1197. label: { show: true, position: 'middle', formatter: '' }
  1198. }
  1199. },
  1200. large: true,
  1201. effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }
  1202. }
  1203. }
  1204. ]
  1205. }
  1206. this.chart1.chartLine.setOption(option)
  1207. window.onresize = function() {
  1208. this.chart1.chartLine.resize()
  1209. }
  1210. },
  1211. // 牛群准确率
  1212. getChart2() {
  1213. this.chart2.listLoading = true
  1214. GetReportform(this.chart2.getdataListParm).then(response => {
  1215. console.log('牛群准确率图数据', this.chart2.chartLine_data)
  1216. if (response.data.list !== null) {
  1217. // for (let i = 0; i < response.data.data.length; i++) {
  1218. // response.data.data[i].准确率 = response.data.data[i].准确率 + '%'
  1219. // }
  1220. this.chart2.table.list = response.data.data
  1221. this.chart2.chartLine_data = response.data.list
  1222. this.chart2.total = response.data.total
  1223. this.chart2.chart3Data3 = response.data.list.data3
  1224. this.chart2.total = response.data.total
  1225. console.log('牛群准确率图数据', this.chart2.chartLine_data)
  1226. console.log('牛群准确率表数据', this.chart2.table.list)
  1227. // this.chart2.chartLine_data = {
  1228. // 'data1': ['1牧', '2牧', '3牧', '4牧', '5牧', '6牧', '7牧', '8牧', '9牧', '10牧', '11牧', '12牧'], // x轴
  1229. // 'data2': [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3], // 泌乳牛
  1230. // 'data3': [2.6, 5.9, 9.0, 30, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3], // 后备牛
  1231. // 'data4': [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3], // 干奶牛
  1232. // 'data5': [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]// 围产牛
  1233. // }
  1234. this.roadChartLine2(this.chart2.chartLine_data)
  1235. } else {
  1236. this.chart2.list = []
  1237. }
  1238. setTimeout(() => {
  1239. this.chart2.listLoading = false
  1240. }, 100)
  1241. })
  1242. },
  1243. roadChartLine2(chartLine_data) {
  1244. if (this.chart2.chartLine != null) {
  1245. this.chart2.chartLine.dispose()
  1246. }
  1247. this.chart2.chartLine = echarts.init(document.getElementById('chartLine2'))
  1248. var option = {
  1249. tooltip: {
  1250. trigger: 'axis',
  1251. axisPointer: {
  1252. type: 'cross',
  1253. crossStyle: {
  1254. color: '#999'
  1255. }
  1256. }
  1257. },
  1258. legend: {
  1259. data: ['泌乳牛', '后备牛', '干奶牛', '围产牛']
  1260. },
  1261. xAxis: [{ type: 'category', data: chartLine_data.data1, axisPointer: { type: 'shadow' }}],
  1262. yAxis: [{ type: 'value', name: '准确率', min: 0, max: 100, interval: 20, axisLabel: { formatter: '{value}%' }}],
  1263. series: [{ name: '泌乳牛', type: 'bar', itemStyle: { normal: { color: '#7ecf51' }},
  1264. data: chartLine_data.data2,
  1265. markLine: {
  1266. data: [{ type: 'average' }],
  1267. symbol: ['none', 'none'],
  1268. position: 'insideTopCenter',
  1269. itemStyle: {
  1270. normal: {
  1271. lineStyle: { type: 'dotted', width: 3 },
  1272. label: { show: true, position: 'middle', formatter: '' }
  1273. }
  1274. },
  1275. large: true,
  1276. effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }
  1277. }
  1278. },
  1279. {
  1280. name: '后备牛',
  1281. type: 'bar',
  1282. itemStyle: {
  1283. normal: {
  1284. color: '#ff6600'
  1285. }
  1286. },
  1287. data: chartLine_data.data3,
  1288. markLine: {
  1289. data: [{ type: 'average' }],
  1290. symbol: ['none', 'none'],
  1291. position: 'insideTopCenter',
  1292. itemStyle: {
  1293. normal: {
  1294. lineStyle: { type: 'dotted', width: 3 },
  1295. label: { show: true, position: 'middle', formatter: '' }
  1296. }
  1297. },
  1298. large: true,
  1299. effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }
  1300. }
  1301. },
  1302. {
  1303. name: '干奶牛',
  1304. type: 'bar',
  1305. itemStyle: {
  1306. normal: {
  1307. color: '#61a5e8'
  1308. }
  1309. },
  1310. data: chartLine_data.data4,
  1311. markLine: {
  1312. data: [{ type: 'average' }],
  1313. symbol: ['none', 'none'],
  1314. position: 'insideTopCenter',
  1315. itemStyle: {
  1316. normal: {
  1317. lineStyle: { type: 'dotted', width: 3 },
  1318. label: { show: true, position: 'middle', formatter: '' }
  1319. }
  1320. },
  1321. large: true,
  1322. effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }
  1323. }
  1324. },
  1325. {
  1326. name: '围产牛',
  1327. type: 'bar',
  1328. itemStyle: {
  1329. normal: {
  1330. color: '#ffff00'
  1331. }
  1332. },
  1333. data: chartLine_data.data5,
  1334. markLine: {
  1335. data: [{ type: 'average' }],
  1336. symbol: ['none', 'none'],
  1337. position: 'insideTopCenter',
  1338. itemStyle: {
  1339. normal: {
  1340. lineStyle: { type: 'dotted', width: 3 },
  1341. label: { show: true, position: 'middle', formatter: '' }
  1342. }
  1343. },
  1344. large: true,
  1345. effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }
  1346. }
  1347. }
  1348. ]
  1349. }
  1350. this.chart2.chartLine.setOption(option)
  1351. window.onresize = function() {
  1352. this.chart2.chartLine.resize()
  1353. }
  1354. },
  1355. // 混料次数统计
  1356. getChart3() {
  1357. this.chart3.listLoading = true
  1358. GetReportform(this.chart3.getdataListParm).then(response => {
  1359. if (response.data.list !== null) {
  1360. // for (let i = 0; i < response.data.data.length; i++) {
  1361. // response.data.data[i].准确率 = response.data.data[i].准确率 + '%'
  1362. // }
  1363. this.chart3.table.list = response.data.data
  1364. this.chart3.chartLine_data = response.data.list
  1365. // this.chart3.chartLine_data = {
  1366. // 'data1': ['1牧', '2牧', '3牧', '4牧', '5牧', '6牧', '7牧', '8牧', '9牧', '10牧', '11牧', '12牧'], // x轴
  1367. // 'data2': [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3], // 自动跳转
  1368. // 'data3': [2.6, 5.9, 9.0, 30, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3] // 手动跳转
  1369. // }
  1370. this.chart3.total = response.data.total
  1371. this.chart3.total = response.data.total
  1372. console.log('混料次数统计图', this.chart3.chartLine_data)
  1373. console.log('混料次数统计表', this.chart3.table.list)
  1374. this.roadChartLine3(this.chart3.chartLine_data)
  1375. } else {
  1376. this.chart3.list = []
  1377. }
  1378. setTimeout(() => {
  1379. this.chart3.listLoading = false
  1380. }, 100)
  1381. })
  1382. },
  1383. roadChartLine3(chartLine_data) {
  1384. if (this.chart3.chartLine != null) {
  1385. this.chart3.chartLine.dispose()
  1386. }
  1387. this.chart3.chartLine = echarts.init(document.getElementById('chartLine3'))
  1388. var option = {
  1389. tooltip: {
  1390. trigger: 'axis',
  1391. axisPointer: {
  1392. type: 'cross',
  1393. crossStyle: {
  1394. color: '#999'
  1395. }
  1396. }
  1397. },
  1398. legend: {
  1399. data: ['自动跳转', '手动跳转', '取消次数']
  1400. },
  1401. xAxis: [{ type: 'category', data: chartLine_data.data1, axisPointer: { type: 'shadow' }}],
  1402. yAxis: [{ type: 'value', name: '次数', min: 0, max: 100, interval: 20, axisLabel: { formatter: '{value}' }}],
  1403. series: [{ name: '自动跳转', type: 'bar', itemStyle: { normal: { color: '#7ecf51' }},
  1404. data: chartLine_data.data2,
  1405. markLine: {
  1406. data: [{ type: 'average' }],
  1407. symbol: ['none', 'none'],
  1408. position: 'insideTopCenter',
  1409. itemStyle: {
  1410. normal: {
  1411. lineStyle: { type: 'dotted', width: 3 },
  1412. label: { show: true, position: 'middle', formatter: '' }
  1413. }
  1414. },
  1415. large: true,
  1416. effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }
  1417. }
  1418. },
  1419. {
  1420. name: '手动跳转',
  1421. type: 'bar',
  1422. itemStyle: {
  1423. normal: {
  1424. color: '#ff6600'
  1425. }
  1426. },
  1427. data: chartLine_data.data3,
  1428. markLine: {
  1429. data: [{ type: 'average' }],
  1430. symbol: ['none', 'none'],
  1431. position: 'insideTopCenter',
  1432. itemStyle: {
  1433. normal: {
  1434. lineStyle: { type: 'dotted', width: 3 },
  1435. label: { show: true, position: 'middle', formatter: '' }
  1436. }
  1437. },
  1438. large: true,
  1439. effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }
  1440. }
  1441. }]
  1442. }
  1443. this.chart3.chartLine.setOption(option)
  1444. window.onresize = function() {
  1445. this.chart3.chartLine.resize()
  1446. }
  1447. },
  1448. // 混料准确率统计
  1449. getChart4() {
  1450. this.chart4.listLoading = true
  1451. GetReportform(this.chart4.getdataListParm).then(response => {
  1452. if (response.data.list !== null) {
  1453. // for (let i = 0; i < response.data.data.length; i++) {
  1454. // response.data.data[i].准确率 = response.data.data[i].准确率 + '%'
  1455. // }
  1456. this.chart4.table.list = response.data.data
  1457. this.chart4.chartLine_data = response.data.list
  1458. // this.chart4.chartLine_data = {
  1459. // 'data1': ['1牧', '2牧', '3牧', '4牧', '5牧', '6牧', '7牧', '8牧', '9牧', '10牧', '11牧', '12牧'], // x轴
  1460. // 'data2': [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3], // 自动跳转准确率
  1461. // 'data3': [2.6, 5.9, 9.0, 30, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3] // 手动跳转准确率
  1462. // }
  1463. this.chart4.total = response.data.total
  1464. this.chart4.total = response.data.total
  1465. console.log('混料准确率统计图', this.chart4.chartLine_data)
  1466. console.log('混料准确率统计表', this.chart4.table.list)
  1467. this.roadChartLine4(this.chart4.chartLine_data)
  1468. } else {
  1469. this.chart4.list = []
  1470. }
  1471. setTimeout(() => {
  1472. this.chart4.listLoading = false
  1473. }, 100)
  1474. })
  1475. },
  1476. roadChartLine4(chartLine_data) {
  1477. if (this.chart4.chartLine != null) {
  1478. this.chart4.chartLine.dispose()
  1479. }
  1480. this.chart4.chartLine = echarts.init(document.getElementById('chartLine4'))
  1481. var option = {
  1482. tooltip: {
  1483. trigger: 'axis',
  1484. axisPointer: {
  1485. type: 'cross',
  1486. crossStyle: {
  1487. color: '#999'
  1488. }
  1489. }
  1490. },
  1491. legend: {
  1492. data: ['自动跳转准确率', '手动跳转准确率']
  1493. },
  1494. xAxis: [{ type: 'category', data: chartLine_data.data1, axisPointer: { type: 'shadow' }}],
  1495. yAxis: [{ type: 'value', name: '混料准确率', min: 0, max: 100, interval: 20, axisLabel: { formatter: '{value}%' }}],
  1496. series: [{ name: '自动跳转准确率', type: 'bar', itemStyle: { normal: { color: '#7ecf51' }},
  1497. data: chartLine_data.data2,
  1498. markLine: {
  1499. data: [{ type: 'average' }],
  1500. symbol: ['none', 'none'],
  1501. position: 'insideTopCenter',
  1502. itemStyle: {
  1503. normal: {
  1504. lineStyle: { type: 'dotted', width: 3 },
  1505. label: { show: true, position: 'middle', formatter: '' }
  1506. }
  1507. },
  1508. large: true,
  1509. effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }
  1510. }
  1511. },
  1512. {
  1513. name: '手动跳转准确率',
  1514. type: 'bar',
  1515. itemStyle: {
  1516. normal: {
  1517. color: '#ff6600'
  1518. }
  1519. },
  1520. data: chartLine_data.data3,
  1521. markLine: {
  1522. data: [{ type: 'average' }],
  1523. symbol: ['none', 'none'],
  1524. position: 'insideTopCenter',
  1525. itemStyle: {
  1526. normal: {
  1527. lineStyle: { type: 'dotted', width: 3 },
  1528. label: { show: true, position: 'middle', formatter: '' }
  1529. }
  1530. },
  1531. large: true,
  1532. effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }
  1533. }
  1534. }]
  1535. }
  1536. this.chart4.chartLine.setOption(option)
  1537. window.onresize = function() {
  1538. this.chart4.chartLine.resize()
  1539. }
  1540. },
  1541. // 栏舍平均撒料时间统计
  1542. getChart5() {
  1543. this.chart5.listLoading = true
  1544. GetReportform(this.chart5.getdataListParm).then(response => {
  1545. if (response.data.list !== null) {
  1546. this.chart5.table.list = response.data.data
  1547. this.chart5.chartLine_data = response.data.list
  1548. // this.chart5.chartLine_data = {
  1549. // data1: ['1牧', '2牧', '3牧'], // 折线
  1550. // data2: ['12/01', '12/02', '12/03'], // X轴
  1551. // data3: [
  1552. // { data: [15.00, 12.08, 1.07, 1.02] },
  1553. // { data: [17.00, 8.05, 1.02, 1.08] },
  1554. // { data: [13.00, 22.05, 1.09, 1.04] }
  1555. // ]// 折线对应数据
  1556. // }
  1557. this.chart5.total = response.data.total
  1558. console.log('栏舍平均撒料时间统计图', this.chart5.chartLine_data)
  1559. console.log('栏舍平均撒料时间统计表', this.chart5.table.list)
  1560. this.roadChartLine5(this.chart5.chartLine_data)
  1561. } else {
  1562. this.chart5.list = []
  1563. }
  1564. setTimeout(() => {
  1565. this.chart5.listLoading = false
  1566. }, 100)
  1567. })
  1568. },
  1569. roadChartLine5(chartLine_data) {
  1570. if (this.chart5.chartLine != null) {
  1571. this.chart5.chartLine.dispose()
  1572. }
  1573. this.chart5.chartLine = echarts.init(document.getElementById('chartLine5'))
  1574. var option = {
  1575. title: {
  1576. text: ''
  1577. },
  1578. tooltip: {
  1579. trigger: 'axis',
  1580. formatter: function(params) {
  1581. // console.log(params)
  1582. var tip = params[0].name
  1583. for (let i = 0; i < params.length; i++) {
  1584. var b = []
  1585. // var str = params[i].value
  1586. for (let j = 0; j <= params[i].value.length; j++) {
  1587. if (params[i].value !== '') {
  1588. if (params[i].value.charAt(j) == '.') {
  1589. b[j] = params[i].value.replace('.', ':')
  1590. }
  1591. } else {
  1592. b[j] = ''
  1593. }
  1594. }
  1595. tip += '<br>' + params[i].seriesName + ': ' + b[b.length - 1]
  1596. }
  1597. return tip
  1598. }
  1599. },
  1600. legend: {
  1601. data: chartLine_data.data1,
  1602. right: 10
  1603. },
  1604. grid: {
  1605. top: '20%',
  1606. left: '5%',
  1607. right: '8%',
  1608. containLabel: true
  1609. },
  1610. toolbox: {
  1611. show: true,
  1612. right: '2%',
  1613. feature: {}
  1614. },
  1615. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
  1616. yAxis: [{
  1617. type: '',
  1618. name: '时间',
  1619. mix: 0,
  1620. max: 24,
  1621. interval: 2,
  1622. axisLabel: {
  1623. formatter: function(value) {
  1624. var texts = []
  1625. if (value < 10) {
  1626. texts.push('0' + value + ':00')
  1627. } else {
  1628. texts.push(value + ':00')
  1629. }
  1630. return texts
  1631. }
  1632. }
  1633. }],
  1634. series: (function() {
  1635. var serie = []
  1636. for (var i = 0; i < chartLine_data.data3.length; i++) {
  1637. var item = {
  1638. name: chartLine_data.data1[i],
  1639. type: 'line',
  1640. data: chartLine_data.data3[i].data
  1641. }
  1642. serie.push(item)
  1643. }
  1644. return serie
  1645. }())
  1646. }
  1647. this.chart5.chartLine.setOption(option)
  1648. window.onresize = function() {
  1649. this.chart5.chartLine.resize()
  1650. }
  1651. },
  1652. // 混料计划取消次数
  1653. getChart6() {
  1654. this.chart6.listLoading = true
  1655. GetReportform(this.chart6.getdataListParm).then(response => {
  1656. if (response.data.list !== null) {
  1657. // for (let i = 0; i < response.data.data.length; i++) {
  1658. // response.data.data[i].准确率 = response.data.data[i].准确率 + '%'
  1659. // }
  1660. this.chart6.table.list = response.data.data
  1661. this.chart6.chartLine_data = response.data.list
  1662. // this.chart6.chartLine_data = {
  1663. // 'data1': ['1牧', '2牧', '3牧', '4牧', '5牧', '6牧', '7牧', '8牧', '9牧', '10牧', '11牧', '12牧'], // x轴
  1664. // 'data2': [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3], // 自动跳转准确率
  1665. // 'data3': [2.6, 5.9, 9.0, 30, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3] // 手动跳转准确率
  1666. // }
  1667. this.chart6.total = response.data.total
  1668. this.chart6.total = response.data.total
  1669. console.log('混料计划取消次数图', this.chart6.chartLine_data)
  1670. console.log('混料计划取消次数表', this.chart6.table.list)
  1671. this.roadChartLine6(this.chart6.chartLine_data)
  1672. } else {
  1673. this.chart6.list = []
  1674. }
  1675. setTimeout(() => {
  1676. this.chart6.listLoading = false
  1677. }, 100)
  1678. })
  1679. },
  1680. roadChartLine6(chartLine_data) {
  1681. if (this.chart6.chartLine != null) {
  1682. this.chart6.chartLine.dispose()
  1683. }
  1684. this.chart6.chartLine = echarts.init(document.getElementById('chartLine6'))
  1685. var option = {
  1686. tooltip: {
  1687. trigger: 'axis',
  1688. axisPointer: {
  1689. type: 'cross',
  1690. crossStyle: {
  1691. color: '#999'
  1692. }
  1693. }
  1694. },
  1695. legend: {
  1696. data: ['混料计划取消次数']
  1697. },
  1698. xAxis: [{ type: 'category', data: chartLine_data.data1, axisPointer: { type: 'shadow' }}],
  1699. yAxis: [{ type: 'value', name: '次数', min: 0, max: 100, interval: 20, axisLabel: { formatter: '{value}%' }}],
  1700. series: [{ name: '混料计划取消次数', type: 'bar', itemStyle: { normal: { color: '#7ecf51' }},
  1701. data: chartLine_data.data2,
  1702. markLine: {
  1703. data: [{ type: 'average' }],
  1704. symbol: ['none', 'none'],
  1705. position: 'insideTopCenter',
  1706. itemStyle: {
  1707. normal: {
  1708. lineStyle: { type: 'dotted', width: 3 },
  1709. label: { show: true, position: 'middle', formatter: '' }
  1710. }
  1711. },
  1712. large: true,
  1713. effect: { show: false, loop: true, period: 0, scaleSize: 2, color: null, shadowColor: null, shadowBlur: null }
  1714. }
  1715. }]
  1716. }
  1717. this.chart6.chartLine.setOption(option)
  1718. window.onresize = function() {
  1719. this.chart6.chartLine.resize()
  1720. }
  1721. },
  1722. handleDownload() {
  1723. var excelDatas = [
  1724. {
  1725. tHeader: ['配方名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '方差'],
  1726. filterVal: ['配方名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '方差'],
  1727. tableDatas: this.table.list,
  1728. sheetName: '混料'
  1729. },
  1730. {
  1731. tHeader: ['配方名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数'],
  1732. filterVal: ['配方名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数'],
  1733. tableDatas: this.table2.list,
  1734. sheetName: '撒料'
  1735. }
  1736. ]
  1737. json2excel(excelDatas, '汇总统计-配方名称', true, 'xlsx')
  1738. },
  1739. // 时间
  1740. changeChartDate(item) {
  1741. console.log(item)
  1742. if (item == 'chart1') {
  1743. if (this.chart1.getdataListParm.parammaps.inputDatetime !== '' && this.chart1.getdataListParm.parammaps.inputDatetime !== null) {
  1744. this.chart1.getdataListParm.parammaps.startTime = parseTime(this.chart1.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  1745. this.chart1.getdataListParm.parammaps.stopTime = parseTime(this.chart1.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  1746. this.getChart1()
  1747. } else {
  1748. this.chart1.getdataListParm.parammaps.inputDatetime = ''
  1749. this.chart1.getdataListParm.parammaps.startTime = ''
  1750. this.chart1.getdataListParm.parammaps.stopTime = ''
  1751. this.getChart1()
  1752. }
  1753. } else if (item == 'chart2') {
  1754. if (this.chart2.getdataListParm.parammaps.inputDatetime !== '' && this.chart2.getdataListParm.parammaps.inputDatetime !== null) {
  1755. this.chart2.getdataListParm.parammaps.startTime = parseTime(this.chart2.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  1756. this.chart2.getdataListParm.parammaps.stopTime = parseTime(this.chart2.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  1757. this.getChart2()
  1758. } else {
  1759. this.chart2.getdataListParm.parammaps.inputDatetime = ''
  1760. this.chart2.getdataListParm.parammaps.startTime = ''
  1761. this.chart2.getdataListParm.parammaps.stopTime = ''
  1762. this.getChart2()
  1763. }
  1764. } else if (item == 'chart3') {
  1765. if (this.chart3.getdataListParm.parammaps.inputDatetime !== '' && this.chart3.getdataListParm.parammaps.inputDatetime !== null) {
  1766. this.chart3.getdataListParm.parammaps.startTime = parseTime(this.chart3.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  1767. this.chart3.getdataListParm.parammaps.stopTime = parseTime(this.chart3.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  1768. this.getChart3()
  1769. } else {
  1770. this.chart3.getdataListParm.parammaps.inputDatetime = ''
  1771. this.chart3.getdataListParm.parammaps.startTime = ''
  1772. this.chart3.getdataListParm.parammaps.stopTime = ''
  1773. this.getChart3()
  1774. }
  1775. } else if (item == 'chart4') {
  1776. if (this.chart4.getdataListParm.parammaps.inputDatetime !== '' && this.chart4.getdataListParm.parammaps.inputDatetime !== null) {
  1777. this.chart4.getdataListParm.parammaps.startTime = parseTime(this.chart4.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  1778. this.chart4.getdataListParm.parammaps.stopTime = parseTime(this.chart4.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  1779. this.getChart4()
  1780. } else {
  1781. this.chart4.getdataListParm.parammaps.inputDatetime = ''
  1782. this.chart4.getdataListParm.parammaps.startTime = ''
  1783. this.chart4.getdataListParm.parammaps.stopTime = ''
  1784. this.getChart4()
  1785. }
  1786. } else if (item == 'chart5') {
  1787. if (this.chart5.getdataListParm.parammaps.inputDatetime !== '' && this.chart5.getdataListParm.parammaps.inputDatetime !== null) {
  1788. this.chart5.getdataListParm.parammaps.startTime = parseTime(this.chart5.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  1789. this.chart5.getdataListParm.parammaps.stopTime = parseTime(this.chart5.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  1790. this.getChart5()
  1791. } else {
  1792. this.chart5.getdataListParm.parammaps.inputDatetime = ''
  1793. this.chart5.getdataListParm.parammaps.startTime = ''
  1794. this.chart5.getdataListParm.parammaps.stopTime = ''
  1795. this.getChart5()
  1796. }
  1797. } else if (item == 'chart6') {
  1798. if (this.chart6.getdataListParm.parammaps.inputDatetime !== '' && this.chart6.getdataListParm.parammaps.inputDatetime !== null) {
  1799. this.chart6.getdataListParm.parammaps.startTime = parseTime(this.chart6.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  1800. this.chart6.getdataListParm.parammaps.stopTime = parseTime(this.chart6.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  1801. this.getChart6()
  1802. } else {
  1803. this.chart6.getdataListParm.parammaps.inputDatetime = ''
  1804. this.chart6.getdataListParm.parammaps.startTime = ''
  1805. this.chart6.getdataListParm.parammaps.stopTime = ''
  1806. this.getChart6()
  1807. }
  1808. }
  1809. },
  1810. handleExport(item) {
  1811. if (item == 'chart1') {
  1812. console.log('配方准确率导出')
  1813. var excelDatasTabChart1 = [
  1814. {
  1815. tHeader: ['日期', '配方名称', '计划重量(kg)', '实际重量(kg)', '准确率'],
  1816. filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
  1817. tableDatas: this.chart1.table.list,
  1818. sheetName: '配方准确率'
  1819. }
  1820. ]
  1821. json2excel(excelDatasTabChart1, '配方准确率', true, 'xlsx')
  1822. } else if (item == 'chart2') {
  1823. console.log('计划统计导出')
  1824. var excelDatasTabChart2 = [
  1825. {
  1826. tHeader: ['日期', '计划执行重量(kg)', '配方理论重量(kg)', '计划准确率', '计划取消重量(kg)', '计划准确率(去除取消重量)', '计划正确数', '计划数', '计划正确率'],
  1827. filterVal: ['日期', '实际量', '理论量', 'field1', '计划取消重量', 'field3', '正确数', '计划数', 'field2'],
  1828. tableDatas: this.chart2.table.list,
  1829. sheetName: '计划统计'
  1830. }
  1831. ]
  1832. json2excel(excelDatasTabChart2, '计划统计', true, 'xlsx')
  1833. } else if (item == 'chart3') {
  1834. console.log('牛群准确率导出')
  1835. var excelDatasTabChart3 = [
  1836. {
  1837. tHeader: ['日期', '牲畜类别', '计划重量(kg)', '实际重量(kg)', '准确率'],
  1838. filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
  1839. tableDatas: this.chart3.table.list,
  1840. sheetName: '牛群准确率'
  1841. }
  1842. ]
  1843. json2excel(excelDatasTabChart3, '牛群准确率', true, 'xlsx')
  1844. } else if (item == 'chart4') {
  1845. console.log('车辆准确率(重量)导出')
  1846. var excelDatasTabChart4 = [
  1847. {
  1848. tHeader: ['日期', '车次', '计划重量(kg)', '实际重量(kg)', '准确率'],
  1849. filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
  1850. tableDatas: this.chart4.table.list,
  1851. sheetName: '车辆准确率(重量)'
  1852. }
  1853. ]
  1854. json2excel(excelDatasTabChart4, '车辆准确率(重量)', true, 'xlsx')
  1855. } else if (item == 'chart5') {
  1856. console.log('混料统计导出')
  1857. var excelDatasTabChart5 = [
  1858. {
  1859. tHeader: ['日期', '自动跳转次数', '手动跳转次数', '自动跳转理论重量', '自动跳转实际重量', '自动跳转准确率', '手动跳转理论重量', '手动跳转实际重量', '手动跳转准确率'],
  1860. filterVal: ['日期', 'field1', 'field2', '理论自动', '实际自动', 'field3', '理论手动', '实际手动', 'field4'],
  1861. tableDatas: this.chart5.table.list,
  1862. sheetName: '混料统计'
  1863. }
  1864. ]
  1865. json2excel(excelDatasTabChart5, '混料统计', true, 'xlsx')
  1866. } else if (item == 'chart6') {
  1867. console.log('混料计划取消次数导出')
  1868. var excelDatasTabChart5 = [
  1869. {
  1870. tHeader: ['日期', '自动跳转次数', '手动跳转次数', '自动跳转理论重量', '自动跳转实际重量', '自动跳转准确率', '手动跳转理论重量', '手动跳转实际重量', '手动跳转准确率'],
  1871. filterVal: ['日期', 'field1', 'field2', '理论自动', '实际自动', 'field3', '理论手动', '实际手动', 'field4'],
  1872. tableDatas: this.chart5.table.list,
  1873. sheetName: '混料计划取消次数'
  1874. }
  1875. ]
  1876. json2excel(excelDatasTabChart5, '混料计划取消次数', true, 'xlsx')
  1877. }
  1878. },
  1879. handleTable(item) {
  1880. // 显示切换表格
  1881. if (item == 'chart1') {
  1882. console.log('配方准确率表格')
  1883. this.chart1.isTable = true
  1884. this.chart1.isChart = false
  1885. } else if (item == 'chart2') {
  1886. console.log('计划统计表格')
  1887. this.chart2.isTable = true
  1888. this.chart2.isChart = false
  1889. } else if (item == 'chart3') {
  1890. console.log('牛群准确率表格')
  1891. this.chart3.isTable = true
  1892. this.chart3.isChart = false
  1893. } else if (item == 'chart4') {
  1894. console.log('车辆准确率(重量)表格')
  1895. this.chart4.isTable = true
  1896. this.chart4.isChart = false
  1897. } else if (item == 'chart5') {
  1898. console.log('混料统计表格')
  1899. this.chart5.isTable = true
  1900. this.chart5.isChart = false
  1901. } else if (item == 'chart6') {
  1902. console.log('混料计划取消次数表格')
  1903. this.chart6.isTable = true
  1904. this.chart6.isChart = false
  1905. } else if (item == 'chart7') {
  1906. console.log('栏舍撒料时间统计表格')
  1907. this.chart7.isTable = true
  1908. this.chart7.isChart = false
  1909. }
  1910. },
  1911. // 切换图表
  1912. handleChart(item) {
  1913. // 显示切换图表
  1914. if (item == 'chart1') {
  1915. console.log('配方准确率图表')
  1916. this.chart1.isTable = false
  1917. this.chart1.isChart = true
  1918. } else if (item == 'chart2') {
  1919. console.log('计划统计图表')
  1920. this.chart2.isTable = false
  1921. this.chart2.isChart = true
  1922. } else if (item == 'chart3') {
  1923. console.log('牛群准确率图表')
  1924. this.chart3.isTable = false
  1925. this.chart3.isChart = true
  1926. } else if (item == 'chart4') {
  1927. console.log('车辆准确率(重量)图表')
  1928. this.chart4.isTable = false
  1929. this.chart4.isChart = true
  1930. } else if (item == 'chart5') {
  1931. console.log('混料统计图表')
  1932. this.chart5.isTable = false
  1933. this.chart5.isChart = true
  1934. } else if (item == 'chart6') {
  1935. console.log('混料计划取消次数图表')
  1936. this.chart6.isTable = false
  1937. this.chart6.isChart = true
  1938. } else if (item == 'chart7') {
  1939. console.log('栏舍撒料时间统计图表')
  1940. this.chart7.isTable = false
  1941. this.chart7.isChart = true
  1942. }
  1943. }
  1944. }
  1945. }
  1946. </script>
  1947. <style lang="scss" scoped>
  1948. .search{margin-bottom:10px;}
  1949. </style>