1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305 |
- <template>
- <div class="app-container">
- <el-tabs v-model="activeName" @tab-click="handleTabClick">
- <el-tab-pane label="汇总统计" name="first">
- <div class="search">
- <el-date-picker v-model="tab.table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" />
- <span style="margin-left: 10px;">统计类型:</span>
- <el-radio v-model="tab.radio" label="1" @change="changeRadio">配方名称</el-radio>
- <el-radio v-model="tab.radio" label="2" @change="changeRadio">栏舍名称</el-radio>
- <el-radio v-model="tab.radio" label="3" @change="changeRadio">牲畜类别</el-radio>
- <el-radio v-model="tab.radio" label="4" @change="changeRadio">车次</el-radio>
- <el-input v-if="tab.isFormulaName" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 245px;" placeholder="配方名称" />
- <el-input v-if="tab.isHouseName" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 245px;" placeholder="栏舍名称" />
- <el-input v-if="tab.isLivestockType" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 245px;" placeholder="牲畜名称" />
- <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.sort" class="filter-item" style="width: 150px;" placeholder="车次" />
- <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.times" class="filter-item" style="width: 150px;" placeholder="班次" />
- <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 150px;" placeholder="TMR名称" />
- <el-button class="successBorder" @click="handleSearch">查询</el-button>
- <el-button class="export" @click="handleDownload">导出</el-button>
- </div>
- <div class="table">
- <h4>混料</h4>
- <el-table
- :key="tab.table.tableKey"
- v-loading="tab.table.listLoading"
- element-loading-text="给我一点时间"
- :data="tab.table.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <el-table-column v-if="tab.isFormulaName" label="配方名称" min-width="110px" align="center" prop="配方名称" />
- <el-table-column v-if="tab.isHouseName" label="栏舍名称" min-width="110px" align="center" prop="栏舍名称" />
- <el-table-column v-if="tab.isLivestockType" label="牲畜类别" min-width="110px" align="center" prop="牲畜类别" />
- <el-table-column v-if="tab.isTrainNumber" label="车次" min-width="110px" align="center" prop="车次" />
- <el-table-column v-if="tab.isTrainNumber" label="班次" min-width="110px" align="center" prop="班次" />
- <el-table-column v-if="tab.isTrainNumber" label="TMR名称" min-width="110px" align="center" prop="TMR名称" />
- <el-table-column v-if="tab.isTrainNumber" label="驾驶员" min-width="110px" align="center" prop="驾驶员" />
- <el-table-column label="理论重量" min-width="110px" align="center" prop="理论重量" />
- <el-table-column label="实际重量" min-width="110px" align="center" prop="实际重量" />
- <el-table-column label="计划混料操作数" min-width="110px" align="center" prop="计划混料操作数" />
- <el-table-column label="已混料操作数" min-width="110px" align="center" prop="已混料操作数" />
- <el-table-column label="混料操作率" min-width="110px" align="center" prop="混料操作率" />
- <el-table-column label="混料误差值" min-width="110px" align="center" prop="混料误差值" />
- <el-table-column label="混料准确率" min-width="110px" align="center" prop="混料准确率" />
- <el-table-column label="混料自动跳转次数" min-width="110px" align="center" prop="混料自动跳转次数" />
- <el-table-column label="混料手动跳转次数" min-width="110px" align="center" prop="混料手动跳转次数" />
- <el-table-column label="取消次数" min-width="110px" align="center" prop="取消次数" />
- <el-table-column label="方差" min-width="110px" align="center" prop="方差" />
- </el-table>
- <!-- <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" /> -->
- <h4>撒料</h4>
- <el-table
- :key="tab.table2.tableKey"
- v-loading="tab.table2.listLoading"
- element-loading-text="给我一点时间"
- :data="tab.table2.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <el-table-column v-if="tab.isFormulaName" label="配方名称" min-width="110px" align="center" prop="配方名称" />
- <el-table-column v-if="tab.isHouseName" label="栏舍名称" min-width="110px" align="center" prop="栏舍名称" />
- <el-table-column v-if="tab.isLivestockType" label="牲畜类别" min-width="110px" align="center" prop="牲畜类别" />
- <el-table-column v-if="tab.isTrainNumber" label="车次" min-width="110px" align="center" prop="车次" />
- <el-table-column v-if="tab.isTrainNumber" label="班次" min-width="110px" align="center" prop="班次" />
- <el-table-column v-if="tab.isTrainNumber" label="TMR名称" min-width="110px" align="center" prop="TMR" />
- <el-table-column v-if="tab.isTrainNumber" label="驾驶员" min-width="110px" align="center" prop="驾驶员" />
- <el-table-column label="理论重量" min-width="110px" align="center" prop="理论重量" />
- <el-table-column label="实际重量" min-width="110px" align="center" prop="实际重量" />
- <el-table-column label="计划撒料操作数" min-width="110px" align="center" prop="计划撒料操作数" />
- <el-table-column label="已撒料操作数" min-width="110px" align="center" prop="已撒料操作数" />
- <el-table-column label="撒料操作率" min-width="110px" align="center" prop="撒料操作率" />
- <el-table-column label="撒料误差值" min-width="110px" align="center" prop="撒料误差值" />
- <el-table-column label="撒料准确率" min-width="110px" align="center" prop="撒料准确率" />
- <el-table-column label="撒料自动跳转次数" min-width="110px" align="center" prop="撒料自动跳转次数" />
- <el-table-column label="撒料手动跳转次数" min-width="110px" align="center" prop="撒料手动跳转次数" />
- </el-table>
- <!-- <pagination v-show="tab.table2.total>=0" :total="tab.table2.total" :page.sync="tab.table2.getdataListParm.offset" :limit.sync="tab.table2.getdataListParm.pagecount" @pagination="getTabList2" /> -->
- </div>
- <div class="AnalysisChart">
- <el-row :gutter="10">
- <!-- 计划统计 -->
- <el-col :span="12" style="position: relative;">
- <h4 style="text-align:center;">计划统计</h4>
- <div>
- <el-date-picker v-model="tab.chart2.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 250px;" class="inputDatetime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeChartDate('chart2')" />
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart2')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart2')">切换表格</el-button>
- </div>
- <div id="chartLine2" style="width:100%;height:400px;" />
- <div v-if="tab.chart2.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart2')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart2')">切换图表</el-button>
- <el-table
- :key="tab.chart2.table.tableKey"
- v-loading="tab.chart2.table.listLoading"
- element-loading-text="给我一点时间"
- :data="tab.chart2.table.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- height="430"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
- <el-table-column label="计划执行重量(kg)" sortable min-width="110px" align="center" prop="执行重量" />
- <el-table-column label="配方理论重量(kg)" sortable min-width="110px" align="center" prop="配方理论重量" />
- <el-table-column label="计划准确率" sortable min-width="110px" align="center" prop="准确率" />
- <el-table-column label="计划取消重量(kg)" sortable min-width="110px" align="center" prop="取消重量" />
- <el-table-column label="计划准确率(去除取消重量)" sortable min-width="110px" align="center" prop="计准确率" />
- <el-table-column label="计划正确数" sortable min-width="110px" align="center" prop="正确数" />
- <el-table-column label="计划数" sortable min-width="110px" align="center" prop="计划数" />
- <el-table-column label="计划正确率" sortable min-width="110px" align="center" prop="正确率" />
- </el-table>
- </div>
- </el-col>
- <!-- 配方准确率 -->
- <el-col :span="12" style="position: relative;">
- <h4 style="text-align:center;">配方准确率</h4>
- <div>
- <el-select v-model="tab.chart1.getdataListParm.parammaps.statisticsList" style="width: 150px;margin-right: 5px;" multiple collapse-tags placeholder="请选择统计参数" @visible-change="changeStatisticChart1()">
- <el-option v-for="item in tab.chart1.statisticsList" :key="item.name" :label="item.name" :value="item.name" />
- </el-select>
- <el-date-picker v-model="tab.chart1.getdataListParm.parammaps.inputDatetime" style="width: 250px;" class="inputDatetime filter-item" :clearable="false" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeChartDate('chart1')" />
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart1')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart1')">切换表格</el-button>
- </div>
- <div id="chartLine1" style="width:100%;height:400px;" />
- <div v-if="tab.chart1.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart1')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart1')">切换图表</el-button>
- <el-table
- :key="tab.chart1.table.tableKey"
- v-loading="tab.chart1.table.listLoading"
- element-loading-text="给我一点时间"
- :data="tab.chart1.table.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- height="430"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <el-table-column label="日期" sortable min-width="90px" align="center" prop="日期" />
- <el-table-column label="配方名称" sortable min-width="90px" align="center" prop="名称" />
- <el-table-column label="计划重量(kg)" sortable min-width="100px" align="center" prop="理论量" />
- <el-table-column label="实际重量(kg)" sortable min-width="100px" align="center" prop="实际量" />
- <el-table-column label="准确率" sortable min-width="90px" align="center" prop="准确率" />
- </el-table>
- </div>
- </el-col>
- </el-row>
- <el-row :gutter="10">
- <!-- 牛群准确率 -->
- <el-col :span="12" style="position: relative;">
- <h4 style="text-align:center;">牛群准确率</h4>
- <div>
- <el-select v-model="tab.chart3.getdataListParm.parammaps.statisticsList" style="width: 150px;margin-right: 5px;" multiple collapse-tags placeholder="请选择统计参数" @visible-change="changeStatisticChart3()">
- <el-option v-for="item in tab.chart3.statisticsList" :key="item.name" :label="item.name" :value="item.name" />
- </el-select>
- <el-date-picker v-model="tab.chart3.getdataListParm.parammaps.inputDatetime" style="width: 250px;" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeChartDate('chart3')" />
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart3')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart3')">切换表格</el-button>
- </div>
- <div id="chartLine3" style="width:100%;height:400px;" />
- <div v-if="tab.chart3.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart3')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart3')">切换图表</el-button>
- <el-table
- :key="tab.chart3.table.tableKey"
- v-loading="tab.chart3.table.listLoading"
- element-loading-text="给我一点时间"
- :data="tab.chart3.table.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- height="430"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <el-table-column label="日期" sortable min-width="90px" align="center" prop="日期" />
- <el-table-column label="牲畜类别" sortable min-width="90px" align="center" prop="名称" />
- <el-table-column label="计划重量(kg)" sortable min-width="100px" align="center" prop="理论量" />
- <el-table-column label="实际重量(kg)" sortable min-width="100px" align="center" prop="实际量" />
- <el-table-column label="准确率" sortable min-width="90px" align="center" prop="准确率" />
- </el-table>
- </div>
- </el-col>
- <!-- 车辆准确率(重量) -->
- <el-col :span="12" style="position: relative;">
- <h4 style="text-align:center;">车辆准确率(重量)</h4>
- <div>
- <el-select v-model="tab.chart4.getdataListParm.parammaps.statisticsList" style="width: 150px;margin-right: 5px;" multiple collapse-tags placeholder="请选择统计参数" @visible-change="changeStatisticChart4()">
- <el-option v-for="item in tab.chart4.statisticsList" :key="item.name" :label="item.name" :value="item.name" />
- </el-select>
- <el-date-picker v-model="tab.chart4.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 250px;" class="inputDatetime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeChartDate('chart4')" />
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart4')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart4')">切换表格</el-button>
- </div>
- <div id="chartLine4" style="width:100%;height:400px;" />
- <div v-if="tab.chart4.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart4')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart4')">切换图表</el-button>
- <el-table
- :key="tab.chart4.table.tableKey"
- v-loading="tab.chart4.table.listLoading"
- element-loading-text="给我一点时间"
- :data="tab.chart4.table.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- height="430"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <el-table-column label="日期" sortable min-width="90px" align="center" prop="日期" />
- <el-table-column label="车次" sortable min-width="90px" align="center" prop="名称" />
- <el-table-column label="计划重量(kg)" sortable min-width="100px" align="center" prop="理论量" />
- <el-table-column label="实际重量(kg)" sortable min-width="100px" align="center" prop="实际量" />
- <el-table-column label="准确率" sortable min-width="90px" align="center" prop="准确率" />
- </el-table>
- </div>
- </el-col>
- </el-row>
- <el-row :gutter="10">
- <!-- 混料统计 -->
- <el-col :span="12" style="position: relative;">
- <h4 style="text-align:center;">混料统计</h4>
- <div>
- <el-date-picker v-model="tab.chart5.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 250px;" class="inputDatetime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeChartDate('chart5')" />
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart5')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart5')">切换表格</el-button>
- </div>
- <div id="chartLine5" style="width:100%;height:400px;" />
- <div v-if="tab.chart5.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart5')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart5')">切换图表</el-button>
- <el-table
- :key="tab.chart5.table.tableKey"
- v-loading="tab.chart5.table.listLoading"
- element-loading-text="给我一点时间"
- :data="tab.chart5.table.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- height="430"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <el-table-column label="日期" sortable min-width="100px" align="center" prop="日期" />
- <el-table-column label="自动跳转次数" sortable min-width="130px" align="center" prop="field1" />
- <el-table-column label="手动跳转次数" sortable min-width="130px" align="center" prop="field2" />
- <el-table-column label="自动跳转理论重量" sortable min-width="110px" align="center" prop="理论自动" />
- <el-table-column label="自动跳转实际重量" sortable min-width="110px" align="center" prop="实际自动" />
- <el-table-column label="自动跳转准确率" sortable min-width="110px" align="center" prop="field3" />
- <el-table-column label="手动跳转理论重量" sortable min-width="110px" align="center" prop="理论手动" />
- <el-table-column label="手动跳转实际重量" sortable min-width="110px" align="center" prop="实际手动" />
- <el-table-column label="手动跳转准确率" sortable min-width="110px" align="center" prop="field4" />
- </el-table>
- </div>
- </el-col>
- <!-- 混料计划取消次数 -->
- <el-col :span="12" style="position: relative;">
- <h4 style="text-align:center;">混料计划取消次数</h4>
- <div>
- <el-date-picker v-model="tab.chart6.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 250px;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeChartDate('chart6')" />
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart6')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart6')">切换表格</el-button>
- </div>
- <div id="chartLine6" style="width:100%;height:400px;" />
- <div v-if="tab.chart6.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart6')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart6')">切换图表</el-button>
- <el-table
- :key="tab.chart6.table.tableKey"
- v-loading="tab.chart6.table.listLoading"
- element-loading-text="给我一点时间"
- :data="tab.chart6.table.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- height="430"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
- <el-table-column label="混料计划取消次数" sortable min-width="110px" align="center" prop="field1" />
- </el-table>
- </div>
- </el-col>
- </el-row>
- <el-row :gutter="10">
- <!-- 栏舍撒料时间统计 -->
- <el-col :span="24" style="position: relative;">
- <h4 style="text-align:center;">栏舍撒料时间统计</h4>
- <div>
- <el-select v-model="tab.chart7.getdataListParm.parammaps.statisticsList" style="width: 150px;margin-right: 5px;" multiple collapse-tags placeholder="请选择统计参数" @visible-change="changeStatisticChart7()">
- <el-option v-for="item in tab.chart7.statisticsList" :key="item.name" :label="item.name" :value="item.name" />
- </el-select>
- <el-date-picker v-model="tab.chart7.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 250px;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeChartDate('chart7')" />
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart7')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('chart7')">切换表格</el-button>
- </div>
- <div id="chartLine7" style="width:100%;height:400px;" />
- <div v-if="tab.chart7.isTable" class="table" style="width: 100%;z-index: 1;position: absolute;top:19px;right: 0;">
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('chart7')">导出</el-button>
- <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('chart7')">切换图表</el-button>
- <el-table
- :key="tab.chart7.table.tableKey"
- v-loading="tab.chart7.table.listLoading"
- element-loading-text="给我一点时间"
- :data="tab.chart7.table.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- height="430"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
- <el-table-column label="栏舍" sortable min-width="110px" align="center" prop="名称" />
- <el-table-column label="撒料时间" sortable min-width="110px" align="center" prop="撒料时间" />
- </el-table>
- </div>
- </el-col>
- </el-row>
- </div>
- </el-tab-pane>
- <el-tab-pane label="混料统计" name="second">
- <div class="search">
- <el-date-picker v-model="tab2.table.getdataListParm.parammaps.inputDatetime" style="float: left;margin-right: 10px;margin-bottom:10px;width: 250px;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
- <el-input v-model="tab2.table.getdataListParm.parammaps.tmrtname" style="float: left;margin-right: 10px;margin-bottom:10px;width: 130px;" placeholder="TMR名称" class="filter-item" clearable />
- <el-input v-model="tab2.table.getdataListParm.parammaps.projname" style="float: left;margin-right: 10px;margin-bottom:10px;width: 130px;" placeholder="车次" class="filter-item" clearable />
- <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>
- <el-option v-for="item in tab2.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
- </el-select>
- <el-input v-model="tab2.table.getdataListParm.parammaps.templetname" style="float: left;margin-right: 10px;margin-bottom:10px;width: 130px;" placeholder="配方名称" class="filter-item" clearable />
- <el-select v-model="tab2.table.getdataListParm.parammaps.projname" style="float: left;margin-right: 10px;margin-bottom:10px;" filterable placeholder="跳转方式" class="filter-item" clearable>
- <el-option v-for="item in tab2.jumpModeList" :key="item.id" :label="item.name" :value="item.id" />
- </el-select>
- <el-button class="successBorder" style="float: left;margin-right: 10px;margin-bottom:10px;" @click="handleSearch2">查询</el-button>
- <el-button class="successBorder" style="float: left;margin-right: 10px;margin-bottom:10px;" @click="handleRefresh2">重置</el-button>
- <el-button class="export" style="float: right;margin-right: 10px;margin-bottom:10px;" @click="handleExport2">导出</el-button>
- </div>
- <div class="table">
- <el-table
- :key="tab2.table.tableKey"
- v-loading="tab2.table.listLoading"
- element-loading-text="给我一点时间"
- :data="tab2.table.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <el-table-column label="日期" min-width="110px" align="center" prop="日期" />
- <el-table-column label="TMR名称" min-width="110px" align="center" prop="TMR名称" />
- <el-table-column label="车次" min-width="110px" align="center" prop="车次" />
- <el-table-column label="班次" min-width="110px" align="center" prop="班次" />
- <el-table-column label="配方名称" min-width="110px" align="center" prop="配方名称" />
- <el-table-column label="饲料" min-width="110px" align="center" prop="饲料" />
- <el-table-column label="理论重量" min-width="110px" align="center" prop="理论重量" />
- <el-table-column label="实际重量" min-width="110px" align="center" prop="实际重量" />
- <el-table-column label="误差值" min-width="110px" align="center" prop="误差值" />
- <el-table-column label="误差lv" min-width="110px" align="center" prop="误差值" />
- <el-table-column label="计划时间" min-width="110px" align="center" prop="计划时间" />
- <el-table-column label="开始时间" min-width="110px" align="center" prop="开始时间" />
- <el-table-column label="结束时间" min-width="110px" align="center" prop="结束时间" />
- <el-table-column label="跳转方式" min-width="110px" align="center" prop="跳转方式" />
- <el-table-column label="开始重量" min-width="110px" align="center" prop="开始重量" />
- <el-table-column label="结束重量" min-width="110px" align="center" prop="结束重量" />
- </el-table>
- <!-- <pagination v-show="tab2.table.total>=0" :total="tab2.table.total" :page.sync="tab2.table.getdataListParm.offset" :limit.sync="tab2.table.getdataListParm.pagecount" @pagination="getTab2List" /> -->
- </div>
- </el-tab-pane>
- <el-tab-pane label="撒料统计" name="third">
- <div class="search">
- <el-date-picker v-model="tab3.table.getdataListParm.parammaps.inputDatetime" style="float: left;margin-right: 10px;margin-bottom:10px;width: 250px;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
- <el-input v-model="tab3.table.getdataListParm.parammaps.tmrtname" style="float: left;margin-right: 10px;margin-bottom:10px;width: 110px;" placeholder="TMR名称" class="filter-item" clearable />
- <el-input v-model="tab3.table.getdataListParm.parammaps.projname" style="float: left;margin-right: 10px;margin-bottom:10px;width: 110px;" placeholder="车次" class="filter-item" clearable />
- <el-select v-model="tab3.table.getdataListParm.parammaps.times" style="float: left;margin-right: 10px;margin-bottom:10px;width: 110px;" filterable placeholder="班次" class="filter-item" clearable>
- <el-option v-for="item in tab3.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
- </el-select>
- <el-input v-model="tab3.table.getdataListParm.parammaps.templetname" style="float: left;margin-right: 10px;margin-bottom:10px;width: 110px;" placeholder="配方名称" class="filter-item" clearable />
- <el-input v-model="tab3.table.getdataListParm.parammaps.fname" style="float: left;margin-right: 10px;margin-bottom:10px;width: 110px;" placeholder="栏舍名称" class="filter-item" clearable />
- <el-select v-model="tab3.table.getdataListParm.parammaps.buttontype" style="float: left;margin-right: 10px;margin-bottom:10px;" filterable placeholder="跳转方式" class="filter-item" clearable>
- <el-option v-for="item in tab3.jumpModeList" :key="item.id" :label="item.name" :value="item.id" />
- </el-select>
- <el-button class="successBorder" style="float: left;margin-right: 10px;margin-bottom:10px;" @click="handleSearch3">查询</el-button>
- <el-button class="successBorder" style="float: left;margin-right: 10px;margin-bottom:10px;" @click="handleRefresh3">重置</el-button>
- <el-button class="export" style="float: right;margin-right: 10px;margin-bottom:10px;" @click="handleExport3">导出</el-button>
- </div>
- <div class="table">
- <el-table
- :key="tab3.table.tableKey"
- v-loading="tab3.table.listLoading"
- element-loading-text="给我一点时间"
- :data="tab3.table.list"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <el-table-column label="日期" min-width="110px" align="center" prop="日期" />
- <el-table-column label="TMR名称" min-width="110px" align="center" prop="TMR名称" />
- <el-table-column label="车次" min-width="110px" align="center" prop="车次" />
- <el-table-column label="班次" min-width="110px" align="center" prop="班次" />
- <el-table-column label="配方名称" min-width="110px" align="center" prop="配方名称" />
- <el-table-column label="栏舍" min-width="110px" align="center" prop="栏舍" />
- <el-table-column label="理论重量" min-width="110px" align="center" prop="理论重量" />
- <el-table-column label="实际重量" min-width="110px" align="center" prop="实际重量" />
- <el-table-column label="误差值" min-width="110px" align="center" prop="误差值" />
- <el-table-column label="误差率" min-width="110px" align="center" prop="误差率" />
- <el-table-column label="开始时间" min-width="110px" align="center" prop="开始时间" />
- <el-table-column label="结束时间" min-width="110px" align="center" prop="结束时间" />
- <el-table-column label="跳转方式" min-width="110px" align="center" prop="跳转方式" />
- <el-table-column label="开始重量" min-width="110px" align="center" prop="开始重量" />
- <el-table-column label="结束重量" min-width="110px" align="center" prop="结束重量" />
- </el-table>
- <!-- <pagination v-show="tab3.table.total>=0" :total="tab3.table.total" :page.sync="tab3.table.getdataListParm.offset" :limit.sync="tab3.table.getdataListParm.pagecount" @pagination="getTab3List" /> -->
- </div>
- </el-tab-pane>
- </el-tabs>
- </div>
- </template>
- <script>
- import echarts from 'echarts'
- require('echarts/theme/macarons')
- import { GetDataByName, GetReportform } from '@/api/common'
- import Cookies from 'js-cookie'
- import { parseTime } from '@/utils/index.js'
- import Pagination from '@/components/Pagination'
- import { json2excel } from '@/utils/index.js'
- export default {
- name: 'ErrorAnalysis',
- components: { Pagination },
- data() {
- return {
- // 班次
- maxTime: {
- getMaxTimesParm: {
- name: 'getSysoptEnable',
- page: 1,
- offset: 1,
- pagecount: 1,
- returntype: 'Map',
- parammaps: {
- pastureid: Cookies.get('pastureid'),
- inforname: 'times'
- }
- }
- },
- activeName: 'first',
- tab: {
- radio: '1',
- isFormulaName: true, // 配方名称
- isHouseName: false, // 栏舍名称
- isLivestockType: false, // 牲畜类别
- isTrainNumber: false, // 车次
- table: {
- getdataListParm: {
- name: 'getAccuracyHFT',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- pastureid: Cookies.get('pastureid'),
- startTime: parseTime(new Date(), '{y}-{m}-{d}'),
- stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
- inputDatetime: [new Date(), new Date()],
- fname: '',
- sort: '',
- times: ''
- }
- },
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: true,
- temp: {}
- },
- table2: {
- getdataListParm: {
- name: 'getAccuracySFT',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- pastureid: Cookies.get('pastureid'),
- startTime: parseTime(new Date(), '{y}-{m}-{d}'),
- stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
- inputDatetime: [new Date(), new Date()],
- fname: '',
- sort: '',
- times: ''
- }
- },
- tableKey: 2,
- list: [],
- total: 0,
- listLoading: true,
- temp: {}
- },
- // 配方准确率
- chart1: {
- chartLine: null,
- chartLine_data: {},
- getdataListParm: {
- name: 'getAccuracyAllFT',
- page: 1,
- offset: 1,
- pagecount: '',
- returntype: 'Map',
- parammaps: {
- pastureid: Cookies.get('pastureid'),
- startTime: parseTime(new Date(), '{y}-{m}-{d}'),
- stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
- inputDatetime: [new Date(), new Date()]
- }
- },
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: true,
- statisticsList: [],
- chart1Data3: [],
- isChart: true,
- isTable: false,
- table: {
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: false
- }
- },
- // 计划统计
- chart2: {
- chartLine: null,
- chartLine_data: {},
- getdataListParm: {
- name: 'getAccuracyAllJH',
- page: 1,
- offset: 1,
- pagecount: '',
- returntype: 'Map',
- parammaps: {
- pastureid: Cookies.get('pastureid'),
- startTime: parseTime(new Date(), '{y}-{m}-{d}'),
- stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
- inputDatetime: [new Date(), new Date()]
- }
- },
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: true,
- isChart: true,
- isTable: false,
- table: {
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: false
- }
- },
- // 牛群准确率
- chart3: {
- chartLine: null,
- chartLine_data: {},
- getdataListParm: {
- name: 'getAccuracyAllNQ',
- page: 1,
- offset: 1,
- pagecount: '',
- returntype: 'Map',
- parammaps: {
- pastureid: Cookies.get('pastureid'),
- startTime: parseTime(new Date(), '{y}-{m}-{d}'),
- stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
- inputDatetime: [new Date(), new Date()]
- }
- },
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: true,
- statisticsList: [],
- chart1Data3: [],
- isChart: true,
- isTable: false,
- table: {
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: false
- }
- },
- // 车辆准确率(重量)
- chart4: {
- chartLine: null,
- chartLine_data: {},
- getdataListParm: {
- name: 'getAccuracyAllCC',
- page: 1,
- offset: 1,
- pagecount: '',
- returntype: 'Map',
- parammaps: {
- pastureid: Cookies.get('pastureid'),
- startTime: parseTime(new Date(), '{y}-{m}-{d}'),
- stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
- inputDatetime: [new Date(), new Date()]
- }
- },
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: true,
- statisticsList: [],
- chart4Data3: [],
- isChart: true,
- isTable: false,
- table: {
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: false
- }
- },
- // 混料统计
- chart5: {
- chartLine: null,
- chartLine_data: {},
- getdataListParm: {
- name: 'getAccuracyAllHL',
- page: 1,
- offset: 1,
- pagecount: '',
- returntype: 'Map',
- parammaps: {
- pastureid: Cookies.get('pastureid'),
- startTime: parseTime(new Date(), '{y}-{m}-{d}'),
- stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
- inputDatetime: [new Date(), new Date()]
- }
- },
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: true,
- isChart: true,
- isTable: false,
- table: {
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: false
- }
- },
- // 混料计划取消次数
- chart6: {
- chartLine: null,
- chartLine_data: {},
- getdataListParm: {
- name: 'getAccuracyAllQX',
- page: 1,
- offset: 1,
- pagecount: '',
- returntype: 'Map',
- parammaps: {
- pastureid: Cookies.get('pastureid'),
- startTime: parseTime(new Date(), '{y}-{m}-{d}'),
- stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
- inputDatetime: [new Date(), new Date()]
- }
- },
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: true,
- isChart: true,
- isTable: false,
- table: {
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: false
- }
- },
- // 栏舍撒料时间统计
- chart7: {
- chartLine: null,
- chartLine_data: {},
- getdataListParm: {
- name: 'getAccuracyAllLS',
- page: 1,
- offset: 1,
- pagecount: '',
- returntype: 'Map',
- parammaps: {
- pastureid: Cookies.get('pastureid'),
- startTime: parseTime(new Date(), '{y}-{m}-{d}'),
- stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
- inputDatetime: [new Date(), new Date()]
- }
- },
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: true,
- statisticsList: [],
- chart7Data3: [],
- isChart: true,
- isTable: false,
- table: {
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: false
- }
- }
- },
- tab2: {
- table: {
- getdataListParm: {
- name: 'getStatisticsHL',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- pastureid: Cookies.get('pastureid'),
- startTime: parseTime(new Date(), '{y}-{m}-{d}'),
- stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
- inputDatetime: [new Date(), new Date()],
- tmrtname: '',
- projname: '',
- times: '',
- buttontype: '',
- templetname: ''
- }
- },
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: true,
- temp: {}
- },
- frequencyList: [],
- jumpModeList: [{ id: '0', name: '手动跳转' }, { id: '1', name: '自动跳转' }]
- },
- tab3: {
- table: {
- getdataListParm: {
- name: 'getStatisticsSL',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- pastureid: Cookies.get('pastureid'),
- startTime: parseTime(new Date(), '{y}-{m}-{d}'),
- stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
- inputDatetime: [new Date(), new Date()],
- tmrtname: '',
- projname: '',
- times: '',
- templetname: '',
- fname: '',
- buttontype: ''
- }
- },
- tableKey: 1,
- list: [],
- total: 0,
- listLoading: true,
- temp: {}
- },
- frequencyList: [],
- jumpModeList: [{ id: '0', name: '手动跳转' }, { id: '1', name: '自动跳转' }]
- },
- rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
- cellStyle: { padding: 0 + 'px' }
- }
- },
- created() {
- this.getTimeFn()
- this.getIsDisplay()
- this.getTabList()
- this.getTabList2()
- this.getChart1()
- this.getChart2()
- this.getChart3()
- this.getChart4()
- this.getChart5()
- this.getChart6()
- this.getChart7()
- },
- mounted() {
- },
- methods: {
- getTimeFn() {
- const that = this
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
- that.tab.chart1.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart1.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart1.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart1.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart2.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart2.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart3.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart3.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart3.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart3.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart4.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart4.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart4.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart4.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart4.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart5.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart5.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart5.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart6.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart6.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart6.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart6.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart7.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart7.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
- that.tab.chart7.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
- that.tab.chart7.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
- },
- getIsDisplay() {
- GetDataByName(this.maxTime.getMaxTimesParm).then(response => {
- if (response.data.list[0].inforvalue == 1) {
- this.tab2.frequencyList = [{ id: '1', name: '第一班' }]
- this.tab3.frequencyList = [{ id: '1', name: '第一班' }]
- } else if (response.data.list[0].inforvalue == 2) {
- this.tab2.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }]
- this.tab3.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }]
- } else if (response.data.list[0].inforvalue == 3) {
- this.tab2.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }]
- this.tab3.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }]
- this.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }]
- } else if (response.data.list[0].inforvalue == 4) {
- this.tab2.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }, { id: '4', name: '第四班' }]
- this.tab3.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }, { id: '4', name: '第四班' }]
- }
- })
- },
- // 导出
- handleDownload() {
- if (this.tab.radio == '1') {
- var excelDatas = [
- {
- tHeader: ['配方名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料误差率', '混料自动跳转次数', '混料手动跳转次数', '去除取消重量', '方差'],
- filterVal: ['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10', 'A11', 'A12'],
- tableDatas: this.tab.table.list,
- sheetName: '混料'
- },
- {
- tHeader: ['配方名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料误差率', '撒料自动跳转次数', '撒料手动跳转次数'],
- filterVal: ['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10'],
- tableDatas: this.tab.table2.list,
- sheetName: '撒料'
- }
- ]
- json2excel(excelDatas, '汇总统计-配方名称', true, 'xlsx')
- } else if (this.tab.radio == '2') {
- var excelDatas2 = [
- {
- tHeader: ['栏舍名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料误差率', '混料自动跳转次数', '混料手动跳转次数', '去除取消重量', '方差'],
- filterVal: ['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10', 'A11', 'A12'],
- tableDatas: this.tab.table.list,
- sheetName: '混料'
- },
- {
- tHeader: ['栏舍名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料误差率', '撒料自动跳转次数', '撒料手动跳转次数'],
- filterVal: ['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10'],
- tableDatas: this.tab.table2.list,
- sheetName: '撒料'
- }
- ]
- json2excel(excelDatas2, '汇总统计-栏舍名称', true, 'xlsx')
- } else if (this.tab.radio == '3') {
- var excelDatas3 = [
- {
- tHeader: ['牲畜类别', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料误差率', '混料自动跳转次数', '混料手动跳转次数', '去除取消重量', '方差'],
- filterVal: ['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10', 'A11', 'A12'],
- tableDatas: this.tab.table.list,
- sheetName: '混料'
- },
- {
- tHeader: ['牲畜类别', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料误差率', '撒料自动跳转次数', '撒料手动跳转次数'],
- filterVal: ['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10'],
- tableDatas: this.tab.table2.list,
- sheetName: '撒料'
- }
- ]
- json2excel(excelDatas3, '汇总统计-牲畜类别', true, 'xlsx')
- } else if (this.tab.radio == '4') {
- var excelDatas4 = [
- {
- tHeader: ['车次', '班次', 'TMR名称', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料误差率', '混料自动跳转次数', '混料手动跳转次数', '去除取消重量', '方差'],
- filterVal: ['A1', 'A13', 'A14', 'A15', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10', 'A11', 'A12'],
- tableDatas: this.tab.table.list,
- sheetName: '混料'
- },
- {
- tHeader: ['车次', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料误差率', '撒料自动跳转次数', '撒料手动跳转次数'],
- filterVal: ['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10'],
- tableDatas: this.tab.table2.list,
- sheetName: '撒料'
- }
- ]
- json2excel(excelDatas4, '汇总统计-车次', true, 'xlsx')
- }
- },
- // 切换Tab
- handleTabClick() {
- if (this.activeName == 'first') {
- this.tab.table.getdataListParm.parammaps.inputDatetime = [new Date(), new Date()]
- this.tab.table.getdataListParm.parammaps.startTime = parseTime(new Date(), '{y}-{m}-{d}')
- this.tab.table.getdataListParm.parammaps.stopTime = parseTime(new Date(), '{y}-{m}-{d}'),
- this.tab.table.getdataListParm.parammaps.fname = ''
- this.tab.table.getdataListParm.parammaps.sort = ''
- this.tab.table.getdataListParm.parammaps.times = ''
- this.tab.table2.getdataListParm.parammaps.inputDatetime = [new Date(), new Date()]
- this.tab.table2.getdataListParm.parammaps.startTime = parseTime(new Date(), '{y}-{m}-{d}')
- this.tab.table2.getdataListParm.parammaps.stopTime = parseTime(new Date(), '{y}-{m}-{d}'),
- this.tab.table2.getdataListParm.parammaps.fname = ''
- this.tab.table2.getdataListParm.parammaps.sort = ''
- this.tab.table2.getdataListParm.parammaps.times = ''
- this.getTabList()
- this.getTabList2()
- this.getChart1()
- this.getChart2()
- this.getChart3()
- this.getChart4()
- this.getChart5()
- this.getChart6()
- this.getChart7()
- } else if (this.activeName == 'second') {
- this.tab2.table.getdataListParm.parammaps.inputDatetime = [new Date(), new Date()]
- this.tab2.table.getdataListParm.parammaps.startTime = parseTime(new Date(), '{y}-{m}-{d}')
- this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(new Date(), '{y}-{m}-{d}'),
- this.tab2.table.getdataListParm.parammaps.tmrtname = ''
- this.tab2.table.getdataListParm.parammaps.projname = ''
- this.tab2.table.getdataListParm.parammaps.times = ''
- this.tab2.table.getdataListParm.parammaps.buttontype = ''
- this.tab2.table.getdataListParm.parammaps.templetname = ''
- this.getTab2List()
- } else if (this.activeName == 'third') {
- this.tab3.table.getdataListParm.parammaps.inputDatetime = [new Date(), new Date()]
- this.tab3.table.getdataListParm.parammaps.startTime = parseTime(new Date(), '{y}-{m}-{d}')
- this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(new Date(), '{y}-{m}-{d}'),
- this.tab3.table.getdataListParm.parammaps.tmrtname = ''
- this.tab3.table.getdataListParm.parammaps.projname = ''
- this.tab3.table.getdataListParm.parammaps.times = ''
- this.tab3.table.getdataListParm.parammaps.templetname = ''
- this.tab3.table.getdataListParm.parammaps.buttontype = ''
- this.getTab3List()
- }
- },
- changeRadio() {
- console.log(this.tab.radio)
- this.tab.table.getdataListParm.parammaps.sort = ''
- this.tab.table.getdataListParm.parammaps.times = ''
- this.tab.table.getdataListParm.parammaps.fname = ''
- if (this.tab.radio == '1') {
- console.log('配方名称')
- this.tab.isFormulaName = true
- this.tab.isHouseName = false
- this.tab.isLivestockType = false
- this.tab.isTrainNumber = false
- this.tab.table.getdataListParm.name = 'getAccuracyHFT'
- if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- } else {
- this.tab.table.getdataListParm.parammaps.inputDatetime = ''
- this.tab.table.getdataListParm.parammaps.startTime = ''
- this.tab.table.getdataListParm.parammaps.stopTime = ''
- }
- this.tab.table.getdataListParm.offset = 1
- this.getTabList()
- this.tab.table2.getdataListParm.name = 'getAccuracySFT'
- this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.getTabList2()
- this.tab.chart1.getdataListParm.name = 'getAccuracyAllFT'
- this.tab.chart1.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.chart1.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.chart1.getdataListParm.offset = 1
- this.getChart1()
- } else if (this.tab.radio == '2') {
- console.log('栏舍名称')
- this.tab.isFormulaName = false
- this.tab.isHouseName = true
- this.tab.isLivestockType = false
- this.tab.isTrainNumber = false
- this.tab.table.getdataListParm.name = 'getAccuracyHNS'
- if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- } else {
- this.tab.table.getdataListParm.parammaps.inputDatetime = ''
- this.tab.table.getdataListParm.parammaps.startTime = ''
- this.tab.table.getdataListParm.parammaps.stopTime = ''
- }
- this.tab.table.getdataListParm.offset = 1
- this.getTabList()
- this.tab.table2.getdataListParm.name = 'getAccuracySNS'
- this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.getTabList2()
- } else if (this.tab.radio == '3') {
- console.log(' 牲畜类别')
- this.tab.isFormulaName = false
- this.tab.isHouseName = false
- this.tab.isLivestockType = true
- this.tab.isTrainNumber = false
- this.tab.table.getdataListParm.name = 'getAccuracyHSC'
- if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- } else {
- this.tab.table.getdataListParm.parammaps.inputDatetime = ''
- this.tab.table.getdataListParm.parammaps.startTime = ''
- this.tab.table.getdataListParm.parammaps.stopTime = ''
- }
- this.tab.table.getdataListParm.offset = 1
- this.getTabList()
- this.tab.table2.getdataListParm.name = 'getAccuracySSC'
- this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.table2.getdataListParm.offset = 1
- this.getTabList2()
- } else if (this.tab.radio == '4') {
- console.log('车次')
- this.tab.isFormulaName = false
- this.tab.isHouseName = false
- this.tab.isLivestockType = false
- this.tab.isTrainNumber = true
- this.tab.table.getdataListParm.name = 'getAccuracyHCC'
- if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- } else {
- this.tab.table.getdataListParm.parammaps.inputDatetime = ''
- this.tab.table.getdataListParm.parammaps.startTime = ''
- this.tab.table.getdataListParm.parammaps.stopTime = ''
- }
- this.tab.table.getdataListParm.offset = 1
- this.getTabList()
- this.tab.table2.getdataListParm.name = 'getAccuracySCC'
- this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.table2.getdataListParm.offset = 1
- this.getTabList2()
- }
- },
- // 汇总统计/混料
- getTabList() {
- this.tab.table.listLoading = true
- GetDataByName(this.tab.table.getdataListParm).then(response => {
- console.log('汇总统计/混料table数据', response.data.list)
- if (response.data.list !== null) {
- this.tab.table.list = response.data.list
- // this.tab.table.total = response.data.total
- } else {
- this.tab.table.list = []
- }
- setTimeout(() => {
- this.tab.table.listLoading = false
- }, 100)
- })
- },
- // 汇总统计/撒料
- getTabList2() {
- this.tab.table2.listLoading = true
- GetDataByName(this.tab.table2.getdataListParm).then(response => {
- console.log('汇总统计/撒料table数据', response.data.list)
- if (response.data.list !== null) {
- this.tab.table2.list = response.data.list
- // this.tab.table2.total = response.data.total
- } else {
- this.tab.table2.list = []
- }
- setTimeout(() => {
- this.tab.table2.listLoading = false
- }, 100)
- })
- },
- // 查询
- handleSearch() {
- if (this.tab.radio == '1') {
- console.log('配方名称/查询')
- this.tab.isFormulaName = true
- this.tab.isHouseName = false
- this.tab.isLivestockType = false
- this.tab.isTrainNumber = false
- this.tab.table.getdataListParm.name = 'getAccuracyHFT'
- if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- } else {
- this.tab.table.getdataListParm.parammaps.inputDatetime = ''
- this.tab.table.getdataListParm.parammaps.startTime = ''
- this.tab.table.getdataListParm.parammaps.stopTime = ''
- }
- this.tab.table.getdataListParm.offset = 1
- this.getTabList()
- this.tab.table2.getdataListParm.name = 'getAccuracySFT'
- this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.table2.getdataListParm.offset = 1
- this.getTabList2()
- } else if (this.tab.radio == '2') {
- console.log('栏舍名称/查询')
- this.tab.isFormulaName = false
- this.tab.isHouseName = true
- this.tab.isLivestockType = false
- this.tab.isTrainNumber = false
- this.tab.table.getdataListParm.name = 'getAccuracyHNS'
- if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- } else {
- this.tab.table.getdataListParm.parammaps.inputDatetime = ''
- this.tab.table.getdataListParm.parammaps.startTime = ''
- this.tab.table.getdataListParm.parammaps.stopTime = ''
- }
- this.tab.table.getdataListParm.offset = 1
- this.getTabList()
- this.tab.table2.getdataListParm.name = 'getAccuracySNS'
- this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.table2.getdataListParm.offset = 1
- this.getTabList2()
- } else if (this.tab.radio == '3') {
- console.log(' 牲畜类别/查询')
- this.tab.isFormulaName = false
- this.tab.isHouseName = false
- this.tab.isLivestockType = true
- this.tab.isTrainNumber = false
- this.tab.table.getdataListParm.name = 'getAccuracyHSC'
- if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- } else {
- this.tab.table.getdataListParm.parammaps.inputDatetime = ''
- this.tab.table.getdataListParm.parammaps.startTime = ''
- this.tab.table.getdataListParm.parammaps.stopTime = ''
- }
- this.tab.table.getdataListParm.offset = 1
- this.getTabList()
- this.tab.table2.getdataListParm.name = 'getAccuracySSC'
- this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.table2.getdataListParm.offset = 1
- this.getTabList2()
- } else if (this.tab.radio == '4') {
- console.log('车次/查询')
- this.tab.isFormulaName = false
- this.tab.isHouseName = false
- this.tab.isLivestockType = false
- this.tab.isTrainNumber = true
- this.tab.table.getdataListParm.name = 'getAccuracyHCC'
- if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- } else {
- this.tab.table.getdataListParm.parammaps.inputDatetime = ''
- this.tab.table.getdataListParm.parammaps.startTime = ''
- this.tab.table.getdataListParm.parammaps.stopTime = ''
- }
- this.tab.table.getdataListParm.offset = 1
- this.getTabList()
- this.tab.table2.getdataListParm.name = 'getAccuracySCC'
- this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.table2.getdataListParm.offset = 1
- this.getTabList2()
- }
- this.tab.chart1.getdataListParm.name = 'getAccuracyAllFT'
- this.tab.chart1.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.chart1.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.chart1.getdataListParm.offset = 1
- this.getChart1()
- this.tab.chart2.getdataListParm.name = 'getAccuracyAllJH'
- this.tab.chart2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.chart2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.chart2.getdataListParm.offset = 1
- this.getChart2()
- this.tab.chart3.getdataListParm.name = 'getAccuracyAllNQ'
- this.tab.chart3.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.chart3.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.chart3.getdataListParm.offset = 1
- this.getChart3()
- this.tab.chart4.getdataListParm.name = 'getAccuracyAllCC'
- this.tab.chart4.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.chart4.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.chart4.getdataListParm.offset = 1
- this.getChart4()
- this.tab.chart5.getdataListParm.name = 'getAccuracyAllHL'
- this.tab.chart5.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.chart5.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.chart5.getdataListParm.offset = 1
- this.getChart5()
- this.tab.chart6.getdataListParm.name = 'getAccuracyAllQX'
- this.tab.chart6.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.chart6.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.chart6.getdataListParm.offset = 1
- this.getChart6()
- this.tab.chart7.getdataListParm.name = 'getAccuracyAllLS'
- this.tab.chart7.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
- this.tab.chart7.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
- this.tab.chart7.getdataListParm.offset = 1
- this.getChart7()
- },
- // 配方准确率
- changeStatisticChart1() {
- var arrData3 = []
- for (let i = 0; i < this.tab.chart1.getdataListParm.parammaps.statisticsList.length; i++) {
- const myId = this.tab.chart1.statisticsList.find(obj => obj.name == this.tab.chart1.getdataListParm.parammaps.statisticsList[i]).id
- for (let j = 0; j < this.tab.chart1.chart1Data3.length; j++) {
- if (j == myId) {
- arrData3.push(this.tab.chart1.chart1Data3[j])
- }
- }
- }
- this.tab.chart1.chartLine_data.data3 = arrData3
- this.tab.chart1.chartLine_data.data1 = this.tab.chart1.getdataListParm.parammaps.statisticsList
- this.roadChartLine1(this.tab.chart1.chartLine_data)
- },
- getChart1() {
- this.tab.chart1.listLoading = true
- GetReportform(this.tab.chart1.getdataListParm).then(response => {
- if (response.data.list !== null) {
- for (let i = 0; i < response.data.data.length; i++) {
- response.data.data[i].准确率 = parseFloat(response.data.data[i].准确率) + '%'
- }
- this.tab.chart1.table.list = response.data.data
- this.tab.chart1.chartLine_data = response.data.list
- this.tab.chart1.statisticsList = []
- this.tab.chart1.getdataListParm.parammaps.statisticsList = []
- for (let i = 0; i < response.data.list.data1.length; i++) {
- if (i < 10) {
- this.tab.chart1.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
- }
- var obj = {}
- obj.id = i
- obj.name = response.data.list.data1[i]
- this.tab.chart1.statisticsList.push(obj)
- }
- this.tab.chart1.chart1Data3 = response.data.list.data3
- this.tab.chart1.total = response.data.total
- console.log('配方准确率表数据', this.tab.chart1.table.list)
- console.log('配方准确率图数据', this.tab.chart1.chartLine_data)
- var arrData3 = []
- for (let i = 0; i < this.tab.chart1.getdataListParm.parammaps.statisticsList.length; i++) {
- const myId = this.tab.chart1.statisticsList.find(obj => obj.name == this.tab.chart1.getdataListParm.parammaps.statisticsList[i]).id
- for (let j = 0; j < this.tab.chart1.chart1Data3.length; j++) {
- if (j == myId) {
- arrData3.push(this.tab.chart1.chart1Data3[j])
- }
- }
- }
- this.tab.chart1.chartLine_data.data3 = arrData3
- this.tab.chart1.chartLine_data.data1 = this.tab.chart1.getdataListParm.parammaps.statisticsList
- this.roadChartLine1(this.tab.chart1.chartLine_data)
- } else {
- this.tab.chart1.list = []
- }
- setTimeout(() => {
- this.tab.chart1.listLoading = false
- }, 100)
- })
- },
- roadChartLine1(chartLine_data) {
- if (this.tab.chart1.chartLine != null) {
- this.tab.chart1.chartLine.dispose()
- }
- this.tab.chart1.chartLine = echarts.init(document.getElementById('chartLine1'))
- var option = {
- title: {
- text: ''
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: chartLine_data.data1,
- top: 10,
- right: 10
- },
- grid: {
- left: '0%',
- right: '8%',
- bottom: '3%',
- containLabel: true
- },
- toolbox: {
- show: true,
- right: '2%',
- feature: {}
- },
- xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
- yAxis: {
- type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
- },
- series: (function() {
- var serie = []
- for (var i = 0; i < chartLine_data.data3.length; i++) {
- var item = {
- name: chartLine_data.data1[i],
- type: 'line',
- data: chartLine_data.data3[i].data
- }
- serie.push(item)
- }
- return serie
- }())
- }
- this.tab.chart1.chartLine.setOption(option)
- window.onresize = function() {
- this.tab.chart1.chartLine.resize()
- }
- },
- // 计划统计
- getChart2() {
- this.tab.chart2.listLoading = true
- GetReportform(this.tab.chart2.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.tab.chart2.table.list = response.data.data
- this.tab.chart2.chartLine_data = response.data.list
- this.tab.chart2.total = response.data.total
- console.log('计划统计图数据', this.tab.chart2.chartLine_data)
- console.log('计划统计表数据', this.tab.chart2.table.list)
- this.roadChartLine2(this.tab.chart2.chartLine_data)
- } else {
- this.tab.chart2.list = []
- }
- setTimeout(() => {
- this.tab.chart2.listLoading = false
- }, 100)
- })
- },
- roadChartLine2(chartLine_data) {
- if (this.tab.chart2.chartLine != null) {
- this.tab.chart2.chartLine.dispose()
- }
- this.tab.chart2.chartLine = echarts.init(document.getElementById('chartLine2'))
- var option = {
- title: {
- text: ''
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: ['计划准确率', '计划正确率', '计划准确率(去除取消重量)'],
- top: 10,
- right: 10
- },
- grid: {
- left: '0%',
- right: '8%',
- bottom: '3%',
- containLabel: true
- },
- toolbox: {
- show: true,
- right: '2%',
- feature: {}
- },
- xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data1, name: '日期' },
- yAxis: {
- type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
- },
- series: [
- { name: '计划准确率', type: 'line', data: chartLine_data.data2 },
- { name: '计划正确率', type: 'line', data: chartLine_data.data3 }
- // {name: '计划准确率(去除取消重量)', type: 'line', stack: '总量', data: chartLine_data.data4 }
- ]
- }
- this.tab.chart2.chartLine.setOption(option)
- window.onresize = function() {
- this.tab.chart2.chartLine.resize()
- }
- },
- // 牛群准确率
- changeStatisticChart3() {
- var arrData3 = []
- for (let i = 0; i < this.tab.chart3.getdataListParm.parammaps.statisticsList.length; i++) {
- const myId = this.tab.chart3.statisticsList.find(obj => obj.name == this.tab.chart3.getdataListParm.parammaps.statisticsList[i]).id
- for (let j = 0; j < this.tab.chart3.chart3Data3.length; j++) {
- if (j == myId) {
- arrData3.push(this.tab.chart3.chart3Data3[j])
- }
- }
- }
- this.tab.chart3.chartLine_data.data3 = arrData3
- this.tab.chart3.chartLine_data.data1 = this.tab.chart3.getdataListParm.parammaps.statisticsList
- this.roadChartLine3(this.tab.chart3.chartLine_data)
- },
- getChart3() {
- this.tab.chart3.listLoading = true
- GetReportform(this.tab.chart3.getdataListParm).then(response => {
- if (response.data.data !== null) {
- for (let i = 0; i < response.data.data.length; i++) {
- response.data.data[i].准确率 = response.data.data[i].准确率 + '%'
- }
- this.tab.chart3.table.list = response.data.data
- this.tab.chart3.chartLine_data = response.data.list
- this.tab.chart3.total = response.data.total
- this.tab.chart3.statisticsList = []
- this.tab.chart3.getdataListParm.parammaps.statisticsList = []
- for (let i = 0; i < response.data.list.data1.length; i++) {
- if (i < 10) {
- this.tab.chart3.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
- }
- var obj = {}
- obj.id = i
- obj.name = response.data.list.data1[i]
- this.tab.chart3.statisticsList.push(obj)
- }
- this.tab.chart3.chart3Data3 = response.data.list.data3
- this.tab.chart3.total = response.data.total
- console.log('牛群准确率图数据', this.tab.chart3.chartLine_data)
- console.log('牛群准确率表数据', this.tab.chart3.table.list)
- var arrData3 = []
- for (let i = 0; i < this.tab.chart3.getdataListParm.parammaps.statisticsList.length; i++) {
- const myId = this.tab.chart3.statisticsList.find(obj => obj.name == this.tab.chart3.getdataListParm.parammaps.statisticsList[i]).id
- for (let j = 0; j < this.tab.chart3.chart3Data3.length; j++) {
- if (j == myId) {
- arrData3.push(this.tab.chart3.chart3Data3[j])
- }
- }
- }
- this.tab.chart3.chartLine_data.data3 = arrData3
- this.tab.chart3.chartLine_data.data1 = this.tab.chart3.getdataListParm.parammaps.statisticsList
- this.roadChartLine3(this.tab.chart3.chartLine_data)
- } else {
- this.tab.chart3.list = []
- }
- setTimeout(() => {
- this.tab.chart3.listLoading = false
- }, 100)
- })
- },
- roadChartLine3(chartLine_data) {
- if (this.tab.chart3.chartLine != null) {
- this.tab.chart3.chartLine.dispose()
- }
- this.tab.chart3.chartLine = echarts.init(document.getElementById('chartLine3'))
- var option = {
- title: {
- text: ''
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: chartLine_data.data1,
- top: 10,
- right: 10
- },
- grid: {
- left: '0%',
- right: '8%',
- bottom: '3%',
- containLabel: true
- },
- toolbox: {
- show: true,
- right: '2%',
- feature: {}
- },
- xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
- yAxis: {
- type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
- },
- series: (function() {
- var serie = []
- for (var i = 0; i < chartLine_data.data3.length; i++) {
- var item = {
- name: chartLine_data.data1[i],
- type: 'line',
- data: chartLine_data.data3[i].data
- }
- serie.push(item)
- }
- return serie
- }())
- }
- this.tab.chart3.chartLine.setOption(option)
- window.onresize = function() {
- this.tab.chart3.chartLine.resize()
- }
- },
- // 车辆准确率(重量)
- changeStatisticChart4() {
- var arrData3 = []
- for (let i = 0; i < this.tab.chart4.getdataListParm.parammaps.statisticsList.length; i++) {
- const myId = this.tab.chart4.statisticsList.find(obj => obj.name == this.tab.chart4.getdataListParm.parammaps.statisticsList[i]).id
- for (let j = 0; j < this.tab.chart4.chart4Data3.length; j++) {
- if (j == myId) {
- arrData3.push(this.tab.chart4.chart4Data3[j])
- }
- }
- }
- this.tab.chart4.chartLine_data.data3 = arrData3
- this.tab.chart4.chartLine_data.data1 = this.tab.chart4.getdataListParm.parammaps.statisticsList
- this.roadChartLine4(this.tab.chart4.chartLine_data)
- },
- getChart4() {
- this.tab.chart4.listLoading = true
- GetReportform(this.tab.chart4.getdataListParm).then(response => {
- if (response.data.list !== null) {
- for (let i = 0; i < response.data.data.length; i++) {
- response.data.data[i].准确率 = response.data.data[i].准确率 + '%'
- }
- this.tab.chart4.table.list = response.data.data
- this.tab.chart4.chartLine_data = response.data.list
- this.tab.chart4.total = response.data.total
- this.tab.chart4.statisticsList = []
- this.tab.chart4.getdataListParm.parammaps.statisticsList = []
- for (let i = 0; i < response.data.list.data1.length; i++) {
- if (i < 10) {
- this.tab.chart4.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
- }
- var obj = {}
- obj.id = i
- obj.name = response.data.list.data1[i]
- this.tab.chart4.statisticsList.push(obj)
- }
- this.tab.chart4.chart4Data3 = response.data.list.data3
- this.tab.chart4.total = response.data.total
- console.log('车辆准确率(重量)图', this.tab.chart4.chartLine_data)
- console.log('车辆准确率(重量)表', this.tab.chart4.table.list)
- var arrData3 = []
- for (let i = 0; i < this.tab.chart4.getdataListParm.parammaps.statisticsList.length; i++) {
- const myId = this.tab.chart4.statisticsList.find(obj => obj.name == this.tab.chart4.getdataListParm.parammaps.statisticsList[i]).id
- for (let j = 0; j < this.tab.chart4.chart4Data3.length; j++) {
- if (j == myId) {
- arrData3.push(this.tab.chart4.chart4Data3[j])
- }
- }
- }
- this.tab.chart4.chartLine_data.data3 = arrData3
- this.tab.chart4.chartLine_data.data1 = this.tab.chart4.getdataListParm.parammaps.statisticsList
- this.roadChartLine4(this.tab.chart4.chartLine_data)
- } else {
- this.tab.chart4.list = []
- }
- setTimeout(() => {
- this.tab.chart4.listLoading = false
- }, 100)
- })
- },
- roadChartLine4(chartLine_data) {
- if (this.tab.chart4.chartLine != null) {
- this.tab.chart4.chartLine.dispose()
- }
- this.tab.chart4.chartLine = echarts.init(document.getElementById('chartLine4'))
- var option = {
- title: {
- text: ''
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: chartLine_data.data1,
- right: 10
- },
- grid: {
- top: '20%',
- left: '0%',
- right: '8%',
- containLabel: true
- },
- toolbox: {
- show: true,
- right: '2%',
- feature: {}
- },
- xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
- yAxis: {
- type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
- },
- series: (function() {
- var serie = []
- for (var i = 0; i < chartLine_data.data3.length; i++) {
- var item = {
- name: chartLine_data.data1[i],
- type: 'line',
- data: chartLine_data.data3[i].data
- }
- serie.push(item)
- }
- return serie
- }())
- }
- this.tab.chart4.chartLine.setOption(option)
- window.onresize = function() {
- this.tab.chart4.chartLine.resize()
- }
- },
- // 混料统计
- getChart5() {
- this.tab.chart5.listLoading = true
- GetReportform(this.tab.chart5.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.tab.chart5.table.list = response.data.data
- this.tab.chart5.chartLine_data = response.data.list
- this.tab.chart5.total = response.data.total
- console.log('混料统计图', this.tab.chart5.chartLine_data)
- console.log('混料统计表', this.tab.chart5.table.list)
- this.roadChartLine5(this.tab.chart5.chartLine_data)
- } else {
- this.tab.chart5.list = []
- }
- setTimeout(() => {
- this.tab.chart5.listLoading = false
- }, 100)
- })
- },
- roadChartLine5(chartLine_data) {
- if (this.tab.chart5.chartLine != null) {
- this.tab.chart5.chartLine.dispose()
- }
- this.tab.chart5.chartLine = echarts.init(document.getElementById('chartLine5'))
- var option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- toolbox: {
- feature: {}
- },
- legend: {
- data: ['自动跳转次数', '手动跳转次数', '自动跳转准确率', '手动跳转准确率']
- },
- xAxis: [
- {
- type: 'category',
- data: chartLine_data.data1,
- axisPointer: {
- type: 'shadow'
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '跳转次数',
- axisLabel: {
- formatter: '{value}'
- }
- },
- {
- type: 'value',
- name: '混料准确率',
- min: 0,
- max: 100,
- interval: 10,
- axisLabel: {
- formatter: '{value} %'
- }
- }
- ],
- series: [
- {
- name: '自动跳转次数',
- type: 'bar',
- data: chartLine_data.data2
- },
- {
- name: '手动跳转次数',
- type: 'bar',
- data: chartLine_data.data3
- },
- {
- name: '自动跳转准确率',
- type: 'line',
- yAxisIndex: 1,
- data: chartLine_data.data4
- },
- {
- name: '手动跳转准确率',
- type: 'line',
- yAxisIndex: 1,
- data: chartLine_data.data5
- }
- ]
- }
- this.tab.chart5.chartLine.setOption(option)
- window.onresize = function() {
- this.tab.chart5.chartLine.resize()
- }
- },
- // 混料计划取消次数
- getChart6() {
- this.tab.chart6.listLoading = true
- GetReportform(this.tab.chart6.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.tab.chart6.table.list = response.data.data
- this.tab.chart6.chartLine_data = response.data.list
- this.tab.chart6.total = response.data.total
- console.log('混料计划取消次数图', this.tab.chart6.chartLine_data)
- console.log('混料计划取消次数表', this.tab.chart6.table.list)
- this.roadChartLine6(this.tab.chart6.chartLine_data)
- } else {
- this.tab.chart6.list = []
- }
- setTimeout(() => {
- this.tab.chart6.listLoading = false
- }, 100)
- })
- },
- roadChartLine6(chartLine_data) {
- if (this.tab.chart6.chartLine != null) {
- this.tab.chart6.chartLine.dispose()
- }
- this.tab.chart6.chartLine = echarts.init(document.getElementById('chartLine6'))
- var option = {
- color: ['#3398DB'],
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- grid: {
- left: '8%',
- right: '8%',
- bottom: '3%',
- containLabel: true
- },
- // visualMap: {
- // bottom: 10
- // },
- legend: {
- data: ['取消次数']
- },
- xAxis: [
- {
- name: '日期',
- type: 'category',
- data: chartLine_data.data1,
- axisTick: {
- alignWithLabel: true
- }
- }
- ],
- yAxis: [
- {
- name: '次数',
- type: 'value'
- }
- ],
- series: [
- {
- name: '取消次数',
- type: 'bar',
- barWidth: '60%',
- data: chartLine_data.data2
- }
- ]
- }
- this.tab.chart6.chartLine.setOption(option)
- window.onresize = function() {
- this.tab.chart6.chartLine.resize()
- }
- },
- // 栏舍撒料时间统计
- changeStatisticChart7() {
- var arrData3 = []
- for (let i = 0; i < this.tab.chart7.getdataListParm.parammaps.statisticsList.length; i++) {
- const myId = this.tab.chart7.statisticsList.find(obj => obj.name == this.tab.chart7.getdataListParm.parammaps.statisticsList[i]).id
- for (let j = 0; j < this.tab.chart7.chart7Data3.length; j++) {
- if (j == myId) {
- arrData3.push(this.tab.chart7.chart7Data3[j])
- }
- }
- }
- this.tab.chart7.chartLine_data.data3 = arrData3
- this.tab.chart7.chartLine_data.data1 = this.tab.chart7.getdataListParm.parammaps.statisticsList
- this.roadChartLine7(this.tab.chart7.chartLine_data)
- },
- getChart7() {
- this.tab.chart7.listLoading = true
- GetReportform(this.tab.chart7.getdataListParm).then(response => {
- if (response.data.list !== null) {
- for (let i = 0; i < response.data.data.length; i++) {
- // 撒料时间
- var b = []
- for (let j = 0; j <= response.data.data[i].准确率.length; j++) {
- if (response.data.data[i].准确率.charAt(j) == '.') {
- b[j] = response.data.data[i].准确率.replace('.', ':')
- }
- }
- response.data.data[i].准确率 = b[b.length - 1]
- response.data.data[i].撒料时间 = response.data.data[i].准确率
- }
- this.tab.chart7.table.list = response.data.data
- this.tab.chart7.chartLine_data = response.data.list
- this.tab.chart7.statisticsList = []
- this.tab.chart7.getdataListParm.parammaps.statisticsList = []
- for (let i = 0; i < response.data.list.data1.length; i++) {
- if (i < 10) {
- this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
- }
- var obj = {}
- obj.id = i
- obj.name = response.data.list.data1[i]
- this.tab.chart7.statisticsList.push(obj)
- }
- this.tab.chart7.chart7Data3 = response.data.list.data3
- this.tab.chart7.total = response.data.total
- console.log('栏舍撒料时间统计图', this.tab.chart7.chartLine_data)
- console.log('栏舍撒料时间统计表', this.tab.chart7.table.list)
- var arrData3 = []
- for (let i = 0; i < this.tab.chart7.getdataListParm.parammaps.statisticsList.length; i++) {
- const myId = this.tab.chart7.statisticsList.find(obj => obj.name == this.tab.chart7.getdataListParm.parammaps.statisticsList[i]).id
- for (let j = 0; j < this.tab.chart7.chart7Data3.length; j++) {
- if (j == myId) {
- arrData3.push(this.tab.chart7.chart7Data3[j])
- }
- }
- }
- this.tab.chart7.chartLine_data.data3 = arrData3
- this.tab.chart7.chartLine_data.data1 = this.tab.chart7.getdataListParm.parammaps.statisticsList
- this.roadChartLine7(this.tab.chart7.chartLine_data)
- } else {
- this.tab.chart7.list = []
- }
- setTimeout(() => {
- this.tab.chart7.listLoading = false
- }, 100)
- })
- },
- roadChartLine7(chartLine_data) {
- if (this.tab.chart7.chartLine != null) {
- this.tab.chart7.chartLine.dispose()
- }
- this.tab.chart7.chartLine = echarts.init(document.getElementById('chartLine7'))
- var option = {
- title: {
- text: ''
- },
- tooltip: {
- trigger: 'axis',
- formatter: function(params) {
- var tip = params[0].name
- for (let i = 0; i < params.length; i++) {
- var b = []
- var str = params[i].value
- for (let j = 0; j <= params[i].value.length; j++) {
- if (params[i].value.charAt(j) == '.') {
- b[j] = params[i].value.replace('.', ':')
- }
- }
- tip += '<br>' + params[i].seriesName + ': ' + b[b.length - 1]
- }
- return tip
- }
- },
- legend: {
- data: chartLine_data.data1,
- top: 10,
- right: 10
- },
- grid: {
- left: '3%',
- right: '5%',
- bottom: '3%',
- containLabel: true
- },
- toolbox: {
- show: true,
- right: '2%',
- feature: {}
- },
- xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
- yAxis: [{
- type: '',
- name: '时间',
- mix: 0,
- max: 24,
- interval: 2,
- axisLabel: {
- formatter: function(value) {
- var texts = []
- if (value < 10) {
- texts.push('0' + value + ':00')
- } else {
- texts.push(value + ':00')
- }
- return texts
- }
- }
- }],
- series: (function() {
- var serie = []
- for (var i = 0; i < chartLine_data.data3.length; i++) {
- var item = {
- name: chartLine_data.data1[i],
- type: 'line',
- data: chartLine_data.data3[i].data
- }
- serie.push(item)
- }
- return serie
- }())
- }
- this.tab.chart7.chartLine.setOption(option)
- window.onresize = function() {
- this.tab.chart7.chartLine.resize()
- }
- },
- // 时间
- changeChartDate(item) {
- console.log(item)
- if (item == 'chart1') {
- if (this.tab.chart1.getdataListParm.parammaps.inputDatetime !== '' && this.tab.chart1.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.chart1.getdataListParm.parammaps.startTime = parseTime(this.tab.chart1.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.chart1.getdataListParm.parammaps.stopTime = parseTime(this.tab.chart1.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- this.getChart1()
- } else {
- this.tab.chart1.getdataListParm.parammaps.inputDatetime = ''
- this.tab.chart1.getdataListParm.parammaps.startTime = ''
- this.tab.chart1.getdataListParm.parammaps.stopTime = ''
- this.getChart1()
- }
- } else if (item == 'chart2') {
- if (this.tab.chart2.getdataListParm.parammaps.inputDatetime !== '' && this.tab.chart2.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.chart2.getdataListParm.parammaps.startTime = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.chart2.getdataListParm.parammaps.stopTime = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- this.getChart2()
- } else {
- this.tab.chart2.getdataListParm.parammaps.inputDatetime = ''
- this.tab.chart2.getdataListParm.parammaps.startTime = ''
- this.tab.chart2.getdataListParm.parammaps.stopTime = ''
- this.getChart2()
- }
- } else if (item == 'chart3') {
- if (this.tab.chart3.getdataListParm.parammaps.inputDatetime !== '' && this.tab.chart3.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.chart3.getdataListParm.parammaps.startTime = parseTime(this.tab.chart3.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.chart3.getdataListParm.parammaps.stopTime = parseTime(this.tab.chart3.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- this.getChart3()
- } else {
- this.tab.chart3.getdataListParm.parammaps.inputDatetime = ''
- this.tab.chart3.getdataListParm.parammaps.startTime = ''
- this.tab.chart3.getdataListParm.parammaps.stopTime = ''
- this.getChart3()
- }
- } else if (item == 'chart4') {
- if (this.tab.chart4.getdataListParm.parammaps.inputDatetime !== '' && this.tab.chart4.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.chart4.getdataListParm.parammaps.startTime = parseTime(this.tab.chart4.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.chart4.getdataListParm.parammaps.stopTime = parseTime(this.tab.chart4.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- this.getChart4()
- } else {
- this.tab.chart4.getdataListParm.parammaps.inputDatetime = ''
- this.tab.chart4.getdataListParm.parammaps.startTime = ''
- this.tab.chart4.getdataListParm.parammaps.stopTime = ''
- this.getChart4()
- }
- } else if (item == 'chart5') {
- if (this.tab.chart5.getdataListParm.parammaps.inputDatetime !== '' && this.tab.chart5.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.chart5.getdataListParm.parammaps.startTime = parseTime(this.tab.chart5.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.chart5.getdataListParm.parammaps.stopTime = parseTime(this.tab.chart5.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- this.getChart5()
- } else {
- this.tab.chart5.getdataListParm.parammaps.inputDatetime = ''
- this.tab.chart5.getdataListParm.parammaps.startTime = ''
- this.tab.chart5.getdataListParm.parammaps.stopTime = ''
- this.getChart5()
- }
- } else if (item == 'chart6') {
- if (this.tab.chart6.getdataListParm.parammaps.inputDatetime !== '' && this.tab.chart6.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.chart6.getdataListParm.parammaps.startTime = parseTime(this.tab.chart6.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.chart6.getdataListParm.parammaps.stopTime = parseTime(this.tab.chart6.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- this.getChart6()
- } else {
- this.tab.chart6.getdataListParm.parammaps.inputDatetime = ''
- this.tab.chart6.getdataListParm.parammaps.startTime = ''
- this.tab.chart6.getdataListParm.parammaps.stopTime = ''
- this.getChart6()
- }
- } else if (item == 'chart7') {
- if (this.tab.chart6.getdataListParm.parammaps.inputDatetime !== '' && this.tab.chart7.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab.chart7.getdataListParm.parammaps.startTime = parseTime(this.tab.chart7.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab.chart7.getdataListParm.parammaps.stopTime = parseTime(this.tab.chart7.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- this.getChart7()
- } else {
- this.tab.chart7.getdataListParm.parammaps.inputDatetime = ''
- this.tab.chart7.getdataListParm.parammaps.startTime = ''
- this.tab.chart7.getdataListParm.parammaps.stopTime = ''
- this.getChart7()
- }
- }
- },
- // 导出
- handleExport(item) {
- if (item == 'chart1') {
- console.log('配方准确率导出')
- var excelDatasTabChart1 = [
- {
- tHeader: ['日期', '配方名称', '计划重量(kg)', '实际重量(kg)', '准确率'],
- filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
- tableDatas: this.tab.chart1.table.list,
- sheetName: '配方准确率'
- }
- ]
- json2excel(excelDatasTabChart1, '配方准确率', true, 'xlsx')
- } else if (item == 'chart2') {
- console.log('计划统计导出')
- } else if (item == 'chart3') {
- console.log('牛群准确率导出')
- var excelDatasTabChart3 = [
- {
- tHeader: ['日期', '牲畜类别', '计划重量(kg)', '实际重量(kg)', '准确率'],
- filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
- tableDatas: this.tab.chart3.table.list,
- sheetName: '牛群准确率'
- }
- ]
- json2excel(excelDatasTabChart3, '牛群准确率', true, 'xlsx')
- } else if (item == 'chart4') {
- console.log('车辆准确率(重量)导出')
- var excelDatasTabChart4 = [
- {
- tHeader: ['日期', '车次', '计划重量(kg)', '实际重量(kg)', '准确率'],
- filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
- tableDatas: this.tab.chart4.table.list,
- sheetName: '车辆准确率(重量)'
- }
- ]
- json2excel(excelDatasTabChart4, '车辆准确率(重量)', true, 'xlsx')
- } else if (item == 'chart5') {
- console.log('混料统计导出')
- var excelDatasTabChart5 = [
- {
- tHeader: ['日期', '自动跳转次数', '手动跳转次数', '自动跳转理论重量', '自动跳转实际重量', '自动跳转准确率', '手动跳转理论重量', '手动跳转实际重量', '手动跳转准确率'],
- filterVal: ['日期', 'field1', 'field2', '理论自动', '实际自动', 'field3', '理论手动', '实际手动', 'field4'],
- tableDatas: this.tab.chart5.table.list,
- sheetName: '混料统计'
- }
- ]
- json2excel(excelDatasTabChart5, '混料统计', true, 'xlsx')
- } else if (item == 'chart6') {
- console.log('混料计划取消次数导出')
- var excelDatasTabChart6 = [
- {
- tHeader: ['日期', '混料计划取消次数'],
- filterVal: ['日期', 'field1'],
- tableDatas: this.tab.chart6.table.list,
- sheetName: '混料计划取消次数'
- }
- ]
- json2excel(excelDatasTabChart6, '混料计划取消次数', true, 'xlsx')
- } else if (item == 'chart7') {
- console.log('栏舍撒料时间统计导出')
- var excelDatasTabChart7 = [
- {
- tHeader: ['日期', '栏舍', '撒料时间'],
- filterVal: ['日期', '名称', '准确率'],
- tableDatas: this.tab.chart7.table.list,
- sheetName: '栏舍撒料时间统计'
- }
- ]
- json2excel(excelDatasTabChart7, '栏舍撒料时间统计', true, 'xlsx')
- }
- },
- // 切换表格
- handleTable(item) {
- // 显示切换表格
- if (item == 'chart1') {
- console.log('配方准确率表格')
- this.tab.chart1.isTable = true
- this.tab.chart1.isChart = false
- } else if (item == 'chart2') {
- console.log('计划统计表格')
- this.tab.chart2.isTable = true
- this.tab.chart2.isChart = false
- } else if (item == 'chart3') {
- console.log('牛群准确率表格')
- this.tab.chart3.isTable = true
- this.tab.chart3.isChart = false
- } else if (item == 'chart4') {
- console.log('车辆准确率(重量)表格')
- this.tab.chart4.isTable = true
- this.tab.chart4.isChart = false
- } else if (item == 'chart5') {
- console.log('混料统计表格')
- this.tab.chart5.isTable = true
- this.tab.chart5.isChart = false
- } else if (item == 'chart6') {
- console.log('混料计划取消次数表格')
- this.tab.chart6.isTable = true
- this.tab.chart6.isChart = false
- } else if (item == 'chart7') {
- console.log('栏舍撒料时间统计表格')
- this.tab.chart7.isTable = true
- this.tab.chart7.isChart = false
- }
- },
- // 切换图表
- handleChart(item) {
- // 显示切换图表
- if (item == 'chart1') {
- console.log('配方准确率图表')
- this.tab.chart1.isTable = false
- this.tab.chart1.isChart = true
- } else if (item == 'chart2') {
- console.log('计划统计图表')
- this.tab.chart2.isTable = false
- this.tab.chart2.isChart = true
- } else if (item == 'chart3') {
- console.log('牛群准确率图表')
- this.tab.chart3.isTable = false
- this.tab.chart3.isChart = true
- } else if (item == 'chart4') {
- console.log('车辆准确率(重量)图表')
- this.tab.chart4.isTable = false
- this.tab.chart4.isChart = true
- } else if (item == 'chart5') {
- console.log('混料统计图表')
- this.tab.chart5.isTable = false
- this.tab.chart5.isChart = true
- } else if (item == 'chart6') {
- console.log('混料计划取消次数图表')
- this.tab.chart6.isTable = false
- this.tab.chart6.isChart = true
- } else if (item == 'chart7') {
- console.log('栏舍撒料时间统计图表')
- this.tab.chart7.isTable = false
- this.tab.chart7.isChart = true
- }
- },
- // 混料统计
- getTab2List() {
- this.tab2.table.listLoading = true
- GetDataByName(this.tab2.table.getdataListParm).then(response => {
- console.log('混料统计table数据', response.data.list)
- if (response.data.list !== null) {
- this.tab2.table.list = response.data.list
- this.tab2.table.total = response.data.total
- } else {
- this.tab2.table.list = []
- }
- setTimeout(() => {
- this.tab2.table.listLoading = false
- }, 100)
- })
- },
- handleSearch2() {
- this.tab2.table.getdataListParm.name = 'getStatisticsHL'
- if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
- console.log(this.tab2.table.getdataListParm.parammaps.inputDatetime)
- this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- } else {
- this.tab2.table.getdataListParm.parammaps.inputDatetime = ''
- this.tab2.table.getdataListParm.parammaps.startTime = ''
- this.tab2.table.getdataListParm.parammaps.stopTime = ''
- }
- this.tab2.table.getdataListParm.offset = 1
- this.getTab2List()
- },
- handleRefresh2() {
- this.getTab2List()
- },
- handleExport2() {
- var excelDatasTab2 = [
- {
- tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '误差率', '计划时间', '开始时间', '结束时间', ' 跳转方式', ' 开始重量', ' 结束重量'],
- filterVal: ['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10', 'A11', 'A12', 'A13', 'A14', 'A15', 'A16'],
- tableDatas: this.tab2.table.list,
- sheetName: '混料统计'
- }
- ]
- json2excel(excelDatasTab2, '混料统计', true, 'xlsx')
- },
- // 撒料统计
- getTab3List() {
- this.tab3.table.listLoading = true
- GetDataByName(this.tab3.table.getdataListParm).then(response => {
- console.log('撒料统计table数据', response.data.list)
- if (response.data.list !== null) {
- this.tab3.table.list = response.data.list
- this.tab3.table.total = response.data.total
- } else {
- this.tab3.table.list = []
- }
- setTimeout(() => {
- this.tab3.table.listLoading = false
- }, 100)
- })
- },
- handleSearch3() {
- this.tab3.table.getdataListParm.name = 'getStatisticsSL'
- if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime !== null) {
- this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- } else {
- this.tab3.table.getdataListParm.parammaps.inputDatetime = ''
- this.tab3.table.getdataListParm.parammaps.startTime = ''
- this.tab3.table.getdataListParm.parammaps.stopTime = ''
- }
- this.tab3.table.getdataListParm.offset = 1
- this.getTab3List()
- },
- handleRefresh3() {
- this.getTab3List()
- },
- handleExport3() {
- var excelDatasTab3 = [
- {
- tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '误差率', '开始时间', '结束时间', ' 跳转方式', ' 开始重量', ' 结束重量'],
- filterVal: ['A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10', 'A11', 'A12', 'A13', 'A14', 'A15'],
- tableDatas: this.tab3.table.list,
- sheetName: '撒料统计'
- }
- ]
- json2excel(excelDatasTab3, '撒料统计', true, 'xlsx')
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .search{margin-bottom:10px;}
- </style>
|