83d1e9676c276118f99ba40cd1d8e2557a25c1b1.svn-base 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551
  1. <template>
  2. <div class="app-container">
  3. <!-- <h1>集团</h1> -->
  4. <el-tabs v-model="activeName" @tab-click="handleTabClick">
  5. <el-tab-pane label="效率统计" name="first">
  6. <div class="search">
  7. <el-date-picker v-model="tab.table.getdataListParm.parammaps.date" :clearable="false" type="date" placeholder="选择日期" style="width: 150px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
  8. <span style="margin-left: 10px;">统计类型:</span>
  9. <el-radio v-model="tab.radio" label="1" @change="changeRadio">配方</el-radio>
  10. <el-radio v-model="tab.radio" label="2" @change="changeRadio">栏舍</el-radio>
  11. <el-radio v-model="tab.radio" label="3" @change="changeRadio">牲畜类别</el-radio>
  12. <el-input v-if="tab.isFormulaName" v-model="tab.table.getdataListParm.parammaps.ftname" class="filter-item" style="width: 245px;" placeholder="配方模板" />
  13. <el-input v-if="tab.isHouseName" v-model="tab.table.getdataListParm.parammaps.barname" class="filter-item" style="width: 150px;" placeholder="栏舍" />
  14. <el-input v-if="tab.isHouseName" v-model="tab.table.getdataListParm.parammaps.ftname" class="filter-item" style="width: 150px;" placeholder="配方模板" />
  15. <el-input v-if="tab.isLivestockType" v-model="tab.table.getdataListParm.parammaps.cowclass" class="filter-item" style="width: 150px;" placeholder="牲畜类别" />
  16. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  17. <el-button class="export" @click="handleDownload">导出</el-button>
  18. <svg-icon icon-class="down" style="width: 40px;height: 40px;float: right;" @click="handleQuickJumpChart" />
  19. </div>
  20. <div class="table">
  21. <el-table
  22. :key="tab.table.tableKey"
  23. v-loading="tab.table.listLoading"
  24. element-loading-text="给我一点时间"
  25. :data="tab.table.list"
  26. border
  27. fit
  28. highlight-current-row
  29. style="width: 100%;"
  30. :row-style="rowStyle"
  31. :cell-style="cellStyle"
  32. class="elTable table-fixed"
  33. >
  34. <el-table-column v-if="tab.isFormulaName" label="配方模板" min-width="110px" align="center" prop="配方模板" />
  35. <el-table-column v-if="tab.isHouseName" label="栏舍" min-width="110px" align="center" prop="栏舍" />
  36. <el-table-column v-if="tab.isHouseName" label="配方模板" min-width="110px" align="center" prop="配方模板" />
  37. <el-table-column v-if="tab.isLivestockType" label="牲畜类别" min-width="110px" align="center" prop="牲畜类别" />
  38. <el-table-column label="实际牛头数" min-width="110px" align="center" prop="实际牛头数" />
  39. <el-table-column label="应混料量(kg)" min-width="110px" align="center" prop="应混料量" />
  40. <el-table-column label="实际混料量(kg)" min-width="110px" align="center" prop="实际混料量" />
  41. <el-table-column label="撒料量(kg)" min-width="110px" align="center" prop="撒料量" />
  42. <el-table-column label="混料时间" min-width="110px" align="center" prop="混料时间" />
  43. <el-table-column label="转投剩料量(kg)" min-width="110px" align="center" prop="转投剩料量" />
  44. <el-table-column label="今日剩料量(kg)" min-width="110px" align="center" prop="今日剩料量" />
  45. <el-table-column label="剩料率(%)" min-width="110px" align="center" prop="剩料率" />
  46. <el-table-column label="TMR干物质(%)" min-width="110px" align="center" prop="TMR干物质" />
  47. <el-table-column label="配方干物质采食量(kg/头)" min-width="110px" align="center" prop="配方干物质采食量" />
  48. <el-table-column label="实际干物质采食量(kg/头)" 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="产奶量(kg/头)" min-width="110px" align="center" prop="产奶量" />
  53. <el-table-column label="饲料转化率" min-width="110px" align="center" prop="饲料转化率" />
  54. <el-table-column label="公斤奶饲料成本" min-width="110px" align="center" prop="公斤奶饲料成本" />
  55. </el-table>
  56. <!-- <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" /> -->
  57. </div>
  58. <div id="chartDate" style="height: 90px;" />
  59. <div class="AnalysisChart">
  60. <el-row :gutter="10">
  61. <el-col :span="2"><h4>图表查询时间:</h4></el-col>
  62. <el-col :span="22" style="margin-top: 10px;">
  63. <el-date-picker v-model="tab.chartDate" :clearable="false" style="width: 250px;margin-right: 10px;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" />
  64. <el-button class="successBorder" @click="handleChartDate">确认</el-button>
  65. <svg-icon icon-class="Up" style="width: 40px;height: 40px;float: right;" @click="handleQuickJumpTop" />
  66. </el-col>
  67. </el-row>
  68. <el-row :gutter="10">
  69. <!-- 泌乳牛采食量 -->
  70. <el-col :span="12" style="position: relative;">
  71. <h4 style="text-align:center;">泌乳牛采食量</h4>
  72. <div>
  73. <el-date-picker v-model="tab.chart1.getdataListParm.parammaps.inputDatetime" style="width: 250px;" class="inputDatetime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :clearable="false" :picker-options="pickerOptions" @change="changeChartDate('chart1')" />
  74. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart1')">导出</el-button>
  75. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart1')">切换表格</el-button>
  76. </div>
  77. <div id="chartLine1" style="width:100%;height:430px;" />
  78. <div v-if="tab.chart1.isTable" class="table" style="width: 100%;position: absolute;top:19px;right: 0;">
  79. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart1')">导出</el-button>
  80. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart1')">切换图表</el-button>
  81. <el-table
  82. :key="tab.chart1.table.tableKey"
  83. v-loading="tab.chart1.table.listLoading"
  84. element-loading-text="给我一点时间"
  85. :data="tab.chart1.table.list"
  86. border
  87. fit
  88. highlight-current-row
  89. style="width: 100%;"
  90. height="430"
  91. :row-style="rowStyle"
  92. :cell-style="cellStyle"
  93. class="elTable table-fixed"
  94. >
  95. <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
  96. <el-table-column label="泌乳牛采食量(kg)" sortable min-width="110px" align="center" prop="field1" />
  97. <el-table-column label="泌乳牛产奶量(kg)" sortable min-width="110px" align="center" prop="field2" />
  98. </el-table>
  99. </div>
  100. </el-col>
  101. <!-- 剩料率 -->
  102. <el-col :span="12" style="position: relative;">
  103. <h4 style="text-align:center;">剩料率</h4>
  104. <div>
  105. <el-date-picker v-model="tab.chart2.getdataListParm.parammaps.inputDatetime" style="width: 250px;" class="inputDatetime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :clearable="false" :picker-options="pickerOptions" @change="changeChartDate('chart2')" />
  106. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart2')">导出</el-button>
  107. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart2')">切换表格</el-button>
  108. </div>
  109. <div id="chartLine2" style="width:100%;height:430px;" />
  110. <div v-if="tab.chart2.isTable" class="table" style="width: 100%;z-index:1;position: absolute;top:19px;right: 0;">
  111. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart2')">导出</el-button>
  112. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart2')">切换图表</el-button>
  113. <el-table
  114. :key="tab.chart2.table.tableKey"
  115. v-loading="tab.chart2.table.listLoading"
  116. element-loading-text="给我一点时间"
  117. :data="tab.chart2.table.list"
  118. border
  119. fit
  120. highlight-current-row
  121. style="width: 100%;"
  122. height="430"
  123. :row-style="rowStyle"
  124. :cell-style="cellStyle"
  125. class="elTable table-fixed"
  126. >
  127. <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
  128. <el-table-column label="栏舍名称" sortable min-width="110px" align="center" prop="名称" />
  129. <el-table-column label="剩料量" sortable min-width="110px" align="center" prop="剩料量" />
  130. <el-table-column label="撒料量" sortable min-width="110px" align="center" prop="撒料量" />
  131. <el-table-column label="剩料率" sortable min-width="110px" align="center" prop="准确率" />
  132. </el-table>
  133. </div>
  134. </el-col>
  135. </el-row>
  136. <el-row :gutter="10">
  137. <!-- 混料时间统计 -->
  138. <el-col :span="12" style="position: relative;">
  139. <h4 style="text-align:center;">混料时间统计</h4>
  140. <div>
  141. <el-date-picker v-model="tab.chart3.getdataListParm.parammaps.inputDatetime" style="width: 250px;" class="inputDatetime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :clearable="false" :picker-options="pickerOptions" @change="changeChartDate('chart3')" />
  142. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart3')">导出</el-button>
  143. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart3')">切换表格</el-button>
  144. </div>
  145. <div id="chartLine3" style="width:100%;height:430px;" />
  146. <div v-if="tab.chart3.isTable" class="table" style="width: 100%;position: absolute;top:19px;right: 0;">
  147. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart3')">导出</el-button>
  148. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart3')">切换图表</el-button>
  149. <el-table
  150. :key="tab.chart3.table.tableKey"
  151. v-loading="tab.chart3.table.listLoading"
  152. element-loading-text="给我一点时间"
  153. :data="tab.chart3.table.list"
  154. border
  155. fit
  156. highlight-current-row
  157. style="width: 100%;"
  158. height="430"
  159. :row-style="rowStyle"
  160. :cell-style="cellStyle"
  161. class="elTable table-fixed"
  162. >
  163. <el-table-column label="日期" min-width="110px" align="center" prop="日期" />
  164. <el-table-column label="混料时间(分钟)" min-width="110px" align="center" prop="field1" />
  165. </el-table>
  166. </div>
  167. </el-col>
  168. <!-- 转化率 -->
  169. <el-col :span="12" style="position: relative;">
  170. <h4 style="text-align:center;">转化率</h4>
  171. <div>
  172. <el-date-picker v-model="tab.chart4.getdataListParm.parammaps.inputDatetime" style="width: 250px;" class="inputDatetime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :clearable="false" :picker-options="pickerOptions" @change="changeChartDate('chart4')" />
  173. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart4')">导出</el-button>
  174. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart4')">切换表格</el-button>
  175. </div>
  176. <div id="chartLine4" style="width:100%;height:430px;" />
  177. <div v-if="tab.chart4.isTable" class="table" style="width: 100%;z-index:1;position: absolute;top:19px;right: 0;">
  178. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart4')">导出</el-button>
  179. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart4')">切换图表</el-button>
  180. <el-table
  181. :key="tab.chart4.table.tableKey"
  182. v-loading="tab.chart4.table.listLoading"
  183. element-loading-text="给我一点时间"
  184. :data="tab.chart4.table.list"
  185. border
  186. fit
  187. highlight-current-row
  188. style="width: 100%;"
  189. height="430"
  190. :row-style="rowStyle"
  191. :cell-style="cellStyle"
  192. class="elTable table-fixed"
  193. >
  194. <el-table-column label="日期" min-width="110px" align="center" prop="日期" />
  195. <el-table-column label="配方名称" min-width="110px" align="center" prop="名称" />
  196. <el-table-column label="饲料转化率" min-width="110px" align="center" prop="准确率" />
  197. </el-table>
  198. </div>
  199. </el-col>
  200. </el-row>
  201. <el-row :gutter="10">
  202. <!-- 成本分析 -->
  203. <el-col :span="24" style="position: relative;">
  204. <h4 style="text-align:center;">成本分析</h4>
  205. <div>
  206. <el-date-picker v-model="tab.chart5.getdataListParm.parammaps.inputDatetime" style="width: 250px;" class="inputDatetime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :clearable="false" :picker-options="pickerOptions" @change="changeChartDate('chart5')" />
  207. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart5')">导出</el-button>
  208. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart5')">切换表格</el-button>
  209. </div>
  210. <div id="chartLine5" style="width:100%;height:430px;" />
  211. <div v-if="tab.chart5.isTable" class="table" style="width: 100%;z-index:1;position: absolute;top:19px;right: 0;">
  212. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart5')">导出</el-button>
  213. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart5')">切换图表</el-button>
  214. <el-table
  215. :key="tab.chart5.table.tableKey"
  216. v-loading="tab.chart5.table.listLoading"
  217. element-loading-text="给我一点时间"
  218. :data="tab.chart5.table.list"
  219. border
  220. fit
  221. highlight-current-row
  222. style="width: 100%;"
  223. height="430"
  224. :row-style="rowStyle"
  225. :cell-style="cellStyle"
  226. class="elTable table-fixed"
  227. >
  228. <el-table-column label="日期" min-width="110px" align="center" prop="日期" />
  229. <el-table-column label="牲畜类别" min-width="110px" align="center" prop="名称" />
  230. <el-table-column label="公斤奶饲料成本(元)" min-width="110px" align="center" prop="准确率" />
  231. </el-table>
  232. </div>
  233. </el-col>
  234. </el-row>
  235. </div>
  236. </el-tab-pane>
  237. <el-tab-pane label="牛群评估" name="second">
  238. <div class="search">
  239. <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>
  240. <el-option v-for="item in tab2.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  241. </el-select>
  242. <el-date-picker v-model="tab2.table.getdataListParm.parammaps.date" :clearable="false" type="date" placeholder="选择日期" style="width: 150px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeTab2Date" />
  243. </div>
  244. <div class="table">
  245. <el-row :gutter="10">
  246. <!-- 宾州筛分析 -->
  247. <el-col :span="12">
  248. <h4 style="text-align:center;">宾州筛分析</h4>
  249. <el-table
  250. :key="tab2.table.tableKey"
  251. v-loading="tab2.table.listLoading"
  252. element-loading-text="给我一点时间"
  253. :data="tab2.table.list"
  254. border
  255. fit
  256. highlight-current-row
  257. style="width: 100%;"
  258. :row-style="rowStyle"
  259. :cell-style="cellStyle"
  260. class="elTable table-fixed"
  261. height="400px"
  262. >
  263. <el-table-column label="宾州筛" min-width="110px" align="center" prop="barname" />
  264. <el-table-column label="第一层重量" min-width="110px" align="center" prop="oneweight" />
  265. <el-table-column label="第一层百分比" min-width="110px" align="center" prop="onerate" />
  266. <el-table-column label="第二层重量" min-width="110px" align="center" prop="twoweight" />
  267. <el-table-column label="第二层百分比" min-width="110px" align="center" prop="tworate" />
  268. <el-table-column label="第三层重量" min-width="110px" align="center" prop="threeweight" />
  269. <el-table-column label="第三层百分比" min-width="110px" align="center" prop="threerate" />
  270. <el-table-column label="第四层重量" min-width="110px" align="center" prop="fourweight" />
  271. <el-table-column label="第四层百分比" min-width="110px" align="center" prop="fourrate" />
  272. <el-table-column label="参考标准" min-width="110px" align="center" prop="standard" />
  273. </el-table>
  274. </el-col>
  275. <!-- 粪便筛分析 -->
  276. <el-col :span="12">
  277. <h4 style="text-align:center;">粪便筛分析</h4>
  278. <el-table
  279. :key="tab2.table2.tableKey"
  280. v-loading="tab2.table2.listLoading"
  281. element-loading-text="给我一点时间"
  282. :data="tab2.table2.list"
  283. border
  284. fit
  285. highlight-current-row
  286. style="width: 100%;"
  287. :row-style="rowStyle"
  288. :cell-style="cellStyle"
  289. class="elTable table-fixed"
  290. height="400px"
  291. >
  292. <el-table-column label="粪便筛" min-width="150px" align="center" prop="barname" />
  293. <el-table-column label="第一层重量" min-width="110px" align="center" prop="oneweight" />
  294. <el-table-column label="第一层百分比" min-width="110px" align="center" prop="onerate" />
  295. <el-table-column label="第二层重量" min-width="110px" align="center" prop="twoweight" />
  296. <el-table-column label="第二层百分比" min-width="110px" align="center" prop="tworate" />
  297. <el-table-column label="第三层重量" min-width="110px" align="center" prop="threeweight" />
  298. <el-table-column label="第三层百分比" min-width="110px" align="center" prop="threerate" />
  299. <el-table-column label="参考标准" min-width="110px" align="center" prop="standard" />
  300. </el-table>
  301. </el-col>
  302. </el-row>
  303. <el-row :gutter="10">
  304. <!-- BCS评分 -->
  305. <el-col :span="12">
  306. <h4 style="text-align:center;">BCS评分</h4>
  307. <el-table
  308. :key="tab2.table3.tableKey"
  309. v-loading="tab2.table3.listLoading"
  310. element-loading-text="给我一点时间"
  311. :data="tab2.table3.list"
  312. border
  313. fit
  314. highlight-current-row
  315. style="width: 100%;"
  316. :row-style="rowStyle"
  317. :cell-style="cellStyle"
  318. class="elTable table-fixed"
  319. height="400px"
  320. >
  321. <el-table-column label="栏舍" min-width="110px" align="center" prop="barname" />
  322. <el-table-column label="抽查样本数" min-width="110px" align="center" prop="sumcowcount" />
  323. <el-table-column label="单产" min-width="110px" align="center" prop="product" />
  324. <el-table-column label="干物质采食量" min-width="110px" align="center" prop="dryweight" />
  325. <el-table-column label="泌乳天数" min-width="110px" align="center" prop="avgdim" />
  326. <el-table-column label="标准分数" min-width="110px" align="center" prop="standardscore" />
  327. <el-table-column label="2.75-分(数量、百分比)" min-width="110px" align="center" prop="score25" />
  328. <el-table-column label="2.75分(数量、百分比" min-width="110px" align="center" prop="score275" />
  329. <el-table-column label="3分(数量、百分比)" min-width="110px" align="center" prop="score3" />
  330. <el-table-column label="3.25分(数量、百分比)" min-width="110px" align="center" prop="score325" />
  331. <el-table-column label="3.5分(数量、百分比)" min-width="110px" align="center" prop="score35" />
  332. <el-table-column label="3.75分(数量、百分比)" min-width="110px" align="center" prop="score375" />
  333. <el-table-column label="4+分(数量、百分比)" min-width="110px" align="center" prop="score4" />
  334. </el-table>
  335. </el-col>
  336. <!-- 粪便评分 -->
  337. <el-col :span="12">
  338. <h4 style="text-align:center;">粪便评分</h4>
  339. <el-table
  340. :key="tab2.table4.tableKey"
  341. v-loading="tab2.table4.listLoading"
  342. element-loading-text="给我一点时间"
  343. :data="tab2.table4.list"
  344. border
  345. fit
  346. highlight-current-row
  347. style="width: 100%;"
  348. :row-style="rowStyle"
  349. :cell-style="cellStyle"
  350. class="elTable table-fixed"
  351. height="400px"
  352. >
  353. <el-table-column label="栏舍" min-width="110px" align="center" prop="barname" />
  354. <el-table-column label="抽查样本数" min-width="110px" align="center" prop="sumcowcount" />
  355. <el-table-column label="单产" min-width="110px" align="center" prop="product" />
  356. <el-table-column label="干物质采食量" min-width="110px" align="center" prop="dryweight" />
  357. <el-table-column label="泌乳天数" min-width="110px" align="center" prop="avgdim" />
  358. <el-table-column label="标准分数" min-width="110px" align="center" prop="standardscore" />
  359. <el-table-column label="1分(数量、百分比)" min-width="110px" align="center" prop="score1" />
  360. <el-table-column label="2分(数量、百分比)" min-width="110px" align="center" prop="score2" />
  361. <el-table-column label="3分(数量、百分比)" min-width="110px" align="center" prop="score3" />
  362. <el-table-column label="4分(数量、百分比)" min-width="110px" align="center" prop="score4" />
  363. <el-table-column label="5分(数量、百分比)" min-width="110px" align="center" prop="score5" />
  364. </el-table>
  365. </el-col>
  366. </el-row>
  367. </div>
  368. </el-tab-pane>
  369. </el-tabs>
  370. </div>
  371. </template>
  372. <script>
  373. import echarts from 'echarts'
  374. require('echarts/theme/macarons')
  375. import { GetDataByName, GetReportform } from '@/api/common'
  376. import Cookies from 'js-cookie'
  377. import { parseTime } from '@/utils/index.js'
  378. import Pagination from '@/components/Pagination'
  379. import { json2excel } from '@/utils/index.js'
  380. import { MessageBox } from 'element-ui'
  381. export default {
  382. name: 'GroupFeedingEfficiency',
  383. components: { Pagination },
  384. data() {
  385. return {
  386. pickerMinDate: '',
  387. pickerOptions: {
  388. onPick: ({ maxDate, minDate }) => {
  389. this.pickerMinDate = minDate.getTime()
  390. if (maxDate) {
  391. this.pickerMinDate = ''
  392. }
  393. },
  394. // 限制不能选择今天之后的日期
  395. disabledDate: (time) => {
  396. if (this.pickerMinDate !== '') {
  397. const one = 31 * 24 * 3600 * 1000
  398. const minTime = this.pickerMinDate - one
  399. let maxTime = this.pickerMinDate + one
  400. if (maxTime > new Date()) {
  401. maxTime = new Date()
  402. }
  403. return time.getTime() < minTime || time.getTime() > maxTime
  404. }
  405. return time.getTime() > Date.now()
  406. }
  407. },
  408. activeName: 'first',
  409. tab: {
  410. radio: '1',
  411. isFormulaName: true, // 配方名称
  412. isHouseName: false, // 栏舍名称
  413. isLivestockType: false, // 牲畜类别
  414. chartDate: [],
  415. table: {
  416. getdataListParm: {
  417. name: 'getFeedEfficiencyFT',
  418. page: 1,
  419. offset: 1,
  420. pagecount: '',
  421. returntype: 'Map',
  422. parammaps: {
  423. pastureid: Cookies.get('pastureid'),
  424. date: parseTime(new Date(), '{y}-{m}-{d}'),
  425. ftname: '',
  426. barname: '',
  427. cowclass: ''
  428. }
  429. },
  430. tableKey: 1,
  431. list: [],
  432. total: 0,
  433. listLoading: true,
  434. temp: {}
  435. },
  436. chart1: {
  437. chartLine: null,
  438. chartLine_data: {},
  439. getdataListParm: {
  440. name: 'getFeedEffMR',
  441. page: 1,
  442. offset: 1,
  443. pagecount: '',
  444. returntype: 'Map',
  445. parammaps: {
  446. pastureid: Cookies.get('pastureid'),
  447. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  448. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  449. inputDatetime: [new Date(), new Date()]
  450. }
  451. },
  452. tableKey: 1,
  453. list: [],
  454. total: 0,
  455. listLoading: true,
  456. isChart: true,
  457. isTable: false,
  458. table: {
  459. tableKey: 1,
  460. list: [],
  461. total: 0,
  462. listLoading: false
  463. }
  464. },
  465. chart2: {
  466. chartLine: null,
  467. chartLine_data: {},
  468. getdataListParm: {
  469. name: 'getFeedEffSL',
  470. page: 1,
  471. offset: 1,
  472. pagecount: '',
  473. returntype: 'Map',
  474. parammaps: {
  475. pastureid: Cookies.get('pastureid'),
  476. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  477. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  478. inputDatetime: [new Date(), new Date()]
  479. }
  480. },
  481. tableKey: 1,
  482. list: [],
  483. total: 0,
  484. listLoading: true,
  485. chart2Data3: [],
  486. isChart: true,
  487. isTable: false,
  488. table: {
  489. tableKey: 1,
  490. list: [],
  491. total: 0,
  492. listLoading: false
  493. }
  494. },
  495. chart3: {
  496. chartLine: null,
  497. chartLine_data: {},
  498. getdataListParm: {
  499. name: 'getFeedEffHL',
  500. page: 1,
  501. offset: 1,
  502. pagecount: '',
  503. returntype: 'Map',
  504. parammaps: {
  505. pastureid: Cookies.get('pastureid'),
  506. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  507. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  508. inputDatetime: [new Date(), new Date()]
  509. }
  510. },
  511. tableKey: 1,
  512. list: [],
  513. total: 0,
  514. listLoading: true,
  515. isChart: true,
  516. isTable: false,
  517. table: {
  518. tableKey: 1,
  519. list: [],
  520. total: 0,
  521. listLoading: false
  522. }
  523. },
  524. chart4: {
  525. chartLine: null,
  526. chartLine_data: {},
  527. getdataListParm: {
  528. name: 'getFeedEffZH',
  529. page: 1,
  530. offset: 1,
  531. pagecount: '',
  532. returntype: 'Map',
  533. parammaps: {
  534. pastureid: Cookies.get('pastureid'),
  535. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  536. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  537. inputDatetime: [new Date(), new Date()]
  538. }
  539. },
  540. tableKey: 1,
  541. list: [],
  542. total: 0,
  543. listLoading: true,
  544. chart4Data3: [],
  545. isChart: true,
  546. isTable: false,
  547. table: {
  548. tableKey: 1,
  549. list: [],
  550. total: 0,
  551. listLoading: false
  552. }
  553. },
  554. chart5: {
  555. chartLine: null,
  556. chartLine_data: {},
  557. getdataListParm: {
  558. name: 'getFeedEffCB',
  559. page: 1,
  560. offset: 1,
  561. pagecount: '',
  562. returntype: 'Map',
  563. parammaps: {
  564. pastureid: Cookies.get('pastureid'),
  565. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  566. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  567. inputDatetime: [new Date(), new Date()]
  568. }
  569. },
  570. tableKey: 1,
  571. list: [],
  572. total: 0,
  573. listLoading: true,
  574. chart5Data3: [],
  575. isChart: true,
  576. isTable: false,
  577. table: {
  578. tableKey: 1,
  579. list: [],
  580. total: 0,
  581. listLoading: false
  582. }
  583. }
  584. },
  585. tab2: {
  586. table: {
  587. getdataListParm: {
  588. name: 'getAssessCowPenn',
  589. page: 1,
  590. offset: 1,
  591. pagecount: '',
  592. returntype: 'Map',
  593. parammaps: {
  594. pastureid: Cookies.get('pastureid'),
  595. date: parseTime(new Date(), '{y}-{m}-{d}')
  596. }
  597. },
  598. tableKey: 1,
  599. list: [],
  600. total: 0,
  601. listLoading: true,
  602. temp: {}
  603. },
  604. table2: {
  605. getdataListParm: {
  606. name: 'getAssessCowDung',
  607. page: 1,
  608. offset: 1,
  609. pagecount: '',
  610. returntype: 'Map',
  611. parammaps: {
  612. pastureid: Cookies.get('pastureid'),
  613. date: ''
  614. }
  615. },
  616. tableKey: 1,
  617. list: [],
  618. total: 0,
  619. listLoading: true,
  620. temp: {}
  621. },
  622. table3: {
  623. getdataListParm: {
  624. name: 'getAssessBodyscore',
  625. page: 1,
  626. offset: 1,
  627. pagecount: '',
  628. returntype: 'Map',
  629. parammaps: {
  630. pastureid: Cookies.get('pastureid'),
  631. date: ''
  632. }
  633. },
  634. tableKey: 1,
  635. list: [],
  636. total: 0,
  637. listLoading: true,
  638. temp: {}
  639. },
  640. table4: {
  641. getdataListParm: {
  642. name: 'getAssessDungscore',
  643. page: 1,
  644. offset: 1,
  645. pagecount: '',
  646. returntype: 'Map',
  647. parammaps: {
  648. pastureid: Cookies.get('pastureid'),
  649. date: ''
  650. }
  651. },
  652. tableKey: 1,
  653. list: [],
  654. total: 0,
  655. listLoading: true,
  656. temp: {}
  657. }
  658. },
  659. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  660. cellStyle: { padding: 0 + 'px' }
  661. }
  662. },
  663. created() {
  664. this.getTabList()
  665. this.getTimeFn()
  666. this.getChart1()
  667. this.getChart2()
  668. this.getChart3()
  669. this.getChart4()
  670. this.getChart5()
  671. },
  672. mounted() {
  673. },
  674. methods: {
  675. getTimeFn() {
  676. const that = this
  677. const end = new Date()
  678. const start = new Date()
  679. const start2 = new Date()
  680. start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
  681. that.tab.table.getdataListParm.parammaps.date = parseTime(start2, '{y}-{m}-{d}')
  682. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
  683. that.tab.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
  684. that.tab.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
  685. that.tab.chart1.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  686. that.tab.chart1.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  687. that.tab.chart1.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  688. that.tab.chart1.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  689. that.tab.chart2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  690. that.tab.chart2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  691. that.tab.chart2.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  692. that.tab.chart2.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  693. that.tab.chart3.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  694. that.tab.chart3.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  695. that.tab.chart3.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  696. that.tab.chart3.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  697. that.tab.chart4.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  698. that.tab.chart4.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  699. that.tab.chart4.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  700. that.tab.chart4.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  701. that.tab.chart5.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  702. that.tab.chart5.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  703. that.tab.chart5.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  704. that.tab.chart5.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  705. },
  706. // 导出
  707. handleDownload() {
  708. if (this.tab.radio == '1') {
  709. var excelDatas = [
  710. {
  711. tHeader: ['配方模板', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方干物质采食量(kg/头)', '实际干物质采食量(kg/头)', '采食率(%)', '配方成本(元/头 )', '实际成本(元/ 头)', '产奶量(kg /头)', '饲料转化率', '公斤奶饲料成本'],
  712. filterVal: ['配方模板', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', '采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
  713. tableDatas: this.tab.table.list,
  714. sheetName: '配方'
  715. }
  716. ]
  717. json2excel(excelDatas, '效率统计-配方', true, 'xlsx')
  718. } else if (this.tab.radio == '2') {
  719. var excelDatas2 = [
  720. {
  721. tHeader: ['栏舍', '配方模板', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方干物质采食量(kg/头)', ' 实际干物质采食量( kg/头)', '采食率 (%)', '配方成本( 元/头)', '实际成本 (元/头)', '产奶量(kg/头)', '饲料转化率', '公斤奶饲料成本'],
  722. filterVal: ['栏舍', '配方模板', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', '采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
  723. tableDatas: this.tab.table.list,
  724. sheetName: '栏舍'
  725. }
  726. ]
  727. json2excel(excelDatas2, '效率统计-栏舍', true, 'xlsx')
  728. } else if (this.tab.radio == '3') {
  729. var excelDatas3 = [
  730. {
  731. tHeader: ['牲畜类别', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方 物质采食量(kg/ 头)', '实际干物质采 食量(kg/头)', ' 采食率(%)', '配方 成本(元/头)', '实际成本(元/头)', '产奶量(kg/头)', '饲料转化率', '公斤奶饲料成本'],
  732. filterVal: ['牲畜类别', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', ' 采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
  733. tableDatas: this.tab.table.list,
  734. sheetName: '牲畜类别'
  735. }
  736. ]
  737. json2excel(excelDatas3, '效率统计-牲畜类别', true, 'xlsx')
  738. }
  739. },
  740. // Tab切换
  741. handleTabClick() {
  742. if (this.activeName == 'first') {
  743. const start2 = new Date()
  744. start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
  745. this.tab.table.getdataListParm.parammaps.date = parseTime(start2, '{y}-{m}-{d}')
  746. this.getTabList()
  747. this.getChart1()
  748. this.getChart2()
  749. this.getChart3()
  750. this.getChart4()
  751. this.getChart5()
  752. } else if (this.activeName == 'second') {
  753. const start2 = new Date()
  754. start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
  755. this.tab2.table.getdataListParm.parammaps.date = parseTime(start2, '{y}-{m}-{d}')
  756. this.getTab2List()
  757. this.getTab2List2()
  758. this.getTab2List3()
  759. this.getTab2List4()
  760. }
  761. },
  762. // 切换统计类型
  763. changeRadio() {
  764. console.log(this.tab.radio)
  765. if (this.tab.radio == '1') {
  766. console.log('配方名称')
  767. this.tab.isFormulaName = true
  768. this.tab.isHouseName = false
  769. this.tab.isLivestockType = false
  770. this.tab.table.getdataListParm.parammaps.ftname = ''
  771. this.tab.table.getdataListParm.parammaps.barname = ''
  772. this.tab.table.getdataListParm.parammaps.ftname = ''
  773. this.tab.table.getdataListParm.parammaps.cowclass = ''
  774. this.tab.table.getdataListParm.name = 'getFeedEfficiencyFT'
  775. this.getTabList()
  776. this.tab.chart5.getdataListParm.name = 'getFeedEffCB'
  777. this.getChart5()
  778. } else if (this.tab.radio == '2') {
  779. console.log('栏舍名称')
  780. this.tab.isFormulaName = false
  781. this.tab.isHouseName = true
  782. this.tab.isLivestockType = false
  783. this.tab.table.getdataListParm.parammaps.ftname = ''
  784. this.tab.table.getdataListParm.parammaps.barname = ''
  785. this.tab.table.getdataListParm.parammaps.ftname = ''
  786. this.tab.table.getdataListParm.parammaps.cowclass = ''
  787. this.tab.table.getdataListParm.name = 'getFeedEfficiencyLS'
  788. this.getTabList()
  789. this.tab.chart5.getdataListParm.name = 'getFeedEffCBLS'
  790. this.getChart5()
  791. } else if (this.tab.radio == '3') {
  792. console.log(' 牲畜类别')
  793. this.tab.isFormulaName = false
  794. this.tab.isHouseName = false
  795. this.tab.isLivestockType = true
  796. this.tab.table.getdataListParm.parammaps.ftname = ''
  797. this.tab.table.getdataListParm.parammaps.barname = ''
  798. this.tab.table.getdataListParm.parammaps.ftname = ''
  799. this.tab.table.getdataListParm.parammaps.cowclass = ''
  800. this.tab.table.getdataListParm.name = 'getFeedEfficiencySC'
  801. this.getTabList()
  802. this.tab.chart5.getdataListParm.name = 'getFeedEffCB'
  803. this.getChart5()
  804. }
  805. },
  806. // 效率统计
  807. getTabList() {
  808. this.tab.table.listLoading = true
  809. GetDataByName(this.tab.table.getdataListParm).then(response => {
  810. console.log('汇总统计/混料table数据', response.data.list)
  811. if (response.data.list !== null) {
  812. this.tab.table.list = response.data.list
  813. this.tab.table.total = response.data.total
  814. } else {
  815. this.tab.table.list = []
  816. }
  817. setTimeout(() => {
  818. this.tab.table.listLoading = false
  819. }, 100)
  820. })
  821. },
  822. // 查询
  823. handleSearch() {
  824. if (this.tab.radio == '1') {
  825. console.log('配方名称/查询')
  826. this.tab.isFormulaName = true
  827. this.tab.isHouseName = false
  828. this.tab.isLivestockType = false
  829. this.tab.table.getdataListParm.name = 'getFeedEfficiencyFT'
  830. this.getTabList()
  831. } else if (this.tab.radio == '2') {
  832. console.log('栏舍名称/查询')
  833. this.tab.isFormulaName = false
  834. this.tab.isHouseName = true
  835. this.tab.isLivestockType = false
  836. this.tab.table.getdataListParm.name = 'getFeedEfficiencyLS'
  837. this.getTabList()
  838. } else if (this.tab.radio == '3') {
  839. console.log(' 牲畜类别/查询')
  840. this.tab.isFormulaName = false
  841. this.tab.isHouseName = false
  842. this.tab.isLivestockType = true
  843. this.tab.table.getdataListParm.name = 'getFeedEfficiencySC'
  844. this.getTabList()
  845. }
  846. },
  847. // 快速跳转到图表
  848. handleQuickJumpChart() {
  849. console.log(document.querySelector('#chartDate'))
  850. document.querySelector('#chartDate').scrollIntoView()
  851. },
  852. // 快速回到顶部
  853. handleQuickJumpTop() {
  854. window.scrollTo(0, 0)
  855. },
  856. // 图表总查询
  857. handleChartDate() {
  858. console.log('点击了确认时间')
  859. MessageBox.confirm('是否调整以下所有图表查询时间?', {
  860. confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
  861. }).then(() => {
  862. var that = this
  863. var startTime = parseTime(this.tab.chartDate[0], '{y}-{m}-{d}')
  864. var stopTime = parseTime(this.tab.chartDate[1], '{y}-{m}-{d}')
  865. that.tab.chart1.getdataListParm.parammaps.inputDatetime = this.tab.chartDate
  866. that.tab.chart1.getdataListParm.parammaps.startTime = startTime
  867. that.tab.chart1.getdataListParm.parammaps.stopTime = stopTime
  868. that.getChart1()
  869. that.tab.chart2.getdataListParm.parammaps.inputDatetime = this.tab.chartDate
  870. that.tab.chart2.getdataListParm.parammaps.startTime = startTime
  871. that.tab.chart2.getdataListParm.parammaps.stopTime = stopTime
  872. that.getChart2()
  873. that.tab.chart3.getdataListParm.parammaps.inputDatetime = this.tab.chartDate
  874. that.tab.chart3.getdataListParm.parammaps.startTime = startTime
  875. that.tab.chart3.getdataListParm.parammaps.stopTime = stopTime
  876. that.getChart3()
  877. that.tab.chart4.getdataListParm.parammaps.inputDatetime = this.tab.chartDate
  878. that.tab.chart4.getdataListParm.parammaps.startTime = startTime
  879. that.tab.chart4.getdataListParm.parammaps.stopTime = stopTime
  880. that.getChart4()
  881. that.tab.chart5.getdataListParm.parammaps.inputDatetime = this.tab.chartDate
  882. that.tab.chart5.getdataListParm.parammaps.startTime = startTime
  883. that.tab.chart5.getdataListParm.parammaps.stopTime = stopTime
  884. that.getChart5()
  885. })
  886. },
  887. // 泌乳牛采食量
  888. getChart1() {
  889. this.tab.chart1.listLoading = true
  890. GetReportform(this.tab.chart1.getdataListParm).then(response => {
  891. console.log('泌乳牛采食量图表数据', response.data.list)
  892. if (response.data.list !== null) {
  893. this.tab.chart1.table.list = response.data.data
  894. this.tab.chart1.chartLine_data = response.data.list
  895. this.tab.chart1.chartLine_data = {
  896. data1: ['1牧', '2牧', '3牧'], // 折线
  897. data2: ['12/01', '12/02', '12/03'], // X轴
  898. data3: [
  899. { data: [1.5, 1.2, 1.7, 1.2] },
  900. { data: [1.7, 0.8, 1.2, 1.8] },
  901. { data: [1.3, 2.2, 1.9, 1.4] }
  902. ]// 折线对应数据
  903. }
  904. // this.tab.chart1.total = response.data.total
  905. this.roadChartLine1(this.tab.chart1.chartLine_data)
  906. } else {
  907. this.tab.chart1.list = []
  908. }
  909. setTimeout(() => {
  910. this.tab.chart1.listLoading = false
  911. }, 100)
  912. })
  913. },
  914. roadChartLine1(chartLine_data) {
  915. if (this.tab.chart1.chartLine != null) {
  916. this.tab.chart1.chartLine.dispose()
  917. }
  918. this.tab.chart1.chartLine = echarts.init(document.getElementById('chartLine1'))
  919. var option = {
  920. title: {
  921. text: ''
  922. },
  923. tooltip: {
  924. trigger: 'axis'
  925. },
  926. legend: {
  927. data: chartLine_data.data1,
  928. right: 10
  929. },
  930. grid: {
  931. top: '20%',
  932. left: '3%',
  933. right: '8%',
  934. containLabel: true
  935. },
  936. toolbox: {
  937. show: true,
  938. right: '2%',
  939. feature: {}
  940. },
  941. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
  942. yAxis: {
  943. type: 'value', name: 'kg', axisLabel: { formatter: '{value}' }
  944. },
  945. series: (function() {
  946. var serie = []
  947. for (var i = 0; i < chartLine_data.data3.length; i++) {
  948. var item = {
  949. name: chartLine_data.data1[i],
  950. type: 'line',
  951. data: chartLine_data.data3[i].data
  952. }
  953. serie.push(item)
  954. }
  955. return serie
  956. }())
  957. }
  958. this.tab.chart1.chartLine.setOption(option)
  959. window.onresize = function() {
  960. this.tab.chart1.chartLine.resize()
  961. }
  962. },
  963. // 剩料率
  964. getChart2() {
  965. this.tab.chart2.listLoading = true
  966. GetReportform(this.tab.chart2.getdataListParm).then(response => {
  967. console.log('剩料率图表数据', response.data.list)
  968. if (response.data.list !== null) {
  969. this.tab.chart2.table.list = response.data.data
  970. this.tab.chart2.chartLine_data = response.data.list
  971. this.tab.chart2.chartLine_data = {
  972. data1: ['1牧', '2牧', '3牧'], // 折线
  973. data2: ['12/01', '12/02', '12/03'], // X轴
  974. data3: [
  975. { data: [1.5, 1.2, 1.7, 1.2] },
  976. { data: [1.7, 0.8, 1.2, 1.8] },
  977. { data: [1.3, 2.2, 1.9, 1.4] }
  978. ]// 折线对应数据
  979. }
  980. this.tab.chart2.total = response.data.total
  981. console.log('剩料率图数据', this.tab.chart2.chartLine_data)
  982. console.log('剩料率表数据', this.tab.chart2.table.list)
  983. this.roadChartLine2(this.tab.chart2.chartLine_data)
  984. } else {
  985. this.tab.chart2.list = []
  986. }
  987. setTimeout(() => {
  988. this.tab.chart2.listLoading = false
  989. }, 100)
  990. })
  991. },
  992. roadChartLine2(chartLine_data) {
  993. if (this.tab.chart2.chartLine != null) {
  994. this.tab.chart2.chartLine.dispose()
  995. }
  996. this.tab.chart2.chartLine = echarts.init(document.getElementById('chartLine2'))
  997. var option = {
  998. title: {
  999. text: ''
  1000. },
  1001. tooltip: {
  1002. trigger: 'axis'
  1003. },
  1004. legend: {
  1005. data: chartLine_data.data1,
  1006. right: 10
  1007. },
  1008. grid: {
  1009. top: '20%',
  1010. left: '3%',
  1011. right: '8%',
  1012. containLabel: true
  1013. },
  1014. toolbox: {
  1015. show: true,
  1016. right: '2%',
  1017. feature: {}
  1018. },
  1019. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
  1020. yAxis: {
  1021. type: 'value', name: '剩料率', axisLabel: { formatter: '{value} %' }
  1022. },
  1023. series: (function() {
  1024. var serie = []
  1025. for (var i = 0; i < chartLine_data.data3.length; i++) {
  1026. var item = {
  1027. name: chartLine_data.data1[i],
  1028. type: 'line',
  1029. data: chartLine_data.data3[i].data
  1030. }
  1031. serie.push(item)
  1032. }
  1033. return serie
  1034. }())
  1035. }
  1036. this.tab.chart2.chartLine.setOption(option)
  1037. window.onresize = function() {
  1038. this.tab.chart2.chartLine.resize()
  1039. }
  1040. },
  1041. // 混料时间统计
  1042. getChart3() {
  1043. this.tab.chart3.listLoading = true
  1044. GetReportform(this.tab.chart3.getdataListParm).then(response => {
  1045. console.log('混料时间统计图表数据', response.data.list)
  1046. if (response.data.list !== null) {
  1047. this.tab.chart3.table.list = response.data.data
  1048. this.tab.chart3.chartLine_data = response.data.list
  1049. this.tab.chart3.chartLine_data = {
  1050. data1: ['1牧', '2牧', '3牧'], // 折线
  1051. data2: ['12/01', '12/02', '12/03'], // X轴
  1052. data3: [
  1053. { data: [1.5, 1.2, 1.7, 1.2] },
  1054. { data: [1.7, 0.8, 1.2, 1.8] },
  1055. { data: [1.3, 2.2, 1.9, 1.4] }
  1056. ]// 折线对应数据
  1057. }
  1058. this.tab.chart3.total = response.data.total
  1059. this.tab.chart3.total = response.data.total
  1060. this.roadChartLine3(this.tab.chart3.chartLine_data)
  1061. } else {
  1062. this.tab.chart3.list = []
  1063. }
  1064. setTimeout(() => {
  1065. this.tab.chart3.listLoading = false
  1066. }, 100)
  1067. })
  1068. },
  1069. roadChartLine3(chartLine_data) {
  1070. if (this.tab.chart3.chartLine != null) {
  1071. this.tab.chart3.chartLine.dispose()
  1072. }
  1073. this.tab.chart3.chartLine = echarts.init(document.getElementById('chartLine3'))
  1074. var option = {
  1075. title: {
  1076. text: ''
  1077. },
  1078. tooltip: {
  1079. trigger: 'axis'
  1080. },
  1081. legend: {
  1082. data: chartLine_data.data1,
  1083. right: 10
  1084. },
  1085. grid: {
  1086. top: '20%',
  1087. left: '3%',
  1088. right: '8%',
  1089. containLabel: true
  1090. },
  1091. toolbox: {
  1092. show: true,
  1093. right: '2%',
  1094. feature: {}
  1095. },
  1096. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
  1097. yAxis: {
  1098. type: 'value', name: '分钟', axisLabel: { formatter: '{value}min' }
  1099. },
  1100. series: (function() {
  1101. var serie = []
  1102. for (var i = 0; i < chartLine_data.data3.length; i++) {
  1103. var item = {
  1104. name: chartLine_data.data1[i],
  1105. type: 'line',
  1106. data: chartLine_data.data3[i].data
  1107. }
  1108. serie.push(item)
  1109. }
  1110. return serie
  1111. }())
  1112. }
  1113. this.tab.chart3.chartLine.setOption(option)
  1114. window.onresize = function() {
  1115. this.tab.chart3.chartLine.resize()
  1116. }
  1117. },
  1118. // 转化率
  1119. getChart4() {
  1120. this.tab.chart4.listLoading = true
  1121. GetReportform(this.tab.chart4.getdataListParm).then(response => {
  1122. console.log('转化率图表数据', response.data.list)
  1123. if (response.data.list !== null) {
  1124. this.tab.chart4.table.list = response.data.data
  1125. this.tab.chart4.chartLine_data = response.data.list
  1126. this.tab.chart4.chartLine_data = {
  1127. data1: ['1牧', '2牧', '3牧'], // 折线
  1128. data2: ['12/01', '12/02', '12/03'], // X轴
  1129. data3: [
  1130. { data: [1.5, 1.2, 1.7, 1.2] },
  1131. { data: [1.7, 0.8, 1.2, 1.8] },
  1132. { data: [1.3, 2.2, 1.9, 1.4] }
  1133. ]// 折线对应数据
  1134. }
  1135. this.tab.chart4.total = response.data.total
  1136. console.log('转化率图数据', this.tab.chart4.chartLine_data)
  1137. console.log('转化率表数据', this.tab.chart4.table.list)
  1138. this.roadChartLine4(this.tab.chart4.chartLine_data)
  1139. } else {
  1140. this.tab.chart4.list = []
  1141. }
  1142. setTimeout(() => {
  1143. this.tab.chart4.listLoading = false
  1144. }, 100)
  1145. })
  1146. },
  1147. roadChartLine4(chartLine_data) {
  1148. if (this.tab.chart4.chartLine != null) {
  1149. this.tab.chart4.chartLine.dispose()
  1150. }
  1151. this.tab.chart4.chartLine = echarts.init(document.getElementById('chartLine4'))
  1152. var option = {
  1153. title: {
  1154. text: ''
  1155. },
  1156. tooltip: {
  1157. trigger: 'axis'
  1158. },
  1159. legend: {
  1160. data: chartLine_data.data1,
  1161. right: 10
  1162. },
  1163. grid: {
  1164. top: '20%',
  1165. left: '3%',
  1166. right: '8%',
  1167. containLabel: true
  1168. },
  1169. toolbox: {
  1170. show: true,
  1171. right: '2%',
  1172. feature: {}
  1173. },
  1174. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
  1175. yAxis: {
  1176. type: 'value', name: '饲料转化率', axisLabel: { formatter: '{value} %' }
  1177. },
  1178. series: (function() {
  1179. var serie = []
  1180. for (var i = 0; i < chartLine_data.data3.length; i++) {
  1181. var item = {
  1182. name: chartLine_data.data1[i],
  1183. type: 'line',
  1184. data: chartLine_data.data3[i].data
  1185. }
  1186. serie.push(item)
  1187. }
  1188. return serie
  1189. }())
  1190. }
  1191. this.tab.chart4.chartLine.setOption(option)
  1192. window.onresize = function() {
  1193. this.tab.chart4.chartLine.resize()
  1194. }
  1195. },
  1196. // 成本分析
  1197. getChart5() {
  1198. this.tab.chart5.listLoading = true
  1199. GetReportform(this.tab.chart5.getdataListParm).then(response => {
  1200. console.log('转化率图表数据', response.data.list)
  1201. if (response.data.list !== null) {
  1202. this.tab.chart5.table.list = response.data.data
  1203. this.tab.chart5.chartLine_data = response.data.list
  1204. this.tab.chart5.chartLine_data = {
  1205. data1: ['1牧', '2牧', '3牧'], // 折线
  1206. data2: ['12/01', '12/02', '12/03'], // X轴
  1207. data3: [
  1208. { data: [1.5, 1.2, 1.7, 1.2] },
  1209. { data: [1.7, 0.8, 1.2, 1.8] },
  1210. { data: [1.3, 2.2, 1.9, 1.4] }
  1211. ]// 折线对应数据
  1212. }
  1213. this.tab.chart5.total = response.data.total
  1214. console.log('转化率图数据', this.tab.chart5.chartLine_data)
  1215. console.log('转化率表数据', this.tab.chart5.table.list)
  1216. this.roadChartLine5(this.tab.chart5.chartLine_data)
  1217. } else {
  1218. this.tab.chart5.list = []
  1219. }
  1220. setTimeout(() => {
  1221. this.tab.chart5.listLoading = false
  1222. }, 100)
  1223. })
  1224. },
  1225. roadChartLine5(chartLine_data) {
  1226. if (this.tab.chart5.chartLine != null) {
  1227. this.tab.chart5.chartLine.dispose()
  1228. }
  1229. this.tab.chart5.chartLine = echarts.init(document.getElementById('chartLine5'))
  1230. var option = {
  1231. title: {
  1232. text: ''
  1233. },
  1234. tooltip: {
  1235. trigger: 'axis'
  1236. },
  1237. legend: {
  1238. data: chartLine_data.data1,
  1239. right: 10
  1240. },
  1241. grid: {
  1242. top: '20%',
  1243. left: '5%',
  1244. right: '8%',
  1245. containLabel: true
  1246. },
  1247. toolbox: {
  1248. show: true,
  1249. right: '2%',
  1250. feature: {}
  1251. },
  1252. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
  1253. yAxis: {
  1254. type: 'value', name: '公斤奶饲料成本(元)'
  1255. },
  1256. series: (function() {
  1257. var serie = []
  1258. for (var i = 0; i < chartLine_data.data3.length; i++) {
  1259. var item = {
  1260. name: chartLine_data.data1[i],
  1261. type: 'line',
  1262. data: chartLine_data.data3[i].data
  1263. }
  1264. serie.push(item)
  1265. }
  1266. return serie
  1267. }())
  1268. }
  1269. this.tab.chart5.chartLine.setOption(option)
  1270. window.onresize = function() {
  1271. this.tab.chart5.chartLine.resize()
  1272. }
  1273. },
  1274. // 时间
  1275. changeChartDate(item) {
  1276. console.log(item)
  1277. if (item == 'chart1') {
  1278. if (this.tab.chart1.getdataListParm.parammaps.inputDatetime !== '' && this.tab.chart1.getdataListParm.parammaps.inputDatetime !== null) {
  1279. this.tab.chart1.getdataListParm.parammaps.startTime = parseTime(this.tab.chart1.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  1280. this.tab.chart1.getdataListParm.parammaps.stopTime = parseTime(this.tab.chart1.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  1281. this.getChart1()
  1282. } else {
  1283. this.tab.chart1.getdataListParm.parammaps.inputDatetime = ''
  1284. this.tab.chart1.getdataListParm.parammaps.startTime = ''
  1285. this.tab.chart1.getdataListParm.parammaps.stopTime = ''
  1286. this.getChart1()
  1287. }
  1288. } else if (item == 'chart2') {
  1289. if (this.tab.chart2.getdataListParm.parammaps.inputDatetime !== '' && this.tab.chart2.getdataListParm.parammaps.inputDatetime !== null) {
  1290. this.tab.chart2.getdataListParm.parammaps.startTime = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  1291. this.tab.chart2.getdataListParm.parammaps.stopTime = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  1292. this.getChart2()
  1293. } else {
  1294. this.tab.chart2.getdataListParm.parammaps.inputDatetime = ''
  1295. this.tab.chart2.getdataListParm.parammaps.startTime = ''
  1296. this.tab.chart2.getdataListParm.parammaps.stopTime = ''
  1297. this.getChart2()
  1298. }
  1299. } else if (item == 'chart3') {
  1300. if (this.tab.chart3.getdataListParm.parammaps.inputDatetime !== '' && this.tab.chart3.getdataListParm.parammaps.inputDatetime !== null) {
  1301. this.tab.chart3.getdataListParm.parammaps.startTime = parseTime(this.tab.chart3.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  1302. this.tab.chart3.getdataListParm.parammaps.stopTime = parseTime(this.tab.chart3.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  1303. this.getChart3()
  1304. } else {
  1305. this.tab.chart3.getdataListParm.parammaps.inputDatetime = ''
  1306. this.tab.chart3.getdataListParm.parammaps.startTime = ''
  1307. this.tab.chart3.getdataListParm.parammaps.stopTime = ''
  1308. this.getChart3()
  1309. }
  1310. } else if (item == 'chart4') {
  1311. if (this.tab.chart4.getdataListParm.parammaps.inputDatetime !== '' && this.tab.chart4.getdataListParm.parammaps.inputDatetime !== null) {
  1312. this.tab.chart4.getdataListParm.parammaps.startTime = parseTime(this.tab.chart4.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  1313. this.tab.chart4.getdataListParm.parammaps.stopTime = parseTime(this.tab.chart4.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  1314. this.getChart4()
  1315. } else {
  1316. this.tab.chart4.getdataListParm.parammaps.inputDatetime = ''
  1317. this.tab.chart4.getdataListParm.parammaps.startTime = ''
  1318. this.tab.chart4.getdataListParm.parammaps.stopTime = ''
  1319. this.getChart4()
  1320. }
  1321. } else if (item == 'chart5') {
  1322. if (this.tab.chart5.getdataListParm.parammaps.inputDatetime !== '' && this.tab.chart5.getdataListParm.parammaps.inputDatetime !== null) {
  1323. this.tab.chart5.getdataListParm.parammaps.startTime = parseTime(this.tab.chart5.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  1324. this.tab.chart5.getdataListParm.parammaps.stopTime = parseTime(this.tab.chart5.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  1325. this.getChart5()
  1326. } else {
  1327. this.tab.chart5.getdataListParm.parammaps.inputDatetime = ''
  1328. this.tab.chart5.getdataListParm.parammaps.startTime = ''
  1329. this.tab.chart5.getdataListParm.parammaps.stopTime = ''
  1330. this.getChart5()
  1331. }
  1332. }
  1333. },
  1334. // 导出
  1335. handleExport(item) {
  1336. if (item == 'chart1') {
  1337. console.log('泌乳牛采食量导出')
  1338. var excelDatasTabChart1 = [
  1339. {
  1340. tHeader: ['日期', '泌乳牛采食量', '泌乳牛产奶量'],
  1341. filterVal: ['日期', 'field1', 'field2'],
  1342. tableDatas: this.tab.chart1.table.list,
  1343. sheetName: '泌乳牛采食量'
  1344. }
  1345. ]
  1346. json2excel(excelDatasTabChart1, '泌乳牛采食量', true, 'xlsx')
  1347. } else if (item == 'chart2') {
  1348. console.log('剩料率导出')
  1349. var excelDatasTabChart2 = [
  1350. {
  1351. tHeader: ['日期', '栏舍名称', '剩料量', '撒料量', '剩料率'],
  1352. filterVal: ['日期', '名称', '剩料量', '撒料量', '准确率'],
  1353. tableDatas: this.tab.chart2.table.list,
  1354. sheetName: '牛栏剩料率'
  1355. }
  1356. ]
  1357. json2excel(excelDatasTabChart2, '牛栏剩料率', true, 'xlsx')
  1358. } else if (item == 'chart3') {
  1359. console.log('混料时间统计导出')
  1360. var excelDatasTabChart3 = [
  1361. {
  1362. tHeader: ['日期', '混料时间(分钟)'],
  1363. filterVal: ['日期', 'field1'],
  1364. tableDatas: this.tab.chart3.table.list,
  1365. sheetName: '混料时间统计'
  1366. }
  1367. ]
  1368. json2excel(excelDatasTabChart3, '混料时间统计', true, 'xlsx')
  1369. } else if (item == 'chart4') {
  1370. console.log('转化率导出')
  1371. var excelDatasTabChart4 = [
  1372. {
  1373. tHeader: ['日期', '配方名称', '饲料转化率'],
  1374. filterVal: ['日期', '名称', '准确率'],
  1375. tableDatas: this.tab.chart4.table.list,
  1376. sheetName: '转化率统计'
  1377. }
  1378. ]
  1379. json2excel(excelDatasTabChart4, '转化率', true, 'xlsx')
  1380. } else if (item == 'chart5') {
  1381. console.log('成本分析导出')
  1382. var excelDatasTabChart5 = [
  1383. {
  1384. tHeader: ['日期', '牲畜类别', '公斤奶饲料成本(元)'],
  1385. filterVal: ['日期', '名称', '准确率'],
  1386. tableDatas: this.tab.chart5.table.list,
  1387. sheetName: '成本分析'
  1388. }
  1389. ]
  1390. json2excel(excelDatasTabChart5, '成本分析', true, 'xlsx')
  1391. }
  1392. },
  1393. // 切换表格
  1394. handleTable(item) {
  1395. // 显示切换表格
  1396. if (item == 'chart1') {
  1397. console.log('泌乳牛采食量表格')
  1398. this.tab.chart1.isTable = true
  1399. this.tab.chart1.isChart = false
  1400. } else if (item == 'chart2') {
  1401. console.log('牛栏剩料率表格')
  1402. this.tab.chart2.isTable = true
  1403. this.tab.chart2.isChart = false
  1404. } else if (item == 'chart3') {
  1405. console.log('混料时间统计表格')
  1406. this.tab.chart3.isTable = true
  1407. this.tab.chart3.isChart = false
  1408. } else if (item == 'chart4') {
  1409. console.log('转化率表格')
  1410. this.tab.chart4.isTable = true
  1411. this.tab.chart4.isChart = false
  1412. } else if (item == 'chart5') {
  1413. console.log('成本分析表格')
  1414. this.tab.chart5.isTable = true
  1415. this.tab.chart5.isChart = false
  1416. }
  1417. },
  1418. // 切换图表
  1419. handleChart(item) {
  1420. // 显示切换图表
  1421. if (item == 'chart1') {
  1422. console.log('泌乳牛采食量图表')
  1423. this.tab.chart1.isTable = false
  1424. this.tab.chart1.isChart = true
  1425. } else if (item == 'chart2') {
  1426. console.log('牛栏剩料率图表')
  1427. this.tab.chart2.isTable = false
  1428. this.tab.chart2.isChart = true
  1429. } else if (item == 'chart3') {
  1430. console.log('混料时间统计图表')
  1431. this.tab.chart3.isTable = false
  1432. this.tab.chart3.isChart = true
  1433. } else if (item == 'chart4') {
  1434. console.log('转化率图表')
  1435. this.tab.chart4.isTable = false
  1436. this.tab.chart4.isChart = true
  1437. } else if (item == 'chart5') {
  1438. console.log('成本分析图表')
  1439. this.tab.chart5.isTable = false
  1440. this.tab.chart5.isChart = true
  1441. }
  1442. },
  1443. // 切换tab2日期
  1444. changeTab2Date() {
  1445. this.getTab2List()
  1446. this.getTab2List2()
  1447. this.getTab2List3()
  1448. this.getTab2List4()
  1449. },
  1450. // 宾州筛分析
  1451. getTab2List() {
  1452. this.tab2.table.listLoading = true
  1453. GetDataByName(this.tab2.table.getdataListParm).then(response => {
  1454. console.log('宾州筛分析table数据', response.data.list)
  1455. if (response.data.list !== null) {
  1456. this.tab2.table.list = response.data.list
  1457. this.tab2.table.total = response.data.total
  1458. } else {
  1459. this.tab2.table.list = []
  1460. }
  1461. setTimeout(() => {
  1462. this.tab2.table.listLoading = false
  1463. }, 100)
  1464. })
  1465. },
  1466. // 粪便筛分析
  1467. getTab2List2() {
  1468. this.tab2.table2.listLoading = true
  1469. this.tab2.table2.getdataListParm.parammaps.date = this.tab2.table.getdataListParm.parammaps.date
  1470. GetDataByName(this.tab2.table2.getdataListParm).then(response => {
  1471. console.log('粪便筛分析table数据', response.data.list)
  1472. if (response.data.list !== null) {
  1473. this.tab2.table2.list = response.data.list
  1474. this.tab2.table2.total = response.data.total
  1475. } else {
  1476. this.tab2.table2.list = []
  1477. }
  1478. setTimeout(() => {
  1479. this.tab2.table2.listLoading = false
  1480. }, 100)
  1481. })
  1482. },
  1483. // BCS评分
  1484. getTab2List3() {
  1485. this.tab2.table3.listLoading = true
  1486. this.tab2.table3.getdataListParm.parammaps.date = this.tab2.table.getdataListParm.parammaps.date
  1487. GetDataByName(this.tab2.table3.getdataListParm).then(response => {
  1488. console.log('BCS评分table数据', response.data.list)
  1489. if (response.data.list !== null) {
  1490. this.tab2.table3.list = response.data.list
  1491. this.tab2.table3.total = response.data.total
  1492. } else {
  1493. this.tab2.table3.list = []
  1494. }
  1495. setTimeout(() => {
  1496. this.tab2.table3.listLoading = false
  1497. }, 100)
  1498. })
  1499. },
  1500. // 粪便评分
  1501. getTab2List4() {
  1502. this.tab2.table4.listLoading = true
  1503. this.tab2.table4.getdataListParm.parammaps.date = this.tab2.table.getdataListParm.parammaps.date
  1504. GetDataByName(this.tab2.table4.getdataListParm).then(response => {
  1505. console.log('成本分析table数据', response.data.list)
  1506. if (response.data.list !== null) {
  1507. this.tab2.table4.list = response.data.list
  1508. this.tab2.table4.total = response.data.total
  1509. } else {
  1510. this.tab2.table4.list = []
  1511. }
  1512. setTimeout(() => {
  1513. this.tab2.table4.listLoading = false
  1514. }, 100)
  1515. })
  1516. }
  1517. }
  1518. }
  1519. </script>
  1520. <style lang="scss" scoped>
  1521. .search{margin-bottom:10px;}
  1522. </style>