38e7b3c287b39abe88172bfb6e971e530b7f7af1.svn-base 88 KB

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