index.vue 321 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526
  1. <template>
  2. <div class="app-container1">
  3. <el-tabs v-model="activeName" @tab-click="handleTabClick">
  4. <el-tab-pane :label="$t('errorAnalysis.sumName')" name="first">
  5. <div ref="scrollContainer" @scroll="handleScroll" :style="{ height: myHeight1+'px', overflowY: 'auto', overflowX: 'hidden' }">
  6. <div class="search">
  7. <el-date-picker v-model="tab.table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" style="width: 250px;" :picker-options="pickerOptions" />
  8. <el-button class="el-icon-arrow-left elIconArrowLeft" :disabled="Beforedisabled" @click="handleBefore" />
  9. <el-button class="el-icon-arrow-right elIconArrowRight" :disabled="Nextdisabled" @click="handleNext" />
  10. <span style="margin-left: 10px;">{{$t('errorAnalysis.typeName')}}</span>
  11. <el-select v-model="tab.radio" :placeholder="$t('errorAnalysis.typeName')" class="filter-item" style="width: 120px;" @change="changeRadio">
  12. <el-option v-for="item in statisticalTypeList" :key="item.id" :label="item.name" :value="item.id" />
  13. </el-select>
  14. <el-checkbox v-model="tab.checked" style="margin-right: 10px;" @change="changeChecked"></el-checkbox>{{$t('errorAnalysis.tjBydate')}}</el-checkbox>
  15. <el-input v-if="tab.isDriver" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 140px;" :placeholder="$t('errorAnalysis.Driver')" />
  16. <el-input v-if="tab.isFormulaName" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 140px;" :placeholder="$t('errorAnalysis.feedName')" />
  17. <el-input v-if="tab.isHouseName" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 140px;" :placeholder="$t('errorAnalysis.isHouseName')" />
  18. <el-input v-if="tab.isLivestockType" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 140px;" :placeholder="$t('errorAnalysis.animelName')" />
  19. <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.projname" class="filter-item" style="width: 100px;" :placeholder="$t('errorAnalysis.projname')" />
  20. <el-input v-if="tab.isFeed" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 140px;" :placeholder="$t('errorAnalysis.isFeed')" />
  21. <el-select v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.times" filterable :placeholder="$t('errorAnalysis.isTrainNumber')" class="filter-item" style="width: 120px;" clearable>
  22. <el-option v-for="item in tab2.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  23. </el-select>
  24. <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 100px;" :placeholder="$t('processAnalysis.tmrName')" />
  25. <el-select v-if="tab.isTMRName" v-model="tab.table.getdataListParm.parammaps.fname" :placeholder="$t('errorAnalysis.tmrName')" class="filter-item" style="width: 150px;">
  26. <el-option v-for="(item,index) in tab.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
  27. </el-select>
  28. <div style="display: inline-block;" class="filter-item1">
  29. <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.hlwc1" :placeholder="$t('processAnalysis.hlwc')" style="width: 120px;" class="filter-item" clearable />
  30. <span>-</span>
  31. <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.hlwc2" :placeholder="$t('processAnalysis.hlwc')" style="width: 120px;" class="filter-item" clearable />
  32. </div>
  33. <div style="display: inline-block;" class="filter-item1">
  34. <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.hlzq1" :placeholder="$t('processAnalysis.hlzq')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  35. <span>-</span>
  36. <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.hlzq2" :placeholder="$t('processAnalysis.hlzq')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  37. </div>
  38. <div style="display: inline-block;" class="filter-item1">
  39. <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.hlzql1" :placeholder="$t('processAnalysis.hlzql')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  40. <span>-</span>
  41. <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.hlzql2" :placeholder="$t('processAnalysis.hlzql')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  42. </div>
  43. <div style="display: inline-block;" class="filter-item1">
  44. <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.slwc1" :placeholder="$t('processAnalysis.slwc')" style="width: 120px;" class="filter-item" clearable />
  45. <span>-</span>
  46. <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.slwc2" :placeholder="$t('processAnalysis.slwc')" style="width: 120px;" class="filter-item" clearable />
  47. </div>
  48. <div style="display: inline-block;" class="filter-item1">
  49. <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.slzq1" :placeholder="$t('processAnalysis.slzq')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  50. <span>-</span>
  51. <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.slzq2" :placeholder="$t('processAnalysis.slzq')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  52. </div>
  53. <div style="display: inline-block;" class="filter-item1">
  54. <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.slzql1" :placeholder="$t('processAnalysis.slzql')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  55. <span>-</span>
  56. <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.slzql2" :placeholder="$t('processAnalysis.slzql')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  57. </div>
  58. <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.templetname" class="filter-item" style="width: 140px;" :placeholder="$t('errorAnalysis.feedName')" />
  59. <div style="display: inline-block;" class="filter-item1">
  60. <el-input-number :controls="false" :precision="0" v-model="tab.table.getdataListParm.parammaps.startdate" :placeholder="$t('errorAnalysis.hlStartTime')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  61. <span>-</span>
  62. <el-input-number :controls="false" :precision="0" v-model="tab.table.getdataListParm.parammaps.enddate" :placeholder="$t('errorAnalysis.hlEndTime')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  63. </div>
  64. <el-checkbox v-model="tab.table.getdataListParm.parammaps.error" style="margin-right: 10px;" @change="changeccysChecked">{{$t('processAnalysis.oName')}}</el-checkbox>
  65. <el-button class="successBorder" @click="form_search">{{$t('common.query')}}</el-button>
  66. <el-button class="successBorder" @click="handleRefresh1">{{$t('common.reset')}}</el-button>
  67. <el-button class="export" icon="el-icon-upload2" @click="handleDownload">{{$t('dashboard.Export')}}</el-button>
  68. <svg-icon icon-class="Up" class="down" style="width: 40px;height: 40px;float: right;" @click="handleQuickJumpChart" />
  69. </div>
  70. <div id="table" class="table">
  71. <h4>{{$t('errorAnalysis.hl')}}</h4>
  72. <u-table
  73. ref="plTable1"
  74. :key="tab.table.tableKey"
  75. v-loading="tab.table.listLoading"
  76. :element-loading-text="$t('common.tableMsg')"
  77. :data="tab.table.list"
  78. border
  79. fit
  80. highlight-current-row
  81. style="width: 100%;"
  82. :row-style="rowStyle"
  83. :cell-style="cellStyle"
  84. class="elTable table-fixed"
  85. :max-height="myHeight2"
  86. >
  87. <template slot="empty">
  88. <span style="color: #969799;">No more data</span>
  89. </template>
  90. <u-table-column v-if="tab.checked && !tab.isTrainNumber" :key="0" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="计划时间" />
  91. <u-table-column v-if="tab.isTrainNumber" :key="117" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="计划时间1" />
  92. <u-table-column v-if="tab.isTrainNumber" :key="113" sortable :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="templetname" />
  93. <u-table-column v-if="tab.isTrainNumber" :key="114" sortable :label="$t('errorAnalysis.drivername')" min-width="70px" align="center" prop="TMR名称" />
  94. <u-table-column v-if="tab.isTrainNumber" :key="115" sortable :label="$t('errorAnalysis.stratJl')" min-width="70px" align="center" prop="startTime" />
  95. <u-table-column v-if="tab.isTrainNumber" :key="116" sortable :label="$t('errorAnalysis.endJl')" min-width="70px" align="center" prop="endTime" />
  96. <u-table-column v-if="tab.isDriver" :key="1" sortable :label="$t('errorAnalysis.Driver')" min-width="70px" align="center" prop="驾驶员" />
  97. <u-table-column v-if="tab.isFormulaName" :key="2" sortable :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="配方名称" />
  98. <u-table-column v-if="tab.isHouseName" :key="3" sortable :label="$t('errorAnalysis.isHouseName')" min-width="70px" align="center" prop="栏舍名称" />
  99. <u-table-column v-if="tab.isLivestockType" :key="4" sortable :label="$t('errorAnalysis.sxlb')" min-width="70px" align="center" prop="牲畜类别" />
  100. <u-table-column v-if="tab.isTrainNumber" :key="5" sortable :label="$t('errorAnalysis.tmrnames')" min-width="70px" align="center" prop="TMR名称" />
  101. <u-table-column v-if="tab.isTrainNumber" :key="6" sortable :label="$t('errorAnalysis.projname')" min-width="70px" align="center" prop="车次" />
  102. <u-table-column v-if="tab.isTrainNumber" :key="7" sortable :label="$t('errorAnalysis.isTrainNumber')" min-width="70px" align="center" prop="班次" />
  103. <u-table-column v-if="tab.isTrainNumber" :key="8" sortable :label="$t('errorAnalysis.Driver')" min-width="70px" align="center" prop="驾驶员" />
  104. <u-table-column v-if="tab.isTMRName" :key="9" sortable :label="$t('errorAnalysis.tmrnames')" min-width="70px" align="center" prop="TMR名称" />
  105. <u-table-column v-if="tab.isTMRName" :key="10" sortable :label="$t('errorAnalysis.isTrainNumber')" min-width="70px" align="center" prop="班次" />
  106. <u-table-column v-if="tab.isTMRName" :key="11" sortable :label="$t('errorAnalysis.projname')" min-width="70px" align="center" prop="车次" />
  107. <u-table-column v-if="tab.isTMRName" :key="12" sortable :label="$t('errorAnalysis.Driver')" min-width="70px" align="center" prop="驾驶员" />
  108. <u-table-column v-if="tab.isFeed" :key="13" sortable :label="$t('errorAnalysis.isFeed')" min-width="70px" align="center" prop="fname" />
  109. <u-table-column :key="14" sortable :label="$t('errorAnalysis.llzl')" min-width="60px" align="center" prop="理论重量" />
  110. <u-table-column :key="15" sortable :label="$t('errorAnalysis.acWeight')" min-width="60px" align="center" prop="实际重量" />
  111. <u-table-column :key="16" sortable :label="$t('errorAnalysis.jshlczs')" min-width="60px" align="center" prop="计划混料操作数" />
  112. <u-table-column :key="17" sortable :label="$t('errorAnalysis.yhlczs')" min-width="50px" align="center" prop="已混料操作数" />
  113. <u-table-column :key="18" sortable :label="$t('errorAnalysis.hlczl')" min-width="60px" align="center" prop="混料操作率" />
  114. <u-table-column :key="19" sortable :label="$t('processAnalysis.hlwc')" min-width="60px" align="center" prop="混料误差值" />
  115. <u-table-column :key="20" sortable :label="$t('processAnalysis.hlzq')" min-width="60px" align="center" prop="混料准确率" />
  116. <u-table-column v-if="tab.isTrainNumber" :key="21" sortable :label="$t('errorAnalysis.hlsj')" min-width="70px" align="center" prop="混料时间" />
  117. <u-table-column v-if="tab.isTrainNumber" :key="22" sortable :label="$t('errorAnalysis.flstartTime')" min-width="70px" align="center" prop="startMaterialTime" />
  118. <u-table-column v-if="tab.isTrainNumber" :key="23" sortable :label="$t('errorAnalysis.waitTime')" min-width="70px" align="center" prop="等待时间" />
  119. <u-table-column :key="24" sortable :label="$t('errorAnalysis.hlzdtzcs')" min-width="65px" align="center" prop="混料自动跳转次数" />
  120. <u-table-column :key="25" sortable :label="$t('errorAnalysis.hlsdzdtzcs')" min-width="65px" align="center" prop="混料手动跳转次数" />
  121. <u-table-column :key="26" sortable :label="$t('errorAnalysis.qxcs')" min-width="70px" align="center" prop="取消次数" />
  122. <u-table-column :key="27" sortable :label="$t('errorAnalysis.hlzqs')" min-width="70px" align="center" prop="混料正确数" />
  123. <u-table-column :key="28" sortable :label="$t('processAnalysis.hlzql')" min-width="70px" align="center" prop="混料正确率" />
  124. <u-table-column :key="29" sortable :label="$t('errorAnalysis.qcqxzql')" min-width="60px" align="center" prop="去除取消正确率" />
  125. <u-table-column :key="30" sortable :label="$t('errorAnalysis.bzc')" min-width="60px" align="center" prop="方差" />
  126. <u-table-column :key="31" v-if="tab.isTrainNumber" sortable :label="$t('errorAnalysis.area')" min-width="60px" align="center" prop="barname" />
  127. <u-table-column v-if="activeName=='first' && tab.table.list !== null" :key="33" align="center" width="70" :label="$t('errorAnalysis.cz')" class-name="small-padding fixed-width" fixed="right">
  128. <template slot-scope="{row}">
  129. <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('1',row)" />
  130. </template>
  131. </u-table-column>
  132. <u-table-column v-else :key="33" align="center" width="70" :label="$t('errorAnalysis.cz')" class-name="small-padding fixed-width">
  133. <template slot-scope="{row}">
  134. <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('1',row)" />
  135. </template>
  136. </u-table-column>
  137. </u-table>
  138. <span v-if="tab.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">{{$t('processAnalysis.total')}}{{ tab.table.total }}{{$t('processAnalysis.tiao')}}</span>
  139. <div v-if="tab.radio !== '6'">
  140. <h4>{{$t('errorAnalysis.sl')}}</h4>
  141. <u-table
  142. ref="plTable22"
  143. :key="tab.table2.tableKey"
  144. v-loading="tab.table2.listLoading"
  145. :data="tab.table2.list"
  146. border
  147. fit
  148. highlight-current-row
  149. style="width: 100%;"
  150. :row-style="rowStyle"
  151. :cell-style="cellStyle"
  152. class="elTable table-fixed"
  153. :max-height="myHeight2"
  154. >
  155. <template slot="empty">
  156. <span style="color: #969799;">No more data</span>
  157. </template>
  158. <u-table-column v-if="tab.checked && !tab.isTrainNumber" :key="0" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="计划时间" />
  159. <u-table-column v-if="tab.isTrainNumber" :key="117" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="计划时间1" />
  160. <u-table-column v-if="tab.isTrainNumber" :key="113" sortable :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="templetname" />
  161. <u-table-column v-if="tab.isTrainNumber" :key="114" sortable :label="$t('errorAnalysis.drivername')" min-width="70px" align="center" prop="TMR名称" />
  162. <u-table-column v-if="tab.isTrainNumber" :key="115" sortable :label="$t('errorAnalysis.stratJl')" min-width="70px" align="center" prop="startTime" />
  163. <u-table-column v-if="tab.isTrainNumber" :key="116" sortable :label="$t('errorAnalysis.endJl')" min-width="70px" align="center" prop="endTime" />
  164. <u-table-column v-if="tab.isDriver" :key="1" sortable :label="$t('errorAnalysis.Driver')" min-width="70px" align="center" prop="驾驶员" />
  165. <u-table-column v-if="tab.isFormulaName" :key="2" sortable :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="配方名称" />
  166. <u-table-column v-if="tab.isHouseName" :key="3" sortable :label="$t('errorAnalysis.isHouseName')" min-width="70px" align="center" prop="栏舍名称" />
  167. <u-table-column v-if="tab.isLivestockType" :key="4" sortable :label="$t('errorAnalysis.sxlb')" min-width="70px" align="center" prop="牲畜类别" />
  168. <u-table-column v-if="tab.isTrainNumber" :key="5" sortable :label="$t('errorAnalysis.projname')" min-width="70px" align="center" prop="车次" />
  169. <u-table-column v-if="tab.isTrainNumber" :key="6" sortable :label="$t('errorAnalysis.isTrainNumber')" min-width="70px" align="center" prop="班次" />
  170. <u-table-column v-if="tab.isTrainNumber" :key="7" sortable :label="$t('errorAnalysis.tmrnames')" min-width="70px" align="center" prop="TMR名称" />
  171. <u-table-column v-if="tab.isTrainNumber" :key="8" sortable :label="$t('errorAnalysis.Driver')" min-width="70px" align="center" prop="驾驶员" />
  172. <u-table-column v-if="tab.isTMRName" :key="9" sortable :label="$t('errorAnalysis.tmrnames')" min-width="70px" align="center" prop="TMR名称" />
  173. <u-table-column v-if="tab.isTMRName" :key="10" sortable :label="$t('errorAnalysis.isTrainNumber')" min-width="70px" align="center" prop="班次" />
  174. <u-table-column v-if="tab.isTMRName" :key="11" sortable :label="$t('errorAnalysis.projname')" min-width="70px" align="center" prop="车次" />
  175. <u-table-column v-if="tab.isTMRName" :key="12" sortable :label="$t('errorAnalysis.Driver')" min-width="70px" align="center" prop="驾驶员" />
  176. <u-table-column v-if="tab.isFeed" :key="13" sortable :label="$t('errorAnalysis.isFeed')" min-width="70px" align="center" prop="饲料" />
  177. <u-table-column :key="14" sortable :label="$t('errorAnalysis.llzl')" min-width="60px" align="center" prop="理论重量" />
  178. <u-table-column :key="15" sortable :label="$t('errorAnalysis.acWeight')" min-width="60px" align="center" prop="实际重量" />
  179. <u-table-column :key="16" sortable :label="$t('errorAnalysis.sljhczs')" min-width="60px" align="center" prop="计划撒料操作数" />
  180. <u-table-column :key="17" sortable :label="$t('errorAnalysis.yclczs')" min-width="50px" align="center" prop="已撒料操作数" />
  181. <u-table-column :key="18" sortable :label="$t('errorAnalysis.slczl')" min-width="60px" align="center" prop="撒料操作率" />
  182. <u-table-column :key="19" sortable :label="$t('errorAnalysis.slwcz')" min-width="60px" align="center" prop="撒料误差值" />
  183. <u-table-column :key="20" sortable :label="$t('errorAnalysis.slzql')" min-width="60px" align="center" prop="撒料准确率" />
  184. <u-table-column v-if="tab.isTrainNumber" :key="21" sortable :label="$t('errorAnalysis.slsj')" min-width="70px" align="center" prop="撒料时间" />
  185. <u-table-column v-if="tab.isTrainNumber" :key="22" sortable :label="$t('errorAnalysis.flstartTime')" min-width="70px" align="center" prop="startMaterialTime" />
  186. <u-table-column v-if="tab.isTrainNumber" :key="23" sortable :label="$t('errorAnalysis.waitTime')" min-width="70px" align="center" prop="等待时间" />
  187. <u-table-column :key="24" sortable :label="$t('errorAnalysis.slzdtzcs')" width="65px" align="center" prop="撒料自动跳转次数" />
  188. <u-table-column :key="25" sortable :label="$t('errorAnalysis.slsdzdtzcs')" width="65px" align="center" prop="撒料手动跳转次数" />
  189. <u-table-column :key="26" sortable :label="$t('errorAnalysis.qxcs')" min-width="70px" align="center" prop="取消次数" />
  190. <u-table-column :key="27" sortable :label="$t('errorAnalysis.slzqs')" min-width="70px" align="center" prop="撒料正确数" />
  191. <u-table-column :key="28" sortable :label="$t('processAnalysis.slzql')" min-width="70px" align="center" prop="撒料正确率" />
  192. <u-table-column :key="29" sortable :label="$t('errorAnalysis.qcqxzql')" min-width="65px" align="center" prop="去除取消正确率" />
  193. <u-table-column :key="30" sortable :label="$t('errorAnalysis.bzc')" min-width="60px" align="center" prop="方差" />
  194. <u-table-column :key="31" v-if="tab.isTrainNumber" sortable :label="$t('errorAnalysis.area')" min-width="60px" align="center" prop="barname" />
  195. <u-table-column v-if="activeName=='first' && tab.table2.list !== null" :key="32" align="center" width="70" :label="$t('errorAnalysis.cz')" class-name="small-padding fixed-width" fixed="right">
  196. <template slot-scope="{row}">
  197. <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('2',row)" />
  198. </template>
  199. </u-table-column>
  200. <u-table-column v-else :key="30" align="center" width="70" :label="$t('errorAnalysis.cz')" class-name="small-padding fixed-width">
  201. <template slot-scope="{row}">
  202. <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('2',row)" />
  203. </template>
  204. </u-table-column>
  205. </u-table>
  206. <span v-if="tab.table2.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">{{$t('processAnalysis.total')}}{{ tab.table2.total }}{{$t('processAnalysis.tiao')}}</span>
  207. </div>
  208. </div>
  209. <div id="AnalysisChart" class="AnalysisChart">
  210. <el-row :gutter="10">
  211. <el-col :span="24" style="margin-bottom: 10px;margin-top: 10px;">
  212. <span>{{$t('feedingEfficiency.tbcxsj')}}</span>
  213. <el-radio-group v-model="tab.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeAllSpecificDate">
  214. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  215. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  216. </el-radio-group>
  217. <div v-show="tab.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  218. <el-date-picker v-model="tab.chartDate" :clearable="false" class="inputDatetime filter-item" style="width:250px;" type="daterange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" :picker-options="pickerOptionsDate" />
  219. </div>
  220. <div v-show="tab.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  221. <el-select v-model="tab.selectYear" class="filter-item" style="width:130px;margin-right:10px;" :placeholder="$t('errorAnalysis.qxznf')" @change="changeAllYear">
  222. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  223. </el-select>
  224. <el-select v-model="tab.selectWeek" class="filter-item" style="width:170px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  225. <el-option v-for="(item,index) in tab.weekList" :key="index" :label="item.name" :value="item.id" />
  226. </el-select>
  227. </div>
  228. <div v-show="tab.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  229. <el-date-picker v-model="tab.chartMonth" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" style="width:250px;" class="inputDatetime filter-item" :range-separator="$t('common.to')" :picker-options="pickerOptionsMonth" />
  230. </div>
  231. <el-button class="successBorder" style="margin-left:10px;" @click="handleAllDate">{{$t('errorAnalysis.confirm')}}</el-button>
  232. <svg-icon icon-class="Up" style="width: 40px;height: 40px;float: right;" @click="handleQuickJumpTop" />
  233. </el-col>
  234. </el-row>
  235. <el-row :gutter="10" class="dashboard-editor-container">
  236. <el-col :span="12">
  237. <div class="grid-content">
  238. <h4>{{$t('errorAnalysis.planName')}}</h4>
  239. <div v-if="tab.chart2.isChart" class="button">
  240. <div class="chartButton">
  241. <el-radio-group v-model="tab.chart2.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart2')">
  242. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  243. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  244. </el-radio-group>
  245. <div v-show="tab.chart2.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  246. <el-date-picker v-model="tab.chart2.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" :picker-options="pickerOptionsDate" />
  247. </div>
  248. <div v-show="tab.chart2.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  249. <el-select v-model="tab.chart2.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" :placeholder="$t('errorAnalysis.nf')" @change="changeChartYear('chart2')">
  250. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  251. </el-select>
  252. <el-select v-model="tab.chart2.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  253. <el-option v-for="(item,index) in tab.chart2.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  254. </el-select>
  255. </div>
  256. <div v-show="tab.chart2.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  257. <el-date-picker v-model="tab.chart2.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" format="yyyy-MM" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" :range-separator="$t('common.to')" :picker-options="pickerOptionsMonth" />
  258. </div>
  259. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart2')">{{$t('errorAnalysis.confirm')}}</el-button>
  260. </div>
  261. <div>
  262. <div class="exportTable2" @click="handleExport('chart2')">{{$t('dashboard.Export')}}</div>
  263. <div class="exportTable2" @click="handleTable('chart2')">{{$t('errorAnalysis.changeTable')}}</div>
  264. </div>
  265. </div>
  266. <div v-if="tab.chart2.isChart" id="chartLine2" style="width:100%;height:385px;background: #fff;" />
  267. <div v-if="tab.chart2.isTable" class="table">
  268. <div class="button">
  269. <div class="exportTable" @click="handleExport('chart2')">{{$t('dashboard.Export')}}</div>
  270. <div class="exportTable" @click="handleChart('chart2')">{{$t('dashboard.sTable')}}</div>
  271. </div>
  272. <el-table
  273. :key="tab.chart2.table.tableKey"
  274. v-loading="tab.chart2.table.listLoading"
  275. :data="tab.chart2.table.list"
  276. border
  277. fit
  278. highlight-current-row
  279. style="width: 100%;"
  280. height="385"
  281. :row-style="rowStyle"
  282. :cell-style="cellStyle"
  283. class="elTable table-fixed"
  284. >
  285. <template slot="empty">
  286. <span style="color: #969799;">No more data</span>
  287. </template>
  288. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="85px" align="center" prop="日期" />
  289. <el-table-column :label="$t('errorAnalysis.jhzxzl')" sortable min-width="80px" align="center" prop="实际量" />
  290. <el-table-column :label="$t('errorAnalysis.pfllzl')" sortable min-width="80px" align="center" prop="理论量" />
  291. <el-table-column :label="$t('errorAnalysis.jhzql')" sortable min-width="85px" align="center" prop="field1" />
  292. <el-table-column :label="$t('errorAnalysis.jhqxzl')" sortable min-width="80px" align="center" prop="计划取消重量" />
  293. <el-table-column :label="$t('errorAnalysis.jhzqll')" sortable min-width="100px" align="center" prop="field3" />
  294. <el-table-column :label="$t('errorAnalysis.jhzql1')" sortable min-width="85px" align="center" prop="正确数" />
  295. <el-table-column :label="$t('errorAnalysis.jhs')" sortable min-width="60px" align="center" prop="计划数" />
  296. <el-table-column :label="$t('errorAnalysis.jhzql1')"sortable min-width="75px" align="center" prop="field2" />
  297. </el-table>
  298. </div>
  299. </div>
  300. </el-col>
  301. <el-col :span="12">
  302. <div class="grid-content">
  303. <h4>{{$t('errorAnalysis.feedName')}}</h4>
  304. <div v-if="tab.chart1.isChart" class="button">
  305. <div class="chartButton">
  306. <my-select ref="tenantselect" :model="tab.chart1.getdataListParm.parammaps.statisticsList" :option="tab.chart1.statisticsList" :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" :placeholder="$t('errorAnalysis.xztjcs')" @searchSelect="changeStatisticChart1" />
  307. <el-radio-group v-model="tab.chart1.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart1')">
  308. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  309. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  310. </el-radio-group>
  311. <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  312. <el-date-picker v-model="tab.chart1.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" :picker-options="pickerOptionsDate" />
  313. </div>
  314. <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  315. <el-select v-model="tab.chart1.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" :placeholder="$t('errorAnalysis.nf')" @change="changeChartYear('chart1')">
  316. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  317. </el-select>
  318. <el-select v-model="tab.chart1.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  319. <el-option v-for="(item,index) in tab.chart1.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  320. </el-select>
  321. </div>
  322. <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  323. <el-date-picker v-model="tab.chart1.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" :range-separator="$t('common.to')" :picker-options="pickerOptionsMonth" />
  324. </div>
  325. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart1')">{{$t('errorAnalysis.confirm')}}</el-button>
  326. </div>
  327. <div>
  328. <div class="exportTable2" @click="handleExport('chart1')">{{$t('dashboard.Export')}}</div>
  329. <div class="exportTable2" @click="handleTable('chart1')">{{$t('errorAnalysis.changeTable')}}</div>
  330. </div>
  331. </div>
  332. <div v-if="tab.chart1.isChart" id="chartLine1" style="width:100%;height:385px;" />
  333. <div v-if="tab.chart1.isTable" class="table">
  334. <div class="button">
  335. <div class="exportTable" @click="handleExport('chart1')">{{$t('dashboard.Export')}}</div>
  336. <div class="exportTable" @click="handleChart('chart1')">{{$t('dashboard.sTable')}}</div>
  337. </div>
  338. <el-table
  339. :key="tab.chart1.table.tableKey"
  340. v-loading="tab.chart1.table.listLoading"
  341. :data="tab.chart1.table.list"
  342. border
  343. fit
  344. highlight-current-row
  345. style="width: 100%;"
  346. height="385"
  347. :row-style="rowStyle"
  348. :cell-style="cellStyle"
  349. class="elTable table-fixed"
  350. >
  351. <template slot="empty">
  352. <span style="color: #969799;">No more data</span>
  353. </template>
  354. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="90px" align="center" prop="日期" />
  355. <el-table-column :label="$t('errorAnalysis.feedName')" sortable min-width="90px" align="center" prop="名称" />
  356. <el-table-column :label="$t('errorAnalysis.jhzl')" sortable min-width="100px" align="center" prop="理论量" />
  357. <el-table-column :label="$t('errorAnalysis.skzl')"sortable min-width="100px" align="center" prop="实际量" />
  358. <el-table-column :label="$t('errorAnalysis.zql')" sortable min-width="90px" align="center" prop="准确率" />
  359. </el-table>
  360. </div>
  361. </div>
  362. </el-col>
  363. </el-row>
  364. <el-row :gutter="10" class="dashboard-editor-container">
  365. <el-col :span="12">
  366. <div class="grid-content">
  367. <h4>{{$t('errorAnalysis.nqName')}}</h4>
  368. <div v-if="tab.chart3.isChart" class="button">
  369. <div class="chartButton">
  370. <my-select ref="tenantselect" :model="tab.chart3.getdataListParm.parammaps.statisticsList" :option="tab.chart3.statisticsList" :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" :placeholder="$t('errorAnalysis.xztjcs')" @searchSelect="changeStatisticChart3" />
  371. <el-radio-group v-model="tab.chart3.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart3')">
  372. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  373. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  374. </el-radio-group>
  375. <div v-show="tab.chart3.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  376. <el-date-picker v-model="tab.chart3.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" :picker-options="pickerOptionsDate" />
  377. </div>
  378. <div v-show="tab.chart3.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  379. <el-select v-model="tab.chart3.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" :placeholder="$t('errorAnalysis.nf')" @change="changeChartYear('chart3')">
  380. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  381. </el-select>
  382. <el-select v-model="tab.chart3.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  383. <el-option v-for="(item,index) in tab.chart3.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  384. </el-select>
  385. </div>
  386. <div v-show="tab.chart3.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  387. <el-date-picker v-model="tab.chart3.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" :range-separator="$t('common.to')" :picker-options="pickerOptionsMonth" />
  388. </div>
  389. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart3')">{{$t('errorAnalysis.confirm')}}</el-button>
  390. </div>
  391. <div>
  392. <div class="exportTable2" @click="handleExport('chart3')">{{$t('dashboard.Export')}}</div>
  393. <div class="exportTable2" @click="handleTable('chart3')">{{$t('errorAnalysis.changeTable')}}</div>
  394. </div>
  395. </div>
  396. <div v-if="tab.chart3.isChart" id="chartLine3" style="width:100%;height:385px;" />
  397. <div v-if="tab.chart3.isTable" class="table">
  398. <div class="button">
  399. <div class="exportTable" @click="handleExport('chart3')">{{$t('dashboard.Export')}}</div>
  400. <div class="exportTable" @click="handleChart('chart3')">{{$t('dashboard.sTable')}}</div>
  401. </div>
  402. <el-table
  403. :key="tab.chart3.table.tableKey"
  404. v-loading="tab.chart3.table.listLoading"
  405. :element-loading-text="$t('common.tableMsg')"
  406. :data="tab.chart3.table.list"
  407. border
  408. fit
  409. highlight-current-row
  410. style="width: 100%;"
  411. height="385"
  412. :row-style="rowStyle"
  413. :cell-style="cellStyle"
  414. class="elTable table-fixed"
  415. >
  416. <template slot="empty">
  417. <span style="color: #969799;">No more data</span>
  418. </template>
  419. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="90px" align="center" prop="日期" />
  420. <el-table-column :label="$t('errorAnalysis.sxlb')" sortable min-width="90px" align="center" prop="名称" />
  421. <el-table-column :label="$t('errorAnalysis.jhzl')" sortable min-width="100px" align="center" prop="理论量" />
  422. <el-table-column :label="$t('errorAnalysis.skzl')"sortable min-width="100px" align="center" prop="实际量" />
  423. <el-table-column :label="$t('errorAnalysis.zql')" sortable min-width="90px" align="center" prop="准确率" />
  424. </el-table>
  425. </div>
  426. </div>
  427. </el-col>
  428. <el-col :span="12">
  429. <div class="grid-content">
  430. <h4>{{$t('errorAnalysis.clzql')}}</h4>
  431. <div v-if="tab.chart4.isChart" class="button">
  432. <div class="chartButton">
  433. <my-select ref="tenantselect" :model="tab.chart4.getdataListParm.parammaps.statisticsList" :option="tab.chart4.statisticsList" :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" :placeholder="$t('errorAnalysis.xztjcs')" @searchSelect="changeStatisticChart4" />
  434. <el-radio-group v-model="tab.chart4.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart4')">
  435. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  436. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  437. </el-radio-group>
  438. <div v-show="tab.chart4.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  439. <el-date-picker v-model="tab.chart4.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" :picker-options="pickerOptionsDate" />
  440. </div>
  441. <div v-show="tab.chart4.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  442. <el-select v-model="tab.chart4.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" :placeholder="$t('errorAnalysis.nf')" @change="changeChartYear('chart4')">
  443. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  444. </el-select>
  445. <el-select v-model="tab.chart4.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  446. <el-option v-for="(item,index) in tab.chart4.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  447. </el-select>
  448. </div>
  449. <div v-show="tab.chart4.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  450. <el-date-picker v-model="tab.chart4.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" :range-separator="$t('common.to')" :picker-options="pickerOptionsMonth" />
  451. </div>
  452. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart4')">{{$t('errorAnalysis.confirm')}}</el-button>
  453. </div>
  454. <div>
  455. <div class="exportTable2" @click="handleExport('chart4')">{{$t('dashboard.Export')}}</div>
  456. <div class="exportTable2" @click="handleTable('chart4')">{{$t('errorAnalysis.changeTable')}}</div>
  457. </div>
  458. </div>
  459. <div v-if="tab.chart4.isChart" id="chartLine4" style="width:100%;height:385px;" />
  460. <div v-if="tab.chart4.isTable" class="table">
  461. <div class="button">
  462. <div class="exportTable" @click="handleExport('chart4')">{{$t('dashboard.Export')}}</div>
  463. <div class="exportTable" @click="handleChart('chart4')">{{$t('dashboard.sTable')}}</div>
  464. </div>
  465. <el-table
  466. :key="tab.chart4.table.tableKey"
  467. v-loading="tab.chart4.table.listLoading"
  468. :data="tab.chart4.table.list"
  469. border
  470. fit
  471. highlight-current-row
  472. style="width: 100%;"
  473. height="385"
  474. :row-style="rowStyle"
  475. :cell-style="cellStyle"
  476. class="elTable table-fixed"
  477. >
  478. <template slot="empty">
  479. <span style="color: #969799;">No more data</span>
  480. </template>
  481. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="90px" align="center" prop="日期" />
  482. <el-table-column :label="$t('errorAnalysis.projname')" sortable min-width="90px" align="center" prop="名称" />
  483. <el-table-column :label="$t('errorAnalysis.jhzl')" sortable min-width="100px" align="center" prop="理论量" />
  484. <el-table-column :label="$t('errorAnalysis.skzl')"sortable min-width="100px" align="center" prop="实际量" />
  485. <el-table-column :label="$t('errorAnalysis.zql')" sortable min-width="90px" align="center" prop="准确率" />
  486. </el-table>
  487. </div>
  488. </div>
  489. </el-col>
  490. </el-row>
  491. <el-row :gutter="10" class="dashboard-editor-container">
  492. <el-col :span="12">
  493. <div class="grid-content">
  494. <h4> {{$t('errorAnalysis.hltj')}} </h4>
  495. <div v-if="tab.chart5.isChart" class="button">
  496. <div class="chartButton">
  497. <el-radio-group v-model="tab.chart5.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart5')">
  498. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  499. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  500. </el-radio-group>
  501. <div v-show="tab.chart5.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  502. <el-date-picker v-model="tab.chart5.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" :picker-options="pickerOptionsDate" />
  503. </div>
  504. <div v-show="tab.chart5.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  505. <el-select v-model="tab.chart5.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" :placeholder="$t('errorAnalysis.nf')" @change="changeChartYear('chart5')">
  506. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  507. </el-select>
  508. <el-select v-model="tab.chart5.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  509. <el-option v-for="(item,index) in tab.chart5.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  510. </el-select>
  511. </div>
  512. <div v-show="tab.chart5.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  513. <el-date-picker v-model="tab.chart5.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" :range-separator="$t('common.to')" :picker-options="pickerOptionsMonth" />
  514. </div>
  515. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart5')">{{$t('errorAnalysis.confirm')}}</el-button>
  516. </div>
  517. <div>
  518. <div class="exportTable2" @click="handleExport('chart5')">{{$t('dashboard.Export')}}</div>
  519. <div class="exportTable2" @click="handleTable('chart5')">{{$t('errorAnalysis.changeTable')}}</div>
  520. </div>
  521. </div>
  522. <div v-if="tab.chart5.isChart" id="chartLine5" class="button" style="width:100%;height:385px;" />
  523. <div v-if="tab.chart5.isTable" class="table">
  524. <div class="button">
  525. <div class="exportTable" @click="handleExport('chart5')">{{$t('dashboard.Export')}}</div>
  526. <div class="exportTable" @click="handleChart('chart5')">{{$t('dashboard.sTable')}}</div>
  527. </div>
  528. <el-table
  529. :key="tab.chart5.table.tableKey"
  530. v-loading="tab.chart5.table.listLoading"
  531. :data="tab.chart5.table.list"
  532. ref='myTable'
  533. border
  534. fit
  535. highlight-current-row
  536. style="width: 100%;"
  537. height="385"
  538. :row-style="rowStyle"
  539. :cell-style="cellStyle"
  540. class="elTable table-fixed"
  541. >
  542. <template slot="empty">
  543. <span style="color: #969799;">No more data</span>
  544. </template>
  545. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="100px" align="center" prop="日期" />
  546. <el-table-column :label="$t('errorAnalysis.zdtzcs')" sortable min-width="130px" align="center" prop="field1" />
  547. <el-table-column :label="$t('errorAnalysis.sdtzcs')" sortable min-width="130px" align="center" prop="field2" />
  548. <el-table-column :label="$t('errorAnalysis.zdtzllzl')" sortable min-width="110px" align="center" prop="理论自动" />
  549. <el-table-column :label="$t('errorAnalysis.zdtzsjzl')" sortable min-width="110px" align="center" prop="实际自动" />
  550. <el-table-column :label="$t('errorAnalysis.zdtzzql')" sortable min-width="110px" align="center" prop="field3" />
  551. <el-table-column :label="$t('errorAnalysis.sdtzllzl')" sortable min-width="110px" align="center" prop="理论手动" />
  552. <el-table-column :label="$t('errorAnalysis.sdtzsjzl')" sortable min-width="110px" align="center" prop="实际手动" />
  553. <el-table-column :label="$t('errorAnalysis.sdtzzql')" sortable min-width="110px" align="center" prop="field4" />
  554. </el-table>
  555. </div>
  556. </div>
  557. </el-col>
  558. <el-col :span="12">
  559. <div class="grid-content">
  560. <h4>{{$t('errorAnalysis.hlqxcs')}}</h4>
  561. <div v-if="tab.chart6.isChart" class="button">
  562. <div class="chartButton">
  563. <el-radio-group v-model="tab.chart6.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart6')">
  564. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  565. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  566. </el-radio-group>
  567. <div v-show="tab.chart6.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  568. <el-date-picker v-model="tab.chart6.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" :picker-options="pickerOptionsDate" />
  569. </div>
  570. <div v-show="tab.chart6.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  571. <el-select v-model="tab.chart6.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" :placeholder="$t('errorAnalysis.nf')" @change="changeChartYear('chart6')">
  572. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  573. </el-select>
  574. <el-select v-model="tab.chart6.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  575. <el-option v-for="(item,index) in tab.chart6.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  576. </el-select>
  577. </div>
  578. <div v-show="tab.chart6.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  579. <el-date-picker v-model="tab.chart6.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" :range-separator="$t('common.to')" :picker-options="pickerOptionsMonth" />
  580. </div>
  581. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart6')">{{$t('errorAnalysis.confirm')}}</el-button>
  582. </div>
  583. <div>
  584. <div class="exportTable2" @click="handleExport('chart6')">{{$t('dashboard.Export')}}</div>
  585. <div class="exportTable2" @click="handleTable('chart6')">{{$t('errorAnalysis.changeTable')}}</div>
  586. </div>
  587. </div>
  588. <div v-if="tab.chart6.isChart" id="chartLine6" style="width:100%;height:385px;" />
  589. <div v-if="tab.chart6.isTable" class="table">
  590. <div class="button">
  591. <div class="exportTable" @click="handleExport('chart6')">{{$t('dashboard.Export')}}</div>
  592. <div class="exportTable" @click="handleChart('chart6')">{{$t('dashboard.sTable')}}</div>
  593. </div>
  594. <el-table
  595. :key="tab.chart6.table.tableKey"
  596. v-loading="tab.chart6.table.listLoading"
  597. :element-loading-text="$t('common.tableMsg')"
  598. :data="tab.chart6.table.list"
  599. border
  600. fit
  601. highlight-current-row
  602. style="width: 100%;"
  603. height="385"
  604. :row-style="rowStyle"
  605. :cell-style="cellStyle"
  606. class="elTable table-fixed"
  607. >
  608. <template slot="empty">
  609. <span style="color: #969799;">No more data</span>
  610. </template>
  611. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="110px" align="center" prop="日期" />
  612. <el-table-column :label="$t('errorAnalysis.hlqxcs')" sortable min-width="110px" align="center" prop="field1" />
  613. </el-table>
  614. </div>
  615. </div>
  616. </el-col>
  617. </el-row>
  618. <el-row :gutter="10" class="dashboard-editor-container" style="margin-bottom: 30px;">
  619. <el-col :span="24">
  620. <div class="grid-content">
  621. <h4>{{$t('errorAnalysis.lsslsjtj')}}</h4>
  622. <div v-if="tab.chart7.isChart" class="button">
  623. <div class="chartButton">
  624. <!-- 君盛-->
  625. <!-- <el-select v-model="tab.chart7.getdataListParm.parammaps.statisticsList" multiple :placeholder="$t('common.please')" collapse-tags @change="changeStatisticChart7">
  626. <el-option v-for="item in tab.chart7.statisticsList" :key="item.name" :label="item.name" :value="item.name" />
  627. </el-select> -->
  628. <!-- 其他牧场 -->
  629. <my-select ref="tenantselect" :model="tab.chart7.getdataListParm.parammaps.statisticsList" :option="tab.chart7.statisticsList" :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" :placeholder="$t('errorAnalysis.xztjcs')" @searchSelect="changeStatisticChart7" />
  630. <el-select v-model="tab.chart7.getdataListParm.parammaps.ftId" multiple collapse-tags :placeholder="$t('common.please')" @change="changeformula()">
  631. <el-option v-for="item in tab.chart7.formulaList" :key="item.id" :label="item.tname" :value="item.id" />
  632. </el-select>
  633. <el-radio-group v-model="tab.chart7.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;margin-left: 10px;" @change="changeChartSpecificDate('chart7')">
  634. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  635. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  636. </el-radio-group>
  637. <div v-show="tab.chart7.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  638. <el-date-picker v-model="tab.chart7.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" :picker-options="pickerOptionsDate" />
  639. </div>
  640. <div v-show="tab.chart7.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  641. <el-select v-model="tab.chart7.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" :placeholder="$t('errorAnalysis.nf')" @change="changeChartYear('chart7')">
  642. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  643. </el-select>
  644. <el-select v-model="tab.chart7.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  645. <el-option v-for="(item,index) in tab.chart7.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  646. </el-select>
  647. </div>
  648. <div v-show="tab.chart7.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  649. <el-date-picker v-model="tab.chart7.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" :range-separator="$t('common.to')" :picker-options="pickerOptionsMonth" />
  650. </div>
  651. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart7')">{{$t('errorAnalysis.confirm')}}</el-button>
  652. </div>
  653. <div>
  654. <div class="exportTable2" @click="handleExport('chart7')">{{$t('dashboard.Export')}}</div>
  655. <div class="exportTable2" @click="handleTable('chart7')">{{$t('errorAnalysis.changeTable')}}</div>
  656. </div>
  657. </div>
  658. <div v-if="tab.chart7.isChart" id="chartLine7" style="width:100%;height:385px;" />
  659. <div v-if="tab.chart7.isTable" class="table">
  660. <div class="button">
  661. <div class="exportTable" @click="handleExport('chart7')">{{$t('dashboard.Export')}}</div>
  662. <div class="exportTable" @click="handleChart('chart7')">{{$t('dashboard.sTable')}}</div>
  663. </div>
  664. <el-table
  665. :key="tab.chart7.table.tableKey"
  666. v-loading="tab.chart7.table.listLoading"
  667. :data="tab.chart7.table.list"
  668. border
  669. fit
  670. highlight-current-row
  671. style="width: 100%;"
  672. height="385"
  673. :row-style="rowStyle"
  674. :cell-style="cellStyle"
  675. class="elTable table-fixed"
  676. >
  677. <template slot="empty">
  678. <span style="color: #969799;">No more data</span>
  679. </template>
  680. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="110px" align="center" prop="日期" />
  681. <el-table-column :label="$t('errorAnalysis.pen')" sortable min-width="110px" align="center" prop="fname" />
  682. <el-table-column :label="$t('errorAnalysis.slsj')" sortable min-width="110px" align="center" prop="撒料时间" />
  683. </el-table>
  684. </div>
  685. </div>
  686. </el-col>
  687. </el-row>
  688. </div>
  689. </div>
  690. </el-tab-pane>
  691. <el-tab-pane :label="$t('errorAnalysis.hltj')"name="second">
  692. <div class="search" ref="myHeightSecond">
  693. <el-date-picker v-model="tab2.table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" style="width: 250px;" :picker-options="pickerOptions3" />
  694. <!-- <el-date-picker v-model="tab2.table.getdataListParm.parammaps.inputDatetime2" :clearable="false" style="width: 140px;margin-top: 5px;" type="date" :placeholder="$t('dailyExecutionPlan.xzrq')" > </el-date-picker> -->
  695. <el-button class="el-icon-arrow-left elIconArrowLeft" style="display:inline-block;margin-top: 5px;" :disabled="Beforedisabled2" @click="handleBefore2" />
  696. <el-button class="el-icon-arrow-right elIconArrowRight" style="display:inline-block;margin-top: 5px;" :disabled="Nextdisabled2" @click="handleNext2" />
  697. <el-select clearable filterable v-model="tab2.table.getdataListParm.parammaps.tmrtname" :placeholder="$t('errorAnalysis.tmrName')" class="filter-item" style="width: 120px;">
  698. <el-option v-for="(item,index) in tab2.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
  699. </el-select>
  700. <el-input v-model="tab2.table.getdataListParm.parammaps.projname" style="margin-top: 5px;width: 110px;" :placeholder="$t('errorAnalysis.projname')" class="filter-item" clearable />
  701. <el-select v-model="tab2.table.getdataListParm.parammaps.times" style="margin-top: 5px;width: 110px;" filterable :placeholder="$t('errorAnalysis.isTrainNumber')" class="filter-item" clearable>
  702. <el-option v-for="item in tab2.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  703. </el-select>
  704. <el-input v-model="tab2.table.getdataListParm.parammaps.templetname" style="margin-top: 5px;width: 110px;" :placeholder="$t('errorAnalysis.feedName')" class="filter-item" clearable />
  705. <el-select v-model="tab2.table.getdataListParm.parammaps.buttontype" style="margin-top: 5px;width: 130px;" filterable :placeholder="$t('errorAnalysis.tzfs')" class="filter-item" clearable>
  706. <el-option v-for="item in tab2.jumpModeList" :key="item.id" :label="item.name" :value="item.id" />
  707. </el-select>
  708. <div style="display: inline-block;" class="filter-item1">
  709. <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlwc1" :placeholder="$t('processAnalysis.hlwc')" style="width: 120px;" class="filter-item" clearable />
  710. <span>-</span>
  711. <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlwc2" :placeholder="$t('processAnalysis.hlwc')" style="width: 120px;" class="filter-item" clearable />
  712. </div>
  713. <div style="display: inline-block;" class="filter-item1">
  714. <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlzq1" :placeholder="$t('processAnalysis.hlzq')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  715. <span>-</span>
  716. <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlzq2" :placeholder="$t('processAnalysis.hlzq')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  717. </div>
  718. <div style="display: inline-block;" class="filter-item1">
  719. <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlzql1" :placeholder="$t('processAnalysis.hlzql')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  720. <span>-</span>
  721. <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlzql2" :placeholder="$t('processAnalysis.hlzql')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  722. </div>
  723. <el-select v-model="tab2.table.getdataListParm.parammaps.premix" filterable :placeholder="$t('errorAnalysis.sfyhjh')" class="filter-item" style="width: 120px;" clearable>
  724. <el-option v-for="item in tab2.premixList" :key="item.id" :label="item.name" :value="item.id" />
  725. </el-select>
  726. <el-checkbox v-model="tab2.table.getdataListParm.parammaps.error" style="margin-right: 10px;">{{$t('processAnalysis.oName')}}</el-checkbox>
  727. <el-button class="successBorder" style="margin-top: 5px;" @click="form_search2">{{$t('common.query')}}</el-button>
  728. <el-button class="successBorder" style="margin-top: 5px;" @click="handleRefresh2">{{$t('common.reset')}}</el-button>
  729. <el-button style="float: right;margin-right: 10px;margin-bottom:10px;margin-top: 5px;" class="export" icon="el-icon-upload2" @click="handleExport2">{{$t('dashboard.Export')}}</el-button>
  730. </div>
  731. <div class="table">
  732. <u-table
  733. ref="plTable2"
  734. :key="tab2.table.tableKey"
  735. v-loading="tab2.table.listLoading"
  736. :element-loading-text="$t('common.tableMsg')"
  737. :data="tab2.table.list"
  738. border
  739. fit
  740. highlight-current-row
  741. style="width: 100%;"
  742. :row-style="rowStyle"
  743. :cell-style="cellStyle"
  744. class="elTable table-fixed"
  745. :height="myHeightSecond"
  746. >
  747. <template slot="empty">
  748. <span style="color: #969799;">No more data</span>
  749. </template>
  750. <u-table-column sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="日期" />
  751. <u-table-column sortable :label="$t('errorAnalysis.tmrnames')" min-width="70px" align="center" prop="TMR名称" />
  752. <u-table-column sortable :label="$t('errorAnalysis.czNum')" min-width="70px" align="center" prop="sort" />
  753. <u-table-column sortable :label="$t('errorAnalysis.projname')" min-width="50px" align="center" prop="车次" />
  754. <u-table-column sortable :label="$t('errorAnalysis.isTrainNumber')" min-width="50px" align="center" prop="班次" />
  755. <u-table-column sortable :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="配方名称">
  756. <template slot-scope="{row}">
  757. <a @click="clickRecipeName2(row)" style="text-decoration: underline;color: #0000FF;">{{ row.配方名称 }}</a>
  758. </template>
  759. </u-table-column>
  760. <u-table-column sortable :label="$t('errorAnalysis.Driver')" min-width="50px" align="center" prop="驾驶员" />
  761. <u-table-column sortable :label="$t('errorAnalysis.isFeed')" min-width="70px" align="center" prop="饲料">
  762. <template slot-scope="{row}">
  763. <a @click="clickFeed2(row)" style="text-decoration: underline;color: #0000FF;">{{ row.饲料 }}</a>
  764. </template>
  765. </u-table-column>
  766. <u-table-column sortable :label="$t('errorAnalysis.llzl')" min-width="55px" align="center" prop="理论重量" />
  767. <u-table-column sortable :label="$t('errorAnalysis.acWeight')" min-width="55px" align="center" prop="实际重量" />
  768. <u-table-column sortable :label="$t('errorAnalysis.wcz')" min-width="45px" align="center" prop="误差值" />
  769. <u-table-column sortable :label="$t('errorAnalysis.zql')" min-width="45px" align="center" prop="准确率" />
  770. <u-table-column sortable :label="$t('errorAnalysis.planTime')" min-width="55px" align="center" prop="计划时间" />
  771. <u-table-column sortable :label="$t('errorAnalysis.startTime')" min-width="55px" align="center" prop="开始时间" />
  772. <u-table-column sortable :label="$t('errorAnalysis.endTime')" min-width="55px" align="center" prop="结束时间" />
  773. <u-table-column sortable :label="$t('errorAnalysis.jsTime')" min-width="55px" align="center" prop="搅拌时间" />
  774. <u-table-column sortable :label="$t('errorAnalysis.tzfs')" min-width="55px" align="center" prop="跳转方式" />
  775. <u-table-column sortable :label="$t('errorAnalysis.stWeight')" min-width="55px" align="center" prop="开始重量" />
  776. <u-table-column sortable :label="$t('errorAnalysis.edWeight')" min-width="55px" align="center" prop="结束重量" />
  777. <u-table-column sortable :label="$t('errorAnalysis.ccms')" min-width="55px" align="center" prop="remark" />
  778. <u-table-column sortable :label="$t('errorAnalysis.isOK')" min-width="70px" align="center" prop="standard" />
  779. <u-table-column sortable :label="$t('errorAnalysis.area')" min-width="70px" align="center" prop="barname" />
  780. </u-table>
  781. <span v-if="tab2.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">{{$t('processAnalysis.total')}}{{ tab2.table.total }}{{$t('processAnalysis.tiao')}}</span>
  782. </div>
  783. </el-tab-pane>
  784. <el-tab-pane :label="$t('errorAnalysis.sltj')" name="third">
  785. <div class="search" ref="myHeightThird">
  786. <el-date-picker v-model="tab3.table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" style="width: 250px;" :picker-options="pickerOptions3" />
  787. <!-- <el-date-picker v-model="tab3.table.getdataListParm.parammaps.inputDatetime2" :clearable="false" style="margin-top: 5px;width:140px;" type="date" :placeholder="$t('dailyExecutionPlan.xzrq')" > </el-date-picker> -->
  788. <el-button class="el-icon-arrow-left elIconArrowLeft" style="dispaly:inline-block;margin-top: 5px;" :disabled="Beforedisabled3" @click="handleBefore3" />
  789. <el-button class="el-icon-arrow-right elIconArrowRight" style="dispaly:inline-block;margin-top: 5px;" :disabled="Nextdisabled3" @click="handleNext3" />
  790. <el-select v-model="tab3.table.getdataListParm.parammaps.tmrtname" :placeholder="$t('errorAnalysis.tmrName')" class="filter-item" style="margin-top: 5px;width: 120px;" clearable filterable>
  791. <el-option v-for="(item,index) in tab3.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
  792. </el-select>
  793. <el-input v-model="tab3.table.getdataListParm.parammaps.projname" style="margin-top: 5px;width: 150px;" :placeholder="$t('errorAnalysis.projname')" class="filter-item" clearable />
  794. <el-select v-model="tab3.table.getdataListParm.parammaps.times" style="margin-top: 5px;width: 100px;" filterable :placeholder="$t('errorAnalysis.isTrainNumber')" class="filter-item" clearable>
  795. <el-option v-for="item in tab3.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  796. </el-select>
  797. <el-input v-model="tab3.table.getdataListParm.parammaps.templetname" style="margin-top: 5px;width: 110px;" :placeholder="$t('errorAnalysis.feedName')" class="filter-item" clearable />
  798. <el-input v-model="tab3.table.getdataListParm.parammaps.fname" style="margin-top: 5px;width: 110px;" :placeholder="$t('errorAnalysis.isHouseName')" class="filter-item" clearable />
  799. <el-select v-model="tab3.table.getdataListParm.parammaps.buttontype" style="margin-top: 5px;width: 110px;" filterable :placeholder="$t('errorAnalysis.tzfs')"class="filter-item" clearable>
  800. <el-option v-for="item in tab3.jumpModeList" :key="item.id" :label="item.name" :value="item.id" />
  801. </el-select>
  802. <div style="display: inline-block;" class="filter-item1">
  803. <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slwc1" :placeholder="$t('processAnalysis.slwc')" style="width: 120px;" class="filter-item" clearable />
  804. <span>-</span>
  805. <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slwc2" :placeholder="$t('processAnalysis.slwc')" style="width: 120px;" class="filter-item" clearable />
  806. </div>
  807. <div style="display: inline-block;" class="filter-item1">
  808. <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slzq1" :placeholder="$t('processAnalysis.slzq')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  809. <span>-</span>
  810. <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slzq2" :placeholder="$t('processAnalysis.slzq')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  811. </div>
  812. <div style="display: inline-block;" class="filter-item1">
  813. <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slzql1" :placeholder="$t('processAnalysis.slzql')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  814. <span>-</span>
  815. <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slzql2" :placeholder="$t('processAnalysis.slzql')" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
  816. </div>
  817. <el-checkbox v-model="tab3.table.getdataListParm.parammaps.error" style="margin-right: 10px;">{{$t('processAnalysis.oName')}}</el-checkbox>
  818. <el-button class="successBorder" style="margin-top: 5px;" @click="form_search3">{{$t('common.query')}}</el-button>
  819. <el-button class="successBorder" style="margin-top: 5px;" @click="handleRefresh3">{{$t('common.reset')}}</el-button>
  820. <el-button style="float: right;margin-right: 10px;margin-bottom:10px;margin-top: 5px;" class="export" icon="el-icon-upload2" @click="handleExport3">{{$t('dashboard.Export')}}</el-button>
  821. </div>
  822. <div class="table">
  823. <u-table
  824. ref="plTable3"
  825. :key="tab3.table.tableKey"
  826. v-loading="tab3.table.listLoading"
  827. :element-loading-text="$t('common.tableMsg')"
  828. :data="tab3.table.list"
  829. border
  830. fit
  831. highlight-current-row
  832. style="width: 100%;"
  833. :row-style="rowStyle"
  834. :cell-style="cellStyle"
  835. class="elTable table-fixed"
  836. :height="myHeightThird"
  837. >
  838. <template slot="empty">
  839. <span style="color: #969799;">No more data</span>
  840. </template>
  841. <u-table-column sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="日期" />
  842. <u-table-column sortable :label="$t('errorAnalysis.tmrnames')" min-width="70px" align="center" prop="TMR名称" />
  843. <u-table-column sortable :label="$t('errorAnalysis.czNum')" min-width="70px" align="center" prop="sort" />
  844. <u-table-column sortable :label="$t('errorAnalysis.projname')" min-width="45px" align="center" prop="车次" />
  845. <u-table-column sortable :label="$t('errorAnalysis.isTrainNumber')" min-width="45px" align="center" prop="班次" />
  846. <u-table-column sortable :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="配方名称">
  847. <template slot-scope="{row}">
  848. <a @click="clickRecipeName3(row)" style="text-decoration: underline;color: #0000FF;">{{ row.配方名称 }}</a>
  849. </template>
  850. </u-table-column>
  851. <u-table-column sortable :label="$t('errorAnalysis.Driver')" min-width="50px" align="center" prop="驾驶员" />
  852. <u-table-column sortable :label="$t('errorAnalysis.pen')" min-width="70px" align="center" prop="栏舍">
  853. <template slot-scope="{row}">
  854. <a @click="clickFence3(row)" style="text-decoration: underline;color: #0000FF;">{{ row.栏舍 }}</a>
  855. </template>
  856. </u-table-column>
  857. <u-table-column sortable :label="$t('errorAnalysis.llzl')" min-width="55px" align="center" prop="理论重量" />
  858. <u-table-column sortable :label="$t('errorAnalysis.acWeight')" min-width="55px" align="center" prop="实际重量" />
  859. <u-table-column sortable :label="$t('errorAnalysis.wcz')" min-width="45px" align="center" prop="误差值" />
  860. <u-table-column sortable :label="$t('errorAnalysis.zql')" min-width="45px" align="center" prop="准确率" />
  861. <u-table-column sortable :label="$t('errorAnalysis.startTime')" min-width="55px" align="center" prop="开始时间" />
  862. <u-table-column sortable :label="$t('errorAnalysis.endTime')" min-width="55px" align="center" prop="结束时间" />
  863. <u-table-column sortable :label="$t('errorAnalysis.tzfs')" min-width="55px" align="center" prop="跳转方式" />
  864. <u-table-column sortable :label="$t('errorAnalysis.stWeight')" min-width="55px" align="center" prop="开始重量" />
  865. <u-table-column sortable :label="$t('errorAnalysis.edWeight')" min-width="55px" align="center" prop="结束重量" />
  866. <u-table-column sortable :label="$t('errorAnalysis.isOK')" min-width="70px" align="center" prop="standard" />
  867. </u-table>
  868. <span v-if="tab3.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">{{$t('processAnalysis.total')}}{{ tab3.table.total }}{{$t('processAnalysis.tiao')}}</span>
  869. </div>
  870. </el-tab-pane>
  871. </el-tabs>
  872. <!-- 导出 -->
  873. <el-dialog :title="textMap[exportList.dialogStatus]" :visible.sync="exportList.dialogFormVisible" :close-on-click-modal="false" width="30%">
  874. <div>
  875. <span>{{$t('feedingEfficiency.dcskff')}}</span>
  876. <el-date-picker v-model="exportList.inputDatetime" :clearable="false" style="width: 230px;" class="inputDatetime filter-item" type="daterange" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" :picker-options="pickerOptions2" />
  877. </div>
  878. <div slot="footer" class="dialog-footer" style="margin-bottom: 10px;">
  879. <el-button class="cancelClose" @click="exportList.dialogFormVisible = false">{{$t('common.closed')}}</el-button>
  880. <el-button class="save" v-if="activeName=='second'" :disabled="isokDisable" @click="exportList2()">{{$t('errorAnalysis.confirm')}}</el-button>
  881. <el-button class="save" v-else-if="activeName=='third'" :disabled="isokDisable" @click="exportList3()">{{$t('errorAnalysis.confirm')}}</el-button>
  882. </div>
  883. </el-dialog>
  884. <!-- 查看 -->
  885. <See :show.sync="isShowDialog" :row-pid="rowPid" :start-time="startTime" :stop-time="stopTime" :optdevice="optdevice" :title-fname="titlefname" :method-name="methodName" :error="error" />
  886. <!-- 配方名称弹窗 -->
  887. <el-dialog :title="textMap[recipeNameTemp2.dialogStatus]" :visible.sync="recipeNameTemp2.dialogFormVisible" :close-on-click-modal="false" width="90%">
  888. <div class="recipeNameTemp2">
  889. <div class="search">
  890. <el-date-picker ref="inputDatetime" :clearable="false" v-model="recipeNameTemp2.getdataListParm.parammaps.inputDatetime" class="filter-item inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" />
  891. <el-button class="successBorder" @click="handleRecipeNameSearch2">{{$t('common.query')}}</el-button>
  892. </div>
  893. <div class="table">
  894. <el-table
  895. :key="recipeNameTemp2.tableKey"
  896. v-loading="recipeNameTemp2.listLoading"
  897. :element-loading-text="$t('common.tableMsg')"
  898. :data="recipeNameTemp2.list"
  899. border
  900. highlight-current-row
  901. style="width: 100%;"
  902. :row-style="rowStyle"
  903. :cell-style="cellStyle"
  904. class="elTable table-fixed"
  905. :max-height="450"
  906. >
  907. <template slot="empty">
  908. <span style="color: #969799;">No more data</span>
  909. </template>
  910. <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px" />
  911. <el-table-column :label="$t('formulationEvaluation.xgsj')" width="130px" align="center" prop="createdate" />
  912. <el-table-column :label="$t('formulationEvaluation.xgyh')" width="130px" align="center" prop="empname" />
  913. <el-table-column :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="tname">
  914. <template slot-scope="{row}">
  915. <span v-if="row.tname !==undefined &&row.tname.indexOf('/') !== -1" style="color: red;">
  916. {{row.tname}}
  917. </span>
  918. <span v-else>{{row.tname}}</span>
  919. </template>
  920. </el-table-column>
  921. <el-table-column :label="$t('formulationEvaluation.pfbm')" width="130px" align="center" prop="tcode" />
  922. <el-table-column :label="$t('formulationEvaluation.pfys')" min-width="70px" align="center">
  923. <template slot-scope="scope">
  924. <el-color-picker v-model="scope.row.tcolor" size="mini" :predefine="predefineColors" style="vertical-align: middle;" :disabled="scope.row.NoEdit" />
  925. </template>
  926. </el-table-column>
  927. <el-table-column :label="$t('errorAnalysis.sxlb')" width="130px" align="center" prop="ccname">
  928. <template slot-scope="{row}">
  929. <span v-if="row.ccname !==undefined &&row.ccname.indexOf('/') !== -1" style="color: red;">
  930. {{row.ccname}}
  931. </span>
  932. <span v-else>{{row.ccname}}</span>
  933. </template>
  934. </el-table-column>
  935. <el-table-column :label="$t('formulationEvaluation.pflx')" width="130px" align="center" prop="fttype">
  936. <template slot-scope="{row}">
  937. <span v-if="row.fttype !==undefined &&row.fttype.indexOf('/') !== -1" style="color: red;">
  938. {{row.fttype}}
  939. </span>
  940. <span v-else>{{row.fttype}}</span>
  941. </template>
  942. </el-table-column>
  943. <el-table-column :label="$t('formulationEvaluation.ly')" width="130px" align="center" prop="source">
  944. <template slot-scope="{row}">
  945. <span v-if="row.source !==undefined &&row.source.indexOf('/') !== -1" style="color: red;">
  946. {{row.source}}
  947. </span>
  948. <span v-else>{{row.source}}</span>
  949. </template>
  950. </el-table-column>
  951. <el-table-column :label="$t('formulationEvaluation.bbh')" width="130px" align="center" prop="version">
  952. <template slot-scope="{row}">
  953. <span v-if="row.version !== undefined && String(row.version).indexOf('/') !== -1" style="color: red;">
  954. {{row.version}}
  955. </span>
  956. <span v-else>{{row.version}}</span>
  957. </template>
  958. </el-table-column>
  959. <el-table-column :label="$t('formulationEvaluation.remark')" width="130px" align="center" prop="remark">
  960. <template slot-scope="{row}">
  961. <span v-if="row.remark !==undefined &&row.remark.indexOf('/') !== -1" style="color: red;">
  962. {{row.remark}}
  963. </span>
  964. <span v-else>{{row.remark}}</span>
  965. </template>
  966. </el-table-column>
  967. <el-table-column label="饲料信息" min-width="70px" align="center">
  968. <template slot-scope="{row}">
  969. <a @click="clickSeeFeed(row)" style="text-decoration: underline;color: #0000FF;">查看</a>
  970. </template>
  971. </el-table-column>
  972. </el-table>
  973. <pagination v-show="recipeNameTemp2.total>0" :total="recipeNameTemp2.total" :page.sync="recipeNameTemp2.getdataListParm.offset" :limit.sync="recipeNameTemp2.getdataListParm.pagecount" @pagination="getRecipeNameList2()" />
  974. </div>
  975. </div>
  976. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  977. <el-button class="cancelClose1" @click="recipeNameTemp2.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
  978. </div>
  979. </el-dialog>
  980. <!-- 撒料统计-配方名称 -->
  981. <el-dialog :title="textMap[recipeNameTemp3.dialogStatus]" :visible.sync="recipeNameTemp3.dialogFormVisible" :close-on-click-modal="false" width="90%">
  982. <div class="recipeNameTemp3">
  983. <!-- <div class="search">
  984. <el-date-picker ref="inputDatetime" :clearable="false" v-model="recipeNameTemp3.getdataListParm.parammaps.inputDatetime" class="filter-item inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" />
  985. <el-button class="successBorder" @click="handleRecipeNameSearch3">{{$t('common.query')}}</el-button>
  986. </div> -->
  987. <div class="table">
  988. <el-table
  989. :key="recipeNameTemp3.tableKey"
  990. v-loading="recipeNameTemp3.listLoading"
  991. :element-loading-text="$t('common.tableMsg')"
  992. :data="recipeNameTemp3.list"
  993. border
  994. highlight-current-row
  995. style="width: 100%;"
  996. :row-style="rowStyle"
  997. :cell-style="cellStyle"
  998. class="elTable table-fixed"
  999. :max-height="450"
  1000. >
  1001. <template slot="empty">
  1002. <span style="color: #969799;">No more data</span>
  1003. </template>
  1004. <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px" />
  1005. <el-table-column :label="$t('formulationEvaluation.slz')" width="130px" align="center" prop="feedgroup" />
  1006. <el-table-column :label="$t('InventoryManagement.silc')" min-width="70px" align="center" prop="fname">
  1007. <template slot-scope="{row}">
  1008. <span v-if="row.fweightstatus == 1" style="color: red;"> {{row.fname}} </span>
  1009. <span v-else>{{row.fname}}</span>
  1010. </template>
  1011. </el-table-column>
  1012. <el-table-column :label="$t('message.msg64')" width="130px" align="center" prop="fweight">
  1013. <template slot-scope="{row}">
  1014. <span v-if="row.fweight !==undefined &&row.fweight.indexOf('/') !== -1" style="color: red;">
  1015. {{row.fweight}}
  1016. </span>
  1017. <span v-else>{{row.fweight}}</span>
  1018. </template>
  1019. </el-table-column>
  1020. <el-table-column :label="$t('formulationEvaluation.jbys')" width="130px" align="center" prop="autosecond" />
  1021. </el-table>
  1022. <pagination v-show="recipeNameTemp3.total>0" :total="recipeNameTemp3.total" :page.sync="recipeNameTemp3.getdataListParm.offset" :limit.sync="recipeNameTemp3.getdataListParm.pagecount" @pagination="getRecipeNameList3()" />
  1023. </div>
  1024. </div>
  1025. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  1026. <el-button class="cancelClose1" @click="recipeNameTemp3.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
  1027. </div>
  1028. </el-dialog>
  1029. <!-- 饲料 -->
  1030. <el-dialog :title="textMap[feedTemp.dialogStatus]" :visible.sync="feedTemp.dialogFormVisible" :close-on-click-modal="false" width="98%">
  1031. <div class="feedTemp">
  1032. <div class="search">
  1033. <el-date-picker ref="inputDatetime" v-model="feedTemp.getdataListParm.parammaps.inputDatetime" :clearable="false" class="filter-item inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" />
  1034. <el-button class="successBorder" @click="handleFeedSearch">{{$t('common.query')}}</el-button>
  1035. </div>
  1036. <div class="table">
  1037. <el-table
  1038. :key="feedTemp.tableKey"
  1039. v-loading="feedTemp.listLoading"
  1040. :element-loading-text="$t('common.tableMsg')"
  1041. :data="feedTemp.list"
  1042. border
  1043. highlight-current-row
  1044. style="width: 100%;"
  1045. :row-style="rowStyle"
  1046. :cell-style="cellStyle"
  1047. class="elTable table-fixed"
  1048. >
  1049. <template slot="empty">
  1050. <span style="color: #969799;">No more data</span>
  1051. </template>
  1052. <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px">
  1053. <template slot-scope="scope">
  1054. <span>{{ scope.$index + (feedTemp.pageNum-1) * feedTemp.pageSize + 1 }}</span>
  1055. </template>
  1056. </el-table-column>
  1057. <el-table-column :label="$t('formulationEvaluation.xgsj')" min-width="100px" align="center" prop="updateTime" />
  1058. <el-table-column :label="$t('formulationEvaluation.xgyh')" width="130px" align="center" prop="empname" />
  1059. <el-table-column :label="$t('errorAnalysis.slzls')" min-width="100px" align="center">
  1060. <template slot-scope="{row}">
  1061. <span v-if="row.weight !==undefined &&row.weight.indexOf('/') !== -1" style="color: red;">
  1062. {{row.weight}}
  1063. </span>
  1064. <span v-else>{{row.weight}}</span>
  1065. </template>
  1066. </el-table-column>
  1067. </el-table>
  1068. <pagination v-show="feedTemp.total>0" :total="feedTemp.total" :page.sync="feedTemp.getdataListParm.offset" :limit.sync="feedTemp.getdataListParm.pagecount" @pagination="getFeedList()" />
  1069. </div>
  1070. </div>
  1071. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  1072. <el-button class="cancelClose1" @click="feedTemp.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
  1073. </div>
  1074. </el-dialog>
  1075. <!-- 栏舍 -->
  1076. <el-dialog :title="textMap[fenceTemp.dialogStatus]" :visible.sync="fenceTemp.dialogFormVisible" :close-on-click-modal="false" width="90%">
  1077. <div class="fenceTemp">
  1078. <el-tabs v-model="fenceTemp.activeName" @tab-click="handleFenceTabClick">
  1079. <el-tab-pane :label="$t('dhedFormula.bczl')" name="first">
  1080. <div class="search">
  1081. <el-date-picker ref="inputDatetime" v-model="fenceTemp.tab1.getdataListParm.parammaps.inputDatetime" :clearable="false" class="filter-item inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" />
  1082. <el-button class="successBorder" @click="handleFenceSearch">{{$t('common.query')}}</el-button>
  1083. </div>
  1084. <div class="table">
  1085. <u-table
  1086. :key="fenceTemp.tab1.tableKey"
  1087. v-loading="fenceTemp.tab1.listLoading"
  1088. :element-loading-text="$t('common.tableMsg')"
  1089. :data="fenceTemp.tab1.list"
  1090. border
  1091. highlight-current-row
  1092. style="width: 100%;"
  1093. :row-style="rowStyle"
  1094. :cell-style="cellStyle"
  1095. class="elTable table-fixed"
  1096. :span-method="objectSpanMethod1"
  1097. >
  1098. <template slot="empty">
  1099. <span style="color: #969799;">No more data</span>
  1100. </template>
  1101. <u-table-column :label="$t('formulationEvaluation.xh')" width="50px" align="center" type="index" />
  1102. <u-table-column :label="$t('formulationEvaluation.xgsj')" width="100px" align="center" prop="createdate" />
  1103. <u-table-column :label="$t('formulationEvaluation.xgyh')" width="130px" align="center" prop="empname" />
  1104. <u-table-column :label="$t('errorAnalysis.projname')" min-width="100px" align="center" prop="times" />
  1105. <u-table-column :label="$t('feedingEfficiency.sjnts')" min-width="100px" align="center" prop="ccount">
  1106. <template slot-scope="{row}">
  1107. <span v-if="row.ccountstatus == 1" style="color: red;">{{row.ccount}}</span>
  1108. <span v-else >{{row.ccount}}</span>
  1109. </template>
  1110. </u-table-column>
  1111. <u-table-column :label="$t('errorAnalysis.xs')" min-width="100px" align="center" prop="ratio">
  1112. <template slot-scope="{row}">
  1113. <span v-if="row.ratiostatus == 1" style="color: red;">{{row.ratio}}</span>
  1114. <span v-else >{{row.ratio}}</span>
  1115. </template>
  1116. </u-table-column>
  1117. <u-table-column :label="$t('dhedFormula.xsts')" min-width="100px" align="center" prop="ccountratio">
  1118. <template slot-scope="{row}">
  1119. <span v-if="row.ccountratiostatus == 1" style="color: red;">{{row.ccountratio}}</span>
  1120. <span v-else >{{row.ccountratio}}</span>
  1121. </template>
  1122. </u-table-column>
  1123. <u-table-column :label="$t('feedingEfficiency.pfmb')" min-width="70px" align="center" prop="ftname">
  1124. <template slot-scope="{row}">
  1125. <a v-if="row.ftnamestatus == 1" @click="clickRecipeTemplate3(row)" style="text-decoration: underline;color: red;">{{ row.ftname }}</a>
  1126. <a v-else @click="clickRecipeTemplate3(row)" style="text-decoration: underline;">{{ row.ftname }}</a>
  1127. </template>
  1128. </u-table-column>
  1129. <u-table-column :label="$t('errorAnalysis.bl')" min-width="100px" align="center">
  1130. <template slot-scope="{row}">
  1131. <span v-if="row.tratiostatus == 1" style="color: red;">{{row.tratio}}</span>
  1132. <span v-else >{{row.tratio}}</span>
  1133. </template>
  1134. </u-table-column>
  1135. <u-table-column :label="$t('formulationEvaluation.reset1')" min-width="100px" align="center" prop="weight">
  1136. <template slot-scope="{row}">
  1137. <span v-if="row.weightstatus == 1" style="color: red;">{{row.weight}}</span>
  1138. <span v-else>{{row.weight}}</span>
  1139. </template>
  1140. </u-table-column>
  1141. </u-table>
  1142. </div>
  1143. </el-tab-pane>
  1144. <el-tab-pane :label="$t('errorAnalysis.cczl')" name="second">
  1145. <div class="search">
  1146. <el-date-picker ref="inputDatetime" :clearable="false" v-model="fenceTemp.tab2.getdataListParm.parammaps.inputDatetime" class="filter-item inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" />
  1147. <el-button class="successBorder" @click="handleFenceSearch">{{$t('common.query')}}</el-button>
  1148. </div>
  1149. <div class="table">
  1150. <u-table
  1151. :key="fenceTemp.tab2.tableKey"
  1152. v-loading="fenceTemp.tab2.listLoading"
  1153. :element-loading-text="$t('common.tableMsg')"
  1154. :data="fenceTemp.tab2.list"
  1155. border
  1156. highlight-current-row
  1157. style="width: 100%;"
  1158. :row-style="rowStyle"
  1159. class="elTable table-fixed"
  1160. :span-method="objectSpanMethod2"
  1161. >
  1162. <template slot="empty">
  1163. <span style="color: #969799;">No more data</span>
  1164. </template>
  1165. <u-table-column :label="$t('formulationEvaluation.xh')" width="50px" align="center" type="index" />
  1166. <u-table-column :label="$t('formulationEvaluation.xgsj')" width="100px" align="center" prop="createdate" />
  1167. <u-table-column :label="$t('formulationEvaluation.xgyh')" width="130px" align="center" prop="empname" />
  1168. <u-table-column :label="$t('errorAnalysis.projname')" width="100px" align="center" prop="times" />
  1169. <!-- <u-table-column v-for="(item, index) in fenceTemp.tab2.tableLabel" :key="index" align="center" :min-width="item.width" :prop="item.prop" :label="item.label"> -->
  1170. <u-table-column v-for="(item, index) in fenceTemp.tab2.tableLabel" :key="index" align="center" :min-width="item.width" :prop="item.prop" :label="item.label">
  1171. <template slot-scope="scope">
  1172. <span v-if="scope.row[item.prop] !==undefined &&scope.row[item.prop].indexOf('/') !== -1" style="color: red;">
  1173. {{scope.row[item.prop]}}
  1174. </span>
  1175. <span v-else>{{scope.row[item.prop]}}</span>
  1176. </template>
  1177. </u-table-column>
  1178. </u-table>
  1179. </div>
  1180. </el-tab-pane>
  1181. </el-tabs>
  1182. </div>
  1183. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  1184. <el-button class="cancelClose1" @click="fenceTemp.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
  1185. </div>
  1186. </el-dialog>
  1187. <!-- this.$t('errorAnalysis.pfmbxgjl') -->
  1188. <el-dialog :title="textMap[modificationRecordTemp.dialogStatus]" :visible.sync="modificationRecordTemp.dialogFormVisible" :close-on-click-modal="false" width="90%">
  1189. <div class="modificationRecord">
  1190. <h3 style="flex: 1;">修改前</h3>
  1191. <div class="top">
  1192. <div class="left">
  1193. <div><b>配方名称:</b>{{modificationRecordTemp.list1.tname}}</div>
  1194. <div><b>配方编码:</b>{{modificationRecordTemp.list1.tcode}}</div>
  1195. <div><b>配方颜色:</b><el-color-picker v-model="modificationRecordTemp.list1.tcolor" size="mini" :predefine="predefineColors" style="vertical-align: middle;" disabled /></div>
  1196. <div><b>牲畜类别:</b>{{modificationRecordTemp.list1.ccname}}</div>
  1197. <div><b>配方类型:</b>{{modificationRecordTemp.list1.fttype}}</div>
  1198. <div><b>{{$t('formulationEvaluation.ly')}}:</b>{{modificationRecordTemp.list1.source}}</div>
  1199. <div><b>版本号:</b>{{modificationRecordTemp.list1.version}}</div>
  1200. <div><b>备注:</b>{{modificationRecordTemp.list1.remark}}</div>
  1201. </div>
  1202. <div class="right">
  1203. <el-table
  1204. :key="modificationRecordTemp.tableKey1"
  1205. v-loading="modificationRecordTemp.listLoading1"
  1206. :element-loading-text="$t('common.tableMsg')"
  1207. :data="modificationRecordTemp.list1.fit"
  1208. border
  1209. fit
  1210. highlight-current-row
  1211. style="width: 100%;"
  1212. height="280"
  1213. :row-style="rowStyle"
  1214. :cell-style="cellStyle"
  1215. class="elTable table-fixed"
  1216. show-summary
  1217. :summary-method="getSummaries1"
  1218. >
  1219. <template slot="empty">
  1220. <span style="color: #969799;">No more data</span>
  1221. </template>
  1222. <el-table-column :label="$t('formulationEvaluation.slz')" min-width="90px" align="center" prop="feedgroup" />
  1223. <el-table-column :label="$t('InventoryManagement.silc')" min-width="90px" align="center" prop="fname" />
  1224. <el-table-column :label="$t('message.msg64')" min-width="100px" align="center" prop="fweight" />
  1225. <el-table-column :label="$t('formulationEvaluation.jbys')" min-width="100px" align="center">
  1226. <template slot-scope="{row}">
  1227. <span>{{ row.autosecond }}</span>
  1228. </template>
  1229. </el-table-column>
  1230. </el-table>
  1231. </div>
  1232. </div>
  1233. <hr/>
  1234. <h3 style="color: red;">修改后</h3>
  1235. <div class="bottom">
  1236. <div class="left">
  1237. <div><b>配方名称:</b>{{modificationRecordTemp.list2.tname}}</div>
  1238. <div><b>配方编码:</b>{{modificationRecordTemp.list2.tcode}}</div>
  1239. <div><b>配方颜色:</b><el-color-picker v-model="modificationRecordTemp.list2.tcolor" size="mini" :predefine="predefineColors" style="vertical-align: middle;" disabled /></div>
  1240. <div><b>牲畜类别:</b>{{modificationRecordTemp.list2.ccname}}</div>
  1241. <div><b>配方类型:</b>{{modificationRecordTemp.list2.fttype}}</div>
  1242. <div><b>{{$t('formulationEvaluation.ly')}}:</b>{{modificationRecordTemp.list2.source}}</div>
  1243. <div><b>版本号:</b>{{modificationRecordTemp.list2.version}}</div>
  1244. <div><b>备注:</b>{{modificationRecordTemp.list2.remark}}</div>
  1245. </div>
  1246. <div class="right">
  1247. <el-table
  1248. :key="modificationRecordTemp.tableKey2"
  1249. v-loading="modificationRecordTemp.listLoading2"
  1250. :element-loading-text="$t('common.tableMsg')"
  1251. :data="modificationRecordTemp.list2.fit"
  1252. border
  1253. fit
  1254. highlight-current-row
  1255. style="width: 100%;"
  1256. height="280"
  1257. :row-style="rowStyle"
  1258. :cell-style="cellStyle"
  1259. class="elTable table-fixed"
  1260. show-summary
  1261. :summary-method="getSummaries2"
  1262. >
  1263. <template slot="empty">
  1264. <span style="color: #969799;">No more data</span>
  1265. </template>
  1266. <el-table-column :label="$t('formulationEvaluation.slz')" min-width="90px" align="center" prop="feedgroup" />
  1267. <el-table-column :label="$t('InventoryManagement.silc')" min-width="90px" align="center" prop="fname" />
  1268. <el-table-column :label="$t('message.msg64')" min-width="100px" align="center" prop="fweight" />
  1269. <el-table-column :label="$t('formulationEvaluation.jbys')" min-width="100px" align="center">
  1270. <template slot-scope="{row}">
  1271. <span>{{ row.autosecond }}</span>
  1272. </template>
  1273. </el-table-column>
  1274. </el-table>
  1275. </div>
  1276. </div>
  1277. </div>
  1278. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  1279. <el-button class="cancelClose1" @click="modificationRecordTemp.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
  1280. </div>
  1281. </el-dialog>
  1282. </div>
  1283. </template>
  1284. <script>
  1285. import echarts from 'echarts'
  1286. import See from './see.vue'
  1287. require('echarts/theme/macarons')
  1288. import { GetDataByName, GetReportform, whichWeek, postJson } from '@/api/common'
  1289. import Cookies from 'js-cookie'
  1290. import { parseTime, json2excel, handleTableSpan, handleObjectSpanMethod } from '@/utils/index.js'
  1291. import Pagination from '@/components/Pagination'
  1292. import { MessageBox } from 'element-ui'
  1293. import mySelect from '@/components/mySelect'
  1294. export default {
  1295. name: 'PastureErrorAnalysis',
  1296. components: { Pagination, mySelect, See },
  1297. data() {
  1298. return {
  1299. error:'',
  1300. optdevice:'',
  1301. stopTime:'',
  1302. startTime:'',
  1303. Eweight:'',
  1304. predefineColors: [
  1305. '#E57373', '#F06292', '#BA68C8', '#9575CD', '#7986CB', '#64B5F6', '#4FC3F7', '#4DD0E1', '#4DB6AC', '#81C784', '#AED581', '#DCE775', '#FFF176', '#FFD54F', '#FFB74D', '#FF8A65', '#A1887F', '#E0E0E0', '#90A4AE'
  1306. ],
  1307. pickerMinMonth: '',
  1308. pickerOptionsMonth: {
  1309. onPick: ({ maxDate, minDate }) => {
  1310. this.pickerMinMonth = minDate.getTime()
  1311. if (maxDate) {
  1312. this.pickerMinMonth = ''
  1313. }
  1314. },
  1315. // 限制不能选择今天之后的日期
  1316. disabledDate: (time) => {
  1317. if (this.pickerMinMonth !== '') {
  1318. const one = 24 * 3600 * 1000 * 365 * 5
  1319. const minTime = this.pickerMinMonth - 0
  1320. let maxTime = this.pickerMinMonth + one
  1321. if (maxTime > new Date()) {
  1322. maxTime = new Date()
  1323. }
  1324. return time.getTime() < minTime || time.getTime() > maxTime
  1325. }
  1326. return time.getTime() >= Date.now()
  1327. }
  1328. },
  1329. pickerMinDate: '',
  1330. pickerOptionsDate: {
  1331. showWeekNumber: false,
  1332. onPick: ({ maxDate, minDate }) => {
  1333. this.pickerMinDate = minDate.getTime()
  1334. if (maxDate) {
  1335. this.pickerMinDate = ''
  1336. }
  1337. },
  1338. // 限制不能选择今天之后的日期
  1339. disabledDate: (time) => {
  1340. if (this.pickerMinDate !== '') {
  1341. const one = 31 * 24 * 3600 * 1000
  1342. const minTime = this.pickerMinDate - one
  1343. let maxTime = this.pickerMinDate + one
  1344. if (maxTime > new Date()) {
  1345. maxTime = new Date()
  1346. }
  1347. return time.getTime() < minTime || time.getTime() > maxTime
  1348. }
  1349. return time.getTime() > Date.now()
  1350. }
  1351. },
  1352. Beforedisabled: false,
  1353. Nextdisabled: false,
  1354. Beforedisabled2: false,
  1355. Nextdisabled2: false,
  1356. Beforedisabled3: false,
  1357. Nextdisabled3: false,
  1358. pickerOptions: {
  1359. onPick: ({ maxDate, minDate }) => {
  1360. this.pickerMinDate = minDate.getTime()
  1361. if (maxDate) {
  1362. this.pickerMinDate = ''
  1363. }
  1364. },
  1365. // 限制不能选择今天之后的日期
  1366. disabledDate: (time) => {
  1367. if (this.pickerMinDate !== '') {
  1368. const one = 31 * 24 * 3600 * 1000
  1369. const minTime = this.pickerMinDate - one
  1370. let maxTime = this.pickerMinDate + one
  1371. if (maxTime > new Date()) {
  1372. maxTime = new Date()
  1373. }
  1374. return time.getTime() < minTime || time.getTime() > maxTime
  1375. }
  1376. return time.getTime() > Date.now()
  1377. }
  1378. },
  1379. pickerOptions2: {
  1380. onPick: ({ maxDate, minDate }) => {
  1381. this.pickerMinDate = minDate.getTime()
  1382. if (maxDate) {
  1383. this.pickerMinDate = ''
  1384. }
  1385. },
  1386. // 限制不能选择今天之后的日期
  1387. disabledDate: (time) => {
  1388. if (this.pickerMinDate !== '') {
  1389. const one = 100 * 24 * 3600 * 1000
  1390. const minTime = this.pickerMinDate - one
  1391. let maxTime = this.pickerMinDate + one
  1392. if (maxTime > new Date()) {
  1393. maxTime = new Date()
  1394. }
  1395. return time.getTime() < minTime || time.getTime() > maxTime
  1396. }
  1397. return time.getTime() > Date.now()
  1398. }
  1399. },
  1400. pickerOptions3:{
  1401. onPick: ({ maxDate, minDate }) => {
  1402. this.pickerMinDate = minDate.getTime()
  1403. if (maxDate) {
  1404. this.pickerMinDate = ''
  1405. }
  1406. },
  1407. // 限制不能选择今天之后的日期
  1408. disabledDate: (time) => {
  1409. if (this.pickerMinDate !== '') {
  1410. const one = 365 * 24 * 3600 * 1000
  1411. const minTime = this.pickerMinDate - one
  1412. let maxTime = this.pickerMinDate + one
  1413. if (maxTime > new Date()) {
  1414. maxTime = new Date()
  1415. }
  1416. return time.getTime() < minTime || time.getTime() > maxTime
  1417. }
  1418. return time.getTime() > Date.now()
  1419. }
  1420. },
  1421. // 班次
  1422. maxTime: {
  1423. getMaxTimesParm: {
  1424. name: 'getSysoptEnable',
  1425. page: 1,
  1426. offset: 1,
  1427. pagecount: 1,
  1428. returntype: 'Map',
  1429. parammaps: {
  1430. pastureid: Cookies.get('pastureid'),
  1431. inforname: 'times'
  1432. }
  1433. }
  1434. },
  1435. activeName: 'first',
  1436. tab: {
  1437. TMRNameList:[],
  1438. radio: '7',
  1439. isDriver: false,
  1440. isFormulaName: false, // 配方名称
  1441. isHouseName: true, // 栏舍名称
  1442. isLivestockType: false, // 牲畜类别
  1443. isTrainNumber: false, // 车次
  1444. isTMRName: false, // TMR名称
  1445. isFeed:false,//饲料
  1446. checked: false, // 按日期统计
  1447. chartDate: [],
  1448. selectWeek: [],
  1449. chartMonth: [],
  1450. specificDate: '1',
  1451. selectYear: parseTime(new Date(), '{y}'),
  1452. yearList: [],
  1453. weekList: [],
  1454. table: {
  1455. getdataListParm: {
  1456. name: 'getAccuracyHFT',
  1457. page: 1,
  1458. offset: 1,
  1459. pagecount: '',
  1460. returntype: 'Map',
  1461. parammaps: {
  1462. pastureid: Cookies.get('pastureid'),
  1463. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1464. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1465. inputDatetime: [new Date(), new Date()],
  1466. inputDate:null,
  1467. fname: '',
  1468. sort: '',
  1469. times: ''
  1470. }
  1471. },
  1472. tableKey: 1,
  1473. list: [],
  1474. total: 0,
  1475. listLoading: true,
  1476. temp: {}
  1477. },
  1478. table2: {
  1479. getdataListParm: {
  1480. name: 'getAccuracySFT',
  1481. page: 1,
  1482. offset: 1,
  1483. pagecount: '',
  1484. returntype: 'Map',
  1485. parammaps: {
  1486. pastureid: Cookies.get('pastureid'),
  1487. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1488. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1489. inputDatetime: [new Date(), new Date()],
  1490. fname: '',
  1491. sort: '',
  1492. times: ''
  1493. }
  1494. },
  1495. tableKey: 2,
  1496. list: [],
  1497. total: 0,
  1498. listLoading: true,
  1499. temp: {}
  1500. },
  1501. chartDate: [],
  1502. // 配方准确率
  1503. chart1: {
  1504. chartLine: null,
  1505. chartLine_data: {},
  1506. getdataListParm: {
  1507. name: 'getAccuracyAllFT',
  1508. page: 1,
  1509. offset: 1,
  1510. pagecount: '',
  1511. returntype: 'Map',
  1512. parammaps: {
  1513. pastureid: Cookies.get('pastureid'),
  1514. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1515. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1516. inputDatetime: [new Date(), new Date()],
  1517. specificDate: '1',
  1518. selectYear: parseTime(new Date(), '{y}'),
  1519. selectWeek: '',
  1520. chartMonth: '',
  1521. yearList: [],
  1522. weekList: [],
  1523. status: 0
  1524. }
  1525. },
  1526. tableKey: 1,
  1527. list: [],
  1528. total: 0,
  1529. listLoading: true,
  1530. statisticsList: [],
  1531. chart1Data3: [],
  1532. isChart: true,
  1533. isTable: false,
  1534. table: {
  1535. tableKey: 1,
  1536. list: [],
  1537. total: 0,
  1538. listLoading: false
  1539. }
  1540. },
  1541. // 计划统计
  1542. chart2: {
  1543. chartLine: null,
  1544. chartLine_data: {},
  1545. getdataListParm: {
  1546. name: 'getAccuracyAllJH',
  1547. page: 1,
  1548. offset: 1,
  1549. pagecount: '',
  1550. returntype: 'Map',
  1551. parammaps: {
  1552. pastureid: Cookies.get('pastureid'),
  1553. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1554. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1555. inputDatetime: [new Date(), new Date()],
  1556. specificDate: '1',
  1557. selectYear: parseTime(new Date(), '{y}'),
  1558. selectWeek: '',
  1559. chartMonth: '',
  1560. yearList: [],
  1561. weekList: [],
  1562. status: 0
  1563. }
  1564. },
  1565. tableKey: 1,
  1566. list: [],
  1567. total: 0,
  1568. listLoading: true,
  1569. isChart: true,
  1570. isTable: false,
  1571. table: {
  1572. tableKey: 1,
  1573. list: [],
  1574. total: 0,
  1575. listLoading: false
  1576. }
  1577. },
  1578. // 牛群准确率
  1579. chart3: {
  1580. chartLine: null,
  1581. chartLine_data: {},
  1582. getdataListParm: {
  1583. name: 'getAccuracyAllNQ',
  1584. page: 1,
  1585. offset: 1,
  1586. pagecount: '',
  1587. returntype: 'Map',
  1588. parammaps: {
  1589. pastureid: Cookies.get('pastureid'),
  1590. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1591. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1592. inputDatetime: [new Date(), new Date()],
  1593. specificDate: '1',
  1594. selectYear: parseTime(new Date(), '{y}'),
  1595. selectWeek: '',
  1596. chartMonth: '',
  1597. yearList: [],
  1598. weekList: [],
  1599. status: 0
  1600. }
  1601. },
  1602. tableKey: 1,
  1603. list: [],
  1604. total: 0,
  1605. listLoading: true,
  1606. statisticsList: [],
  1607. chart1Data3: [],
  1608. isChart: true,
  1609. isTable: false,
  1610. table: {
  1611. tableKey: 1,
  1612. list: [],
  1613. total: 0,
  1614. listLoading: false
  1615. }
  1616. },
  1617. // 车辆准确率(重量)
  1618. chart4: {
  1619. chartLine: null,
  1620. chartLine_data: {},
  1621. getdataListParm: {
  1622. name: 'getAccuracyAllCC',
  1623. page: 1,
  1624. offset: 1,
  1625. pagecount: '',
  1626. returntype: 'Map',
  1627. parammaps: {
  1628. pastureid: Cookies.get('pastureid'),
  1629. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1630. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1631. inputDatetime: [new Date(), new Date()],
  1632. specificDate: '1',
  1633. selectYear: parseTime(new Date(), '{y}'),
  1634. selectWeek: '',
  1635. chartMonth: '',
  1636. yearList: [],
  1637. weekList: [],
  1638. status: 0
  1639. }
  1640. },
  1641. tableKey: 1,
  1642. list: [],
  1643. total: 0,
  1644. listLoading: true,
  1645. statisticsList: [],
  1646. chart4Data3: [],
  1647. isChart: true,
  1648. isTable: false,
  1649. table: {
  1650. tableKey: 1,
  1651. list: [],
  1652. total: 0,
  1653. listLoading: false
  1654. }
  1655. },
  1656. // 混料统计
  1657. chart5: {
  1658. chartLine: null,
  1659. chartLine_data: {},
  1660. getdataListParm: {
  1661. name: 'getAccuracyAllHL',
  1662. page: 1,
  1663. offset: 1,
  1664. pagecount: '',
  1665. returntype: 'Map',
  1666. parammaps: {
  1667. pastureid: Cookies.get('pastureid'),
  1668. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1669. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1670. inputDatetime: [new Date(), new Date()],
  1671. specificDate: '1',
  1672. selectYear: parseTime(new Date(), '{y}'),
  1673. selectWeek: '',
  1674. chartMonth: '',
  1675. yearList: [],
  1676. weekList: [],
  1677. status: 0
  1678. }
  1679. },
  1680. tableKey: 1,
  1681. list: [],
  1682. total: 0,
  1683. listLoading: true,
  1684. isChart: true,
  1685. isTable: false,
  1686. table: {
  1687. tableKey: 1,
  1688. list: [],
  1689. total: 0,
  1690. listLoading: false
  1691. }
  1692. },
  1693. // 混料计划取消次数
  1694. chart6: {
  1695. chartLine: null,
  1696. chartLine_data: {},
  1697. getdataListParm: {
  1698. name: 'getAccuracyAllQX',
  1699. page: 1,
  1700. offset: 1,
  1701. pagecount: '',
  1702. returntype: 'Map',
  1703. parammaps: {
  1704. pastureid: Cookies.get('pastureid'),
  1705. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1706. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1707. inputDatetime: [new Date(), new Date()],
  1708. specificDate: '1',
  1709. selectYear: parseTime(new Date(), '{y}'),
  1710. selectWeek: '',
  1711. chartMonth: '',
  1712. yearList: [],
  1713. weekList: [],
  1714. status: 0
  1715. }
  1716. },
  1717. tableKey: 1,
  1718. list: [],
  1719. total: 0,
  1720. listLoading: true,
  1721. isChart: true,
  1722. isTable: false,
  1723. table: {
  1724. tableKey: 1,
  1725. list: [],
  1726. total: 0,
  1727. listLoading: false
  1728. }
  1729. },
  1730. // 栏舍撒料时间统计
  1731. chart7: {
  1732. chartLine: null,
  1733. chartLine_data: {},
  1734. getdataListParm: {
  1735. name: 'getAccuracyAllLS',
  1736. page: 1,
  1737. offset: 1,
  1738. pagecount: '',
  1739. returntype: 'Map',
  1740. parammaps: {
  1741. pastureid: Cookies.get('pastureid'),
  1742. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1743. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1744. inputDatetime: [new Date(), new Date()],
  1745. specificDate: '1',
  1746. selectYear: parseTime(new Date(), '{y}'),
  1747. selectWeek: '',
  1748. chartMonth: '',
  1749. yearList: [],
  1750. weekList: [],
  1751. status: 0
  1752. }
  1753. },
  1754. tableKey: 1,
  1755. list: [],
  1756. total: 0,
  1757. listLoading: true,
  1758. statisticsList: [],
  1759. chart7Data3: [],
  1760. formulaList:[],
  1761. isChart: true,
  1762. isTable: false,
  1763. table: {
  1764. tableKey: 1,
  1765. list: [],
  1766. total: 0,
  1767. listLoading: false
  1768. }
  1769. }
  1770. },
  1771. tab2: {
  1772. TMRNameList:[],
  1773. premixList:[{id:0,name:this.$t('errorAnalysis.yh')},{id:1,name:this.$t('errorAnalysis.fyh')}],
  1774. table: {
  1775. getdataListParm: {
  1776. name: 'getStatisticsHL',
  1777. page: 1,
  1778. offset: 1,
  1779. pagecount: '',
  1780. returntype: 'Map',
  1781. parammaps: {
  1782. pastureid: Cookies.get('pastureid'),
  1783. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1784. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1785. inputDatetime: [new Date(), new Date()],
  1786. inputDatetime2:new Date(),
  1787. tmrtname: '',
  1788. projname: '',
  1789. times: '',
  1790. buttontype: '',
  1791. templetname: '',
  1792. isuse: '',
  1793. premix:''
  1794. }
  1795. },
  1796. tableKey: 1,
  1797. list: [],
  1798. total: 0,
  1799. listLoading: true,
  1800. temp: {}
  1801. },
  1802. frequencyList: [],
  1803. jumpModeList: [{ id: '0', name:this.$t('errorAnalysis.sdtz') }, { id: '1', name:this.$t('errorAnalysis.zdtz') }],
  1804. isuseList: [{ id: '0', name:this.$t('errorAnalysis.wwc')}, { id: '2', name:this.$t('errorAnalysis.bfwc')}, { id: '1', name:this.$t('errorAnalysis.qbwc') }]
  1805. },
  1806. tab3: {
  1807. TMRNameList:[],
  1808. table: {
  1809. getdataListParm: {
  1810. name: 'getStatisticsSL',
  1811. page: 1,
  1812. offset: 1,
  1813. pagecount: '',
  1814. returntype: 'Map',
  1815. parammaps: {
  1816. pastureid: Cookies.get('pastureid'),
  1817. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1818. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1819. inputDatetime: [new Date(), new Date()],
  1820. inputDatetime2: new Date(),
  1821. tmrtname: '',
  1822. projname: '',
  1823. times: '',
  1824. templetname: '',
  1825. fname: '',
  1826. buttontype: '',
  1827. isuse: ''
  1828. }
  1829. },
  1830. tableKey: 1,
  1831. list: [],
  1832. total: 0,
  1833. listLoading: true,
  1834. temp: {}
  1835. },
  1836. frequencyList: [],
  1837. jumpModeList: [{ id: '0', name:this.$t('errorAnalysis.sdtz') }, { id: '1', name:this.$t('errorAnalysis.zdtz') }],
  1838. isuseList: [{ id: '0', name:this.$t('errorAnalysis.wwc')}, { id: '2', name:this.$t('errorAnalysis.bfwc')}, { id: '1', name:this.$t('errorAnalysis.qbwc') }]
  1839. },
  1840. titlefname: '',
  1841. methodName:'',
  1842. rowPid: '',
  1843. optdevice:'',
  1844. startTime:'',
  1845. stopTime:'',
  1846. error:'',
  1847. isShowDialog: false,
  1848. statisticalTypeList: this.$t('errorAnalysis.statisticalTypeList'),
  1849. rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
  1850. cellStyle: { padding: 0 + 'px' },
  1851. exportList:{
  1852. dialogFormVisible:false,
  1853. inputDatetime: [new Date(), new Date()]
  1854. },
  1855. textMap: {
  1856. exportList: this.$t('errorAnalysis.export'),
  1857. recipeNameTxt:this.$t('errorAnalysis.pfxgjl'),
  1858. feedTxt:this.$t('errorAnalysis.isFeed'),
  1859. fenceTxt:this.$t('errorAnalysis.pen'),
  1860. modificationRecord:this.$t('errorAnalysis.pfmbxgjl')
  1861. },
  1862. isokDisable:false,
  1863. // search
  1864. myHeight1: document.documentElement.clientHeight - 85 - 80,
  1865. myHeight2: document.documentElement.clientHeight - 85 - 150,
  1866. myHeightSecond: '',
  1867. myHeightThird:'',
  1868. recipeNameTemp2:{
  1869. dialogStatus: '',
  1870. dialogFormVisible: false,
  1871. getdataListParm: {
  1872. name: 'getFitHistory1', 'name1': 'getFitHistory2', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
  1873. parammaps: { inputDatetime: [], pastureid: '', ftid: '' }
  1874. },
  1875. tableKey: 0, total: 0, listLoading: true, list: []
  1876. },
  1877. recipeNameTemp3:{
  1878. dialogStatus: '',
  1879. dialogFormVisible: false,
  1880. getdataListParm: {
  1881. name: 'getFitHistory1', 'name1': 'getFitHistory2', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
  1882. parammaps: { inputDatetime: [], pastureid: '', fitid: '' }
  1883. },
  1884. tableKey: 0, total: 0, listLoading: true, list: []
  1885. },
  1886. feedTemp:{
  1887. dialogStatus: '',
  1888. dialogFormVisible: false,
  1889. getdataListParm: {
  1890. name: 'getFitHistory1', 'name1': 'getFitHistory2', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
  1891. parammaps: { inputDatetime: [], pastureid: '', fitid: '' }
  1892. },
  1893. tableKey: 0, total: 0, listLoading: true, list: []
  1894. },
  1895. fenceTemp:{
  1896. dialogStatus: '',
  1897. dialogFormVisible: false,
  1898. spanObj1: {},
  1899. spanObj2: {},
  1900. mergekeys1: ['createdate'],
  1901. mergekeys2: ['createdate'],
  1902. tab1:{
  1903. getdataListParm: {
  1904. name: 'getPlanModifyFPlist',page: 1, offset: 1, pagecount: '', returntype: 'Map',
  1905. parammaps: { inputDatetime: [], pastureid: '', fitid: '' }
  1906. },
  1907. tableKey: 0, total: 0, listLoading: true, list: [],
  1908. },
  1909. tab2:{
  1910. getdataListParm: {
  1911. name: 'getPlanModifyFPlist', page: 1, offset: 1, pagecount: '', returntype: 'Map',
  1912. parammaps: { inputDatetime: [], pastureid: '', fitid: '' }
  1913. },
  1914. tableKey: 0, total: 0, listLoading: true, list: [],
  1915. },
  1916. activeName:'first'
  1917. },
  1918. modificationRecordTemp:{
  1919. dialogStatus: '',
  1920. dialogFormVisible: false,
  1921. tableKey1: 0, total1: 0, listLoading1: false, list1: [],
  1922. tableKey2: 0, total2: 0, listLoading2: false, list2: [],
  1923. temp1:{},
  1924. temp2:{},
  1925. lastdate:'',currentdate:'',
  1926. },
  1927. }
  1928. },
  1929. created() {
  1930. this.getTimeFn()
  1931. this.getAllYear()
  1932. this.getIsDisplay()
  1933. this.getTabList()
  1934. this.getTabList2()
  1935. this.getformulaList()
  1936. // 暂时注释
  1937. // this.getChart1()
  1938. // this.getChart2()
  1939. // this.getChart3()
  1940. // this.getChart4()
  1941. // this.getChart5()
  1942. // this.getChart6()
  1943. },
  1944. mounted() {},
  1945. methods: {
  1946. // tab.chart7.formulaList
  1947. getformulaList() {
  1948. let url = 'authdata/GetDataByName'
  1949. let data = {
  1950. "name":"getFeedTempletName",
  1951. "page":1,"offset":1,"pagecount":"","returntype":"Map",
  1952. "parammaps":{"pastureid":Cookies.get('pastureid')},
  1953. }
  1954. postJson(url, data).then(response => {
  1955. if (response.data.list !== null) {
  1956. this.tab.chart7.formulaList = response.data.list
  1957. } else {
  1958. this.tab.chart7.formulaList = []
  1959. }
  1960. })
  1961. },
  1962. getAllYear() {
  1963. var myDate = new Date()
  1964. var thisYear = myDate.getFullYear() // 获取当年年份
  1965. var Section = thisYear - 2001 // 声明一个变量 获得当前年份至想获取年份差 eg.2008
  1966. this.tab.yearList = [] // 声明一个空数组 把遍历出的年份添加到数组里
  1967. for (var i = 0; i <= Section; i++) {
  1968. this.tab.yearList.push(thisYear--)
  1969. }
  1970. console.log(this.tab.yearList)
  1971. },
  1972. changeAllYear() {
  1973. console.log('this.selectYear==>', this.tab.selectYear)
  1974. this.tab.weekList = []
  1975. this.tab.selectWeek = []
  1976. var myWeekList = whichWeek(this.tab.selectYear)
  1977. console.log(myWeekList)
  1978. if(myWeekList !== null){
  1979. for (let i = 0; i <= myWeekList.length; i++) {
  1980. var obj = {}
  1981. var a = i + 1
  1982. obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
  1983. obj.id = i
  1984. this.tab.weekList.push(obj)
  1985. }
  1986. }
  1987. },
  1988. changeAllSpecificDate() {
  1989. var start = ''
  1990. var end = ''
  1991. if (this.tab.specificDate == '2') {
  1992. this.tab.selectYear = parseTime(new Date(), '{y}')
  1993. this.changeAllYear()
  1994. } else if (this.tab.specificDate == '3') {
  1995. start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
  1996. end = parseTime(new Date(), '{y}-{m}-{d}')
  1997. this.tab.chartMonth = []
  1998. this.tab.chartMonth.push(start, end)
  1999. }
  2000. },
  2001. handleAllDate() {
  2002. console.log('点击了确认时间')
  2003. MessageBox.confirm(this.$t('errorAnalysis.msg1'), {
  2004. confirmButtonText: this.$t('common.confirm'), confirmButtonText: this.$t('common.cancel'), type: 'warning'
  2005. }).then(() => {
  2006. var startDate = ''
  2007. var endDate = ''
  2008. var status = ''
  2009. if (this.tab.specificDate == '1') {
  2010. startDate = parseTime(this.tab.chartDate[0], '{y}-{m}-{d}')
  2011. endDate = parseTime(this.tab.chartDate[1], '{y}-{m}-{d}')
  2012. this.tab.chart1.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
  2013. this.tab.chart2.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
  2014. this.tab.chart3.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
  2015. this.tab.chart4.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
  2016. this.tab.chart5.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
  2017. this.tab.chart6.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
  2018. this.tab.chart7.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
  2019. status = 0
  2020. console.log('开始日时==>', startDate)
  2021. console.log('结束日时==>', endDate)
  2022. } else if (this.tab.specificDate == '2') {
  2023. if (this.tab.selectYear == '') {
  2024. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg2'), duration: 2000 })
  2025. return
  2026. }
  2027. if(this.tab.selectWeek !== null){
  2028. if (this.tab.selectWeek.length !== 2) {
  2029. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg3'), duration: 2000 })
  2030. return
  2031. }
  2032. }
  2033. startDate = this.tab.selectYear + '-' + whichWeek(this.tab.selectYear)[this.tab.selectWeek[0]].month + '-' + whichWeek(this.tab.selectYear)[this.tab.selectWeek[0]].date
  2034. endDate = this.tab.selectYear + '-' + whichWeek(this.tab.selectYear)[this.tab.selectWeek[1]].last.month + '-' + whichWeek(this.tab.selectYear)[this.tab.selectWeek[1]].last.date
  2035. status = 1
  2036. this.tab.chart1.getdataListParm.parammaps.selectYear = this.tab.selectYear
  2037. this.tab.chart1.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
  2038. this.tab.chart1.getdataListParm.parammaps.weekList = this.tab.weekList
  2039. this.tab.chart2.getdataListParm.parammaps.selectYear = this.tab.selectYear
  2040. this.tab.chart2.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
  2041. this.tab.chart2.getdataListParm.parammaps.weekList = this.tab.weekList
  2042. this.tab.chart3.getdataListParm.parammaps.selectYear = this.tab.selectYear
  2043. this.tab.chart3.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
  2044. this.tab.chart3.getdataListParm.parammaps.weekList = this.tab.weekList
  2045. this.tab.chart4.getdataListParm.parammaps.selectYear = this.tab.selectYear
  2046. this.tab.chart4.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
  2047. this.tab.chart4.getdataListParm.parammaps.weekList = this.tab.weekList
  2048. this.tab.chart5.getdataListParm.parammaps.selectYear = this.tab.selectYear
  2049. this.tab.chart5.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
  2050. this.tab.chart5.getdataListParm.parammaps.weekList = this.tab.weekList
  2051. this.tab.chart6.getdataListParm.parammaps.selectYear = this.tab.selectYear
  2052. this.tab.chart6.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
  2053. this.tab.chart6.getdataListParm.parammaps.weekList = this.tab.weekList
  2054. this.tab.chart7.getdataListParm.parammaps.selectYear = this.tab.selectYear
  2055. this.tab.chart7.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
  2056. this.tab.chart7.getdataListParm.parammaps.weekList = this.tab.weekList
  2057. console.log('开始周时间==>', startDate)
  2058. console.log('结束周时间==>', endDate)
  2059. } else if (this.tab.specificDate == '3') {
  2060. if(this.tab.chartMonth !== null){
  2061. if (this.tab.chartMonth.length > 0) {
  2062. startDate = this.tab.chartMonth[0]
  2063. var dataArr = this.tab.chartMonth[1].substring(0, 7).split('-')
  2064. let temp = new Date(dataArr[0],dataArr[1],0);
  2065. let mm = temp.getDate(); //这里mm就是天数啦
  2066. endDate = this.tab.chartMonth[1].substring(0, 8) + mm
  2067. status = 2
  2068. this.tab.chart1.getdataListParm.parammaps.chartMonth = [startDate, endDate]
  2069. this.tab.chart2.getdataListParm.parammaps.chartMonth = [startDate, endDate]
  2070. this.tab.chart3.getdataListParm.parammaps.chartMonth = [startDate, endDate]
  2071. this.tab.chart4.getdataListParm.parammaps.chartMonth = [startDate, endDate]
  2072. this.tab.chart5.getdataListParm.parammaps.chartMonth = [startDate, endDate]
  2073. this.tab.chart6.getdataListParm.parammaps.chartMonth = [startDate, endDate]
  2074. this.tab.chart7.getdataListParm.parammaps.chartMonth = [startDate, endDate]
  2075. console.log('开始月时间==>', startDate)
  2076. console.log('结束月时间==>', endDate)
  2077. } else {
  2078. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg4'), duration: 2000 })
  2079. }
  2080. }
  2081. }
  2082. this.tab.chart1.getdataListParm.parammaps.specificDate = this.tab.specificDate
  2083. this.tab.chart1.getdataListParm.parammaps.startTime = startDate
  2084. this.tab.chart1.getdataListParm.parammaps.stopTime = endDate
  2085. this.tab.chart1.getdataListParm.parammaps.status = status
  2086. this.tab.chart2.getdataListParm.parammaps.startTime = startDate
  2087. this.tab.chart2.getdataListParm.parammaps.stopTime = endDate
  2088. this.tab.chart2.getdataListParm.parammaps.status = status
  2089. this.tab.chart2.getdataListParm.parammaps.specificDate = this.tab.specificDate
  2090. this.tab.chart3.getdataListParm.parammaps.startTime = startDate
  2091. this.tab.chart3.getdataListParm.parammaps.stopTime = endDate
  2092. this.tab.chart3.getdataListParm.parammaps.status = status
  2093. this.tab.chart3.getdataListParm.parammaps.specificDate = this.tab.specificDate
  2094. this.tab.chart4.getdataListParm.parammaps.startTime = startDate
  2095. this.tab.chart4.getdataListParm.parammaps.stopTime = endDate
  2096. this.tab.chart4.getdataListParm.parammaps.status = status
  2097. this.tab.chart4.getdataListParm.parammaps.specificDate = this.tab.specificDate
  2098. this.tab.chart5.getdataListParm.parammaps.startTime = startDate
  2099. this.tab.chart5.getdataListParm.parammaps.stopTime = endDate
  2100. this.tab.chart5.getdataListParm.parammaps.status = status
  2101. this.tab.chart5.getdataListParm.parammaps.specificDate = this.tab.specificDate
  2102. this.tab.chart6.getdataListParm.parammaps.startTime = startDate
  2103. this.tab.chart6.getdataListParm.parammaps.stopTime = endDate
  2104. this.tab.chart6.getdataListParm.parammaps.status = status
  2105. this.tab.chart6.getdataListParm.parammaps.specificDate = this.tab.specificDate
  2106. this.tab.chart7.getdataListParm.parammaps.startTime = startDate
  2107. this.tab.chart7.getdataListParm.parammaps.stopTime = endDate
  2108. this.tab.chart7.getdataListParm.parammaps.status = status
  2109. this.tab.chart7.getdataListParm.parammaps.specificDate = this.tab.specificDate
  2110. this.getChart1()
  2111. this.getChart2()
  2112. this.getChart3()
  2113. this.getChart4()
  2114. this.getChart5()
  2115. this.getChart6()
  2116. this.getChart7()
  2117. })
  2118. },
  2119. changeChartSpecificDate(item) {
  2120. var start = ''
  2121. var end = ''
  2122. if (item == 'chart1') {
  2123. if (this.tab.chart1.getdataListParm.parammaps.specificDate == '2') {
  2124. this.tab.chart1.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
  2125. this.changeChartYear(item)
  2126. } else if (this.tab.chart1.getdataListParm.parammaps.specificDate == '3') {
  2127. start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
  2128. end = parseTime(new Date(), '{y}-{m}-{d}')
  2129. this.tab.chart1.getdataListParm.parammaps.weekList = []
  2130. this.tab.chart1.getdataListParm.parammaps.chartMonth = []
  2131. this.tab.chart1.getdataListParm.parammaps.chartMonth.push(start, end)
  2132. }
  2133. } else if (item == 'chart2') {
  2134. if (this.tab.chart2.getdataListParm.parammaps.specificDate == '2') {
  2135. this.tab.chart2.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
  2136. this.changeChartYear(item)
  2137. } else if (this.tab.chart2.getdataListParm.parammaps.specificDate == '3') {
  2138. start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
  2139. end = parseTime(new Date(), '{y}-{m}-{d}')
  2140. this.tab.chart2.getdataListParm.parammaps.weekList = []
  2141. this.tab.chart2.getdataListParm.parammaps.chartMonth = []
  2142. this.tab.chart2.getdataListParm.parammaps.chartMonth.push(start, end)
  2143. }
  2144. } else if (item == 'chart3') {
  2145. if (this.tab.chart3.getdataListParm.parammaps.specificDate == '2') {
  2146. this.tab.chart3.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
  2147. this.changeChartYear(item)
  2148. } else if (this.tab.chart3.getdataListParm.parammaps.specificDate == '3') {
  2149. start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
  2150. end = parseTime(new Date(), '{y}-{m}-{d}')
  2151. this.tab.chart3.getdataListParm.parammaps.weekList = []
  2152. this.tab.chart3.getdataListParm.parammaps.chartMonth = []
  2153. this.tab.chart3.getdataListParm.parammaps.chartMonth.push(start, end)
  2154. }
  2155. } else if (item == 'chart4') {
  2156. if (this.tab.chart4.getdataListParm.parammaps.specificDate == '2') {
  2157. this.tab.chart4.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
  2158. this.changeChartYear(item)
  2159. } else if (this.tab.chart4.getdataListParm.parammaps.specificDate == '3') {
  2160. start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
  2161. end = parseTime(new Date(), '{y}-{m}-{d}')
  2162. this.tab.chart4.getdataListParm.parammaps.weekList = []
  2163. this.tab.chart4.getdataListParm.parammaps.chartMonth = []
  2164. this.tab.chart4.getdataListParm.parammaps.chartMonth.push(start, end)
  2165. }
  2166. } else if (item == 'chart5') {
  2167. if (this.tab.chart5.getdataListParm.parammaps.specificDate == '2') {
  2168. this.tab.chart5.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
  2169. this.changeChartYear(item)
  2170. } else if (this.tab.chart5.getdataListParm.parammaps.specificDate == '3') {
  2171. start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
  2172. end = parseTime(new Date(), '{y}-{m}-{d}')
  2173. this.tab.chart5.getdataListParm.parammaps.weekList = []
  2174. this.tab.chart5.getdataListParm.parammaps.chartMonth = []
  2175. this.tab.chart5.getdataListParm.parammaps.chartMonth.push(start, end)
  2176. }
  2177. } else if (item == 'chart6') {
  2178. if (this.tab.chart6.getdataListParm.parammaps.specificDate == '2') {
  2179. this.tab.chart6.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
  2180. this.changeChartYear(item)
  2181. } else if (this.tab.chart6.getdataListParm.parammaps.specificDate == '3') {
  2182. start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
  2183. end = parseTime(new Date(), '{y}-{m}-{d}')
  2184. this.tab.chart6.getdataListParm.parammaps.weekList = []
  2185. this.tab.chart6.getdataListParm.parammaps.chartMonth = []
  2186. this.tab.chart6.getdataListParm.parammaps.chartMonth.push(start, end)
  2187. }
  2188. } else if (item == 'chart7') {
  2189. if (this.tab.chart7.getdataListParm.parammaps.specificDate == '2') {
  2190. this.tab.chart7.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
  2191. this.changeChartYear(item)
  2192. } else if (this.tab.chart7.getdataListParm.parammaps.specificDate == '3') {
  2193. start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
  2194. end = parseTime(new Date(), '{y}-{m}-{d}')
  2195. this.tab.chart7.getdataListParm.parammaps.weekList = []
  2196. this.tab.chart7.getdataListParm.parammaps.chartMonth = []
  2197. this.tab.chart7.getdataListParm.parammaps.chartMonth.push(start, end)
  2198. }
  2199. }
  2200. },
  2201. changeChartYear(item) {
  2202. var myWeekList = ''
  2203. if (item == 'chart1') {
  2204. this.tab.chart1.getdataListParm.parammaps.weekList = []
  2205. this.tab.chart1.getdataListParm.parammaps.selectWeek = []
  2206. myWeekList = whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)
  2207. console.log(myWeekList)
  2208. if(myWeekList !== null){
  2209. for (let i = 0; i <= myWeekList.length; i++) {
  2210. var obj = {}
  2211. var a = i + 1
  2212. obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
  2213. obj.id = i
  2214. this.tab.chart1.getdataListParm.parammaps.weekList.push(obj)
  2215. }
  2216. }
  2217. } else if (item == 'chart2') {
  2218. this.tab.chart2.getdataListParm.parammaps.selectWeek = []
  2219. this.tab.chart2.getdataListParm.parammaps.weekList = []
  2220. myWeekList = whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)
  2221. console.log(myWeekList)
  2222. if(myWeekList !== null){
  2223. for (let i = 0; i <= myWeekList.length; i++) {
  2224. var obj = {}
  2225. var a = i + 1
  2226. obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
  2227. obj.id = i
  2228. this.tab.chart2.getdataListParm.parammaps.weekList.push(obj)
  2229. }
  2230. }
  2231. } else if (item == 'chart3') {
  2232. this.tab.chart3.getdataListParm.parammaps.selectWeek = []
  2233. this.tab.chart3.getdataListParm.parammaps.weekList = []
  2234. myWeekList = whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)
  2235. console.log(myWeekList)
  2236. if(myWeekList !== null){
  2237. for (let i = 0; i <= myWeekList.length; i++) {
  2238. var obj = {}
  2239. var a = i + 1
  2240. obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
  2241. obj.id = i
  2242. this.tab.chart3.getdataListParm.parammaps.weekList.push(obj)
  2243. }
  2244. }
  2245. } else if (item == 'chart4') {
  2246. this.tab.chart4.getdataListParm.parammaps.selectWeek = []
  2247. this.tab.chart4.getdataListParm.parammaps.weekList = []
  2248. myWeekList = whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)
  2249. console.log(myWeekList)
  2250. if(myWeekList !== null){
  2251. for (let i = 0; i <= myWeekList.length; i++) {
  2252. var obj = {}
  2253. var a = i + 1
  2254. obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
  2255. obj.id = i
  2256. this.tab.chart4.getdataListParm.parammaps.weekList.push(obj)
  2257. }
  2258. }
  2259. } else if (item == 'chart5') {
  2260. this.tab.chart5.getdataListParm.parammaps.selectWeek = []
  2261. this.tab.chart5.getdataListParm.parammaps.weekList = []
  2262. myWeekList = whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)
  2263. console.log(myWeekList)
  2264. if(myWeekList !== null){
  2265. for (let i = 0; i <= myWeekList.length; i++) {
  2266. var obj = {}
  2267. var a = i + 1
  2268. obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
  2269. obj.id = i
  2270. this.tab.chart5.getdataListParm.parammaps.weekList.push(obj)
  2271. }
  2272. }
  2273. } else if (item == 'chart6') {
  2274. this.tab.chart6.getdataListParm.parammaps.selectWeek = []
  2275. this.tab.chart6.getdataListParm.parammaps.weekList = []
  2276. myWeekList = whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)
  2277. console.log(myWeekList)
  2278. if(myWeekList !== null){
  2279. for (let i = 0; i <= myWeekList.length; i++) {
  2280. var obj = {}
  2281. var a = i + 1
  2282. obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
  2283. obj.id = i
  2284. this.tab.chart6.getdataListParm.parammaps.weekList.push(obj)
  2285. }
  2286. }
  2287. } else if (item == 'chart7') {
  2288. this.tab.chart7.getdataListParm.parammaps.selectWeek = []
  2289. this.tab.chart7.getdataListParm.parammaps.weekList = []
  2290. myWeekList = whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)
  2291. console.log(myWeekList)
  2292. if(myWeekList !== null){
  2293. for (let i = 0; i <= myWeekList.length; i++) {
  2294. var obj = {}
  2295. var a = i + 1
  2296. obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
  2297. obj.id = i
  2298. this.tab.chart7.getdataListParm.parammaps.weekList.push(obj)
  2299. }
  2300. }
  2301. }
  2302. },
  2303. handleChartDate(item) {
  2304. console.log(item)
  2305. var startDate = ''
  2306. var endDate = ''
  2307. if (item == 'chart1') {
  2308. if (this.tab.chart1.getdataListParm.parammaps.specificDate == '1') {
  2309. startDate = parseTime(this.tab.chart1.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  2310. endDate = parseTime(this.tab.chart1.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  2311. console.log('配方准确率开始日期==>', startDate)
  2312. console.log('配方准确率结束日期==>', endDate)
  2313. this.tab.chart1.getdataListParm.parammaps.status = 0
  2314. } else if (this.tab.chart1.getdataListParm.parammaps.specificDate == '2') {
  2315. if (this.tab.chart1.getdataListParm.parammaps.selectYear == '') {
  2316. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg2'), duration: 2000 })
  2317. return
  2318. }
  2319. if(this.tab.chart1.getdataListParm.parammaps.selectWeek !== null){
  2320. if (this.tab.chart1.getdataListParm.parammaps.selectWeek.length !== 2) {
  2321. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg3'), duration: 2000 })
  2322. return
  2323. }
  2324. }
  2325. startDate = this.tab.chart1.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)[this.tab.chart1.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)[this.tab.chart1.getdataListParm.parammaps.selectWeek[0]].date
  2326. endDate = this.tab.chart1.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)[this.tab.chart1.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)[this.tab.chart1.getdataListParm.parammaps.selectWeek[1]].last.date
  2327. console.log('配方准确率开始周日期==>', startDate)
  2328. console.log('配方准确率结束周日期==>', endDate)
  2329. this.tab.chart1.getdataListParm.parammaps.status = 1
  2330. } else if (this.tab.chart1.getdataListParm.parammaps.specificDate == '3') {
  2331. startDate = this.tab.chart1.getdataListParm.parammaps.chartMonth[0]
  2332. endDate = this.tab.chart1.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
  2333. console.log('配方准确率开始月日期==>', startDate)
  2334. console.log('配方准确率结束月日期==>', endDate)
  2335. this.tab.chart1.getdataListParm.parammaps.status = 2
  2336. }
  2337. this.tab.chart1.getdataListParm.parammaps.startTime = startDate
  2338. this.tab.chart1.getdataListParm.parammaps.stopTime = endDate
  2339. this.getChart1()
  2340. } else if (item == 'chart2') {
  2341. if (this.tab.chart2.getdataListParm.parammaps.specificDate == '1') {
  2342. startDate = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  2343. endDate = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  2344. this.tab.chart2.getdataListParm.parammaps.status = 0
  2345. console.log('计划统计开始日期==>', startDate)
  2346. console.log('计划统计结束日期==>', endDate)
  2347. } else if (this.tab.chart2.getdataListParm.parammaps.specificDate == '2') {
  2348. if (this.tab.chart2.getdataListParm.parammaps.selectYear == '') {
  2349. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg2'), duration: 2000 })
  2350. return
  2351. }
  2352. if (this.tab.chart2.getdataListParm.parammaps.selectWeek !== null) {
  2353. if (this.tab.chart2.getdataListParm.parammaps.selectWeek.length !== 2) {
  2354. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg3'), duration: 2000 })
  2355. return
  2356. }
  2357. }
  2358. startDate = this.tab.chart2.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)[this.tab.chart2.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)[this.tab.chart2.getdataListParm.parammaps.selectWeek[0]].date
  2359. endDate = this.tab.chart2.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)[this.tab.chart2.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)[this.tab.chart2.getdataListParm.parammaps.selectWeek[1]].last.date
  2360. this.tab.chart2.getdataListParm.parammaps.status = 1
  2361. console.log('计划统计开始周日期==>', startDate)
  2362. console.log('计划统计结束周日期==>', endDate)
  2363. } else if (this.tab.chart2.getdataListParm.parammaps.specificDate == '3') {
  2364. console.log('计划统计开始月日期==>', this.tab.chart2.getdataListParm.parammaps.chartMonth)
  2365. startDate = this.tab.chart2.getdataListParm.parammaps.chartMonth[0]
  2366. endDate = this.tab.chart2.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
  2367. this.tab.chart2.getdataListParm.parammaps.status = 2
  2368. console.log('计划统计开始月日期==>', startDate)
  2369. console.log('计划统计结束月日期==>', endDate)
  2370. }
  2371. this.tab.chart2.getdataListParm.parammaps.startTime = startDate
  2372. this.tab.chart2.getdataListParm.parammaps.stopTime = endDate
  2373. this.getChart2()
  2374. } else if (item == 'chart3') {
  2375. if (this.tab.chart3.getdataListParm.parammaps.specificDate == '1') {
  2376. startDate = parseTime(this.tab.chart3.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  2377. endDate = parseTime(this.tab.chart3.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  2378. this.tab.chart3.getdataListParm.parammaps.status = 0
  2379. console.log('牛群准确率开始日期==>', startDate)
  2380. console.log('牛群准确率结束日期==>', endDate)
  2381. } else if (this.tab.chart3.getdataListParm.parammaps.specificDate == '2') {
  2382. if (this.tab.chart3.getdataListParm.parammaps.selectYear == '') {
  2383. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg2'), duration: 2000 })
  2384. return
  2385. }
  2386. if (this.tab.chart3.getdataListParm.parammaps.selectWeek !== null) {
  2387. if (this.tab.chart3.getdataListParm.parammaps.selectWeek.length !== 2) {
  2388. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg3'), duration: 2000 })
  2389. return
  2390. }
  2391. }
  2392. startDate = this.tab.chart3.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)[this.tab.chart3.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)[this.tab.chart3.getdataListParm.parammaps.selectWeek[0]].date
  2393. endDate = this.tab.chart3.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)[this.tab.chart3.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)[this.tab.chart3.getdataListParm.parammaps.selectWeek[1]].last.date
  2394. this.tab.chart3.getdataListParm.parammaps.status = 1
  2395. console.log('牛群准确率开始周日期==>', startDate)
  2396. console.log('牛群准确率结束周日期==>', endDate)
  2397. } else if (this.tab.chart3.getdataListParm.parammaps.specificDate == '3') {
  2398. startDate = this.tab.chart3.getdataListParm.parammaps.chartMonth[0]
  2399. endDate = this.tab.chart3.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
  2400. this.tab.chart3.getdataListParm.parammaps.status = 2
  2401. console.log('牛群准确率开始月日期==>', startDate)
  2402. console.log('牛群准确率结束月日期==>', endDate)
  2403. }
  2404. this.tab.chart3.getdataListParm.parammaps.startTime = startDate
  2405. this.tab.chart3.getdataListParm.parammaps.stopTime = endDate
  2406. this.getChart3()
  2407. } else if (item == 'chart4') {
  2408. if (this.tab.chart4.getdataListParm.parammaps.specificDate == '1') {
  2409. startDate = parseTime(this.tab.chart4.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  2410. endDate = parseTime(this.tab.chart4.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  2411. this.tab.chart4.getdataListParm.parammaps.status = 0
  2412. console.log('车辆准确率(重量)开始日期==>', startDate)
  2413. console.log('车辆准确率(重量)结束日期==>', endDate)
  2414. } else if (this.tab.chart4.getdataListParm.parammaps.specificDate == '2') {
  2415. if (this.tab.chart4.getdataListParm.parammaps.selectYear == '') {
  2416. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg2'), duration: 2000 })
  2417. return
  2418. }
  2419. if (this.tab.chart4.getdataListParm.parammaps.selectWeek !== null) {
  2420. if (this.tab.chart4.getdataListParm.parammaps.selectWeek.length !== 2) {
  2421. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg3'), duration: 2000 })
  2422. return
  2423. }
  2424. }
  2425. startDate = this.tab.chart4.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)[this.tab.chart4.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)[this.tab.chart4.getdataListParm.parammaps.selectWeek[0]].date
  2426. endDate = this.tab.chart4.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)[this.tab.chart4.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)[this.tab.chart4.getdataListParm.parammaps.selectWeek[1]].last.date
  2427. this.tab.chart4.getdataListParm.parammaps.status = 1
  2428. console.log('车辆准确率(重量)开始周日期==>', startDate)
  2429. console.log('车辆准确率(重量)结束周日期==>', endDate)
  2430. } else if (this.tab.chart4.getdataListParm.parammaps.specificDate == '3') {
  2431. startDate = this.tab.chart4.getdataListParm.parammaps.chartMonth[0]
  2432. endDate = this.tab.chart4.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
  2433. this.tab.chart4.getdataListParm.parammaps.status = 2
  2434. console.log('车辆准确率(重量)开始月日期==>', startDate)
  2435. console.log('车辆准确率(重量)结束月日期==>', endDate)
  2436. }
  2437. this.tab.chart4.getdataListParm.parammaps.startTime = startDate
  2438. this.tab.chart4.getdataListParm.parammaps.stopTime = endDate
  2439. this.getChart4()
  2440. } else if (item == 'chart5') {
  2441. if (this.tab.chart5.getdataListParm.parammaps.specificDate == '1') {
  2442. startDate = parseTime(this.tab.chart5.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  2443. endDate = parseTime(this.tab.chart5.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  2444. this.tab.chart5.getdataListParm.parammaps.status = 0
  2445. console.log('混料统计开始日期==>', startDate)
  2446. console.log('混料统计结束日期==>', endDate)
  2447. } else if (this.tab.chart5.getdataListParm.parammaps.specificDate == '2') {
  2448. if (this.tab.chart5.getdataListParm.parammaps.selectYear == '') {
  2449. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg2'), duration: 2000 })
  2450. return
  2451. }
  2452. if (this.tab.chart5.getdataListParm.parammaps.selectWeek !== null) {
  2453. if (this.tab.chart5.getdataListParm.parammaps.selectWeek.length !== 2) {
  2454. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg3'), duration: 2000 })
  2455. return
  2456. }
  2457. }
  2458. startDate = this.tab.chart5.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)[this.tab.chart5.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)[this.tab.chart5.getdataListParm.parammaps.selectWeek[0]].date
  2459. endDate = this.tab.chart5.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)[this.tab.chart5.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)[this.tab.chart5.getdataListParm.parammaps.selectWeek[1]].last.date
  2460. this.tab.chart5.getdataListParm.parammaps.status = 1
  2461. console.log('混料统计开始周日期==>', startDate)
  2462. console.log('混料统计结束周日期==>', endDate)
  2463. } else if (this.tab.chart5.getdataListParm.parammaps.specificDate == '3') {
  2464. startDate = this.tab.chart5.getdataListParm.parammaps.chartMonth[0]
  2465. endDate = this.tab.chart5.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
  2466. this.tab.chart5.getdataListParm.parammaps.status = 2
  2467. console.log('混料统计开始月日期==>', startDate)
  2468. console.log('混料统计结束月日期==>', endDate)
  2469. }
  2470. this.tab.chart5.getdataListParm.parammaps.startTime = startDate
  2471. this.tab.chart5.getdataListParm.parammaps.stopTime = endDate
  2472. this.getChart5()
  2473. } else if (item == 'chart6') {
  2474. if (this.tab.chart6.getdataListParm.parammaps.specificDate == '1') {
  2475. startDate = parseTime(this.tab.chart6.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  2476. endDate = parseTime(this.tab.chart6.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  2477. this.tab.chart6.getdataListParm.parammaps.status = 0
  2478. console.log('混料计划取消次数开始日期==>', startDate)
  2479. console.log('混料计划取消次数结束日期==>', endDate)
  2480. } else if (this.tab.chart6.getdataListParm.parammaps.specificDate == '2') {
  2481. if (this.tab.chart6.getdataListParm.parammaps.selectYear == '') {
  2482. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg2'), duration: 2000 })
  2483. return
  2484. }
  2485. if (this.tab.chart6.getdataListParm.parammaps.selectWeek !== null) {
  2486. if (this.tab.chart6.getdataListParm.parammaps.selectWeek.length !== 2) {
  2487. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg3'), duration: 2000 })
  2488. return
  2489. }
  2490. }
  2491. startDate = this.tab.chart6.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)[this.tab.chart6.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)[this.tab.chart6.getdataListParm.parammaps.selectWeek[0]].date
  2492. endDate = this.tab.chart6.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)[this.tab.chart6.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)[this.tab.chart6.getdataListParm.parammaps.selectWeek[1]].last.date
  2493. this.tab.chart6.getdataListParm.parammaps.status = 1
  2494. console.log('混料计划取消次数开始周日期==>', startDate)
  2495. console.log('混料计划取消次数结束周日期==>', endDate)
  2496. } else if (this.tab.chart6.getdataListParm.parammaps.specificDate == '3') {
  2497. startDate = this.tab.chart6.getdataListParm.parammaps.chartMonth[0]
  2498. endDate = this.tab.chart6.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
  2499. this.tab.chart6.getdataListParm.parammaps.status = 2
  2500. console.log('混料计划取消次数开始月日期==>', startDate)
  2501. console.log('混料计划取消次数结束月日期==>', endDate)
  2502. }
  2503. this.tab.chart6.getdataListParm.parammaps.startTime = startDate
  2504. this.tab.chart6.getdataListParm.parammaps.stopTime = endDate
  2505. this.getChart6()
  2506. } else if (item == 'chart7') {
  2507. if (this.tab.chart7.getdataListParm.parammaps.specificDate == '1') {
  2508. startDate = parseTime(this.tab.chart7.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  2509. endDate = parseTime(this.tab.chart7.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  2510. this.tab.chart7.getdataListParm.parammaps.status = 0
  2511. console.log('栏舍撒料时间统计开始日期==>', startDate)
  2512. console.log('栏舍撒料时间统计结束日期==>', endDate)
  2513. } else if (this.tab.chart7.getdataListParm.parammaps.specificDate == '2') {
  2514. if (this.tab.chart7.getdataListParm.parammaps.selectYear == '') {
  2515. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg2'), duration: 2000 })
  2516. return
  2517. }
  2518. if (this.tab.chart7.getdataListParm.parammaps.selectWeek !== null) {
  2519. if (this.tab.chart7.getdataListParm.parammaps.selectWeek.length !== 2) {
  2520. this.$message({ type: 'error', message: this.$t('errorAnalysis.msg3'), duration: 2000 })
  2521. return
  2522. }
  2523. }
  2524. startDate = this.tab.chart7.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)[this.tab.chart7.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)[this.tab.chart7.getdataListParm.parammaps.selectWeek[0]].date
  2525. endDate = this.tab.chart7.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)[this.tab.chart7.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)[this.tab.chart7.getdataListParm.parammaps.selectWeek[1]].last.date
  2526. this.tab.chart7.getdataListParm.parammaps.status = 1
  2527. console.log('栏舍撒料时间统计开始周日期==>', startDate)
  2528. console.log('栏舍撒料时间统计结束周日期==>', endDate)
  2529. } else if (this.tab.chart7.getdataListParm.parammaps.specificDate == '3') {
  2530. startDate = this.tab.chart7.getdataListParm.parammaps.chartMonth[0]
  2531. endDate = this.tab.chart7.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
  2532. this.tab.chart7.getdataListParm.parammaps.status = 2
  2533. console.log('栏舍撒料时间统计开始月日期==>', startDate)
  2534. console.log('栏舍撒料时间统计结束月日期==>', endDate)
  2535. }
  2536. this.tab.chart7.getdataListParm.parammaps.startTime = startDate
  2537. this.tab.chart7.getdataListParm.parammaps.stopTime = endDate
  2538. this.getChart7()
  2539. }
  2540. },
  2541. getTimeFn() {
  2542. const that = this
  2543. const start = new Date()
  2544. const end = new Date()
  2545. const start2 = new Date()
  2546. const end2 = new Date()
  2547. start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
  2548. end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 1)
  2549. // that.tab.table.getdataListParm.parammaps.inputDatetime[0] = parseTime(start2, '{y}-{m}-{d}')
  2550. // that.tab.table.getdataListParm.parammaps.inputDatetime[1] = parseTime(end2, '{y}-{m}-{d}')
  2551. that.tab.table.getdataListParm.parammaps.startTime = parseTime(start2, '{y}-{m}-{d}')
  2552. that.tab.table.getdataListParm.parammaps.stopTime = parseTime(end2, '{y}-{m}-{d}')
  2553. that.tab.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
  2554. that.tab.table2.getdataListParm.parammaps.startTime = parseTime(start2, '{y}-{m}-{d}')
  2555. that.tab.table2.getdataListParm.parammaps.stopTime = parseTime(end2, '{y}-{m}-{d}')
  2556. that.tab2.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
  2557. // that.tab2.table.getdataListParm.parammaps.inputDatetime[0] = parseTime(start2, '{y}-{m}-{d}')
  2558. // that.tab2.table.getdataListParm.parammaps.inputDatetime[1] = parseTime(end2, '{y}-{m}-{d}')
  2559. that.tab2.table.getdataListParm.parammaps.startTime = parseTime(start2, '{y}-{m}-{d}')
  2560. that.tab2.table.getdataListParm.parammaps.stopTime = parseTime(end2, '{y}-{m}-{d}')
  2561. that.tab3.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
  2562. // that.tab3.table.getdataListParm.parammaps.inputDatetime[0] = parseTime(start2, '{y}-{m}-{d}')
  2563. // that.tab3.table.getdataListParm.parammaps.inputDatetime[1] = parseTime(end2, '{y}-{m}-{d}')
  2564. that.tab3.table.getdataListParm.parammaps.startTime = parseTime(start2, '{y}-{m}-{d}')
  2565. that.tab3.table.getdataListParm.parammaps.stopTime = parseTime(end2, '{y}-{m}-{d}')
  2566. // start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
  2567. start.setTime(start.getTime() - 3600 * 1000 * 24 * 10)
  2568. end.setTime(end.getTime() - 3600 * 1000 * 24 * 1)
  2569. that.tab.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
  2570. that.tab.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
  2571. that.tab.chart1.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  2572. that.tab.chart1.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  2573. that.tab.chart1.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  2574. that.tab.chart1.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  2575. that.tab.chart2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  2576. that.tab.chart2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  2577. that.tab.chart2.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  2578. that.tab.chart2.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  2579. that.tab.chart3.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  2580. that.tab.chart3.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  2581. that.tab.chart3.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  2582. that.tab.chart3.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  2583. that.tab.chart4.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  2584. that.tab.chart4.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  2585. that.tab.chart4.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  2586. that.tab.chart4.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  2587. that.tab.chart5.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  2588. that.tab.chart5.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  2589. that.tab.chart5.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  2590. that.tab.chart5.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  2591. that.tab.chart6.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  2592. that.tab.chart6.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  2593. that.tab.chart6.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  2594. that.tab.chart6.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  2595. that.tab.chart7.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  2596. that.tab.chart7.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  2597. that.tab.chart7.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  2598. that.tab.chart7.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  2599. },
  2600. getIsDisplay() {
  2601. GetDataByName(this.maxTime.getMaxTimesParm).then(response => {
  2602. if (response.data.list[0].inforvalue == 1) {
  2603. this.tab2.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }]
  2604. this.tab3.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }]
  2605. } else if (response.data.list[0].inforvalue == 2) {
  2606. this.tab2.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }]
  2607. this.tab3.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }]
  2608. } else if (response.data.list[0].inforvalue == 3) {
  2609. this.tab2.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }, { id: '3', name: this.$t('errorAnalysis.three'), }]
  2610. this.tab3.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }, { id: '3', name: this.$t('errorAnalysis.three'), }]
  2611. this.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }, { id: '3', name: this.$t('errorAnalysis.three'), }]
  2612. } else if (response.data.list[0].inforvalue == 4) {
  2613. this.tab2.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }, { id: '3', name: this.$t('errorAnalysis.three'), }, { id: '4', name: this.$t('errorAnalysis.four'), }]
  2614. this.tab3.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }, { id: '3', name: this.$t('errorAnalysis.three'), }, { id: '4', name: this.$t('errorAnalysis.four'), }]
  2615. } else if (response.data.list[0].inforvalue == 5) {
  2616. this.tab2.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }, { id: '3', name: this.$t('errorAnalysis.three'), }, { id: '4', name: this.$t('errorAnalysis.four'), }, { id: '5', name: this.$t('errorAnalysis.five'), }]
  2617. this.tab3.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }, { id: '3', name: this.$t('errorAnalysis.three'), }, { id: '4', name: this.$t('errorAnalysis.four'), }, { id: '5', name: this.$t('errorAnalysis.five'), }]
  2618. } else if (response.data.list[0].inforvalue == 6) {
  2619. this.tab2.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }, { id: '3', name: this.$t('errorAnalysis.three'), }, { id: '4', name: this.$t('errorAnalysis.four'), }, { id: '5', name: this.$t('errorAnalysis.five'), }, { id: '6', name: this.$t('errorAnalysis.six'), }]
  2620. this.tab3.frequencyList = [{ id: '1', name: this.$t('errorAnalysis.one'), }, { id: '2', name: this.$t('errorAnalysis.two'), }, { id: '3', name: this.$t('errorAnalysis.three'), }, { id: '4', name: this.$t('errorAnalysis.four'), }, { id: '5', name: this.$t('errorAnalysis.five'), }, { id: '6', name: this.$t('errorAnalysis.six'), }]
  2621. }
  2622. })
  2623. },
  2624. // 导出
  2625. handleDownload() {
  2626. // const exportTitle2 = [];
  2627. // const exportTitle3 = [];
  2628. // for (let j = 0; j < this.tab.table.tableConfig[i].children.length; j++) {
  2629. // exportTitle2.push(this.tab.table.tableConfig[i].children[j].label)
  2630. // for(let a = 0;a<this.tab.table.tableConfig[i].children[j].children.length;a++){
  2631. // exportTitle3.push(this.tab.table.tableConfig[i].children[j].children[a].label)
  2632. // }
  2633. // }
  2634. console.log(this.tab.table.tableConfig,'this.tab.table.list121212')
  2635. // const columns = this.tab.table.parammaps;
  2636. // const labels = this.getColumnLabels(columns);
  2637. // console.log(labels); // 输出 ["日期", "姓名", "地址"]
  2638. if(this.tab.table.list == null){
  2639. this.tab.table.list = []
  2640. }
  2641. if(this.tab.table2.list == null){
  2642. this.tab.table2.list = []
  2643. }
  2644. if (this.tab.checked == true) {
  2645. if (this.tab.radio == '0') {
  2646. var excelDatas0 = [
  2647. {
  2648. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.Driver'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.hlzqs'), this.$t('errorAnalysis.hlzql'), this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2649. filterVal: ['计划时间', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数', '混料正确率', '去除取消正确率', '方差'],
  2650. tableDatas: this.tab.table.list,
  2651. sheetName: '混料'
  2652. },
  2653. {
  2654. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.Driver'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.slzqs'), this.$t('errorAnalysis.slzqs'), this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2655. filterVal: ['计划时间', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数', '撒料正确率', '去除取消正确率', '方差'],
  2656. tableDatas: this.tab.table2.list,
  2657. sheetName: '撒料'
  2658. }
  2659. ]
  2660. json2excel(excelDatas0, this.$t('errorAnalysis.hztjjsy'), true, 'xlsx')
  2661. } else if (this.tab.radio == '1') {
  2662. var excelDatas = [
  2663. {
  2664. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.feedName'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.hlzqs'), this.$t('errorAnalysis.hlzql'), this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2665. filterVal: ['计划时间', '配方名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数', '混料正确率', '去除取消正确率', '方差'],
  2666. tableDatas: this.tab.table.list,
  2667. sheetName: '混料'
  2668. },
  2669. {
  2670. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.feedName'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.slzqs'), this.$t('errorAnalysis.slzqs'), this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2671. filterVal: ['计划时间', '配方名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数', '撒料正确率', '去除取消正确率', '方差'],
  2672. tableDatas: this.tab.table2.list,
  2673. sheetName: '撒料'
  2674. }
  2675. ]
  2676. json2excel(excelDatas, this.$t('errorAnalysis.hztjpfmc'), true, 'xlsx')
  2677. } else if (this.tab.radio == '2') {
  2678. var excelDatas2 = [
  2679. {
  2680. tHeader: [this.$t('errorAnalysis.date'),this.$t('errorAnalysis.isHouseName'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.hlzqs'),this.$t('errorAnalysis.hlzql'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2681. filterVal: ['计划时间','栏舍名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
  2682. tableDatas: this.tab.table.list,
  2683. sheetName: '混料'
  2684. },
  2685. {
  2686. tHeader: [this.$t('errorAnalysis.date'),this.$t('errorAnalysis.isHouseName'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2687. filterVal: ['计划时间',this.$t('errorAnalysis.isHouseName'), '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '方差'],
  2688. tableDatas: this.tab.table2.list,
  2689. sheetName: '撒料'
  2690. }
  2691. ]
  2692. json2excel(excelDatas2, this.$t('errorAnalysis.hztjlsmz'), true, 'xlsx')
  2693. } else if (this.tab.radio == '3') {
  2694. var excelDatas3 = [
  2695. {
  2696. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.sxlb'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.hlzqs'),this.$t('errorAnalysis.hlzql'),this.$t('errorAnalysis.qcqxzql'),this.$t('errorAnalysis.bzc')],
  2697. filterVal: ['计划时间', '牲畜类别', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
  2698. tableDatas: this.tab.table.list,
  2699. sheetName: '混料'
  2700. },
  2701. {
  2702. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.sxlb'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2703. filterVal: ['计划时间','牲畜类别', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '方差'],
  2704. tableDatas: this.tab.table2.list,
  2705. sheetName: '撒料'
  2706. }
  2707. ]
  2708. json2excel(excelDatas3, this.$t('errorAnalysis.hztjxslb'), true, 'xlsx')
  2709. } else if (this.tab.radio == '4') {
  2710. var excelDatas4 = [
  2711. {
  2712. tHeader: [this.$t('errorAnalysis.date'),this.$t('errorAnalysis.feedName'),this.$t('errorAnalysis.drivername'),this.$t('errorAnalysis.stratJl'),this.$t('errorAnalysis.endJl'), this.$t('errorAnalysis.tmrnames'), this.$t('errorAnalysis.projname'), this.$t('errorAnalysis.isTrainNumber'), this.$t('errorAnalysis.Driver'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlsj'),this.$t('errorAnalysis.flstartTime'),this.$t('errorAnalysis.waitTime'),this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.hlzqs'),this.$t('errorAnalysis.hlzql'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc'),this.$t('errorAnalysis.area')],
  2713. filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','startMaterialTime','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差','barname'],
  2714. tableDatas: this.tab.table.list,
  2715. sheetName: '混料'
  2716. },
  2717. {
  2718. tHeader: [this.$t('errorAnalysis.date'),this.$t('errorAnalysis.feedName'),this.$t('errorAnalysis.drivername'),this.$t('errorAnalysis.stratJl'),this.$t('errorAnalysis.endJl'), this.$t('errorAnalysis.tmrnames'), this.$t('errorAnalysis.projname'),this.$t('errorAnalysis.isTrainNumber'), this.$t('errorAnalysis.Driver'),this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slsj'),this.$t('errorAnalysis.flstartTime'),this.$t('errorAnalysis.waitTime'),this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc'),this.$t('errorAnalysis.area')],
  2719. filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime', 'TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','startMaterialTime','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '方差','barname'],
  2720. tableDatas: this.tab.table2.list,
  2721. sheetName: '撒料'
  2722. }
  2723. ]
  2724. json2excel(excelDatas4, this.$t('errorAnalysis.hztjcc'), true, 'xlsx')
  2725. } else if (this.tab.radio == '5') {
  2726. var excelDatas4 = [
  2727. {
  2728. tHeader: [this.$t('errorAnalysis.date'),this.$t('errorAnalysis.tmrnames'),this.$t('errorAnalysis.isTrainNumber'),this.$t('errorAnalysis.projname'), this.$t('errorAnalysis.Driver'),this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.hlzqs'),this.$t('errorAnalysis.hlzql'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2729. filterVal: ['计划时间','TMR名称', '班次', '车次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
  2730. tableDatas: this.tab.table.list,
  2731. sheetName: '混料'
  2732. },
  2733. {
  2734. tHeader: [this.$t('errorAnalysis.date'),this.$t('errorAnalysis.tmrnames'), this.$t('errorAnalysis.isTrainNumber'), this.$t('errorAnalysis.projname'), this.$t('errorAnalysis.Driver'),this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.qcqxzql'),this.$t('errorAnalysis.bzc')],
  2735. filterVal: ['计划时间','TMR名称','班次', '车次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数','撒料正确率','去除取消正确率','方差'],
  2736. tableDatas: this.tab.table2.list,
  2737. sheetName: '撒料'
  2738. }
  2739. ]
  2740. json2excel(excelDatas4, this.$t('errorAnalysis.hztjtmr'), true, 'xlsx')
  2741. } else if (this.tab.radio == '6') {
  2742. var excelDatas5 = [
  2743. {
  2744. tHeader: [this.$t('errorAnalysis.date'),this.$t('errorAnalysis.isFeed'),this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.hlzqs'),this.$t('errorAnalysis.hlzql'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2745. filterVal: ['计划时间','fname', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
  2746. tableDatas: this.tab.table.list,
  2747. sheetName: '混料'
  2748. }
  2749. ]
  2750. json2excel(excelDatas5, this.$t('errorAnalysis.hztjsl'), true, 'xlsx')
  2751. }else if (this.tab.radio == '7') {
  2752. var excelDatas7 = [
  2753. {
  2754. tHeader: [this.$t('errorAnalysis.date'),this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.hlzqs'),this.$t('errorAnalysis.hlzql'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2755. filterVal: ['计划时间','理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
  2756. tableDatas: this.tab.table.list,
  2757. sheetName: '混料'
  2758. },
  2759. {
  2760. tHeader: [this.$t('errorAnalysis.date'),this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.qcqxzql'),this.$t('errorAnalysis.bzc')],
  2761. filterVal: ['计划时间','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数','撒料正确率','去除取消正确率','方差'],
  2762. tableDatas: this.tab.table2.list,
  2763. sheetName: '撒料'
  2764. }
  2765. ]
  2766. json2excel(excelDatas7, this.$t('errorAnalysis.hztjwfl'), true, 'xlsx')
  2767. }
  2768. } else {
  2769. if (this.tab.radio == '0') {
  2770. var excelDatas0 = [
  2771. {
  2772. tHeader: [this.$t('errorAnalysis.Driver'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.hlzqs'), this.$t('errorAnalysis.hlzql'), this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2773. filterVal: ['驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数', '混料正确率', '去除取消正确率', '方差'],
  2774. tableDatas: this.tab.table.list,
  2775. sheetName: '混料'
  2776. },
  2777. {
  2778. tHeader: [this.$t('errorAnalysis.Driver'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.slzqs'), this.$t('errorAnalysis.slzqs'), this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2779. filterVal: ['驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数', '撒料正确率', '去除取消正确率', '方差'],
  2780. tableDatas: this.tab.table2.list,
  2781. sheetName: '撒料'
  2782. }
  2783. ]
  2784. json2excel(excelDatas0, this.$t('errorAnalysis.sumName'), true, 'xlsx')
  2785. } else if (this.tab.radio == '1') {
  2786. var excelDatas = [
  2787. {
  2788. tHeader: [this.$t('errorAnalysis.feedName'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.hlzqs'), this.$t('errorAnalysis.hlzql'), this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2789. filterVal: ['配方名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数', '混料正确率', '去除取消正确率', '方差'],
  2790. tableDatas: this.tab.table.list,
  2791. sheetName: '混料'
  2792. },
  2793. {
  2794. tHeader: [this.$t('errorAnalysis.feedName'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.slzqs'), this.$t('errorAnalysis.slzqs'), this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2795. filterVal: ['配方名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数', '撒料正确率', '去除取消正确率', '方差'],
  2796. tableDatas: this.tab.table2.list,
  2797. sheetName: '撒料'
  2798. }
  2799. ]
  2800. json2excel(excelDatas, this.$t('errorAnalysis.hztjpfmc'), true, 'xlsx')
  2801. } else if (this.tab.radio == '2') {
  2802. var excelDatas2 = [
  2803. {
  2804. tHeader: [this.$t('errorAnalysis.isHouseName'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.hlzqs'),this.$t('errorAnalysis.hlzql'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2805. filterVal: ['栏舍名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
  2806. tableDatas: this.tab.table.list,
  2807. sheetName: '混料'
  2808. },
  2809. {
  2810. tHeader: [this.$t('errorAnalysis.isHouseName'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2811. filterVal: [this.$t('errorAnalysis.isHouseName'), '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '方差'],
  2812. tableDatas: this.tab.table2.list,
  2813. sheetName: '撒料'
  2814. }
  2815. ]
  2816. json2excel(excelDatas2, this.$t('errorAnalysis.hztjlsmz'), true, 'xlsx')
  2817. } else if (this.tab.radio == '3') {
  2818. var excelDatas3 = [
  2819. {
  2820. tHeader: [this.$t('errorAnalysis.sxlb'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.hlzqs'),this.$t('errorAnalysis.hlzql'),this.$t('errorAnalysis.qcqxzql'),this.$t('errorAnalysis.bzc')],
  2821. filterVal: ['牲畜类别', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
  2822. tableDatas: this.tab.table.list,
  2823. sheetName: '混料'
  2824. },
  2825. {
  2826. tHeader: [this.$t('errorAnalysis.sxlb'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2827. filterVal: ['牲畜类别', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '方差'],
  2828. tableDatas: this.tab.table2.list,
  2829. sheetName: '撒料'
  2830. }
  2831. ]
  2832. json2excel(excelDatas3, this.$t('errorAnalysis.hztjxslb'), true, 'xlsx')
  2833. } else if (this.tab.radio == '4') {
  2834. var excelDatas4 = [
  2835. {
  2836. tHeader: [this.$t('errorAnalysis.date'),this.$t('errorAnalysis.feedName'),this.$t('errorAnalysis.drivername'),this.$t('errorAnalysis.stratJl'),this.$t('errorAnalysis.endJl'),this.$t('errorAnalysis.tmrnames'), this.$t('errorAnalysis.projname'), this.$t('errorAnalysis.isTrainNumber'), this.$t('errorAnalysis.Driver'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlsj'),this.$t('errorAnalysis.flstartTime'),this.$t('errorAnalysis.waitTime'),this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.hlzqs'),this.$t('errorAnalysis.hlzql'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc'),this.$t('errorAnalysis.area')],
  2837. filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','startMaterialTime','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差','barname'],
  2838. tableDatas: this.tab.table.list,
  2839. sheetName: '混料'
  2840. },
  2841. {
  2842. tHeader: [this.$t('errorAnalysis.date'),this.$t('errorAnalysis.feedName'),this.$t('errorAnalysis.drivername'),this.$t('errorAnalysis.stratJl'),this.$t('errorAnalysis.endJl'),this.$t('errorAnalysis.tmrnames'), this.$t('errorAnalysis.projname'),this.$t('errorAnalysis.isTrainNumber'), this.$t('errorAnalysis.Driver'),this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slsj'),this.$t('errorAnalysis.flstartTime'),this.$t('errorAnalysis.waitTime'),this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc'),this.$t('errorAnalysis.area')],
  2843. filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','startMaterialTime','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '方差','barname'],
  2844. tableDatas: this.tab.table2.list,
  2845. sheetName: '撒料'
  2846. }
  2847. ]
  2848. json2excel(excelDatas4, this.$t('errorAnalysis.hztjcc'), true, 'xlsx')
  2849. }else if (this.tab.radio == '5') {
  2850. var excelDatas5 = [
  2851. {
  2852. tHeader: [this.$t('errorAnalysis.tmrnames'),this.$t('errorAnalysis.isTrainNumber'),this.$t('errorAnalysis.projname'), this.$t('errorAnalysis.Driver'),this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.hlzqs'),this.$t('errorAnalysis.hlzql'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2853. filterVal: ['TMR名称', '班次', '车次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
  2854. tableDatas: this.tab.table.list,
  2855. sheetName: '混料'
  2856. },
  2857. {
  2858. tHeader: [this.$t('errorAnalysis.tmrnames'), this.$t('errorAnalysis.isTrainNumber'), this.$t('errorAnalysis.projname'), this.$t('errorAnalysis.Driver'),this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.qcqxzql'),this.$t('errorAnalysis.bzc')],
  2859. filterVal: ['TMR名称','班次', '车次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数','撒料正确率','去除取消正确率','方差'],
  2860. tableDatas: this.tab.table2.list,
  2861. sheetName: '撒料'
  2862. }
  2863. ]
  2864. json2excel(excelDatas5, this.$t('errorAnalysis.hztjtmr'), true, 'xlsx')
  2865. }else if (this.tab.radio == '6') {
  2866. var excelDatas6 = [
  2867. {
  2868. tHeader: [this.$t('errorAnalysis.isFeed'),this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.hlzqs'),this.$t('errorAnalysis.hlzql'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2869. filterVal: ['fname', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
  2870. tableDatas: this.tab.table.list,
  2871. sheetName: '混料'
  2872. }
  2873. ]
  2874. json2excel(excelDatas6, this.$t('errorAnalysis.hztjsl'), true, 'xlsx')
  2875. }else if (this.tab.radio == '7') {
  2876. var excelDatas7 = [
  2877. {
  2878. tHeader: [this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.jshlczs'), this.$t('errorAnalysis.yhlczs'), this.$t('errorAnalysis.hlczl'), this.$t('errorAnalysis.hlwczs'), this.$t('errorAnalysis.hlzqls'), this.$t('errorAnalysis.hlzdtzcs'), this.$t('errorAnalysis.hlsdzdtzcs'), this.$t('errorAnalysis.qxcs'),this.$t('errorAnalysis.hlzqs'),this.$t('errorAnalysis.hlzql'),this.$t('errorAnalysis.qcqxzql'), this.$t('errorAnalysis.bzc')],
  2879. filterVal: ['理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
  2880. tableDatas: this.tab.table.list,
  2881. sheetName: '混料'
  2882. },
  2883. {
  2884. tHeader: [this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.sljhczs'), this.$t('errorAnalysis.yclczs'), this.$t('errorAnalysis.slczl'), this.$t('errorAnalysis.slwcz'), this.$t('errorAnalysis.slzql'), this.$t('errorAnalysis.slzdtzcs'), this.$t('errorAnalysis.slsdzdtzcs'), this.$t('errorAnalysis.qxcs'), this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.slzqs'),this.$t('errorAnalysis.qcqxzql'),this.$t('errorAnalysis.bzc')],
  2885. filterVal: ['理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数','撒料正确率','去除取消正确率','方差'],
  2886. tableDatas: this.tab.table2.list,
  2887. sheetName: '撒料'
  2888. }
  2889. ]
  2890. json2excel(excelDatas7, this.$t('errorAnalysis.hztjwfl'), true, 'xlsx')
  2891. }
  2892. }
  2893. },
  2894. // 切换Tab
  2895. handleTabClick() {
  2896. if (this.activeName == 'first') {
  2897. const start = new Date()
  2898. const end = new Date()
  2899. start.setTime(start.getTime() - 3600 * 1000 * 24 * 1)
  2900. end.setTime(end.getTime() - 3600 * 1000 * 24 * 1)
  2901. this.tab.table.getdataListParm.parammaps.inputDatetime = [start, end]
  2902. this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  2903. this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  2904. this.tab.table2.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  2905. this.tab.table2.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  2906. this.tab.table.getdataListParm.parammaps.fname = ''
  2907. this.tab.table.getdataListParm.parammaps.sort = ''
  2908. this.tab.table.getdataListParm.parammaps.times = ''
  2909. this.tab.table2.getdataListParm.parammaps.fname = ''
  2910. this.tab.table2.getdataListParm.parammaps.sort = ''
  2911. this.tab.table2.getdataListParm.parammaps.times = ''
  2912. this.getTabList()
  2913. this.getTabList2()
  2914. this.getChart1()
  2915. this.getChart2()
  2916. this.getChart3()
  2917. this.getChart4()
  2918. this.getChart5()
  2919. this.getChart6()
  2920. this.$nextTick(() => {
  2921. this.$refs.plTable3.doLayout()
  2922. this.$refs.plTable3.doLayout()
  2923. })
  2924. } else if (this.activeName == 'second') {
  2925. this.$nextTick(()=>{
  2926. this.myHeightSecond = document.documentElement.clientHeight - 40 - this.$refs.myHeightSecond.offsetHeight - 150
  2927. const start2 = new Date()
  2928. start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
  2929. this.tab2.table.getdataListParm.parammaps.inputDatetime2 = start2
  2930. this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
  2931. this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
  2932. this.tab2.table.getdataListParm.parammaps.tmrtname = ''
  2933. this.tab2.table.getdataListParm.parammaps.projname = ''
  2934. this.tab2.table.getdataListParm.parammaps.times = ''
  2935. this.tab2.table.getdataListParm.parammaps.buttontype = ''
  2936. this.tab2.table.getdataListParm.parammaps.templetname = ''
  2937. this.getTab2List()
  2938. this.getTMRNameList2()
  2939. this.$nextTick(() => {
  2940. this.$refs.plTable3.doLayout()
  2941. })
  2942. })
  2943. } else if (this.activeName == 'third') {
  2944. this.$nextTick(()=>{
  2945. console.log(this.$refs.myHeightThird.offsetHeight,'myHeightThird')
  2946. this.myHeightThird = document.documentElement.clientHeight - 40 - this.$refs.myHeightThird.offsetHeight - 150
  2947. const start3 = new Date()
  2948. start3.setTime(start3.getTime() - 3600 * 1000 * 24 * 1)
  2949. this.tab3.table.getdataListParm.parammaps.inputDatetime2 = start3
  2950. this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
  2951. this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
  2952. this.tab3.table.getdataListParm.parammaps.tmrtname = ''
  2953. this.tab3.table.getdataListParm.parammaps.projname = ''
  2954. this.tab3.table.getdataListParm.parammaps.times = ''
  2955. this.tab3.table.getdataListParm.parammaps.templetname = ''
  2956. this.tab3.table.getdataListParm.parammaps.buttontype = ''
  2957. this.getTab3List()
  2958. this.getTMRNameList3()
  2959. this.$nextTick(() => {
  2960. this.$refs.plTable3.doLayout()
  2961. })
  2962. })
  2963. }
  2964. this.$forceUpdate()
  2965. },
  2966. // 切换统计类型
  2967. changeRadio() {
  2968. this.tab.table.getdataListParm.parammaps.sort = ''
  2969. this.tab.table.getdataListParm.parammaps.times = ''
  2970. this.tab.table.getdataListParm.parammaps.fname = ''
  2971. this.tab.table2.getdataListParm.parammaps.sort = ''
  2972. this.tab.table2.getdataListParm.parammaps.times = ''
  2973. this.tab.table2.getdataListParm.parammaps.fname = ''
  2974. if (this.tab.radio == '0') {
  2975. console.log('驾驶员')
  2976. this.tab.isDriver = true
  2977. this.tab.isFormulaName = false
  2978. this.tab.isHouseName = false
  2979. this.tab.isLivestockType = false
  2980. this.tab.isTrainNumber = false
  2981. this.tab.isTMRName = false
  2982. this.tab.isFeed = false
  2983. this.tab.table.getdataListParm.offset = 1
  2984. this.getTabList()
  2985. this.tab.table2.getdataListParm.offset = 1
  2986. this.getTabList2()
  2987. } else if (this.tab.radio == '1') {
  2988. console.log('配方名称')
  2989. this.tab.isDriver = false
  2990. this.tab.isFormulaName = true
  2991. this.tab.isHouseName = false
  2992. this.tab.isLivestockType = false
  2993. this.tab.isTrainNumber = false
  2994. this.tab.isTMRName = false
  2995. this.tab.isFeed = false
  2996. this.tab.table.getdataListParm.offset = 1
  2997. this.getTabList()
  2998. this.tab.table2.getdataListParm.offset = 1
  2999. this.getTabList2()
  3000. } else if (this.tab.radio == '2') {
  3001. console.log('栏舍名称')
  3002. this.tab.isDriver = false
  3003. this.tab.isFormulaName = false
  3004. this.tab.isHouseName = true
  3005. this.tab.isLivestockType = false
  3006. this.tab.isTrainNumber = false
  3007. this.tab.isTMRName = false
  3008. this.tab.isFeed = false
  3009. this.tab.table.getdataListParm.offset = 1
  3010. this.getTabList()
  3011. this.tab.table2.getdataListParm.offset = 1
  3012. this.getTabList2()
  3013. } else if (this.tab.radio == '3') {
  3014. console.log(' 牲畜类别')
  3015. this.tab.isDriver = false
  3016. this.tab.isFormulaName = false
  3017. this.tab.isHouseName = false
  3018. this.tab.isLivestockType = true
  3019. this.tab.isTrainNumber = false
  3020. this.tab.isTMRName = false
  3021. this.tab.isFeed = false
  3022. this.tab.table.getdataListParm.offset = 1
  3023. this.getTabList()
  3024. this.tab.table2.getdataListParm.offset = 1
  3025. this.getTabList2()
  3026. } else if (this.tab.radio == '4') {
  3027. console.log('车次')
  3028. this.tab.isDriver = false
  3029. this.tab.isFormulaName = false
  3030. this.tab.isHouseName = false
  3031. this.tab.isLivestockType = false
  3032. this.tab.isTrainNumber = true
  3033. this.tab.isTMRName = false
  3034. this.tab.isFeed = false
  3035. this.tab.table.getdataListParm.offset = 1
  3036. this.getTabList()
  3037. this.tab.table2.getdataListParm.offset = 1
  3038. this.getTabList2()
  3039. } else if (this.tab.radio == '5') {
  3040. console.log('TMR名称')
  3041. this.tab.isDriver = false
  3042. this.tab.isFormulaName = false
  3043. this.tab.isHouseName = false
  3044. this.tab.isLivestockType = false
  3045. this.tab.isTrainNumber = false
  3046. this.tab.isTMRName = true
  3047. this.tab.isFeed = false
  3048. this.tab.table.getdataListParm.offset = 1
  3049. this.getTabList()
  3050. this.tab.table2.getdataListParm.offset = 1
  3051. this.getTabList2()
  3052. this.getTMRNameList()
  3053. } else if (this.tab.radio == '6') {
  3054. console.log('饲料')
  3055. this.tab.isDriver = false
  3056. this.tab.isFormulaName = false
  3057. this.tab.isHouseName = false
  3058. this.tab.isLivestockType = false
  3059. this.tab.isTrainNumber = false
  3060. this.tab.isTMRName = false
  3061. this.tab.isFeed = true
  3062. this.tab.table.getdataListParm.offset = 1
  3063. this.getTabList()
  3064. } else if (this.tab.radio == '7') {
  3065. console.log('无分类')
  3066. this.tab.isDriver = false
  3067. this.tab.isFormulaName = false
  3068. this.tab.isHouseName = false
  3069. this.tab.isLivestockType = false
  3070. this.tab.isTrainNumber = false
  3071. this.tab.isTMRName = false
  3072. this.tab.isFeed = false
  3073. this.tab.table.getdataListParm.offset = 1
  3074. this.getTabList()
  3075. this.tab.table2.getdataListParm.offset = 1
  3076. this.getTabList2()
  3077. }
  3078. },
  3079. // 按日期统计
  3080. changeChecked() {
  3081. console.log(this.tab.checked)
  3082. this.form_search()
  3083. },
  3084. // 汇总统计/混料
  3085. getTabList() {
  3086. this.tab.table.listLoading = true
  3087. this.tab.table.getdataListParm.parammaps.status = this.tab.radio
  3088. this.tab.table.getdataListParm.parammaps.genre = 0
  3089. if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
  3090. this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  3091. this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  3092. } else {
  3093. this.tab.table.getdataListParm.parammaps.inputDatetime = ''
  3094. this.tab.table.getdataListParm.parammaps.startTime = ''
  3095. this.tab.table.getdataListParm.parammaps.stopTime = ''
  3096. }
  3097. let url = 'authdata/summary'
  3098. let data = {}
  3099. if(this.tab.checked ==false){
  3100. this.tab.table.getdataListParm.parammaps.isdate = 0
  3101. }else{
  3102. this.tab.table.getdataListParm.parammaps.isdate = 1
  3103. }
  3104. data.parammaps = this.tab.table.getdataListParm.parammaps
  3105. postJson(url, data).then(response => {
  3106. if (response.data !== null && response.data.list !== null) {
  3107. console.log('汇总统计/混料table数据', response.data.list)
  3108. this.$refs.plTable1.reloadData(response.data.list)
  3109. this.tab.table.list = response.data.list
  3110. this.tab.table.total = response.data.total
  3111. } else {
  3112. this.$refs.plTable2.reloadData([])
  3113. this.tab.table.list = []
  3114. this.tab.table.total = 0
  3115. }
  3116. setTimeout(() => {
  3117. this.tab.table.listLoading = false
  3118. }, 100)
  3119. })
  3120. },
  3121. // 汇总统计/撒料
  3122. getTabList2() {
  3123. this.tab.table2.listLoading = true
  3124. this.tab.table2.getdataListParm.parammaps.status = this.tab.radio
  3125. this.tab.table2.getdataListParm.parammaps.genre = 1
  3126. this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
  3127. this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
  3128. this.tab.table2.getdataListParm.parammaps.hlwc1 = this.tab.table.getdataListParm.parammaps.hlwc1
  3129. this.tab.table2.getdataListParm.parammaps.hlwc2 = this.tab.table.getdataListParm.parammaps.hlwc2
  3130. this.tab.table2.getdataListParm.parammaps.hlzq1 = this.tab.table.getdataListParm.parammaps.hlzq1
  3131. this.tab.table2.getdataListParm.parammaps.hlzq2 = this.tab.table.getdataListParm.parammaps.hlzq2
  3132. this.tab.table2.getdataListParm.parammaps.hlzql1 = this.tab.table.getdataListParm.parammaps.hlzql1
  3133. this.tab.table2.getdataListParm.parammaps.hlzql2 = this.tab.table.getdataListParm.parammaps.hlzql2
  3134. this.tab.table2.getdataListParm.parammaps.slwc1 = this.tab.table.getdataListParm.parammaps.slwc1
  3135. this.tab.table2.getdataListParm.parammaps.slwc2 = this.tab.table.getdataListParm.parammaps.slwc2
  3136. this.tab.table2.getdataListParm.parammaps.slzq1 = this.tab.table.getdataListParm.parammaps.slzq1
  3137. this.tab.table2.getdataListParm.parammaps.slzq2 = this.tab.table.getdataListParm.parammaps.slzq2
  3138. this.tab.table2.getdataListParm.parammaps.slzql1 = this.tab.table.getdataListParm.parammaps.slzql1
  3139. this.tab.table2.getdataListParm.parammaps.slzql2 = this.tab.table.getdataListParm.parammaps.slzql2
  3140. this.tab.table2.getdataListParm.parammaps.templetname = this.tab.table.getdataListParm.parammaps.templetname
  3141. this.tab.table2.getdataListParm.parammaps.startdate = this.tab.table.getdataListParm.parammaps.startdate
  3142. this.tab.table2.getdataListParm.parammaps.enddate = this.tab.table.getdataListParm.parammaps.enddate
  3143. this.tab.table2.getdataListParm.parammaps.error = this.tab.table.getdataListParm.parammaps.error
  3144. let url = 'authdata/summary'
  3145. let data = {}
  3146. if(this.tab.checked ==false){
  3147. this.tab.table2.getdataListParm.parammaps.isdate = 0
  3148. }else{
  3149. this.tab.table2.getdataListParm.parammaps.isdate = 1
  3150. }
  3151. data.parammaps = this.tab.table2.getdataListParm.parammaps
  3152. postJson(url, data).then(response => {
  3153. if (response.data !== null && response.data.list !== null) {
  3154. console.log('汇总统计/撒料table数据', response.data.list)
  3155. this.$refs.plTable22.reloadData(response.data.list)
  3156. this.tab.table2.list = response.data.list
  3157. this.tab.table2.total = response.data.total
  3158. } else {
  3159. this.$refs.plTable22.reloadData([])
  3160. this.tab.table2.list = []
  3161. this.tab.table2.total = 0
  3162. }
  3163. setTimeout(() => {
  3164. this.tab.table2.listLoading = false
  3165. }, 100)
  3166. })
  3167. },
  3168. // 查询
  3169. form_search() {
  3170. if (this.tab.radio == '0') {
  3171. console.log('驾驶员/查询111')
  3172. this.tab.isDriver = true
  3173. this.tab.isFormulaName = false
  3174. this.tab.isHouseName = false
  3175. this.tab.isLivestockType = false
  3176. this.tab.isTrainNumber = false
  3177. this.tab.isTMRName = false
  3178. this.tab.isFeed = false
  3179. this.tab.table.getdataListParm.offset = 1
  3180. this.getTabList()
  3181. this.tab.table2.getdataListParm.offset = 1
  3182. this.getTabList2()
  3183. } else if (this.tab.radio == '1') {
  3184. console.log('配方名称/查询111')
  3185. this.tab.isDriver = false
  3186. this.tab.isFormulaName = true
  3187. this.tab.isHouseName = false
  3188. this.tab.isLivestockType = false
  3189. this.tab.isTrainNumber = false
  3190. this.tab.isTMRName = false
  3191. this.tab.isFeed = false
  3192. this.tab.table.getdataListParm.offset = 1
  3193. this.getTabList()
  3194. this.tab.table2.getdataListParm.offset = 1
  3195. this.getTabList2()
  3196. } else if (this.tab.radio == '2') {
  3197. console.log('栏舍名称/查询')
  3198. this.tab.isDriver = false
  3199. this.tab.isFormulaName = false
  3200. this.tab.isHouseName = true
  3201. this.tab.isLivestockType = false
  3202. this.tab.isTrainNumber = false
  3203. this.tab.isTMRName = false
  3204. this.tab.isFeed = false
  3205. this.tab.table.getdataListParm.offset = 1
  3206. this.getTabList()
  3207. this.tab.table2.getdataListParm.offset = 1
  3208. this.getTabList2()
  3209. } else if (this.tab.radio == '3') {
  3210. console.log(' 牲畜类别/查询')
  3211. this.tab.isDriver = false
  3212. this.tab.isFormulaName = false
  3213. this.tab.isHouseName = false
  3214. this.tab.isLivestockType = true
  3215. this.tab.isTrainNumber = false
  3216. this.tab.isTMRName = false
  3217. this.tab.isFeed = false
  3218. this.tab.table.getdataListParm.offset = 1
  3219. this.getTabList()
  3220. this.tab.table2.getdataListParm.offset = 1
  3221. this.getTabList2()
  3222. } else if (this.tab.radio == '4') {
  3223. console.log('车次/查询')
  3224. this.tab.isDriver = false
  3225. this.tab.isFormulaName = false
  3226. this.tab.isHouseName = false
  3227. this.tab.isLivestockType = false
  3228. this.tab.isTrainNumber = true
  3229. this.tab.isTMRName = false
  3230. this.tab.isFeed = false
  3231. this.tab.table.getdataListParm.offset = 1
  3232. this.getTabList()
  3233. this.tab.table2.getdataListParm.offset = 1
  3234. this.getTabList2()
  3235. } else if (this.tab.radio == '5') {
  3236. console.log('TMR名称/查询')
  3237. this.tab.isDriver = false
  3238. this.tab.isFormulaName = false
  3239. this.tab.isHouseName = false
  3240. this.tab.isLivestockType = false
  3241. this.tab.isTrainNumber = false
  3242. this.tab.isTMRName = true
  3243. this.tab.isFeed = false
  3244. this.tab.table.getdataListParm.offset = 1
  3245. this.getTabList()
  3246. this.tab.table2.getdataListParm.offset = 1
  3247. this.getTabList2()
  3248. this.getTMRNameList()
  3249. }else if(this.tab.radio == '6'){
  3250. this.tab.isDriver = false
  3251. this.tab.isFormulaName = false
  3252. this.tab.isHouseName = false
  3253. this.tab.isLivestockType = false
  3254. this.tab.isTrainNumber = false
  3255. this.tab.isTMRName = false
  3256. this.tab.isFeed = true
  3257. this.tab.table.getdataListParm.offset = 1
  3258. this.getTabList()
  3259. }else if(this.tab.radio == '7'){
  3260. this.tab.isDriver = false
  3261. this.tab.isFormulaName = false
  3262. this.tab.isHouseName = false
  3263. this.tab.isLivestockType = false
  3264. this.tab.isTrainNumber = false
  3265. this.tab.isTMRName = false
  3266. this.tab.isFeed = false
  3267. this.tab.table.getdataListParm.offset = 1
  3268. this.getTabList()
  3269. this.tab.table2.getdataListParm.offset = 1
  3270. this.getTabList2()
  3271. }
  3272. this.tab.table2.getdataListParm.parammaps.fname = this.tab.table.getdataListParm.parammaps.fname
  3273. },
  3274. handleRefresh1(){
  3275. this.tab.table.getdataListParm.parammaps.fname = ''
  3276. this.tab.table.getdataListParm.parammaps.projname = ''
  3277. this.tab.table.getdataListParm.parammaps.times = ''
  3278. this.tab.table.getdataListParm.parammaps.hlwc1 = undefined
  3279. this.tab.table.getdataListParm.parammaps.hlwc2 = undefined
  3280. this.tab.table.getdataListParm.parammaps.hlzq1 = undefined
  3281. this.tab.table.getdataListParm.parammaps.hlzq2 = undefined
  3282. this.tab.table.getdataListParm.parammaps.hlzql1 = undefined
  3283. this.tab.table.getdataListParm.parammaps.hlzql2 = undefined
  3284. this.tab.table.getdataListParm.parammaps.slwc1 = undefined
  3285. this.tab.table.getdataListParm.parammaps.slwc2 = undefined
  3286. this.tab.table.getdataListParm.parammaps.slzq1 = undefined
  3287. this.tab.table.getdataListParm.parammaps.slzq2 = undefined
  3288. this.tab.table.getdataListParm.parammaps.slzql1 = undefined
  3289. this.tab.table.getdataListParm.parammaps.slzql2 = undefined
  3290. this.tab.table.getdataListParm.parammaps.templetname = ''
  3291. this.tab.table.getdataListParm.parammaps.startdate = undefined
  3292. this.tab.table.getdataListParm.parammaps.enddate = undefined
  3293. this.tab.table.getdataListParm.parammaps.error = false
  3294. this.form_search()
  3295. },
  3296. handleBefore() {
  3297. this.$forceUpdate()
  3298. if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
  3299. var start = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
  3300. var stop = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
  3301. if (stop > Date.now() - 8.64e7) {
  3302. this.Nextdisabled = true
  3303. this.Beforedisabled = false
  3304. } else {
  3305. this.Nextdisabled = false
  3306. this.Beforedisabled = false
  3307. }
  3308. this.tab.table.getdataListParm.parammaps.inputDatetime = []
  3309. this.tab.table.getdataListParm.parammaps.inputDatetime.length = 0
  3310. this.tab.table.getdataListParm.parammaps.inputDatetime.push(start, stop)
  3311. this.$forceUpdate()
  3312. }
  3313. this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  3314. this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  3315. this.getTabList()
  3316. this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
  3317. this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
  3318. this.getTabList2()
  3319. this.getTMRNameList()
  3320. },
  3321. handleNext() {
  3322. this.$forceUpdate()
  3323. if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
  3324. var start2 = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
  3325. var stop2 = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
  3326. if (stop2 > Date.now() - 8.64e7) {
  3327. this.Nextdisabled = true
  3328. this.Beforedisabled = false
  3329. } else {
  3330. this.Nextdisabled = false
  3331. this.Beforedisabled = false
  3332. }
  3333. this.tab.table.getdataListParm.parammaps.inputDatetime = []
  3334. this.tab.table.getdataListParm.parammaps.inputDatetime.length = 0
  3335. this.tab.table.getdataListParm.parammaps.inputDatetime.push(start2, stop2)
  3336. this.$forceUpdate()
  3337. }
  3338. this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  3339. this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  3340. this.getTabList()
  3341. this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
  3342. this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
  3343. this.getTabList2()
  3344. this.getTMRNameList()
  3345. },
  3346. handleBefore2() {
  3347. this.$forceUpdate()
  3348. if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
  3349. var start3 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
  3350. var stop3 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
  3351. if (stop3 > Date.now() - 8.64e7) {
  3352. this.Nextdisabled = true
  3353. this.Beforedisabled = false
  3354. } else {
  3355. this.Nextdisabled = false
  3356. this.Beforedisabled = false
  3357. }
  3358. this.tab2.table.getdataListParm.parammaps.inputDatetime = []
  3359. this.tab2.table.getdataListParm.parammaps.inputDatetime.length = 0
  3360. this.tab2.table.getdataListParm.parammaps.inputDatetime.push(start3, stop3)
  3361. this.$forceUpdate()
  3362. }
  3363. this.tab2.table.getdataListParm.parammaps.startTime = parseTime(start3, '{y}-{m}-{d}')
  3364. this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(stop3, '{y}-{m}-{d}')
  3365. this.getTab2List()
  3366. this.getTMRNameList2()
  3367. },
  3368. handleNext2() {
  3369. if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
  3370. var start4 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
  3371. var stop4 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
  3372. if (stop4 > Date.now() - 8.64e7) {
  3373. this.Nextdisabled = true
  3374. this.Beforedisabled = false
  3375. } else {
  3376. this.Nextdisabled = false
  3377. this.Beforedisabled = false
  3378. }
  3379. this.tab2.table.getdataListParm.parammaps.inputDatetime = []
  3380. this.tab2.table.getdataListParm.parammaps.inputDatetime.length = 0
  3381. this.tab2.table.getdataListParm.parammaps.inputDatetime.push(start4, stop4)
  3382. this.$forceUpdate()
  3383. }
  3384. this.tab2.table.getdataListParm.parammaps.startTime = parseTime(start4, '{y}-{m}-{d}')
  3385. this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(start4, '{y}-{m}-{d}')
  3386. this.getTab2List()
  3387. this.getTMRNameList2()
  3388. },
  3389. handleBefore3() {
  3390. this.$forceUpdate()
  3391. if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime !== null) {
  3392. var start5 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
  3393. var stop5 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
  3394. if (stop5 > Date.now() - 8.64e7) {
  3395. this.Nextdisabled = true
  3396. this.Beforedisabled = false
  3397. } else {
  3398. this.Nextdisabled = false
  3399. this.Beforedisabled = false
  3400. }
  3401. this.tab3.table.getdataListParm.parammaps.inputDatetime = []
  3402. this.tab3.table.getdataListParm.parammaps.inputDatetime.length = 0
  3403. this.tab3.table.getdataListParm.parammaps.inputDatetime.push(start5, stop5)
  3404. this.$forceUpdate()
  3405. }
  3406. this.tab3.table.getdataListParm.parammaps.startTime = parseTime(start5, '{y}-{m}-{d}')
  3407. this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(stop5, '{y}-{m}-{d}')
  3408. this.getTab3List()
  3409. this.getTMRNameList3()
  3410. },
  3411. handleNext3() {
  3412. if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime !== null) {
  3413. var start6 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
  3414. var stop6 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
  3415. if (stop6 > Date.now() - 8.64e7) {
  3416. this.Nextdisabled = true
  3417. this.Beforedisabled = false
  3418. } else {
  3419. this.Nextdisabled = false
  3420. this.Beforedisabled = false
  3421. }
  3422. this.tab3.table.getdataListParm.parammaps.inputDatetime = []
  3423. this.tab3.table.getdataListParm.parammaps.inputDatetime.length = 0
  3424. this.tab3.table.getdataListParm.parammaps.inputDatetime.push(start6, stop6)
  3425. this.$forceUpdate()
  3426. }
  3427. this.tab3.table.getdataListParm.parammaps.startTime = parseTime(start6, '{y}-{m}-{d}')
  3428. this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(stop6, '{y}-{m}-{d}')
  3429. this.getTab3List()
  3430. this.getTMRNameList3()
  3431. },
  3432. // 快速跳转到图表
  3433. handleQuickJumpChart() {
  3434. var myHeight = document.getElementById('table').offsetHeight + 120
  3435. window.scrollTo(myHeight, myHeight)
  3436. },
  3437. // 快速回到顶部
  3438. handleQuickJumpTop() {
  3439. window.scrollTo(0, 0)
  3440. },
  3441. // 配方准确率
  3442. changeStatisticChart1(arr) {
  3443. var arr1 = []
  3444. if(arr !== null){
  3445. for (let i = 0; i < arr.length; i++) {
  3446. if (arr[i] !== 'all') {
  3447. arr1.push(arr[i])
  3448. }
  3449. }
  3450. }
  3451. this.tab.chart1.getdataListParm.parammaps.statisticsList = arr1
  3452. var arrData3 = []
  3453. if(this.tab.chart1.getdataListParm.parammaps.statisticsList !== null){
  3454. for (let i = 0; i < this.tab.chart1.getdataListParm.parammaps.statisticsList.length; i++) {
  3455. const myId = this.tab.chart1.statisticsList.find(obj => obj.name == this.tab.chart1.getdataListParm.parammaps.statisticsList[i]).id
  3456. if(this.tab.chart1.chart1Data3 !== null){
  3457. for (let j = 0; j < this.tab.chart1.chart1Data3.length; j++) {
  3458. if (j == myId) {
  3459. arrData3.push(this.tab.chart1.chart1Data3[j])
  3460. }
  3461. }
  3462. }
  3463. }
  3464. }
  3465. this.tab.chart1.chartLine_data.data3 = arrData3
  3466. this.tab.chart1.chartLine_data.data1 = this.tab.chart1.getdataListParm.parammaps.statisticsList
  3467. this.roadChartLine1(this.tab.chart1.chartLine_data)
  3468. },
  3469. // 配方准确率
  3470. getChart1() {
  3471. this.tab.chart1.listLoading = true
  3472. const url = 'authdata/chart/accuracyAllFT'
  3473. const data = {}
  3474. data.parammaps = {}
  3475. if (this.tab.chart2.getdataListParm.parammaps.specificDate == '1') {
  3476. data.parammaps.pastureid = this.tab.chart2.getdataListParm.parammaps.pastureid
  3477. data.parammaps.startTime = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  3478. data.parammaps.stopTime = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  3479. data.parammaps.status = this.tab.chart2.getdataListParm.parammaps.status
  3480. } else {
  3481. data.parammaps.pastureid = this.tab.chart2.getdataListParm.parammaps.pastureid
  3482. data.parammaps.startTime = this.tab.chart2.getdataListParm.parammaps.startTime
  3483. data.parammaps.stopTime = this.tab.chart2.getdataListParm.parammaps.stopTime
  3484. data.parammaps.status = this.tab.chart2.getdataListParm.parammaps.status
  3485. }
  3486. postJson(url, data).then(response => {
  3487. if (response.data !== null && response.data.list !== null && response.data.data !== null) {
  3488. for (let i = 0; i < response.data.data.length; i++) {
  3489. for (let i = 0; i < response.data.data.length; i++) {
  3490. if (response.data.data[i].准确率 !== '' && response.data.data[i].准确率 !== undefined) {
  3491. response.data.data[i].准确率 = parseFloat(response.data.data[i].准确率) + '%'
  3492. }
  3493. if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
  3494. response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
  3495. }
  3496. if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
  3497. response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
  3498. }
  3499. }
  3500. }
  3501. this.tab.chart1.table.list = response.data.data
  3502. this.tab.chart1.chartLine_data = response.data.list
  3503. this.tab.chart1.statisticsList = []
  3504. this.tab.chart1.getdataListParm.parammaps.statisticsList = []
  3505. if(response.data.list.data1 !== null){
  3506. for (let i = 0; i < response.data.list.data1.length; i++) {
  3507. this.tab.chart1.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
  3508. var obj = {}
  3509. obj.id = i
  3510. obj.name = response.data.list.data1[i]
  3511. this.tab.chart1.statisticsList.push(obj)
  3512. }
  3513. }
  3514. console.log(this.tab.chart1.statisticsList, '配方准确率下拉内容')
  3515. this.tab.chart1.chart1Data3 = response.data.list.data3
  3516. this.tab.chart1.total = response.data.total
  3517. console.log('配方准确率表数据', this.tab.chart1.table.list)
  3518. console.log('配方准确率图数据', this.tab.chart1.chartLine_data)
  3519. var arrData3 = []
  3520. if(this.tab.chart1.getdataListParm.parammaps.statisticsList !== null){
  3521. for (let i = 0; i < this.tab.chart1.getdataListParm.parammaps.statisticsList.length; i++) {
  3522. const myId = this.tab.chart1.statisticsList.find(obj => obj.name == this.tab.chart1.getdataListParm.parammaps.statisticsList[i]).id
  3523. if(this.tab.chart1.chart1Data3 !== null){
  3524. for (let j = 0; j < this.tab.chart1.chart1Data3.length; j++) {
  3525. if (j == myId) {
  3526. this.tab.chart1.chart1Data3[j].checkedState = true
  3527. arrData3.push(this.tab.chart1.chart1Data3[j])
  3528. }
  3529. }
  3530. }
  3531. }
  3532. }
  3533. this.tab.chart1.chartLine_data.data3 = arrData3
  3534. this.tab.chart1.chartLine_data.data1 = this.tab.chart1.getdataListParm.parammaps.statisticsList
  3535. this.roadChartLine1(this.tab.chart1.chartLine_data)
  3536. } else {
  3537. this.tab.chart1.list = []
  3538. }
  3539. setTimeout(() => {
  3540. this.tab.chart1.listLoading = false
  3541. }, 100)
  3542. })
  3543. },
  3544. roadChartLine1(chartLine_data) {
  3545. if (this.tab.chart1.chartLine != null) {
  3546. this.tab.chart1.chartLine.dispose()
  3547. }
  3548. this.tab.chart1.chartLine = echarts.init(document.getElementById('chartLine1'),null,{renderer: "svg"})
  3549. var option = {
  3550. title: {
  3551. text: ''
  3552. },
  3553. tooltip: {
  3554. trigger: 'axis'
  3555. },
  3556. legend: {
  3557. data: chartLine_data.data1,
  3558. right: 10, show: true, type: 'scroll'
  3559. },
  3560. grid: {
  3561. top: '20%',
  3562. left: '5%',
  3563. right: '8%',
  3564. containLabel: true
  3565. },
  3566. toolbox: {
  3567. show: true,
  3568. right: '2%',
  3569. feature: {}
  3570. },
  3571. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name:this.$t('errorAnalysis.date') },
  3572. yAxis: {
  3573. min:0, //取0为最小刻度
  3574. max: 100, //取100为最大刻度
  3575. min:'min', //取最小值为最小刻度
  3576. max: 'max', //取最大值为最大刻度
  3577. min: function(value) {//取最小值向下取整为最小刻度
  3578. return Math.floor(value.min)
  3579. },
  3580. max: function(value) {//取最大值向上取整为最大刻度
  3581. return Math.ceil(value.max)
  3582. },
  3583. type: 'value', name: this.$t('errorAnalysis.bfb') , axisLabel: { formatter: '{value} %' }
  3584. },
  3585. series: (function() {
  3586. var serie = []
  3587. if(chartLine_data.data3 !== null){
  3588. for (var i = 0; i < chartLine_data.data3.length; i++) {
  3589. var item = {
  3590. name: chartLine_data.data1[i],
  3591. type: 'line',
  3592. data: chartLine_data.data3[i].data
  3593. }
  3594. serie.push(item)
  3595. }
  3596. }
  3597. return serie
  3598. }())
  3599. }
  3600. this.tab.chart1.chartLine.setOption(option)
  3601. window.onresize = ()=> {
  3602. this.tab.chart1.chartLine.resize()
  3603. }
  3604. },
  3605. // 计划统计
  3606. getChart2() {
  3607. this.tab.chart2.listLoading = true
  3608. const url = 'authdata/chart/accuracyAllJH'
  3609. const data = {}
  3610. data.parammaps = {}
  3611. if (this.tab.chart2.getdataListParm.parammaps.specificDate == '1') {
  3612. data.parammaps.pastureid = this.tab.chart2.getdataListParm.parammaps.pastureid
  3613. data.parammaps.startTime = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  3614. data.parammaps.stopTime = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  3615. data.parammaps.status = this.tab.chart2.getdataListParm.parammaps.status
  3616. } else {
  3617. data.parammaps.pastureid = this.tab.chart2.getdataListParm.parammaps.pastureid
  3618. data.parammaps.startTime = this.tab.chart2.getdataListParm.parammaps.startTime
  3619. data.parammaps.stopTime = this.tab.chart2.getdataListParm.parammaps.stopTime
  3620. data.parammaps.status = this.tab.chart2.getdataListParm.parammaps.status
  3621. }
  3622. postJson(url, data).then(response => {
  3623. if (response.data !== null && response.data.list !== null && response.data.data !== null) {
  3624. for (let i = 0; i < response.data.data.length; i++) {
  3625. if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
  3626. response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
  3627. }
  3628. if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
  3629. response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
  3630. }
  3631. if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
  3632. response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
  3633. }
  3634. if (response.data.data[i].计划取消重量 !== '' && response.data.data[i].计划取消重量 !== undefined) {
  3635. response.data.data[i].计划取消重量 = parseFloat(response.data.data[i].计划取消重量)
  3636. }
  3637. if (response.data.data[i].field3 !== '' && response.data.data[i].field3 !== undefined) {
  3638. response.data.data[i].field3 = parseFloat(response.data.data[i].field3)
  3639. }
  3640. if (response.data.data[i].正确数 !== '' && response.data.data[i].正确数 !== undefined) {
  3641. response.data.data[i].正确数 = parseFloat(response.data.data[i].正确数)
  3642. }
  3643. if (response.data.data[i].计划数 !== '' && response.data.data[i].计划数 !== undefined) {
  3644. response.data.data[i].计划数 = parseFloat(response.data.data[i].计划数)
  3645. }
  3646. if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
  3647. response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
  3648. }
  3649. }
  3650. this.tab.chart2.table.list = response.data.data
  3651. this.tab.chart2.chartLine_data = response.data.list
  3652. this.tab.chart2.total = response.data.total
  3653. console.log('计划统计图数据', this.tab.chart2.chartLine_data)
  3654. console.log('计划统计表数据', this.tab.chart2.table.list)
  3655. this.roadChartLine2(this.tab.chart2.chartLine_data)
  3656. } else {
  3657. this.tab.chart2.list = []
  3658. }
  3659. setTimeout(() => {
  3660. this.tab.chart2.listLoading = false
  3661. }, 100)
  3662. })
  3663. },
  3664. roadChartLine2(chartLine_data) {
  3665. if (this.tab.chart2.chartLine != null) {
  3666. this.tab.chart2.chartLine.dispose()
  3667. }
  3668. this.tab.chart2.chartLine = echarts.init(document.getElementById('chartLine2'),null,{renderer: "svg"})
  3669. var option = {
  3670. title: {
  3671. text: ''
  3672. },
  3673. tooltip: {
  3674. trigger: 'axis'
  3675. },
  3676. legend: {
  3677. data: [this.$t('errorAnalysis.jhzql'),this.$t('errorAnalysis.jhzql1'),this.$t('errorAnalysis.jhzqll')],
  3678. right: 10
  3679. },
  3680. grid: {
  3681. top: '20%',
  3682. left: '5%',
  3683. right: '8%',
  3684. containLabel: true
  3685. },
  3686. toolbox: {
  3687. show: true,
  3688. right: '2%',
  3689. feature: {}
  3690. },
  3691. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data1, name:this.$t('errorAnalysis.date') },
  3692. yAxis: {
  3693. min:0, //取0为最小刻度
  3694. max: 100, //取100为最大刻度
  3695. min:'min', //取最小值为最小刻度
  3696. max: 'max', //取最大值为最大刻度
  3697. min: function(value) {//取最小值向下取整为最小刻度
  3698. return Math.floor(value.min)
  3699. },
  3700. max: function(value) {//取最大值向上取整为最大刻度
  3701. return Math.ceil(value.max)
  3702. },
  3703. type: 'value', name: this.$t('errorAnalysis.bfb') , axisLabel: { formatter: '{value} %' }
  3704. },
  3705. series: [
  3706. { name: this.$t('errorAnalysis.jhzql'), type: 'line', data: chartLine_data.data2 },
  3707. { name: this.$t('errorAnalysis.jhzql1'), type: 'line', data: chartLine_data.data3 },
  3708. { name: this.$t('errorAnalysis.jhzqll'), type: 'line', data: chartLine_data.data4 }
  3709. ]
  3710. }
  3711. this.tab.chart2.chartLine.setOption(option)
  3712. window.onresize = ()=> {
  3713. this.tab.chart2.chartLine.resize()
  3714. }
  3715. },
  3716. // 牛群准确率
  3717. changeStatisticChart3(arr) {
  3718. var arr1 = []
  3719. for (let i = 0; i < arr.length; i++) {
  3720. if (arr[i] !== 'all') {
  3721. arr1.push(arr[i])
  3722. }
  3723. }
  3724. this.tab.chart3.getdataListParm.parammaps.statisticsList = arr1
  3725. var arrData3 = []
  3726. for (let i = 0; i < this.tab.chart3.getdataListParm.parammaps.statisticsList.length; i++) {
  3727. const myId = this.tab.chart3.statisticsList.find(obj => obj.name == this.tab.chart3.getdataListParm.parammaps.statisticsList[i]).id
  3728. for (let j = 0; j < this.tab.chart3.chart3Data3.length; j++) {
  3729. if (j == myId) {
  3730. arrData3.push(this.tab.chart3.chart3Data3[j])
  3731. }
  3732. }
  3733. }
  3734. this.tab.chart3.chartLine_data.data3 = arrData3
  3735. this.tab.chart3.chartLine_data.data1 = this.tab.chart3.getdataListParm.parammaps.statisticsList
  3736. this.roadChartLine3(this.tab.chart3.chartLine_data)
  3737. },
  3738. // 牛群准确率
  3739. getChart3() {
  3740. this.tab.chart3.listLoading = true
  3741. const url = 'authdata/chart/accuracyAllNQ'
  3742. const data = {}
  3743. data.parammaps = {}
  3744. if (this.tab.chart3.getdataListParm.parammaps.specificDate == '1') {
  3745. data.parammaps.pastureid = this.tab.chart3.getdataListParm.parammaps.pastureid
  3746. data.parammaps.startTime = parseTime(this.tab.chart3.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  3747. data.parammaps.stopTime = parseTime(this.tab.chart3.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  3748. data.parammaps.status = this.tab.chart3.getdataListParm.parammaps.status
  3749. } else {
  3750. data.parammaps.pastureid = this.tab.chart3.getdataListParm.parammaps.pastureid
  3751. data.parammaps.startTime = this.tab.chart3.getdataListParm.parammaps.startTime
  3752. data.parammaps.stopTime = this.tab.chart3.getdataListParm.parammaps.stopTime
  3753. data.parammaps.status = this.tab.chart3.getdataListParm.parammaps.status
  3754. }
  3755. postJson(url, data).then(response => {
  3756. if (response.data !== null && response.data.list !== null && response.data.data !== null) {
  3757. for (let i = 0; i < response.data.data.length; i++) {
  3758. if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
  3759. response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
  3760. }
  3761. if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
  3762. response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
  3763. }
  3764. if (response.data.data[i].准确率 !== '' && response.data.data[i].准确率 !== undefined) {
  3765. response.data.data[i].准确率 = parseFloat(response.data.data[i].准确率) + '%'
  3766. }
  3767. }
  3768. this.tab.chart3.table.list = response.data.data
  3769. this.tab.chart3.chartLine_data = response.data.list
  3770. this.tab.chart3.total = response.data.total
  3771. this.tab.chart3.statisticsList = []
  3772. this.tab.chart3.getdataListParm.parammaps.statisticsList = []
  3773. for (let i = 0; i < response.data.list.data1.length; i++) {
  3774. // if (i < 10) {
  3775. this.tab.chart3.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
  3776. // }
  3777. var obj = {}
  3778. obj.id = i
  3779. obj.name = response.data.list.data1[i]
  3780. this.tab.chart3.statisticsList.push(obj)
  3781. }
  3782. this.tab.chart3.chart3Data3 = response.data.list.data3
  3783. this.tab.chart3.total = response.data.total
  3784. console.log('牛群准确率图数据', this.tab.chart3.chartLine_data)
  3785. console.log('牛群准确率表数据', this.tab.chart3.table.list)
  3786. var arrData3 = []
  3787. for (let i = 0; i < this.tab.chart3.getdataListParm.parammaps.statisticsList.length; i++) {
  3788. const myId = this.tab.chart3.statisticsList.find(obj => obj.name == this.tab.chart3.getdataListParm.parammaps.statisticsList[i]).id
  3789. for (let j = 0; j < this.tab.chart3.chart3Data3.length; j++) {
  3790. if (j == myId) {
  3791. arrData3.push(this.tab.chart3.chart3Data3[j])
  3792. }
  3793. }
  3794. }
  3795. this.tab.chart3.chartLine_data.data3 = arrData3
  3796. this.tab.chart3.chartLine_data.data1 = this.tab.chart3.getdataListParm.parammaps.statisticsList
  3797. this.roadChartLine3(this.tab.chart3.chartLine_data)
  3798. } else {
  3799. this.tab.chart3.list = []
  3800. }
  3801. setTimeout(() => {
  3802. this.tab.chart3.listLoading = false
  3803. }, 100)
  3804. })
  3805. },
  3806. roadChartLine3(chartLine_data) {
  3807. if (this.tab.chart3.chartLine != null) {
  3808. this.tab.chart3.chartLine.dispose()
  3809. }
  3810. this.tab.chart3.chartLine = echarts.init(document.getElementById('chartLine3'),null,{renderer: "svg"})
  3811. var option = {
  3812. title: {
  3813. text: ''
  3814. },
  3815. tooltip: {
  3816. trigger: 'axis'
  3817. },
  3818. legend: {
  3819. data: chartLine_data.data1,
  3820. right: 10, show: true, type: 'scroll'
  3821. },
  3822. grid: {
  3823. top: '20%',
  3824. left: '5%',
  3825. right: '8%',
  3826. containLabel: true
  3827. },
  3828. toolbox: {
  3829. show: true,
  3830. right: '2%',
  3831. feature: {}
  3832. },
  3833. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name:this.$t('errorAnalysis.date') },
  3834. yAxis: {
  3835. min:0, //取0为最小刻度
  3836. max: 100, //取100为最大刻度
  3837. min:'min', //取最小值为最小刻度
  3838. max: 'max', //取最大值为最大刻度
  3839. min: function(value) {//取最小值向下取整为最小刻度
  3840. return Math.floor(value.min)
  3841. },
  3842. max: function(value) {//取最大值向上取整为最大刻度
  3843. return Math.ceil(value.max)
  3844. },
  3845. type: 'value', name: this.$t('errorAnalysis.bfb') , axisLabel: { formatter: '{value} %' }
  3846. },
  3847. series: (function() {
  3848. var serie = []
  3849. for (var i = 0; i < chartLine_data.data3.length; i++) {
  3850. var item = {
  3851. name: chartLine_data.data1[i],
  3852. type: 'line',
  3853. data: chartLine_data.data3[i].data
  3854. }
  3855. serie.push(item)
  3856. }
  3857. return serie
  3858. }())
  3859. }
  3860. this.tab.chart3.chartLine.setOption(option)
  3861. window.onresize = ()=> {
  3862. this.tab.chart3.chartLine.resize()
  3863. }
  3864. },
  3865. // 车辆准确率(重量)
  3866. changeStatisticChart4(arr) {
  3867. var arr1 = []
  3868. for (let i = 0; i < arr.length; i++) {
  3869. if (arr[i] !== 'all') {
  3870. arr1.push(arr[i])
  3871. }
  3872. }
  3873. this.tab.chart4.getdataListParm.parammaps.statisticsList = arr1
  3874. var arrData3 = []
  3875. for (let i = 0; i < this.tab.chart4.getdataListParm.parammaps.statisticsList.length; i++) {
  3876. const myId = this.tab.chart4.statisticsList.find(obj => obj.name == this.tab.chart4.getdataListParm.parammaps.statisticsList[i]).id
  3877. for (let j = 0; j < this.tab.chart4.chart4Data3.length; j++) {
  3878. if (j == myId) {
  3879. arrData3.push(this.tab.chart4.chart4Data3[j])
  3880. }
  3881. }
  3882. }
  3883. this.tab.chart4.chartLine_data.data3 = arrData3
  3884. this.tab.chart4.chartLine_data.data1 = this.tab.chart4.getdataListParm.parammaps.statisticsList
  3885. this.roadChartLine4(this.tab.chart4.chartLine_data)
  3886. },
  3887. // 车辆准确率
  3888. getChart4() {
  3889. this.tab.chart4.listLoading = true
  3890. const url = 'authdata/chart/accuracyAllCC'
  3891. const data = {}
  3892. data.parammaps = {}
  3893. if (this.tab.chart4.getdataListParm.parammaps.specificDate == '1') {
  3894. data.parammaps.pastureid = this.tab.chart4.getdataListParm.parammaps.pastureid
  3895. data.parammaps.startTime = parseTime(this.tab.chart4.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  3896. data.parammaps.stopTime = parseTime(this.tab.chart4.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  3897. data.parammaps.status = this.tab.chart4.getdataListParm.parammaps.status
  3898. } else {
  3899. data.parammaps.pastureid = this.tab.chart4.getdataListParm.parammaps.pastureid
  3900. data.parammaps.startTime = this.tab.chart4.getdataListParm.parammaps.startTime
  3901. data.parammaps.stopTime = this.tab.chart4.getdataListParm.parammaps.stopTime
  3902. data.parammaps.status = this.tab.chart4.getdataListParm.parammaps.status
  3903. }
  3904. postJson(url, data).then(response => {
  3905. if (response.data !== null && response.data.list !== null && response.data.data !== null) {
  3906. for (let i = 0; i < response.data.data.length; i++) {
  3907. if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
  3908. response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
  3909. }
  3910. if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
  3911. response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
  3912. }
  3913. if (response.data.data[i].准确率 !== '' && response.data.data[i].准确率 !== undefined) {
  3914. response.data.data[i].准确率 = parseFloat(response.data.data[i].准确率) + '%'
  3915. }
  3916. }
  3917. this.tab.chart4.table.list = response.data.data
  3918. this.tab.chart4.chartLine_data = response.data.list
  3919. this.tab.chart4.total = response.data.total
  3920. this.tab.chart4.statisticsList = []
  3921. this.tab.chart4.getdataListParm.parammaps.statisticsList = []
  3922. for (let i = 0; i < response.data.list.data1.length; i++) {
  3923. // if (i < 10) {
  3924. this.tab.chart4.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
  3925. // }
  3926. var obj = {}
  3927. obj.id = i
  3928. obj.name = response.data.list.data1[i]
  3929. this.tab.chart4.statisticsList.push(obj)
  3930. }
  3931. this.tab.chart4.chart4Data3 = response.data.list.data3
  3932. this.tab.chart4.total = response.data.total
  3933. console.log('车辆准确率(重量)图', this.tab.chart4.chartLine_data)
  3934. console.log('车辆准确率(重量)表', this.tab.chart4.table.list)
  3935. var arrData3 = []
  3936. for (let i = 0; i < this.tab.chart4.getdataListParm.parammaps.statisticsList.length; i++) {
  3937. const myId = this.tab.chart4.statisticsList.find(obj => obj.name == this.tab.chart4.getdataListParm.parammaps.statisticsList[i]).id
  3938. for (let j = 0; j < this.tab.chart4.chart4Data3.length; j++) {
  3939. if (j == myId) {
  3940. arrData3.push(this.tab.chart4.chart4Data3[j])
  3941. }
  3942. }
  3943. }
  3944. this.tab.chart4.chartLine_data.data3 = arrData3
  3945. this.tab.chart4.chartLine_data.data1 = this.tab.chart4.getdataListParm.parammaps.statisticsList
  3946. this.roadChartLine4(this.tab.chart4.chartLine_data)
  3947. } else {
  3948. this.tab.chart4.list = []
  3949. }
  3950. setTimeout(() => {
  3951. this.tab.chart4.listLoading = false
  3952. }, 100)
  3953. })
  3954. },
  3955. roadChartLine4(chartLine_data) {
  3956. if (this.tab.chart4.chartLine != null) {
  3957. this.tab.chart4.chartLine.dispose()
  3958. }
  3959. this.tab.chart4.chartLine = echarts.init(document.getElementById('chartLine4'),null,{renderer: "svg"})
  3960. var option = {
  3961. title: {
  3962. text: ''
  3963. },
  3964. tooltip: {
  3965. trigger: 'axis'
  3966. },
  3967. legend: {
  3968. data: chartLine_data.data1,
  3969. right: 10, show: true, type: 'scroll'
  3970. },
  3971. grid: {
  3972. top: '20%',
  3973. left: '5%',
  3974. right: '8%',
  3975. containLabel: true
  3976. },
  3977. toolbox: {
  3978. show: true,
  3979. right: '2%',
  3980. feature: {}
  3981. },
  3982. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name:this.$t('errorAnalysis.date') },
  3983. yAxis: {
  3984. min:0, //取0为最小刻度
  3985. max: 100, //取100为最大刻度
  3986. min:'min', //取最小值为最小刻度
  3987. max: 'max', //取最大值为最大刻度
  3988. min: function(value) {//取最小值向下取整为最小刻度
  3989. return Math.floor(value.min)
  3990. },
  3991. max: function(value) {//取最大值向上取整为最大刻度
  3992. return Math.ceil(value.max)
  3993. },
  3994. type: 'value', name: this.$t('errorAnalysis.bfb') , axisLabel: { formatter: '{value} %' }
  3995. },
  3996. series: (function() {
  3997. var serie = []
  3998. for (var i = 0; i < chartLine_data.data3.length; i++) {
  3999. var item = {
  4000. name: chartLine_data.data1[i],
  4001. type: 'line',
  4002. data: chartLine_data.data3[i].data
  4003. }
  4004. serie.push(item)
  4005. }
  4006. return serie
  4007. }())
  4008. }
  4009. this.tab.chart4.chartLine.setOption(option)
  4010. window.onresize = ()=> {
  4011. this.tab.chart4.chartLine.resize()
  4012. }
  4013. },
  4014. // 混料统计
  4015. getChart5() {
  4016. this.tab.chart5.listLoading = true
  4017. const url = 'authdata/chart/accuracyAllHL'
  4018. const data = {}
  4019. data.parammaps = {}
  4020. if (this.tab.chart5.getdataListParm.parammaps.specificDate == '1') {
  4021. data.parammaps.pastureid = this.tab.chart5.getdataListParm.parammaps.pastureid
  4022. data.parammaps.startTime = parseTime(this.tab.chart5.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  4023. data.parammaps.stopTime = parseTime(this.tab.chart5.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  4024. data.parammaps.status = this.tab.chart5.getdataListParm.parammaps.status
  4025. } else {
  4026. data.parammaps.pastureid = this.tab.chart5.getdataListParm.parammaps.pastureid
  4027. data.parammaps.startTime = this.tab.chart5.getdataListParm.parammaps.startTime
  4028. data.parammaps.stopTime = this.tab.chart5.getdataListParm.parammaps.stopTime
  4029. data.parammaps.status = this.tab.chart5.getdataListParm.parammaps.status
  4030. }
  4031. postJson(url, data).then(response => {
  4032. if (response.data !== null && response.data.list !== null && response.data.data !== null) {
  4033. for (let i = 0; i < response.data.data.length; i++) {
  4034. if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
  4035. response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
  4036. }
  4037. if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
  4038. response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
  4039. }
  4040. if (response.data.data[i].理论自动 !== '' && response.data.data[i].理论自动 !== undefined) {
  4041. response.data.data[i].理论自动 = parseFloat(response.data.data[i].理论自动)
  4042. }
  4043. if (response.data.data[i].实际自动 !== '' && response.data.data[i].实际自动 !== undefined) {
  4044. response.data.data[i].实际自动 = parseFloat(response.data.data[i].实际自动)
  4045. }
  4046. if (response.data.data[i].field3 !== '' && response.data.data[i].field3 !== undefined) {
  4047. response.data.data[i].field3 = parseFloat(response.data.data[i].field3)
  4048. }
  4049. if (response.data.data[i].理论手动 !== '' && response.data.data[i].理论手动 !== undefined) {
  4050. response.data.data[i].理论手动 = parseFloat(response.data.data[i].理论手动)
  4051. }
  4052. if (response.data.data[i].实际手动 !== '' && response.data.data[i].实际手动 !== undefined) {
  4053. response.data.data[i].实际手动 = parseFloat(response.data.data[i].实际手动)
  4054. }
  4055. if (response.data.data[i].field4 !== '' && response.data.data[i].field4 !== undefined) {
  4056. response.data.data[i].field4 = parseFloat(response.data.data[i].field4)
  4057. }
  4058. }
  4059. this.tab.chart5.table.list = response.data.data
  4060. this.tab.chart5.chartLine_data = response.data.list
  4061. this.tab.chart5.total = response.data.total
  4062. console.log('混料统计图', this.tab.chart5.chartLine_data)
  4063. console.log('混料统计表', this.tab.chart5.table.list)
  4064. this.roadChartLine5(this.tab.chart5.chartLine_data)
  4065. } else {
  4066. this.tab.chart5.list = []
  4067. }
  4068. setTimeout(() => {
  4069. this.tab.chart5.listLoading = false
  4070. }, 100)
  4071. })
  4072. },
  4073. roadChartLine5(chartLine_data) {
  4074. if (this.tab.chart5.chartLine != null) {
  4075. this.tab.chart5.chartLine.dispose()
  4076. }
  4077. this.tab.chart5.chartLine = echarts.init(document.getElementById('chartLine5'),null,{renderer: "svg"})
  4078. var option = {
  4079. tooltip: {
  4080. trigger: 'axis',
  4081. axisPointer: {
  4082. type: 'cross',
  4083. crossStyle: {
  4084. color: '#999'
  4085. }
  4086. }
  4087. },
  4088. toolbox: {
  4089. feature: {}
  4090. },
  4091. legend: {
  4092. data: [this.$t('errorAnalysis.zdtzcs'), this.$t('errorAnalysis.sdtzcs'), this.$t('errorAnalysis.zdtzzql'), this.$t('errorAnalysis.sdtzzql')]
  4093. },
  4094. grid: {
  4095. top: '20%',
  4096. left: '5%',
  4097. right: '8%',
  4098. containLabel: true
  4099. },
  4100. xAxis: [
  4101. {
  4102. type: 'category',
  4103. data: chartLine_data.data1,
  4104. axisPointer: {
  4105. type: 'shadow'
  4106. }
  4107. }
  4108. ],
  4109. yAxis: [
  4110. {
  4111. splitLine: { show: false }, type: 'value',
  4112. name: this.$t('errorAnalysis.tzcs'),
  4113. axisLabel: {
  4114. formatter: '{value}'
  4115. }
  4116. },
  4117. {
  4118. splitLine: { show: false }, type: 'value',
  4119. name: this.$t('errorAnalysis.hlzqls'),
  4120. min: 0,
  4121. max: 100,
  4122. interval: 10,
  4123. axisLabel: {
  4124. formatter: '{value} %'
  4125. }
  4126. }
  4127. ],
  4128. series: [
  4129. {
  4130. name: this.$t('errorAnalysis.zdtzcs'),
  4131. type: 'bar',
  4132. data: chartLine_data.data2
  4133. },
  4134. {
  4135. name: this.$t('errorAnalysis.sdtzcs'),
  4136. type: 'bar',
  4137. data: chartLine_data.data3
  4138. },
  4139. {
  4140. name: this.$t('errorAnalysis.zdtzzql'),
  4141. type: 'line',
  4142. yAxisIndex: 1,
  4143. data: chartLine_data.data4
  4144. },
  4145. {
  4146. name: this.$t('errorAnalysis.sdtzzql'),
  4147. type: 'line',
  4148. yAxisIndex: 1,
  4149. data: chartLine_data.data5
  4150. }
  4151. ]
  4152. }
  4153. this.tab.chart5.chartLine.setOption(option)
  4154. window.onresize = ()=> {
  4155. this.tab.chart5.chartLine.resize()
  4156. }
  4157. },
  4158. // 混料计划取消次数
  4159. getChart6() {
  4160. this.tab.chart6.listLoading = true
  4161. const url = 'authdata/chart/accuracyAllQX'
  4162. const data = {}
  4163. data.parammaps = {}
  4164. if (this.tab.chart6.getdataListParm.parammaps.specificDate == '1') {
  4165. data.parammaps.pastureid = this.tab.chart6.getdataListParm.parammaps.pastureid
  4166. data.parammaps.startTime = parseTime(this.tab.chart6.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  4167. data.parammaps.stopTime = parseTime(this.tab.chart6.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  4168. data.parammaps.status = this.tab.chart6.getdataListParm.parammaps.status
  4169. } else {
  4170. data.parammaps.pastureid = this.tab.chart6.getdataListParm.parammaps.pastureid
  4171. data.parammaps.startTime = this.tab.chart6.getdataListParm.parammaps.startTime
  4172. data.parammaps.stopTime = this.tab.chart6.getdataListParm.parammaps.stopTime
  4173. data.parammaps.status = this.tab.chart6.getdataListParm.parammaps.status
  4174. }
  4175. postJson(url, data).then(response => {
  4176. if (response.data !== null && response.data.list !== null && response.data.data !== null) {
  4177. for (let i = 0; i < response.data.data.length; i++) {
  4178. if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
  4179. response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
  4180. }
  4181. }
  4182. this.tab.chart6.table.list = response.data.data
  4183. this.tab.chart6.chartLine_data = response.data.list
  4184. this.tab.chart6.total = response.data.total
  4185. console.log('混料计划取消次数图', this.tab.chart6.chartLine_data)
  4186. console.log('混料计划取消次数表', this.tab.chart6.table.list)
  4187. this.roadChartLine6(this.tab.chart6.chartLine_data)
  4188. } else {
  4189. this.tab.chart6.list = []
  4190. }
  4191. setTimeout(() => {
  4192. this.tab.chart6.listLoading = false
  4193. }, 100)
  4194. })
  4195. },
  4196. roadChartLine6(chartLine_data) {
  4197. if (this.tab.chart6.chartLine != null) {
  4198. this.tab.chart6.chartLine.dispose()
  4199. }
  4200. this.tab.chart6.chartLine = echarts.init(document.getElementById('chartLine6'),null,{renderer: "svg"})
  4201. var option = {
  4202. color: ['#3398DB'],
  4203. tooltip: {
  4204. trigger: 'axis',
  4205. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  4206. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  4207. }
  4208. },
  4209. legend: {
  4210. data: [this.$t('errorAnalysis.qxcs')],
  4211. right: 10, show: true, type: 'scroll'
  4212. },
  4213. grid: {
  4214. top: '20%',
  4215. left: '5%',
  4216. right: '8%',
  4217. containLabel: true
  4218. },
  4219. xAxis: [
  4220. {
  4221. name:this.$t('errorAnalysis.date') ,
  4222. type: 'category',
  4223. data: chartLine_data.data1,
  4224. axisTick: {
  4225. alignWithLabel: true
  4226. }
  4227. }
  4228. ],
  4229. yAxis: [
  4230. {
  4231. name: this.$t('errorAnalysis.not'),
  4232. interval: 1, // 会出现负数刻度
  4233. min: 0,
  4234. type: 'value'
  4235. }
  4236. ],
  4237. series: [
  4238. {
  4239. name: this.$t('errorAnalysis.qxcs'),
  4240. type: 'bar',
  4241. barWidth: '60%',
  4242. data: chartLine_data.data2
  4243. }
  4244. ]
  4245. }
  4246. this.tab.chart6.chartLine.setOption(option)
  4247. window.onresize = ()=> {
  4248. this.tab.chart6.chartLine.resize()
  4249. }
  4250. },
  4251. changeformula(){
  4252. this.getChart7()
  4253. },
  4254. // 栏舍撒料时间统计
  4255. changeStatisticChart7(arr) {
  4256. console.log(arr,'arr')
  4257. var arr1 = []
  4258. for (let i = 0; i < arr.length; i++) {
  4259. if (arr[i] !== 'all') {
  4260. arr1.push(arr[i])
  4261. }
  4262. }
  4263. this.tab.chart7.getdataListParm.parammaps.statisticsList = arr1
  4264. var arrData3 = []
  4265. for (let i = 0; i < this.tab.chart7.getdataListParm.parammaps.statisticsList.length; i++) {
  4266. const myId = this.tab.chart7.statisticsList.find(obj => obj.name == this.tab.chart7.getdataListParm.parammaps.statisticsList[i]).id
  4267. for (let j = 0; j < this.tab.chart7.chart7Data3.length; j++) {
  4268. if (j == myId) {
  4269. arrData3.push(this.tab.chart7.chart7Data3[j])
  4270. }
  4271. }
  4272. }
  4273. this.tab.chart7.chartLine_data.data3 = arrData3
  4274. this.tab.chart7.chartLine_data.data1 = this.tab.chart7.getdataListParm.parammaps.statisticsList
  4275. // console.log(this.tab.chart7.getdataListParm.parammaps.statisticsList,'我要看到v-model')
  4276. // console.log(JSON.parse(this.tab.chart7.statisticsList),'我要看的下拉数据')
  4277. // console.log(JSON.stringify(this.tab.chart7.statisticsList),'我要看的下拉数据')
  4278. this.roadChartLine7(this.tab.chart7.chartLine_data)
  4279. },
  4280. handleScroll() {
  4281. // 获取滚动容器的DOM元素
  4282. const scrollContainer = this.$refs.scrollContainer;
  4283. // 计算滚动条距离底部的距离
  4284. const distanceToBottom = scrollContainer.scrollHeight - (scrollContainer.scrollTop + scrollContainer.clientHeight);
  4285. // 如果滚动条已经滚到最下方
  4286. if (distanceToBottom === 0) {
  4287. console.log('滚动条已经滚到最下方');
  4288. this.getChart7()
  4289. // 在这里可以执行相应的操作
  4290. }
  4291. },
  4292. getChart7() {
  4293. this.tab.chart7.listLoading = true
  4294. const url = 'authdata/chart/accuracyAllLS'
  4295. const data = {}
  4296. data.parammaps = {}
  4297. if (this.tab.chart7.getdataListParm.parammaps.specificDate == '1') {
  4298. data.parammaps.pastureid = this.tab.chart7.getdataListParm.parammaps.pastureid
  4299. data.parammaps.startTime = parseTime(this.tab.chart7.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  4300. data.parammaps.stopTime = parseTime(this.tab.chart7.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  4301. data.parammaps.status = this.tab.chart7.getdataListParm.parammaps.status
  4302. data.parammaps.ftId = this.tab.chart7.getdataListParm.parammaps.ftId.join(",")
  4303. } else {
  4304. data.parammaps.pastureid = this.tab.chart7.getdataListParm.parammaps.pastureid
  4305. data.parammaps.startTime = this.tab.chart7.getdataListParm.parammaps.startTime
  4306. data.parammaps.stopTime = this.tab.chart7.getdataListParm.parammaps.stopTime
  4307. data.parammaps.status = this.tab.chart7.getdataListParm.parammaps.status
  4308. data.parammaps.ftId = this.tab.chart7.getdataListParm.parammaps.ftId.join(",")
  4309. }
  4310. postJson(url, data).then(response => {
  4311. if (response.data !== null && response.data.list !== null && response.data.data !== null) {
  4312. for (let i = 0; i < response.data.data.length; i++) {
  4313. // 撒料时间
  4314. var b = []
  4315. for (let j = 0; j <= response.data.data[i].准确率.length; j++) {
  4316. // console.log(response.data.data[i].准确率)
  4317. if (response.data.data[i].准确率.charAt(j) == '.') {
  4318. b[j] = response.data.data[i].准确率.replace('.', ':')
  4319. }
  4320. }
  4321. response.data.data[i].准确率 = b[b.length - 1]
  4322. response.data.data[i].撒料时间 = response.data.data[i].准确率
  4323. }
  4324. this.tab.chart7.table.list = response.data.data
  4325. this.tab.chart7.chartLine_data = response.data.list
  4326. this.tab.chart7.statisticsList = []
  4327. this.tab.chart7.getdataListParm.parammaps.statisticsList = []
  4328. for (let i = 0; i < response.data.list.data1.length; i++) {
  4329. // 君盛
  4330. // if (i < 10) {
  4331. // this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
  4332. // }
  4333. // 其他牧场
  4334. this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
  4335. var obj = {}
  4336. obj.id = i
  4337. obj.name = response.data.list.data1[i]
  4338. this.tab.chart7.statisticsList.push(obj)
  4339. }
  4340. console.log("------->",this.tab.chart7)
  4341. this.tab.chart7.chart7Data3 = response.data.list.data3
  4342. this.tab.chart7.total = response.data.total
  4343. console.log('栏舍撒料时间统计图', this.tab.chart7.chartLine_data)
  4344. console.log('栏舍撒料时间统计表', this.tab.chart7.table.list)
  4345. var arrData3 = []
  4346. for (let i = 0; i < this.tab.chart7.getdataListParm.parammaps.statisticsList.length; i++) {
  4347. const myId = this.tab.chart7.statisticsList.find(obj => obj.name == this.tab.chart7.getdataListParm.parammaps.statisticsList[i]).id
  4348. for (let j = 0; j < this.tab.chart7.chart7Data3.length; j++) {
  4349. if (j == myId) {
  4350. arrData3.push(this.tab.chart7.chart7Data3[j])
  4351. }
  4352. }
  4353. }
  4354. this.tab.chart7.chartLine_data.data3 = arrData3
  4355. this.tab.chart7.chartLine_data.data1 = this.tab.chart7.getdataListParm.parammaps.statisticsList
  4356. // console.log(this.tab.chart7.getdataListParm.parammaps.statisticsList,'我要看到v-model')
  4357. // console.log(JSON.stringify(this.tab.chart7.statisticsList),'我要看的下拉数据')
  4358. this.roadChartLine7(this.tab.chart7.chartLine_data)
  4359. } else {
  4360. this.tab.chart7.list = []
  4361. }
  4362. setTimeout(() => {
  4363. this.tab.chart7.listLoading = false
  4364. }, 100)
  4365. })
  4366. },
  4367. roadChartLine7(chartLine_data) {
  4368. console.log(chartLine_data,'chartLine_data777')
  4369. if (this.tab.chart7.chartLine != null) {
  4370. this.tab.chart7.chartLine.dispose()
  4371. }
  4372. this.tab.chart7.chartLine = echarts.init(document.getElementById('chartLine7'),null,{renderer: "svg"})
  4373. var option = {
  4374. useWorker: true,
  4375. title: {
  4376. text: ''
  4377. },
  4378. tooltip: {
  4379. trigger: 'axis',
  4380. formatter: function(params) {
  4381. // console.log(params)
  4382. var tip = params[0].name
  4383. if(params !== null && params !== ''){
  4384. for (let i = 0; i < params.length; i++) {
  4385. var b = []
  4386. // var str = params[i].value
  4387. for (let j = 0; j <= params[i].value.length; j++) {
  4388. if (params[i].value !== '') {
  4389. if (params[i].value.charAt(j) == '.') {
  4390. b[j] = params[i].value.replace('.', ':')
  4391. }
  4392. } else {
  4393. b[j] = ''
  4394. }
  4395. }
  4396. tip += '<br>' + params[i].seriesName + ': ' + b[b.length - 1]
  4397. }
  4398. }
  4399. return tip
  4400. }
  4401. },
  4402. legend: {
  4403. data: chartLine_data.data1,
  4404. top:10,right: 10, show: true, type: 'scroll'
  4405. },
  4406. grid: {
  4407. top: '20%',
  4408. left: '5%',
  4409. right: '8%',
  4410. containLabel: true
  4411. },
  4412. toolbox: {
  4413. show: true,
  4414. right: '2%',
  4415. feature: {}
  4416. },
  4417. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name:this.$t('errorAnalysis.date') },
  4418. yAxis: [{
  4419. type: '',
  4420. name: this.$t('errorAnalysis.time'),
  4421. mix: 0,
  4422. max: 24,
  4423. interval: 2,
  4424. axisLabel: {
  4425. formatter: function(value) {
  4426. var texts = []
  4427. if (value < 10) {
  4428. texts.push('0' + value + ':00')
  4429. } else {
  4430. texts.push(value + ':00')
  4431. }
  4432. return texts
  4433. }
  4434. }
  4435. }],
  4436. series: (function() {
  4437. var serie = []
  4438. for (var i = 0; i < chartLine_data.data3.length; i++) {
  4439. var item = {
  4440. name: chartLine_data.data1[i],
  4441. type: 'line',
  4442. data: chartLine_data.data3[i].data
  4443. }
  4444. serie.push(item)
  4445. }
  4446. return serie
  4447. }())
  4448. }
  4449. this.tab.chart7.chartLine.setOption(option)
  4450. if (this.tab.chart7.chartLine != null) {
  4451. window.onresize = ()=> {
  4452. this.tab.chart7.chartLine.resize()
  4453. }
  4454. }
  4455. },
  4456. // 导出
  4457. handleExport(item) {
  4458. if (item == 'chart1') {
  4459. console.log('配方准确率导出')
  4460. var excelDatasTabChart1 = [
  4461. {
  4462. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.feedName'), this.$t('errorAnalysis.jhzl'), this.$t('errorAnalysis.skzl'), this.$t('errorAnalysis.zql')],
  4463. filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
  4464. tableDatas: this.tab.chart1.table.list,
  4465. sheetName: this.$t('errorAnalysis.feedName')
  4466. }
  4467. ]
  4468. json2excel(excelDatasTabChart1, this.$t('errorAnalysis.feedName'), true, 'xlsx')
  4469. } else if (item == 'chart2') {
  4470. console.log('计划统计导出')
  4471. var excelDatasTabChart2 = [
  4472. {
  4473. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.jhzxzl'), this.$t('errorAnalysis.pfllzl'), this.$t('errorAnalysis.jhzql'), this.$t('errorAnalysis.jhqxzl'), this.$t('errorAnalysis.jhzqll'), this.$t('errorAnalysis.jhzql1'), this.$t('errorAnalysis.jhs'), this.$t('errorAnalysis.jhzql1')],
  4474. filterVal: ['日期', '实际量', '理论量', 'field1', '计划取消重量', 'field3', '正确数', '计划数', 'field2'],
  4475. tableDatas: this.tab.chart2.table.list,
  4476. sheetName: "计划统计"
  4477. }
  4478. ]
  4479. json2excel(excelDatasTabChart2, this.$t('errorAnalysis.planName'), true, 'xlsx')
  4480. } else if (item == 'chart3') {
  4481. console.log('牛群准确率导出')
  4482. var excelDatasTabChart3 = [
  4483. {
  4484. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.sxlb'), this.$t('errorAnalysis.jhzl'), this.$t('errorAnalysis.skzl'), this.$t('errorAnalysis.zql')],
  4485. filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
  4486. tableDatas: this.tab.chart3.table.list,
  4487. sheetName: "牛群准确率"
  4488. }
  4489. ]
  4490. json2excel(excelDatasTabChart3, this.$t('errorAnalysis.nqName'), true, 'xlsx')
  4491. } else if (item == 'chart4') {
  4492. console.log('车辆准确率(重量)导出')
  4493. var excelDatasTabChart4 = [
  4494. {
  4495. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.projname'), this.$t('errorAnalysis.jhzl'), this.$t('errorAnalysis.skzl'), this.$t('errorAnalysis.zql')],
  4496. filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
  4497. tableDatas: this.tab.chart4.table.list,
  4498. sheetName: '车辆准确率(重量)'
  4499. }
  4500. ]
  4501. json2excel(excelDatasTabChart4,this.$t('errorAnalysis.clzql'), true, 'xlsx')
  4502. } else if (item == 'chart5') {
  4503. console.log('混料统计导出')
  4504. const table = this.$refs.myTable;
  4505. const columns = table.columns;
  4506. const labels = columns.map(column => column.label);
  4507. console.log('labels',labels)
  4508. var excelDatasTabChart5 = [
  4509. {
  4510. tHeader: labels,
  4511. filterVal: ['日期', 'field1', 'field2', '理论自动', '实际自动', 'field3', '理论手动', '实际手动', 'field4'],
  4512. tableDatas: this.tab.chart5.table.list,
  4513. sheetName: '混料统计'
  4514. }
  4515. ]
  4516. json2excel(excelDatasTabChart5, this.$t('errorAnalysis.hltj'), true, 'xlsx')
  4517. } else if (item == 'chart6') {
  4518. console.log('混料计划取消次数导出')
  4519. var excelDatasTabChart6 = [
  4520. {
  4521. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.hlqxcs')],
  4522. filterVal: ['日期', 'field1'],
  4523. tableDatas: this.tab.chart6.table.list,
  4524. sheetName: '混料计划取消次数'
  4525. }
  4526. ]
  4527. json2excel(excelDatasTabChart6, this.$t('errorAnalysis.hlqxcs'), true, 'xlsx')
  4528. } else if (item == 'chart7') {
  4529. console.log('栏舍撒料时间统计导出')
  4530. var excelDatasTabChart7 = [
  4531. {
  4532. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.pen'), this.$t('errorAnalysis.slsj')],
  4533. filterVal: ['日期', 'fname', '准确率'],
  4534. tableDatas: this.tab.chart7.table.list,
  4535. sheetName: '栏舍撒料时间统计'
  4536. }
  4537. ]
  4538. json2excel(excelDatasTabChart7, this.$t('errorAnalysis.lsslsjtj'), true, 'xlsx')
  4539. }
  4540. },
  4541. // 切换表格
  4542. handleTable(item) {
  4543. // 显示切换表格
  4544. if (item == 'chart1') {
  4545. console.log('配方准确率表格')
  4546. this.tab.chart1.isTable = true
  4547. this.tab.chart1.isChart = false
  4548. } else if (item == 'chart2') {
  4549. console.log('计划统计表格')
  4550. this.tab.chart2.isTable = true
  4551. this.tab.chart2.isChart = false
  4552. } else if (item == 'chart3') {
  4553. console.log('牛群准确率表格')
  4554. this.tab.chart3.isTable = true
  4555. this.tab.chart3.isChart = false
  4556. } else if (item == 'chart4') {
  4557. console.log('车辆准确率(重量)表格')
  4558. this.tab.chart4.isTable = true
  4559. this.tab.chart4.isChart = false
  4560. } else if (item == 'chart5') {
  4561. console.log('混料统计表格')
  4562. this.tab.chart5.isTable = true
  4563. this.tab.chart5.isChart = false
  4564. } else if (item == 'chart6') {
  4565. console.log('混料计划取消次数表格')
  4566. this.tab.chart6.isTable = true
  4567. this.tab.chart6.isChart = false
  4568. } else if (item == 'chart7') {
  4569. console.log('栏舍撒料时间统计表格')
  4570. this.tab.chart7.isTable = true
  4571. this.tab.chart7.isChart = false
  4572. }
  4573. },
  4574. // 切换图表
  4575. handleChart(item) {
  4576. // 显示切换图表
  4577. if (item == 'chart1') {
  4578. console.log('配方准确率图表')
  4579. this.tab.chart1.isTable = false
  4580. this.tab.chart1.isChart = true
  4581. this.getChart1()
  4582. } else if (item == 'chart2') {
  4583. console.log('计划统计图表')
  4584. this.tab.chart2.isTable = false
  4585. this.tab.chart2.isChart = true
  4586. this.getChart2()
  4587. } else if (item == 'chart3') {
  4588. console.log('牛群准确率图表')
  4589. this.tab.chart3.isTable = false
  4590. this.tab.chart3.isChart = true
  4591. this.getChart3()
  4592. } else if (item == 'chart4') {
  4593. console.log('车辆准确率(重量)图表')
  4594. this.tab.chart4.isTable = false
  4595. this.tab.chart4.isChart = true
  4596. this.getChart4()
  4597. } else if (item == 'chart5') {
  4598. console.log('混料统计图表')
  4599. this.tab.chart5.isTable = false
  4600. this.tab.chart5.isChart = true
  4601. this.getChart5()
  4602. } else if (item == 'chart6') {
  4603. console.log('混料计划取消次数图表')
  4604. this.tab.chart6.isTable = false
  4605. this.tab.chart6.isChart = true
  4606. this.getChart6()
  4607. } else if (item == 'chart7') {
  4608. console.log('栏舍撒料时间统计图表')
  4609. this.tab.chart7.isTable = false
  4610. this.tab.chart7.isChart = true
  4611. this.getChart7()
  4612. }
  4613. },
  4614. // 混料统计
  4615. getTab2List() {
  4616. this.tab2.table.listLoading = true
  4617. GetDataByName(this.tab2.table.getdataListParm).then(response => {
  4618. if (response.data.list !== null) {
  4619. console.log('混料统计table数据', response.data.list)
  4620. // this.tab2.table.list = response.data.list
  4621. this.$refs.plTable2.reloadData(response.data.list)
  4622. this.tab2.table.total = response.data.total
  4623. } else {
  4624. this.$refs.plTable2.reloadData([])
  4625. this.tab2.table.total = 0
  4626. // this.tab2.table.list = []
  4627. }
  4628. setTimeout(() => {
  4629. this.tab2.table.listLoading = false
  4630. }, 100)
  4631. })
  4632. },
  4633. form_search2() {
  4634. this.tab2.table.getdataListParm.name = 'getStatisticsHL'
  4635. if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
  4636. console.log(this.tab2.table.getdataListParm.parammaps.inputDatetime)
  4637. this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  4638. this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  4639. } else {
  4640. this.tab2.table.getdataListParm.parammaps.inputDatetime = ''
  4641. this.tab2.table.getdataListParm.parammaps.startTime = ''
  4642. this.tab2.table.getdataListParm.parammaps.stopTime = ''
  4643. }
  4644. // this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
  4645. // this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
  4646. this.tab2.table.getdataListParm.offset = 1
  4647. this.getTab2List()
  4648. this.getTMRNameList2()
  4649. },
  4650. handleRefresh2() {
  4651. this.tab2.table.getdataListParm.parammaps.tmrtname = ''
  4652. this.tab2.table.getdataListParm.parammaps.projname = ''
  4653. this.tab2.table.getdataListParm.parammaps.times = ''
  4654. this.tab2.table.getdataListParm.parammaps.templetname = ''
  4655. this.tab2.table.getdataListParm.parammaps.buttontype = ''
  4656. this.tab2.table.getdataListParm.parammaps.hlwc1 = undefined
  4657. this.tab2.table.getdataListParm.parammaps.hlwc2 = undefined
  4658. this.tab2.table.getdataListParm.parammaps.hlzq1 = undefined
  4659. this.tab2.table.getdataListParm.parammaps.hlzq2 = undefined
  4660. this.tab2.table.getdataListParm.parammaps.hlzql1 = undefined
  4661. this.tab2.table.getdataListParm.parammaps.hlzql2 = undefined
  4662. this.tab2.table.getdataListParm.parammaps.error = false
  4663. this.getTab2List()
  4664. },
  4665. handleExport2() {
  4666. console.log('导出')
  4667. this.exportList.dialogFormVisible = true
  4668. this.exportList.dialogStatus = 'exportList'
  4669. // var excelDatasTab2 = [
  4670. // {
  4671. // tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间'],
  4672. // filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
  4673. // tableDatas: this.tab2.table.list,
  4674. // sheetName: '混料统计'
  4675. // }
  4676. // ]
  4677. // json2excel(excelDatasTab2, '混料统计', true, 'xlsx')
  4678. },
  4679. exportList2(){
  4680. this.isokDisable = true
  4681. var url = 'authdata/GetDataByName'
  4682. var data = {
  4683. 'name':"getStatisticsHL",
  4684. "page":1,"offset":1,"pagecount":"","returntype":"Map",
  4685. "parammaps":{"pastureid":Cookies.get('pastureid'),"startTime":"","stopTime":"","templetname":"","isuse":""}
  4686. }
  4687. data.parammaps.startTime = parseTime(this.exportList.inputDatetime[0],'{y}-{m}-{d}')
  4688. data.parammaps.stopTime = parseTime(this.exportList.inputDatetime[1],'{y}-{m}-{d}')
  4689. data.parammaps.tmrtname = this.tab2.table.getdataListParm.parammaps.tmrtname
  4690. data.parammaps.projname = this.tab2.table.getdataListParm.parammaps.projname
  4691. data.parammaps.times = this.tab2.table.getdataListParm.parammaps.times
  4692. data.parammaps.buttontype = this.tab2.table.getdataListParm.parammaps.buttontype
  4693. data.parammaps.templetname = this.tab2.table.getdataListParm.parammaps.templetname
  4694. data.parammaps.isuse = this.tab2.table.getdataListParm.parammaps.isuse
  4695. postJson(url,data).then(response => {
  4696. var exportList = []
  4697. if (response.data.list !== null) {
  4698. console.log('混料统计table数据', response.data.list)
  4699. exportList = response.data.list
  4700. } else {
  4701. exportList = []
  4702. }
  4703. var excelDatasTab2 = [
  4704. {
  4705. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.tmrnames'), this.$t('errorAnalysis.czNum'),this.$t('errorAnalysis.projname'), this.$t('errorAnalysis.isTrainNumber'), this.$t('errorAnalysis.feedName'),this.$t('errorAnalysis.Driver'), this.$t('errorAnalysis.isFeed'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.wcz'), this.$t('errorAnalysis.zql'), this.$t('errorAnalysis.planTime'), this.$t('errorAnalysis.startTime'), this.$t('errorAnalysis.endTime'), this.$t('errorAnalysis.tzfs'), this.$t('errorAnalysis.stWeight'), this.$t('errorAnalysis.edWeight'), this.$t('errorAnalysis.jsTime'),this.$t('errorAnalysis.isOK'),this.$t('errorAnalysis.area')],
  4706. filterVal: ['日期', 'TMR名称','sort', '车次', '班次', '配方名称','驾驶员', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间','standard','barname'],
  4707. tableDatas: exportList,
  4708. sheetName: '混料统计'
  4709. }
  4710. ]
  4711. json2excel(excelDatasTab2, this.$t('errorAnalysis.hltj'), true, 'xlsx')
  4712. this.isokDisable = false
  4713. this.exportList.dialogFormVisible = false
  4714. })
  4715. },
  4716. // 撒料统计
  4717. getTab3List() {
  4718. this.tab3.table.listLoading = true
  4719. GetDataByName(this.tab3.table.getdataListParm).then(response => {
  4720. console.log('撒料统计table数据', response.data.list)
  4721. if (response.data.list !== null) {
  4722. // this.tab3.table.list = response.data.list
  4723. this.$refs.plTable3.reloadData(response.data.list)
  4724. this.tab3.table.total = response.data.total
  4725. } else {
  4726. // this.tab3.table.list = []
  4727. this.$refs.plTable3.reloadData([])
  4728. this.tab3.table.total = 0
  4729. }
  4730. setTimeout(() => {
  4731. this.tab3.table.listLoading = false
  4732. }, 100)
  4733. })
  4734. },
  4735. form_search3() {
  4736. this.tab3.table.getdataListParm.name = 'getStatisticsSL'
  4737. if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime !== null) {
  4738. this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  4739. this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  4740. } else {
  4741. this.tab3.table.getdataListParm.parammaps.inputDatetime = ''
  4742. this.tab3.table.getdataListParm.parammaps.startTime = ''
  4743. this.tab3.table.getdataListParm.parammaps.stopTime = ''
  4744. }
  4745. // this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
  4746. // this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
  4747. this.tab3.table.getdataListParm.offset = 1
  4748. this.getTab3List()
  4749. this.getTMRNameList3()
  4750. },
  4751. handleRefresh3() {
  4752. this.tab3.table.getdataListParm.parammaps.tmrtname = ''
  4753. this.tab3.table.getdataListParm.parammaps.projname = ''
  4754. this.tab3.table.getdataListParm.parammaps.times = ''
  4755. this.tab3.table.getdataListParm.parammaps.templetname = ''
  4756. this.tab3.table.getdataListParm.parammaps.buttontype = ''
  4757. this.tab3.table.getdataListParm.parammaps.fname = ''
  4758. this.tab3.table.getdataListParm.parammaps.slwc1 = undefined
  4759. this.tab3.table.getdataListParm.parammaps.slwc2 = undefined
  4760. this.tab3.table.getdataListParm.parammaps.slzq1 = undefined
  4761. this.tab3.table.getdataListParm.parammaps.slzq2 = undefined
  4762. this.tab3.table.getdataListParm.parammaps.slzql1 = undefined
  4763. this.tab3.table.getdataListParm.parammaps.slzql2 = undefined
  4764. this.tab3.table.getdataListParm.parammaps.error = false
  4765. this.getTab3List()
  4766. },
  4767. handleExport3() {
  4768. this.exportList.dialogFormVisible = true
  4769. this.exportList.dialogStatus = 'exportList'
  4770. // var excelDatasTab3 = [
  4771. // {
  4772. // tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
  4773. // filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
  4774. // tableDatas: this.tab3.table.list,
  4775. // sheetName: '撒料统计'
  4776. // }
  4777. // ]
  4778. // json2excel(excelDatasTab3, '撒料统计', true, 'xlsx')
  4779. },
  4780. exportList3(){
  4781. this.isokDisable = true
  4782. var url = 'authdata/GetDataByName'
  4783. var data = {
  4784. 'name':"getStatisticsSL",
  4785. "page":1,"offset":1,"pagecount":"","returntype":"Map",
  4786. "parammaps":{"pastureid":Cookies.get('pastureid'),"startTime":"","stopTime":"","templetname":"","isuse":""}
  4787. }
  4788. data.parammaps.startTime = parseTime(this.exportList.inputDatetime[0],'{y}-{m}-{d}')
  4789. data.parammaps.stopTime = parseTime(this.exportList.inputDatetime[1],'{y}-{m}-{d}')
  4790. data.parammaps.tmrtname = this.tab3.table.getdataListParm.parammaps.tmrtname
  4791. data.parammaps.projname = this.tab3.table.getdataListParm.parammaps.projname
  4792. data.parammaps.times = this.tab3.table.getdataListParm.parammaps.times
  4793. data.parammaps.buttontype = this.tab3.table.getdataListParm.parammaps.buttontype
  4794. data.parammaps.templetname = this.tab3.table.getdataListParm.parammaps.templetname
  4795. data.parammaps.isuse = this.tab3.table.getdataListParm.parammaps.isuse
  4796. postJson(url,data).then(response => {
  4797. console.log('混料统计table数据', response.data.list)
  4798. var exportList = []
  4799. if (response.data.list !== null) {
  4800. exportList = response.data.list
  4801. } else {
  4802. exportList = []
  4803. }
  4804. var excelDatasTab3 = [
  4805. {
  4806. tHeader: [this.$t('errorAnalysis.date'), this.$t('errorAnalysis.tmrnames'),this.$t('errorAnalysis.czNum'), this.$t('errorAnalysis.projname'), this.$t('errorAnalysis.isTrainNumber'), this.$t('errorAnalysis.feedName'),this.$t('errorAnalysis.Driver'), this.$t('errorAnalysis.pen'), this.$t('errorAnalysis.llzl'), this.$t('errorAnalysis.acWeight'), this.$t('errorAnalysis.wcz'), this.$t('errorAnalysis.zql'), this.$t('errorAnalysis.startTime'), this.$t('errorAnalysis.endTime'), this.$t('errorAnalysis.tzfs'), this.$t('errorAnalysis.stWeight'), this.$t('errorAnalysis.edWeight'), this.$t('errorAnalysis.jsTime'),this.$t('errorAnalysis.isOK'),],
  4807. filterVal: ['日期', 'TMR名称','sort', '车次', '班次', '配方名称','驾驶员', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', this.$t('errorAnalysis.stWeight'), '结束重量', '搅拌时间','standard'],
  4808. tableDatas: exportList,
  4809. sheetName: '撒料统计'
  4810. }
  4811. ]
  4812. json2excel(excelDatasTab3, this.$t('errorAnalysis.sltj'), true, 'xlsx')
  4813. this.isokDisable = false
  4814. this.exportList.dialogFormVisible = false
  4815. })
  4816. },
  4817. handleSee(item,row) {
  4818. if(this.tab.table.getdataListParm.parammaps.error == true){
  4819. this.error = true
  4820. }else{
  4821. this.error = ''
  4822. }
  4823. if(item == 1){
  4824. // 混料
  4825. if (this.tab.radio == 0) {
  4826. this.methodName = 'getDownloadedplanByJsyHL'
  4827. this.optdevice = row.驾驶员
  4828. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.驾驶员
  4829. }else if (this.tab.radio == 1) {
  4830. this.methodName = 'getDownloadedplanByTemHL'
  4831. this.optdevice = row.配方名称
  4832. this.titlefname = this.$t('errorAnalysis.zqxxq')+ row.配方名称
  4833. } else if (this.tab.radio == 2) {
  4834. this.methodName = 'getDownloadedplanByBarHL'
  4835. this.optdevice = row.栏舍名称
  4836. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.栏舍名称
  4837. } else if (this.tab.radio == 3) {
  4838. this.methodName = 'getDownloadedplanBySCHL'
  4839. this.optdevice = row.牲畜类别
  4840. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.牲畜类别
  4841. } else if (this.tab.radio == 4) {
  4842. this.methodName = 'getDownloadedplanByTrainsHL'
  4843. this.optdevice = row.车次
  4844. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.车次
  4845. } else if (this.tab.radio == 5) {
  4846. this.methodName = 'getDownloadedplanByTmrHL'
  4847. this.optdevice = row.TMR名称
  4848. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.TMR名称
  4849. } else if (this.tab.radio == 6) {
  4850. this.methodName = 'getDownloadedplanByFeedHL'
  4851. this.optdevice = row.fname
  4852. this.titlefname = this.$t('errorAnalysis.zqxxq')+ row.fname
  4853. } else if (this.tab.radio == 7) {
  4854. this.methodName = 'getDownloadedplanByWflHL'
  4855. this.optdevice = row.fname
  4856. this.titlefname = this.$t('errorAnalysis.zqxxq')
  4857. }
  4858. }else{
  4859. // 撒料
  4860. if (this.tab.radio == 0) {
  4861. this.methodName = 'getDownloadedplanByJsySL'
  4862. this.optdevice = row.驾驶员
  4863. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.驾驶员
  4864. }else if (this.tab.radio == 1) {
  4865. this.methodName = 'getDownloadedplanByTemSL'
  4866. this.optdevice = row.配方名称
  4867. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.配方名称
  4868. } else if (this.tab.radio == 2) {
  4869. this.methodName = 'getDownloadedplanByBarSL'
  4870. this.optdevice = row.栏舍名称
  4871. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.栏舍名称
  4872. } else if (this.tab.radio == 3) {
  4873. this.methodName = 'getDownloadedplanBySCSL'
  4874. this.optdevice = row.牲畜类别
  4875. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.牲畜类别
  4876. } else if (this.tab.radio == 4) {
  4877. this.methodName = 'getDownloadedplanByTrainsSL'
  4878. this.optdevice = row.车次
  4879. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.车次
  4880. } else if (this.tab.radio == 5) {
  4881. this.methodName = 'getDownloadedplanByTmrSL'
  4882. this.optdevice = row.TMR名称
  4883. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.TMR名称
  4884. }else if (this.tab.radio == 7) {
  4885. this.methodName = 'getDownloadedplanByWflSL'
  4886. this.optdevice = row.fname
  4887. this.titlefname = this.$t('errorAnalysis.zqxxq')
  4888. }
  4889. }
  4890. console.log(row, 'row')
  4891. // this.rowPid = row.pid
  4892. this.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  4893. this.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  4894. this.isShowDialog = true
  4895. },
  4896. getTMRNameList(){
  4897. var data = {}
  4898. data.name = 'getAccuracyMCTmrName'
  4899. data.parammaps = {}
  4900. data.parammaps.pastureid = Cookies.get('pastureid')
  4901. data.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
  4902. data.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
  4903. GetDataByName(data).then(response => {
  4904. if(response.data.list !== null){
  4905. this.tab.TMRNameList = response.data.list
  4906. }else{
  4907. this.tab.TMRNameList = []
  4908. }
  4909. })
  4910. },
  4911. getTMRNameList2(){
  4912. var data = {}
  4913. data.name = 'getAccuracyMCTmrName'
  4914. data.parammaps = {}
  4915. data.parammaps.pastureid = Cookies.get('pastureid')
  4916. data.parammaps.startTime = this.tab2.table.getdataListParm.parammaps.startTime
  4917. data.parammaps.stopTime = this.tab2.table.getdataListParm.parammaps.stopTime
  4918. GetDataByName(data).then(response => {
  4919. if(response.data !== null){
  4920. this.tab2.TMRNameList = response.data.list
  4921. }else{
  4922. this.tab2.TMRNameList = []
  4923. }
  4924. })
  4925. },
  4926. getTMRNameList3(){
  4927. var data = {}
  4928. data.name = 'getAccuracyMCTmrName'
  4929. data.parammaps = {}
  4930. data.parammaps.pastureid = Cookies.get('pastureid')
  4931. data.parammaps.startTime = this.tab3.table.getdataListParm.parammaps.startTime
  4932. data.parammaps.stopTime = this.tab3.table.getdataListParm.parammaps.stopTime
  4933. GetDataByName(data).then(response => {
  4934. if(response.data.list !== null){
  4935. this.tab3.TMRNameList = response.data.list
  4936. }else{
  4937. this.tab3.TMRNameList = []
  4938. }
  4939. })
  4940. },
  4941. clickRecipeName2(row) {
  4942. console.log('点击了混料统计-配方名称',row)
  4943. this.recipeNameTemp2.temp = Object.assign({}, row)
  4944. this.recipeNameTemp2.dialogFormVisible = true
  4945. this.textMap.recipeNameTxt = this.$t('errorAnalysis.pfxgjl') + row.配方名称
  4946. this.recipeNameTemp2.dialogStatus = 'recipeNameTxt'
  4947. this.recipeNameTemp2.getdataListParm.parammaps.pastureid = Cookies.get('pastureid')
  4948. this.recipeNameTemp2.getdataListParm.parammaps.ftid = row.ftid
  4949. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime = []
  4950. const start = new Date()
  4951. const end = new Date()
  4952. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
  4953. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  4954. this.getRecipeNameList2()
  4955. },
  4956. getRecipeNameList2(){
  4957. this.recipeNameTemp2.listLoading = true
  4958. if (this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime == null) {
  4959. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime = ''
  4960. this.recipeNameTemp2.getdataListParm.parammaps.startdate = ''
  4961. this.recipeNameTemp2.getdataListParm.parammaps.enddate = ''
  4962. } else {
  4963. this.recipeNameTemp2.getdataListParm.parammaps.startdate = this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[0] + ' 00:00'
  4964. this.recipeNameTemp2.getdataListParm.parammaps.enddate = this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[1] + ' 23:59'
  4965. }
  4966. const url = 'authdata/feedtemplet/history'
  4967. const data = {
  4968. pastureid:this.recipeNameTemp2.getdataListParm.parammaps.pastureid,
  4969. ftid:this.recipeNameTemp2.getdataListParm.parammaps.ftid,
  4970. startdate:this.recipeNameTemp2.getdataListParm.parammaps.startdate,
  4971. enddate:this.recipeNameTemp2.getdataListParm.parammaps.enddate
  4972. }
  4973. postJson(url, data).then(response => {
  4974. if (response.data !== null && response.data !=='') {
  4975. this.recipeNameTemp2.list = response.data
  4976. } else {
  4977. this.recipeNameTemp2.list = []
  4978. this.recipeNameTemp2.total = 0
  4979. }
  4980. console.log(response.data, 'response.data')
  4981. setTimeout(() => {
  4982. this.recipeNameTemp2.listLoading = false
  4983. }, 100)
  4984. })
  4985. },
  4986. handleRecipeNameSearch2(){
  4987. this.getRecipeNameList2()
  4988. },
  4989. clickSeeFeed(row){
  4990. this.recipeNameTemp3.listLoading = false
  4991. this.recipeNameTemp3.list = row.fit
  4992. this.recipeNameTemp3.temp = Object.assign({}, row)
  4993. this.recipeNameTemp3.dialogFormVisible = true
  4994. this.textMap.recipeNameTxt = this.$t('errorAnalysis.pfxgjl')
  4995. this.recipeNameTemp3.dialogStatus = 'recipeNameTxt'
  4996. const start = new Date()
  4997. const end = new Date()
  4998. this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime = []
  4999. this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
  5000. this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  5001. },
  5002. clickFeed2(row) {
  5003. console.log('点击了混料统计-饲料',row)
  5004. this.feedTemp.temp = Object.assign({}, row)
  5005. this.feedTemp.dialogFormVisible = true
  5006. this.textMap.feedTxt = this.$t('errorAnalysis.pfxgjl') + row.饲料
  5007. this.feedTemp.dialogStatus = 'feedTxt'
  5008. this.feedTemp.getdataListParm.parammaps.pastureid = row.pastureid
  5009. this.feedTemp.getdataListParm.parammaps.ftid = row.ftid
  5010. this.feedTemp.getdataListParm.parammaps.name = row.饲料
  5011. this.feedTemp.getdataListParm.parammaps.inputDatetime = []
  5012. const start = new Date()
  5013. const end = new Date()
  5014. this.feedTemp.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
  5015. this.feedTemp.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  5016. this.getFeedList()
  5017. },
  5018. getFeedList(){
  5019. this.feedTemp.listLoading = true
  5020. if (this.feedTemp.getdataListParm.parammaps.inputDatetime == null) {
  5021. this.feedTemp.getdataListParm.parammaps.inputDatetime = ''
  5022. this.feedTemp.getdataListParm.parammaps.startTime = ''
  5023. this.feedTemp.getdataListParm.parammaps.stopTime = ''
  5024. } else {
  5025. this.feedTemp.getdataListParm.parammaps.startTime = this.feedTemp.getdataListParm.parammaps.inputDatetime[0] +' 00:00'
  5026. this.feedTemp.getdataListParm.parammaps.stopTime = this.feedTemp.getdataListParm.parammaps.inputDatetime[1] +' 23:59'
  5027. }
  5028. const url = 'authdata/GetDataByName'
  5029. const data = {
  5030. name:'getFitistoryByName',
  5031. page: this.feedTemp.getdataListParm.page,
  5032. offset: this.feedTemp.getdataListParm.offset,
  5033. pagecount: this.feedTemp.getdataListParm.pagecount,
  5034. returntype: this.feedTemp.getdataListParm.returntype,
  5035. parammaps: this.feedTemp.getdataListParm.parammaps
  5036. }
  5037. postJson(url, data).then(response => {
  5038. if (response.data.list !== null && response.data.list !== '') {
  5039. for (let i = 0; i < response.data.list.length; i++) {
  5040. if (response.data.list[i].arrList == null) {
  5041. this.$set(response.data.list[i], 'arrList', [])
  5042. }
  5043. }
  5044. this.feedTemp.list = response.data.list
  5045. this.feedTemp.pageNum = response.data.pageNum
  5046. this.feedTemp.pageSize = response.data.pageSize
  5047. this.feedTemp.total = response.data.total
  5048. } else {
  5049. this.feedTemp.list = []
  5050. this.feedTemp.total = 0
  5051. }
  5052. console.log(response.data, 'response.data')
  5053. setTimeout(() => {
  5054. this.feedTemp.listLoading = false
  5055. }, 100)
  5056. })
  5057. },
  5058. handleFeedSearch(){
  5059. this.getFeedList()
  5060. },
  5061. clickRecipeName3(row) {
  5062. console.log('点击了撒料统计-配方名称',row)
  5063. this.recipeNameTemp2.temp = Object.assign({}, row)
  5064. this.recipeNameTemp2.dialogFormVisible = true
  5065. this.textMap.recipeNameTxt = this.$t('errorAnalysis.pfxgjl') + row.配方名称
  5066. this.recipeNameTemp2.dialogStatus = 'recipeNameTxt'
  5067. this.recipeNameTemp2.getdataListParm.parammaps.pastureid = Cookies.get('pastureid')
  5068. this.recipeNameTemp2.getdataListParm.parammaps.ftid = row.ftid
  5069. const start = new Date()
  5070. const end = new Date()
  5071. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime = []
  5072. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
  5073. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  5074. this.getRecipeNameList2()
  5075. },
  5076. getRecipeNameList3(){
  5077. this.recipeNameTemp3.listLoading = true
  5078. if (this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime == null) {
  5079. this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime = ''
  5080. this.recipeNameTemp3.getdataListParm.parammaps.startTime = ''
  5081. this.recipeNameTemp3.getdataListParm.parammaps.stopTime = ''
  5082. } else {
  5083. this.recipeNameTemp3.getdataListParm.parammaps.startTime = this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime[0] + ' 00:00'
  5084. this.recipeNameTemp3.getdataListParm.parammaps.stopTime = this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime[1] + ' 23:59'
  5085. }
  5086. const url = 'authdata/GetArrList'
  5087. const data = {
  5088. name:'getFitHistory1',
  5089. name1:'getFitHistory2',
  5090. page:this.recipeNameTemp3.getdataListParm.page,
  5091. offset:this.recipeNameTemp3.getdataListParm.offset,
  5092. pagecount:this.recipeNameTemp3.getdataListParm.pagecount,
  5093. returntype:this.recipeNameTemp3.getdataListParm.returntype,
  5094. parammaps:this.recipeNameTemp3.getdataListParm.parammaps
  5095. }
  5096. postJson(url, data).then(response => {
  5097. if (response.data.list !== null && response.data.list !=='') {
  5098. for (let i = 0; i < response.data.list.length; i++) {
  5099. if (response.data.list[i].arrList == null) {
  5100. this.$set(response.data.list[i], 'arrList', [])
  5101. }
  5102. }
  5103. this.recipeNameTemp3.list = response.data.list
  5104. this.recipeNameTemp3.pageNum = response.data.pageNum
  5105. this.recipeNameTemp3.pageSize = response.data.pageSize
  5106. this.recipeNameTemp3.total = response.data.total
  5107. } else {
  5108. this.recipeNameTemp3.list = []
  5109. this.recipeNameTemp3.total = 0
  5110. }
  5111. console.log(response.data, 'response.data')
  5112. setTimeout(() => {
  5113. this.recipeNameTemp3.listLoading = false
  5114. }, 100)
  5115. })
  5116. },
  5117. handleRecipeNameSearch3(){
  5118. this.getRecipeNameList2()
  5119. },
  5120. clickFence3(row) {
  5121. console.log('点击了撒料统计-栏舍',row)
  5122. this.fenceTemp.temp = Object.assign({}, row)
  5123. this.fenceTemp.dialogFormVisible = true
  5124. this.textMap.fenceTxt = this.$t('errorAnalysis.pfxgjl') + row.栏舍
  5125. this.fenceTemp.dialogStatus = 'fenceTxt'
  5126. this.fenceTemp.activeName = 'first'
  5127. this.fenceTemp.tab1.getdataListParm.parammaps.barname = row.栏舍
  5128. this.fenceTemp.tab2.getdataListParm.parammaps.barname = row.栏舍
  5129. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime = []
  5130. const start = new Date()
  5131. const end = new Date()
  5132. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
  5133. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  5134. this.getFenceList1()
  5135. },
  5136. getFenceList1(){
  5137. this.fenceTemp.tab1.listLoading = true
  5138. this.fenceTemp.tab1.getdataListParm.parammaps.fitid = this.fenceTemp.temp.id
  5139. if (this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime == null) {
  5140. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime = ''
  5141. this.fenceTemp.tab1.getdataListParm.parammaps.startDate = ''
  5142. this.fenceTemp.tab1.getdataListParm.parammaps.endDate = ''
  5143. } else {
  5144. this.fenceTemp.tab1.getdataListParm.parammaps.startDate = this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[0]+' 00:00'
  5145. this.fenceTemp.tab1.getdataListParm.parammaps.endDate = this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[1]+' 23:59'
  5146. }
  5147. const url = 'authdata/feedp/history'
  5148. // const data = this.fenceTemp.tab1.getdataListParm
  5149. const data = {
  5150.     barname:this.fenceTemp.tab1.getdataListParm.parammaps.barname,
  5151.     startDate:this.fenceTemp.tab1.getdataListParm.parammaps.startDate,
  5152.     endDate:this.fenceTemp.tab1.getdataListParm.parammaps.endDate
  5153. }
  5154. postJson(url, data).then(response => {
  5155. this.fenceTemp.tab1.listLoading = false
  5156. if (response.data !== null && response.data !== '') {
  5157. for (let i = 0; i < response.data.length; i++) {
  5158. if (response.data[i].ptid == undefined || response.data[i].ptname == '') {
  5159. this.$set(response.data[i], 'ptid', '')
  5160. this.$set(response.data[i], 'ptname', '')
  5161. }
  5162. }
  5163. this.fenceTemp.tab1.list = response.data
  5164. this.handleSpan1()
  5165. } else {
  5166. this.fenceTemp.tab1.list = []
  5167. this.fenceTemp.tab1.total = 0
  5168. }
  5169. console.log(response.data, 'response.data')
  5170. setTimeout(() => {
  5171. this.fenceTemp.tab1.listLoading = false
  5172. }, 100)
  5173. })
  5174. },
  5175. getFenceList2(){
  5176. this.fenceTemp.tab2.listLoading = true
  5177. this.fenceTemp.tab2.getdataListParm.parammaps.fitid = this.fenceTemp.temp.id
  5178. if (this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime == null) {
  5179. this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime = ''
  5180. this.fenceTemp.tab2.getdataListParm.parammaps.startDate = ''
  5181. this.fenceTemp.tab2.getdataListParm.parammaps.endDate = ''
  5182. } else {
  5183. this.fenceTemp.tab2.getdataListParm.parammaps.startDate = this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime[0]+' 00:00'
  5184. this.fenceTemp.tab2.getdataListParm.parammaps.endDate = this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime[1]+' 23:59'
  5185. }
  5186. const url = 'authdata/spillageall/history'
  5187. const data = {
  5188. barname:this.fenceTemp.tab2.getdataListParm.parammaps.barname,
  5189. pastureid:Cookies.get('pastureid'),
  5190.     startDate:this.fenceTemp.tab2.getdataListParm.parammaps.startDate,
  5191.     endDate:this.fenceTemp.tab2.getdataListParm.parammaps.endDate
  5192. }
  5193. postJson(url, data).then(response => {
  5194. if (response.data.data !== null) {
  5195. // 表数据
  5196. this.fenceTemp.tab2.list = response.data.data
  5197. this.fenceTemp.tab2.tableLabel = response.data.trains
  5198. this.handleSpan2()
  5199. } else {
  5200. this.fenceTemp.tab2.list = []
  5201. this.fenceTemp.tab2.total = 0
  5202. }
  5203. console.log(response.data, 'response.data')
  5204. setTimeout(() => {
  5205. this.fenceTemp.tab2.listLoading = false
  5206. }, 100)
  5207. })
  5208. },
  5209. handleFenceSearch(){
  5210. if(this.fenceTemp.activeName == 'first'){
  5211. this.getFenceList1()
  5212. }else{
  5213. this.getFenceList2()
  5214. }
  5215. },
  5216. handleFenceTabClick(item){
  5217. const start = new Date()
  5218. const end = new Date()
  5219. if(item == 'first'){
  5220. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime = []
  5221. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
  5222. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  5223. this.getFenceList1()
  5224. }else{
  5225. this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime = []
  5226. this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
  5227. this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  5228. this.getFenceList2()
  5229. }
  5230. },
  5231. handleSpan1() {
  5232. this.fenceTemp.mergekeys1.forEach(key => {
  5233. this.fenceTemp.spanObj1[key] = []
  5234. let position = 0
  5235. this.fenceTemp.tab1.list.forEach((item, index) => {
  5236. if (index === 0) {
  5237. this.fenceTemp.spanObj1[key].push(1)
  5238. position = 0
  5239. } else {
  5240. if (this.fenceTemp.tab1.list[index][key] === this.fenceTemp.tab1.list[index - 1][key]) {
  5241. this.fenceTemp.spanObj1[key][position] += 1
  5242. this.fenceTemp.spanObj1[key].push(0)
  5243. } else {
  5244. this.fenceTemp.spanObj1[key].push(1)
  5245. position = index
  5246. }
  5247. }
  5248. })
  5249. })
  5250. },
  5251. handleSpan2() {
  5252. this.fenceTemp.mergekeys2.forEach(key => {
  5253. this.fenceTemp.spanObj2[key] = []
  5254. let position = 0
  5255. this.fenceTemp.tab2.list.forEach((item, index) => {
  5256. if (index === 0) {
  5257. this.fenceTemp.spanObj2[key].push(1)
  5258. position = 0
  5259. } else {
  5260. if (this.fenceTemp.tab2.list[index][key] === this.fenceTemp.tab2.list[index - 1][key]) {
  5261. this.fenceTemp.spanObj2[key][position] += 1
  5262. this.fenceTemp.spanObj2[key].push(0)
  5263. } else {
  5264. this.fenceTemp.spanObj2[key].push(1)
  5265. position = index
  5266. }
  5267. }
  5268. })
  5269. })
  5270. },
  5271. objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
  5272. if(this.fenceTemp.mergekeys1 !== null && this.fenceTemp.mergekeys1 !== ''){
  5273. for (let i = 0; i < this.fenceTemp.mergekeys1.length; i++) {
  5274. if (column.property === this.fenceTemp.mergekeys1[i]) {
  5275. const _row = this.fenceTemp.spanObj1[this.fenceTemp.mergekeys1[i]][rowIndex]
  5276. const _col = _row > 0 ? 1 : 0
  5277. return {
  5278. rowspan: _row,
  5279. colspan: _col
  5280. }
  5281. }
  5282. }
  5283. }
  5284. },
  5285. objectSpanMethod2({ row, column, rowIndex, columnIndex }) {
  5286. if(this.fenceTemp.mergekeys2 !== null && this.fenceTemp.mergekeys2 !== ''){
  5287. for (let i = 0; i < this.fenceTemp.mergekeys2.length; i++) {
  5288. if (column.property === this.fenceTemp.mergekeys2[i]) {
  5289. const _row = this.fenceTemp.spanObj2[this.fenceTemp.mergekeys2[i]][rowIndex]
  5290. const _col = _row > 0 ? 1 : 0
  5291. return {
  5292. rowspan: _row,
  5293. colspan: _col
  5294. }
  5295. }
  5296. }
  5297. }
  5298. },
  5299. clickRecipeTemplate3(row){
  5300. this.modificationRecordTemp.temp1 = Object.assign({}, row)
  5301. // setTimeout(()=>{
  5302. // this.modificationRecordTemp.dialogFormVisible = true
  5303. // },500)
  5304. this.modificationRecordTemp.dialogStatus = 'modificationRecord'
  5305. this.getFTHisdryweightList()
  5306. this.getRecipeTemplateList1()
  5307. },
  5308. getRecipeTemplateList1() {
  5309. this.modificationRecordTemp.listLoading1 = true
  5310. let url = 'authdata/recipetemplate/history'
  5311. let data = {
  5312. ftid: this.modificationRecordTemp.temp1.ftid,
  5313. pastureid: Cookies.get('pastureid'),
  5314. createdate: this.modificationRecordTemp.temp1.createdate,
  5315. lastftid:this.modificationRecordTemp.temp1.lastftid
  5316. }
  5317. postJson(url, data).then(response => {
  5318. if (response.data !== null) {
  5319. this.modificationRecordTemp.list1 = response.data.current
  5320. this.modificationRecordTemp.list2 = response.data.last
  5321. } else {
  5322. this.modificationRecordTemp.list1 = []
  5323. }
  5324. this.modificationRecordTemp.dialogFormVisible = true
  5325. setTimeout(() => {
  5326. this.modificationRecordTemp.listLoading1 = false
  5327. }, 100)
  5328. })
  5329. },
  5330. getFTHisdryweightList(){
  5331. let url = 'authdata/GetDataByName'
  5332. let data = {
  5333. name:'getFTHisdryweight',
  5334. parammaps:{
  5335. ftid: this.modificationRecordTemp.temp1.ftid,
  5336. pastureid: Cookies.get('pastureid'),
  5337. createdate: this.modificationRecordTemp.temp1.createdate
  5338. }
  5339. }
  5340. postJson(url, data).then(response => {
  5341. console.log(response)
  5342. if (response.data !== null) {
  5343. this.modificationRecordTemp.lastdate = response.data.list.lastdate
  5344. this.modificationRecordTemp.currentdate = response.data.list.currentdate
  5345. } else {
  5346. this.modificationRecordTemp.lastdate = ''
  5347. this.modificationRecordTemp.currentdate = ''
  5348. }
  5349. })
  5350. },
  5351. changeccysChecked(item){
  5352. if(item == false){
  5353. this.tab.table.getdataListParm.parammaps.error = ''
  5354. }
  5355. this.getTabList()
  5356. this.getTabList2()
  5357. },
  5358. getSummaries1(param) {
  5359. const { columns, data } = param
  5360. const sums = []
  5361. columns.forEach((column, index) => {
  5362. if (index === 0) {
  5363. sums[index] = this.$t('common.sum')
  5364. return
  5365. }
  5366. if (column.property !== undefined) {
  5367. // 加了prop属性的el-table-column 才能找到column.property
  5368. const values = data.map(item => Number(item[column.property]))
  5369. if (!values.every(value => isNaN(value))) {
  5370. sums[index] = values.reduce((prev, curr) => {
  5371. const value = Number(curr)
  5372. if (!isNaN(value)) {
  5373. return prev + curr // 多行相加
  5374. } else {
  5375. return prev
  5376. }
  5377. }, 0)
  5378. if(this.modificationRecordTemp.lastdate == undefined){
  5379. this.modificationRecordTemp.lastdate = ''
  5380. }
  5381. sums[index] = sums[index].toFixed(4) + '(干物质量:' + this.modificationRecordTemp.lastdate + ')'
  5382. } else {
  5383. sums[index] = ''
  5384. }
  5385. }
  5386. })
  5387. // console.log(sums, 'sums[index]')
  5388. return sums
  5389. },
  5390. getSummaries2(param) {
  5391. const { columns, data } = param
  5392. const sums = []
  5393. columns.forEach((column, index) => {
  5394. if (index === 0) {
  5395. sums[index] = this.$t('common.sum')
  5396. return
  5397. }
  5398. if (column.property !== undefined) {
  5399. // 加了prop属性的el-table-column 才能找到column.property
  5400. const values = data.map(item => Number(item[column.property]))
  5401. if (!values.every(value => isNaN(value))) {
  5402. sums[index] = values.reduce((prev, curr) => {
  5403. const value = Number(curr)
  5404. if (!isNaN(value)) {
  5405. return prev + curr // 多行相加
  5406. } else {
  5407. return prev
  5408. }
  5409. }, 0)
  5410. if(this.modificationRecordTemp.currentdate == undefined){
  5411. this.modificationRecordTemp.currentdate = ''
  5412. }
  5413. sums[index] = sums[index].toFixed(4) + '(干物质量:' + this.modificationRecordTemp.currentdate + ')'
  5414. } else {
  5415. sums[index] = ''
  5416. }
  5417. }
  5418. })
  5419. // console.log(sums, 'sums[index]')
  5420. return sums
  5421. },
  5422. }
  5423. }
  5424. </script>
  5425. <style lang="scss" scoped>
  5426. .search{
  5427. .el-radio{margin-right: 10px;}
  5428. }
  5429. .filter-item1{
  5430. margin-top: 10px;
  5431. span{margin-right: 5px;}
  5432. }
  5433. .button{
  5434. height: 95px;
  5435. .exportTable2{float: right;margin-right: 5px;margin-top: 5px;width:auto; padding:0 6px;
  5436. }
  5437. }
  5438. .app-container1{padding-left: 10px;background-color: #F4F4F4;}
  5439. .dashboard-editor-container {
  5440. background-color: #F4F4F4;
  5441. .grid-content{
  5442. background-color:#fff;padding: 0 10px;
  5443. h4{text-align: center;line-height: 50px;}
  5444. }
  5445. }
  5446. .table{margin-bottom: 10px;}
  5447. /deep/ .el-table th>.cell{
  5448. padding-left: 0 !important;;
  5449. padding-right: 0 !important;;
  5450. }
  5451. /deep/ .el-table td>.cell{
  5452. padding-left: 0 !important;;
  5453. padding-right: 0 !important;;
  5454. }
  5455. /deep/ .specificDate .el-radio{margin-right: 0px;}
  5456. /deep/ .el-radio-button__inner{padding: 7px 7px ;}
  5457. /deep/ .el-range-editor.el-input__inner .el-input__icon{width: 0;}
  5458. .modificationRecord .top{
  5459. height: 300px;width: 100%;display: flex;flex-direction: row;
  5460. .left{
  5461. width: 200px;
  5462. height: 100%;
  5463. div{line-height: 35px;}
  5464. }
  5465. .right {
  5466. height: 200px;
  5467. flex: 1;
  5468. }
  5469. }
  5470. .modificationRecord .bottom{
  5471. height: 300px;width: 100%;display: flex;flex-direction: row;
  5472. .left{
  5473. width: 200px;
  5474. height: 100%;
  5475. div{line-height: 35px;}
  5476. }
  5477. .right {
  5478. height: 200px;
  5479. flex: 1;
  5480. }
  5481. }
  5482. </style>