87c59e81fb304c4b6d1fab919b1031a46aa77837.svn-base 104 KB

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