43cda0434198a953422a0937d6481262912bbee8.svn-base 79 KB

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