7da54773b6e63614eda0ac47d238dbec68bfc170.svn-base 98 KB

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