123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106 |
- <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%;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="日期" min-width="110px" align="center" prop="日期" />
- <el-table-column label="计划执行重量(kg)" min-width="110px" align="center" prop="执行重量" />
- <el-table-column label="配方理论重量(kg)" min-width="110px" align="center" prop="配方理论重量" />
- <el-table-column label="计划准确率" min-width="110px" align="center" prop="准确率" />
- <el-table-column label="计划取消重量(kg)" 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>
- </div>
- </el-col>
- <!-- 配方准确率 -->
- <el-col :span="12" style="position: relative;">
- <h4 style="text-align:center;">配方准确率1</h4>
- <div>
- <el-select v-model="tab.chart1.getdataListParm.parammaps.enable" style="width: 150px;margin-right: 5px;" multiple collapse-tags placeholder="请选择统计参数">
- <el-option v-for="item in tab.chart1.statisticsList" :key="item.id" :label="item.name" :value="item.id" />
- </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%;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="日期" min-width="110px" align="center" prop="日期" />
- <el-table-column label="配方名称" min-width="110px" align="center" prop="名称" />
- <el-table-column label="计划重量(kg)" min-width="110px" align="center" prop="理论量" />
- <el-table-column label="实际重量(kg)" min-width="110px" align="center" prop="实际量" />
- <el-table-column label="准确率" min-width="110px" 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.enable" style="width: 150px;margin-right: 5px;" multiple collapse-tags placeholder="请选择统计参数">
- <el-option v-for="item in tab.chart3.statisticsList" :key="item.id" :label="item.name" :value="item.id" />
- </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%;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="日期" min-width="110px" align="center" prop="barname" />
- <el-table-column label="牲畜类别" min-width="110px" align="center" prop="barname" />
- <el-table-column label="计划重量(kg)" min-width="110px" align="center" prop="barname" />
- <el-table-column label="实际重量(kg)" min-width="110px" align="center" prop="barname" />
- <el-table-column label="准确率" min-width="110px" align="center" prop="barname" />
- </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.enable" style="width: 150px;margin-right: 5px;" multiple collapse-tags placeholder="请选择统计参数">
- <el-option v-for="item in tab.chart4.statisticsList" :key="item.id" :label="item.name" :value="item.id" />
- </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%;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="日期" min-width="110px" align="center" prop="barname" />
- <el-table-column label="车次" min-width="110px" align="center" prop="barname" />
- <el-table-column label="计划重量(kg)" min-width="110px" align="center" prop="barname" />
- <el-table-column label="实际重量(kg)" min-width="110px" align="center" prop="barname" />
- <el-table-column label="准确率" min-width="110px" align="center" prop="barname" />
- </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%;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="日期" min-width="110px" align="center" prop="barname" />
- <el-table-column label="自动跳转次数" min-width="110px" align="center" prop="barname" />
- <el-table-column label="手动跳转次数" min-width="110px" align="center" prop="barname" />
- <el-table-column label="自动跳转理论重量" min-width="110px" align="center" prop="barname" />
- <el-table-column label="自动跳转实际重量" min-width="110px" align="center" prop="barname" />
- <el-table-column label="自动跳转准确率" min-width="110px" align="center" prop="barname" />
- <el-table-column label="手动跳转理论重量" min-width="110px" align="center" prop="barname" />
- <el-table-column label="手动跳转实际重量" min-width="110px" align="center" prop="barname" />
- <el-table-column label="手动跳转准确率" min-width="110px" align="center" prop="barname" />
- </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%;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="日期" min-width="110px" align="center" prop="barname" />
- <el-table-column label="混料计划取消次数" min-width="110px" align="center" prop="barname" />
- </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.enable" style="width: 150px;margin-right: 5px;" multiple collapse-tags placeholder="请选择统计参数">
- <el-option v-for="item in tab.chart7.statisticsList" :key="item.id" :label="item.name" :value="item.id" />
- </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%;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="日期" min-width="110px" align="center" prop="barname" />
- <el-table-column label="栏舍01(撒料时间)" min-width="110px" align="center" prop="barname" />
- <el-table-column label="栏舍02(撒料时间)" min-width="110px" align="center" prop="barname" />
- <el-table-column label="栏舍03(撒料时间)" min-width="110px" align="center" prop="barname" />
- <el-table-column label="栏舍04(撒料时间)" min-width="110px" align="center" prop="barname" />
- </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="计划时间" 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: [{ id: '0', name: '配方01' }, { id: '1', name: '配方02' }, { id: '2', name: '配方03' }],
- 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: [{ id: '0', name: '配方01' }, { id: '1', name: '配方02' }, { id: '2', name: '配方03' }],
- 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: [{ id: '0', name: '配方01' }, { id: '1', name: '配方02' }, { id: '2', name: '配方03' }],
- 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: [{ id: '0', name: '配方01' }, { id: '1', name: '配方02' }, { id: '2', name: '配方03' }],
- 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: [
- { 'id': 1, 'A1': '2020-09-16', 'A2': '4', 'A3': '1', 'A4': '第一班', 'A5': '新产牛', 'A6': '17号', 'A7': '3869.53', 'A8': '3843.00', 'A9': '0.4', 'A10': '0.27%', 'A11': ' 06:34:09', 'A12': ' 06:48:28', 'A13': '自动跳转', 'A14': '0', 'A15': '3830' },
- { 'id': 2, 'A1': '2020-09-16', 'A2': '1', 'A3': '2', 'A4': '第二班', 'A5': '高产牛', 'A6': '5号南', 'A7': '3371.02', 'A8': '3359.00', 'A9': '10.02', 'A10': '0.57%', 'A11': ' 06:34:25', 'A12': ' 06:46:57', 'A13': '自动跳转', 'A14': '3', 'A15': '3356' },
- { 'id': 3, 'A1': '2020-09-16', 'A2': '4', 'A3': '3', 'A4': '第三班', 'A5': '干奶牛', 'A6': '3南东', 'A7': '3869.53', 'A8': '3843.00', 'A9': '0.4', 'A10': '0.27%', 'A11': '06:37:00', 'A12': ' 06:42:28', 'A13': '自动跳转', 'A14': '5', 'A15': '3260' },
- { 'id': 4, 'A1': '2020-09-16', 'A2': '3', 'A3': '4', 'A4': '第一班', 'A5': '小公牛', 'A6': '3南西', 'A7': '3869.53', 'A8': '3843.00', 'A9': '0.4', 'A10': '0.27%', 'A11': '06:40:00', 'A12': ' 06:59:22', 'A13': '自动跳转', 'A14': '5', 'A15': '3255' },
- { 'id': 5, 'A1': '2020-09-17', 'A2': '1', 'A3': '5', 'A4': '第二班', 'A5': '小育成', 'A6': '1号南', 'A7': '3869.53', 'A8': '3843.00', 'A9': '0.4', 'A10': '0.27%', 'A11': '06:31:00', 'A12': ' 06:35:65', 'A13': '自动跳转', 'A14': '2', 'A15': '3108' },
- { 'id': 6, 'A1': '2020-09-17', 'A2': '4', 'A3': '6', 'A4': '第三班', 'A5': '高产牛', 'A6': '3北西', 'A7': '3869.53', 'A8': '3843.00', 'A9': '0.4', 'A10': '0.27%', 'A11': '06:34:00', 'A12': ' 06:45:38', 'A13': '自动跳转', 'A14': '0', 'A16': '2988' },
- { 'id': 7, 'A1': '2020-09-17', 'A2': '4', 'A3': '7', 'A4': '第一班', 'A5': '新产牛', 'A6': '2号北', 'A7': '3869.53', 'A8': '3843.00', 'A9': '0.4', 'A10': '0.27%', 'A11': '06:45:00', 'A12': ' 06:58:28', 'A13': '自动跳转', 'A14': '4', 'A15': '3005' }
- ],
- 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()
- // if (process.client) {
- // const that = this
- // }
- },
- 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()
- },
- // 配方准确率
- 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
- console.log('配方准确率表数据', this.tab.chart1.table.list)
- console.log('配方准确率图数据', this.tab.chart1.chartLine_data)
- 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: '3%',
- 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: '百分比'
- },
- 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.chartLine_data = {
- // data1: ['计划准确率', '计划正确率', '计划准确率(去除取消重量)'],
- // data2: ['09/16', '09/17', '09/18', '09/19', '09/20', '09/21', '09/22', '09/23', '09/24', '09/25', '09/26', '09/27', '09/28', '09/29', '09/30'],
- // data3: [
- // { data: [95.6, 94.1, 89.8, 95.5, 93.6, 95.7, 90.2, 94.53, 96.88, 91, 89.5, 87, 93.2, 95, 97.23] },
- // { data: [97, 96, 88, 91, 93, 97.7, 90, 92, 91, 91, 95, 94.5, 91.6, 92, 92] },
- // { data: [91.2, 95, 89, 97, 95.9, 92.7, 89, 96, 98, 91, 85, 82, 95, 96, 90, 94] }
- // ]
- // }
- 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: chartLine_data.data1,
- top: 10,
- right: 10
- },
- grid: {
- left: '3%',
- 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: '百分比'
- },
- 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.chart2.chartLine.setOption(option)
- window.onresize = function() {
- this.tab.chart2.chartLine.resize()
- }
- },
- // 牛群准确率
- getChart3() {
- this.tab.chart3.listLoading = true
- GetReportform(this.tab.chart3.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.tab.chart3.table.list = response.data.data
- this.tab.chart3.chartLine_data = response.data.list
- this.tab.chart3.total = response.data.total
- console.log('牛群准确率图数据', this.tab.chart3.chartLine_data)
- console.log('牛群准确率表数据', this.tab.chart3.table.list)
- 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: '3%',
- 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: '百分比'
- },
- 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()
- }
- },
- // 车辆准确率(重量)
- getChart4() {
- this.tab.chart4.listLoading = true
- GetReportform(this.tab.chart4.getdataListParm).then(response => {
- if (response.data.list !== null) {
- // this.tab.chart4.chartLine_data = {
- // data1: ['1', '2', '3', '4'],
- // data2: ['09/16', '09/17', '09/18', '09/19', '09/20', '09/21', '09/22', '09/23', '09/24', '09/25', '09/26', '09/27', '09/28', '09/29', '09/30'],
- // data3: [
- // { data: [92.88, 93.5, 95, 96, 93, 90, 92.5, 98, 97.5, 94, 90.7, 94.3, 96, 93.8, 97] },
- // { data: [97, 96, 88, 91, 93, 97.7, 90, 92, 91, 91, 95, 94.5, 91.6, 92, 92] },
- // { data: [91.2, 95, 89, 97, 95.9, 92.7, 89, 96, 98, 91, 85, 82, 95, 96, 90, 94] },
- // { data: [86, 92, 88, 87, 91, 91, 96, 93, 91.6, 96, 97.5, 91, 98, 99, 91.6] }
- // ]
- // }
- this.tab.chart4.table.list = response.data.data
- this.tab.chart4.chartLine_data = response.data.list
- this.tab.chart4.total = response.data.total
- console.log('车辆准确率(重量)图', this.tab.chart4.chartLine_data)
- console.log('车辆准确率(重量)表', this.tab.chart4.table.list)
- 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,
- top: 10,
- right: 10
- },
- grid: {
- left: '3%',
- 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: '百分比'
- },
- 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()
- }
- },
- // 栏舍撒料时间统计
- getChart7() {
- this.tab.chart7.listLoading = true
- GetReportform(this.tab.chart7.getdataListParm).then(response => {
- if (response.data.list !== null) {
- this.tab.chart7.table.list = response.data.data
- this.tab.chart7.chartLine_data = response.data.list
- this.tab.chart7.total = response.data.total
- console.log('栏舍撒料时间统计图', this.tab.chart7.chartLine_data)
- console.log('栏舍撒料时间统计表', this.tab.chart7.table.list)
- 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'
- },
- 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('配方准确率导出')
- } else if (item == 'chart2') {
- console.log('计划统计导出')
- } else if (item == 'chart3') {
- console.log('牛群准确率导出')
- } else if (item == 'chart4') {
- console.log('车辆准确率(重量)导出')
- } else if (item == 'chart5') {
- console.log('混料统计导出')
- this.getChart5Table()
- } else if (item == 'chart6') {
- console.log('混料计划取消次数导出')
- } else if (item == 'chart7') {
- console.log('栏舍撒料时间统计导出')
- }
- },
- // 切换表格
- 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>
|