f04b75b64b7a1e28dda437f08c10a3cfec18204f.svn-base 100 KB

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