20fed59aad4cd7c232e285f5b72fa766268c696a.svn-base 79 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000
  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" 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" 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" 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" 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" 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" 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" 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:00', '02:00', '04:00', '06:00', '08:00', '10:00', '12:00', '14:00', '16:00', '18:00', '20:00', '22:00', '24:00'],
  1716. data3: [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24],
  1717. data4: [0, 3, 5, 8, 10, 16, 20],
  1718. data5: [23, 15, 5, 18, 4, 8, 10],
  1719. data6: [2, 5, 8, 10, 15, 16, 22]
  1720. }
  1721. this.tab.chart7.total = response.data.total
  1722. this.roadChartLine7(this.tab.chart7.chartLine_data)
  1723. } else {
  1724. this.tab.chart7.list = []
  1725. }
  1726. setTimeout(() => {
  1727. this.tab.chart7.listLoading = false
  1728. }, 100)
  1729. })
  1730. },
  1731. getChart7Table() {
  1732. this.tab.chart7.table.listLoading = true
  1733. GetDataByName(this.tab.chart7.table.getdataListParm).then(response => {
  1734. console.log('栏舍撒料时间统计table/导出数据', response.data.list)
  1735. if (response.data.list !== null) {
  1736. this.tab.chart7.table.list = response.data.list
  1737. this.tab.chart7.table.total = response.data.total
  1738. } else {
  1739. this.tab.chart7.table.list = []
  1740. }
  1741. setTimeout(() => {
  1742. this.tab.chart7.table.listLoading = false
  1743. }, 100)
  1744. })
  1745. },
  1746. roadChartLine7(chartLine_data) {
  1747. if (this.tab.chart7.chartLine != null) {
  1748. this.tab.chart7.chartLine.dispose()
  1749. }
  1750. this.tab.chart7.chartLine = echarts.init(document.getElementById('chartLine7'))
  1751. var option = {
  1752. title: {
  1753. text: ''
  1754. },
  1755. tooltip: {
  1756. trigger: 'axis'
  1757. },
  1758. legend: {
  1759. data: chartLine_data.data1,
  1760. top: 10,
  1761. right: 10
  1762. },
  1763. grid: {
  1764. left: '3%',
  1765. right: '8%',
  1766. bottom: '3%',
  1767. containLabel: true
  1768. },
  1769. toolbox: {
  1770. show: true,
  1771. right: '2%',
  1772. feature: {}
  1773. },
  1774. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
  1775. yAxis: [{
  1776. type: 'value',
  1777. name: '时间',
  1778. mix: 0,
  1779. max: 24,
  1780. interval: 2,
  1781. axisLabel: {
  1782. formatter: function(value) {
  1783. var texts = []
  1784. if (value < 10) {
  1785. texts.push('0' + value + ':00')
  1786. } else {
  1787. texts.push(value + ':00')
  1788. }
  1789. return texts
  1790. }
  1791. }
  1792. }],
  1793. series: [
  1794. {
  1795. name: chartLine_data.data1[0],
  1796. type: 'line',
  1797. stack: '总量',
  1798. data: chartLine_data.data4
  1799. },
  1800. {
  1801. name: chartLine_data.data1[1],
  1802. type: 'line',
  1803. stack: '总量',
  1804. data: chartLine_data.data5
  1805. },
  1806. {
  1807. name: chartLine_data.data1[2],
  1808. type: 'line',
  1809. stack: '总量',
  1810. data: chartLine_data.data6
  1811. }
  1812. ]
  1813. }
  1814. this.tab.chart7.chartLine.setOption(option)
  1815. window.onresize = function() {
  1816. this.tab.chart7.chartLine.resize()
  1817. }
  1818. },
  1819. // 导出
  1820. handleExport(item) {
  1821. if (item == 'chart1') {
  1822. console.log('配方准确率导出')
  1823. this.getChart1Table()
  1824. } else if (item == 'chart2') {
  1825. console.log('计划统计导出')
  1826. this.getChart2Table()
  1827. } else if (item == 'chart3') {
  1828. console.log('牛群准确率导出')
  1829. this.getChart3Table()
  1830. } else if (item == 'chart4') {
  1831. console.log('车辆准确率(重量)导出')
  1832. this.getChart4Table()
  1833. } else if (item == 'chart5') {
  1834. console.log('混料统计导出')
  1835. this.getChart5Table()
  1836. } else if (item == 'chart6') {
  1837. console.log('混料计划取消次数导出')
  1838. this.getChart6Table()
  1839. } else if (item == 'chart7') {
  1840. console.log('栏舍撒料时间统计导出')
  1841. this.getChart7Table()
  1842. }
  1843. },
  1844. // 切换表格
  1845. handleTable(item) {
  1846. // 显示切换表格
  1847. if (item == 'chart1') {
  1848. console.log('配方准确率表格')
  1849. this.tab.chart1.isTable = true
  1850. this.tab.chart1.isChart = false
  1851. this.getChart1Table()
  1852. } else if (item == 'chart2') {
  1853. console.log('计划统计表格')
  1854. this.tab.chart2.isTable = true
  1855. this.tab.chart2.isChart = false
  1856. this.getChart2Table()
  1857. } else if (item == 'chart3') {
  1858. console.log('牛群准确率表格')
  1859. this.tab.chart3.isTable = true
  1860. this.tab.chart3.isChart = false
  1861. this.getChart3Table()
  1862. } else if (item == 'chart4') {
  1863. console.log('车辆准确率(重量)表格')
  1864. this.tab.chart4.isTable = true
  1865. this.tab.chart4.isChart = false
  1866. this.getChart4Table()
  1867. } else if (item == 'chart5') {
  1868. console.log('混料统计表格')
  1869. this.tab.chart5.isTable = true
  1870. this.tab.chart5.isChart = false
  1871. this.getChart5Table()
  1872. } else if (item == 'chart6') {
  1873. console.log('混料计划取消次数表格')
  1874. this.tab.chart6.isTable = true
  1875. this.tab.chart6.isChart = false
  1876. this.getChart6Table()
  1877. } else if (item == 'chart7') {
  1878. console.log('栏舍撒料时间统计表格')
  1879. this.tab.chart7.isTable = true
  1880. this.tab.chart7.isChart = false
  1881. this.getChart7Table()
  1882. }
  1883. },
  1884. // 切换图表
  1885. handleChart(item) {
  1886. // 显示切换图表
  1887. if (item == 'chart1') {
  1888. console.log('配方准确率图表')
  1889. this.tab.chart1.isTable = false
  1890. this.tab.chart1.isChart = true
  1891. } else if (item == 'chart2') {
  1892. console.log('计划统计图表')
  1893. this.tab.chart2.isTable = false
  1894. this.tab.chart2.isChart = true
  1895. } else if (item == 'chart3') {
  1896. console.log('牛群准确率图表')
  1897. this.tab.chart3.isTable = false
  1898. this.tab.chart3.isChart = true
  1899. } else if (item == 'chart4') {
  1900. console.log('车辆准确率(重量)图表')
  1901. this.tab.chart4.isTable = false
  1902. this.tab.chart4.isChart = true
  1903. } else if (item == 'chart5') {
  1904. console.log('混料统计图表')
  1905. this.tab.chart5.isTable = false
  1906. this.tab.chart5.isChart = true
  1907. } else if (item == 'chart6') {
  1908. console.log('混料计划取消次数图表')
  1909. this.tab.chart6.isTable = false
  1910. this.tab.chart6.isChart = true
  1911. } else if (item == 'chart7') {
  1912. console.log('栏舍撒料时间统计图表')
  1913. this.tab.chart7.isTable = false
  1914. this.tab.chart7.isChart = true
  1915. }
  1916. },
  1917. // 混料统计
  1918. getTab2List() {
  1919. this.tab2.table.listLoading = true
  1920. GetDataByName(this.tab2.table.getdataListParm).then(response => {
  1921. console.log('混料统计table数据', response.data.list)
  1922. if (response.data.list !== null) {
  1923. this.tab2.table.list = response.data.list
  1924. this.tab2.table.total = response.data.total
  1925. } else {
  1926. this.tab2.table.list = []
  1927. }
  1928. setTimeout(() => {
  1929. this.tab2.table.listLoading = false
  1930. }, 100)
  1931. })
  1932. },
  1933. handleSearch2() {
  1934. this.getTab2List()
  1935. },
  1936. handleRefresh2() {
  1937. this.getTab2List()
  1938. },
  1939. handleExport2() {},
  1940. // 撒料统计
  1941. getTab3List() {
  1942. this.tab3.table.listLoading = true
  1943. GetDataByName(this.tab3.table.getdataListParm).then(response => {
  1944. console.log('撒料统计table数据', response.data.list)
  1945. if (response.data.list !== null) {
  1946. this.tab3.table.list = response.data.list
  1947. this.tab3.table.total = response.data.total
  1948. } else {
  1949. this.tab3.table.list = []
  1950. }
  1951. setTimeout(() => {
  1952. this.tab3.table.listLoading = false
  1953. }, 100)
  1954. })
  1955. },
  1956. handleSearch3() {
  1957. this.getTab3List()
  1958. },
  1959. handleRefresh3() {
  1960. this.getTab3List()
  1961. },
  1962. handleExport3() {}
  1963. }
  1964. }
  1965. </script>
  1966. <style lang="scss" scoped>
  1967. .search{margin-bottom:10px;}
  1968. </style>