index.vue 359 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487
  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. empty-text="No Data"
  87. >
  88. <u-table-column v-if="tab.checked && !tab.isTrainNumber" :key="0" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="计划时间" />
  89. <u-table-column v-if="tab.isTrainNumber" :key="117" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="计划时间1" />
  90. <u-table-column v-if="tab.isTrainNumber" :key="113" sortable :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="templetname" />
  91. <u-table-column v-if="tab.isTrainNumber" :key="114" sortable :label="$t('errorAnalysis.drivername')" min-width="70px" align="center" prop="TMR名称" />
  92. <u-table-column v-if="tab.isTrainNumber" :key="115" sortable :label="$t('errorAnalysis.stratJl')" min-width="70px" align="center" prop="startTime" />
  93. <u-table-column v-if="tab.isTrainNumber" :key="116" sortable :label="$t('errorAnalysis.endJl')" min-width="70px" align="center" prop="endTime" />
  94. <u-table-column v-if="tab.isDriver" :key="1" sortable :label="$t('errorAnalysis.Driver')" min-width="70px" align="center" prop="驾驶员" />
  95. <u-table-column v-if="tab.isFormulaName" :key="2" sortable :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="配方名称" />
  96. <u-table-column v-if="tab.isHouseName" :key="3" sortable :label="$t('errorAnalysis.isHouseName')" min-width="70px" align="center" prop="栏舍名称" />
  97. <u-table-column v-if="tab.isLivestockType" :key="4" sortable :label="$t('errorAnalysis.sxlb')" min-width="70px" align="center" prop="牲畜类别" />
  98. <u-table-column v-if="tab.isTrainNumber" :key="5" sortable :label="$t('errorAnalysis.tmrnames')" min-width="70px" align="center" prop="TMR名称" />
  99. <u-table-column v-if="tab.isTrainNumber" :key="6" sortable :label="$t('errorAnalysis.projname')" min-width="70px" align="center" prop="车次" />
  100. <u-table-column v-if="tab.isTrainNumber" :key="7" sortable :label="$t('errorAnalysis.isTrainNumber')" min-width="70px" align="center" prop="班次" />
  101. <u-table-column v-if="tab.isTrainNumber" :key="8" sortable :label="$t('errorAnalysis.Driver')" min-width="70px" align="center" prop="驾驶员" />
  102. <u-table-column v-if="tab.isTMRName" :key="9" sortable :label="$t('errorAnalysis.tmrnames')" min-width="70px" align="center" prop="TMR名称" />
  103. <u-table-column v-if="tab.isTMRName" :key="10" sortable :label="$t('errorAnalysis.isTrainNumber')" min-width="70px" align="center" prop="班次" />
  104. <u-table-column v-if="tab.isTMRName" :key="11" sortable :label="$t('errorAnalysis.projname')" min-width="70px" align="center" prop="车次" />
  105. <u-table-column v-if="tab.isTMRName" :key="12" sortable :label="$t('errorAnalysis.Driver')" min-width="70px" align="center" prop="驾驶员" />
  106. <u-table-column v-if="tab.isFeed" :key="13" sortable :label="$t('errorAnalysis.isFeed')" min-width="70px" align="center" prop="fname" />
  107. <u-table-column :key="14" sortable :label="$t('errorAnalysis.llzl')" min-width="60px" align="center" prop="理论重量" />
  108. <u-table-column :key="15" sortable :label="$t('errorAnalysis.acWeight')" min-width="60px" align="center" prop="实际重量" />
  109. <u-table-column :key="16" sortable :label="$t('errorAnalysis.jshlczs')" min-width="60px" align="center" prop="计划混料操作数" />
  110. <u-table-column :key="17" sortable :label="$t('errorAnalysis.yhlczs')" min-width="50px" align="center" prop="已混料操作数" />
  111. <u-table-column :key="18" sortable :label="$t('errorAnalysis.hlczl')" min-width="60px" align="center" prop="混料操作率" />
  112. <u-table-column :key="19" sortable :label="$t('processAnalysis.hlwc')" min-width="60px" align="center" prop="混料误差值" />
  113. <u-table-column :key="20" sortable :label="$t('processAnalysis.hlzq')" min-width="60px" align="center" prop="混料准确率" />
  114. <u-table-column v-if="tab.isTrainNumber" :key="21" sortable :label="$t('errorAnalysis.hlsj')" min-width="70px" align="center" prop="混料时间" />
  115. <u-table-column v-if="tab.isTrainNumber" :key="22" sortable :label="$t('errorAnalysis.flstartTime')" min-width="70px" align="center" prop="startMaterialTime" />
  116. <u-table-column v-if="tab.isTrainNumber" :key="23" sortable :label="$t('errorAnalysis.waitTime')" min-width="70px" align="center" prop="等待时间" />
  117. <u-table-column :key="24" sortable :label="$t('errorAnalysis.hlzdtzcs')" min-width="65px" align="center" prop="混料自动跳转次数" />
  118. <u-table-column :key="25" sortable :label="$t('errorAnalysis.hlsdzdtzcs')" min-width="65px" align="center" prop="混料手动跳转次数" />
  119. <u-table-column :key="26" sortable :label="$t('errorAnalysis.qxcs')" min-width="70px" align="center" prop="取消次数" />
  120. <u-table-column :key="27" sortable :label="$t('errorAnalysis.hlzqs')" min-width="70px" align="center" prop="混料正确数" />
  121. <u-table-column :key="28" sortable :label="$t('processAnalysis.hlzql')" min-width="70px" align="center" prop="混料正确率" />
  122. <u-table-column :key="29" sortable :label="$t('errorAnalysis.qcqxzql')" min-width="60px" align="center" prop="去除取消正确率" />
  123. <u-table-column :key="30" sortable :label="$t('errorAnalysis.bzc')" min-width="60px" align="center" prop="方差" />
  124. <u-table-column :key="31" v-if="tab.isTrainNumber" sortable :label="$t('errorAnalysis.area')" min-width="60px" align="center" prop="barname" />
  125. <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">
  126. <template slot-scope="{row}">
  127. <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('1',row)" />
  128. </template>
  129. </u-table-column>
  130. <u-table-column v-else :key="33" align="center" width="70" :label="$t('errorAnalysis.cz')" class-name="small-padding fixed-width">
  131. <template slot-scope="{row}">
  132. <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('1',row)" />
  133. </template>
  134. </u-table-column>
  135. </u-table>
  136. <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>
  137. <div v-if="tab.radio !== '6'">
  138. <h4>{{$t('errorAnalysis.sl')}}</h4>
  139. <u-table
  140. ref="plTable22"
  141. :key="tab.table2.tableKey"
  142. v-loading="tab.table2.listLoading"
  143. :data="tab.table2.list"
  144. border
  145. fit
  146. highlight-current-row
  147. style="width: 100%;"
  148. :row-style="rowStyle"
  149. :cell-style="cellStyle"
  150. class="elTable table-fixed"
  151. :max-height="myHeight2"
  152. empty-text="No Data"
  153. >
  154. <!-- <u-table-column >
  155. <template slot="empty">
  156. <span style="color: #969799;">No Data</span>
  157. </template>
  158. </u-table-column> -->
  159. <u-table-column v-if="tab.checked && !tab.isTrainNumber" :key="0" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="计划时间" />
  160. <u-table-column v-if="tab.isTrainNumber" :key="117" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="计划时间1" />
  161. <u-table-column v-if="tab.isTrainNumber" :key="113" sortable :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="templetname" />
  162. <u-table-column v-if="tab.isTrainNumber" :key="114" sortable :label="$t('errorAnalysis.drivername')" min-width="70px" align="center" prop="TMR名称" />
  163. <u-table-column v-if="tab.isTrainNumber" :key="115" sortable :label="$t('errorAnalysis.stratJl')" min-width="70px" align="center" prop="startTime" />
  164. <u-table-column v-if="tab.isTrainNumber" :key="116" sortable :label="$t('errorAnalysis.endJl')" min-width="70px" align="center" prop="endTime" />
  165. <u-table-column v-if="tab.isDriver" :key="1" sortable :label="$t('errorAnalysis.Driver')" min-width="70px" align="center" prop="驾驶员" />
  166. <u-table-column v-if="tab.isFormulaName" :key="2" sortable :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="配方名称" />
  167. <u-table-column v-if="tab.isHouseName" :key="3" sortable :label="$t('errorAnalysis.isHouseName')" min-width="70px" align="center" prop="栏舍名称" />
  168. <u-table-column v-if="tab.isLivestockType" :key="4" sortable :label="$t('errorAnalysis.sxlb')" min-width="70px" align="center" prop="牲畜类别" />
  169. <u-table-column v-if="tab.isTrainNumber" :key="5" sortable :label="$t('errorAnalysis.projname')" min-width="70px" align="center" prop="车次" />
  170. <u-table-column v-if="tab.isTrainNumber" :key="6" sortable :label="$t('errorAnalysis.isTrainNumber')" min-width="70px" align="center" prop="班次" />
  171. <u-table-column v-if="tab.isTrainNumber" :key="7" sortable :label="$t('errorAnalysis.tmrnames')" min-width="70px" align="center" prop="TMR名称" />
  172. <u-table-column v-if="tab.isTrainNumber" :key="8" sortable :label="$t('errorAnalysis.Driver')" min-width="70px" align="center" prop="驾驶员" />
  173. <u-table-column v-if="tab.isTMRName" :key="9" sortable :label="$t('errorAnalysis.tmrnames')" min-width="70px" align="center" prop="TMR名称" />
  174. <u-table-column v-if="tab.isTMRName" :key="10" sortable :label="$t('errorAnalysis.isTrainNumber')" min-width="70px" align="center" prop="班次" />
  175. <u-table-column v-if="tab.isTMRName" :key="11" sortable :label="$t('errorAnalysis.projname')" min-width="70px" align="center" prop="车次" />
  176. <u-table-column v-if="tab.isTMRName" :key="12" sortable :label="$t('errorAnalysis.Driver')" min-width="70px" align="center" prop="驾驶员" />
  177. <u-table-column v-if="tab.isFeed" :key="13" sortable :label="$t('errorAnalysis.isFeed')" min-width="70px" align="center" prop="饲料" />
  178. <u-table-column :key="14" sortable :label="$t('errorAnalysis.llzl')" min-width="60px" align="center" prop="理论重量" />
  179. <u-table-column :key="15" sortable :label="$t('errorAnalysis.acWeight')" min-width="60px" align="center" prop="实际重量" />
  180. <u-table-column :key="16" sortable :label="$t('errorAnalysis.sljhczs')" min-width="60px" align="center" prop="计划撒料操作数" />
  181. <u-table-column :key="17" sortable :label="$t('errorAnalysis.yclczs')" min-width="50px" align="center" prop="已撒料操作数" />
  182. <u-table-column :key="18" sortable :label="$t('errorAnalysis.slczl')" min-width="60px" align="center" prop="撒料操作率" />
  183. <u-table-column :key="19" sortable :label="$t('errorAnalysis.slwcz')" min-width="60px" align="center" prop="撒料误差值" />
  184. <u-table-column :key="20" sortable :label="$t('errorAnalysis.slzql')" min-width="60px" align="center" prop="撒料准确率" />
  185. <u-table-column v-if="tab.isTrainNumber" :key="21" sortable :label="$t('errorAnalysis.slsj')" min-width="70px" align="center" prop="撒料时间" />
  186. <u-table-column v-if="tab.isTrainNumber" :key="22" sortable :label="$t('errorAnalysis.flstartTime')" min-width="70px" align="center" prop="startMaterialTime" />
  187. <u-table-column v-if="tab.isTrainNumber" :key="23" sortable :label="$t('errorAnalysis.waitTime')" min-width="70px" align="center" prop="等待时间" />
  188. <u-table-column :key="24" sortable :label="$t('errorAnalysis.slzdtzcs')" width="65px" align="center" prop="撒料自动跳转次数" />
  189. <u-table-column :key="25" sortable :label="$t('errorAnalysis.slsdzdtzcs')" width="65px" align="center" prop="撒料手动跳转次数" />
  190. <u-table-column :key="26" sortable :label="$t('errorAnalysis.qxcs')" min-width="70px" align="center" prop="取消次数" />
  191. <u-table-column :key="27" sortable :label="$t('errorAnalysis.slzqs')" min-width="70px" align="center" prop="撒料正确数" />
  192. <u-table-column :key="28" sortable :label="$t('processAnalysis.slzql')" min-width="70px" align="center" prop="撒料正确率" />
  193. <u-table-column :key="29" sortable :label="$t('errorAnalysis.qcqxzql')" min-width="65px" align="center" prop="去除取消正确率" />
  194. <u-table-column :key="30" sortable :label="$t('errorAnalysis.bzc')" min-width="60px" align="center" prop="方差" />
  195. <u-table-column :key="31" v-if="tab.isTrainNumber" sortable :label="$t('errorAnalysis.area')" min-width="60px" align="center" prop="barname" />
  196. <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">
  197. <template slot-scope="{row}">
  198. <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('2',row)" />
  199. </template>
  200. </u-table-column>
  201. <u-table-column v-else :key="30" align="center" width="70" :label="$t('errorAnalysis.cz')" class-name="small-padding fixed-width">
  202. <template slot-scope="{row}">
  203. <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('2',row)" />
  204. </template>
  205. </u-table-column>
  206. </u-table>
  207. <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>
  208. </div>
  209. </div>
  210. <div id="AnalysisChart" class="AnalysisChart">
  211. <el-row :gutter="10">
  212. <el-col :span="24" style="margin-bottom: 10px;margin-top: 10px;">
  213. <span>{{$t('feedingEfficiency.tbcxsj')}}</span>
  214. <el-radio-group v-model="tab.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeAllSpecificDate">
  215. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  216. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  217. </el-radio-group>
  218. <div v-show="tab.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  219. <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" />
  220. </div>
  221. <div v-show="tab.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  222. <el-select v-model="tab.selectYear" class="filter-item" style="width:130px;margin-right:10px;" :placeholder="$t('errorAnalysis.qxznf')" @change="changeAllYear">
  223. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  224. </el-select>
  225. <el-select v-model="tab.selectWeek" class="filter-item" style="width:170px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  226. <el-option v-for="(item,index) in tab.weekList" :key="index" :label="item.name" :value="item.id" />
  227. </el-select>
  228. </div>
  229. <div v-show="tab.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  230. <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" />
  231. </div>
  232. <el-button class="successBorder" style="margin-left:10px;" @click="handleAllDate">{{$t('errorAnalysis.confirm')}}</el-button>
  233. <svg-icon icon-class="Up" style="width: 40px;height: 40px;float: right;" @click="handleQuickJumpTop" />
  234. </el-col>
  235. </el-row>
  236. <el-row :gutter="10" class="dashboard-editor-container">
  237. <el-col :span="12">
  238. <div class="grid-content">
  239. <h4>{{$t('errorAnalysis.planName')}}</h4>
  240. <div v-if="tab.chart2.isChart" class="button">
  241. <div class="chartButton">
  242. <el-radio-group v-model="tab.chart2.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart2')">
  243. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  244. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  245. </el-radio-group>
  246. <div v-show="tab.chart2.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  247. <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" />
  248. </div>
  249. <div v-show="tab.chart2.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  250. <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')">
  251. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  252. </el-select>
  253. <el-select v-model="tab.chart2.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  254. <el-option v-for="(item,index) in tab.chart2.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  255. </el-select>
  256. </div>
  257. <div v-show="tab.chart2.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  258. <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" />
  259. </div>
  260. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart2')">{{$t('errorAnalysis.confirm')}}</el-button>
  261. </div>
  262. <div>
  263. <div class="exportTable2" @click="handleExport('chart2')">{{$t('dashboard.Export')}}</div>
  264. <div class="exportTable2" @click="handleTable('chart2')">{{$t('errorAnalysis.changeTable')}}</div>
  265. </div>
  266. </div>
  267. <div v-if="tab.chart2.isChart" id="chartLine2" style="width:100%;height:385px;background: #fff;" />
  268. <div v-if="tab.chart2.isTable" class="table">
  269. <div class="button">
  270. <div class="exportTable" @click="handleExport('chart2')">{{$t('dashboard.Export')}}</div>
  271. <div class="exportTable" @click="handleChart('chart2')">{{$t('dashboard.sTable')}}</div>
  272. </div>
  273. <el-table
  274. :key="tab.chart2.table.tableKey"
  275. v-loading="tab.chart2.table.listLoading"
  276. :data="tab.chart2.table.list"
  277. border
  278. fit
  279. highlight-current-row
  280. style="width: 100%;"
  281. height="385"
  282. :row-style="rowStyle"
  283. :cell-style="cellStyle"
  284. class="elTable table-fixed"
  285. empty-text="No Data"
  286. >
  287. <!-- <template slot="empty">
  288. <span style="color: #969799;">No Data</span>
  289. </template> -->
  290. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="85px" align="center" prop="日期" />
  291. <el-table-column :label="$t('errorAnalysis.jhzxzl')" sortable min-width="80px" align="center" prop="实际量" />
  292. <el-table-column :label="$t('errorAnalysis.pfllzl')" sortable min-width="80px" align="center" prop="理论量" />
  293. <el-table-column :label="$t('errorAnalysis.jhzql')" sortable min-width="85px" align="center" prop="field1" />
  294. <el-table-column :label="$t('errorAnalysis.jhqxzl')" sortable min-width="80px" align="center" prop="计划取消重量" />
  295. <el-table-column :label="$t('errorAnalysis.jhzqll')" sortable min-width="100px" align="center" prop="field3" />
  296. <el-table-column :label="$t('errorAnalysis.jhzql1')" sortable min-width="85px" align="center" prop="正确数" />
  297. <el-table-column :label="$t('errorAnalysis.jhs')" sortable min-width="60px" align="center" prop="计划数" />
  298. <el-table-column :label="$t('errorAnalysis.jhzql1')"sortable min-width="75px" align="center" prop="field2" />
  299. </el-table>
  300. </div>
  301. </div>
  302. </el-col>
  303. <el-col :span="12">
  304. <div class="grid-content">
  305. <h4>{{$t('errorAnalysis.feedName')}}</h4>
  306. <div v-if="tab.chart1.isChart" class="button">
  307. <div class="chartButton">
  308. <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" />
  309. <el-radio-group v-model="tab.chart1.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart1')">
  310. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  311. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  312. </el-radio-group>
  313. <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  314. <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" />
  315. </div>
  316. <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  317. <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')">
  318. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  319. </el-select>
  320. <el-select v-model="tab.chart1.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  321. <el-option v-for="(item,index) in tab.chart1.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  322. </el-select>
  323. </div>
  324. <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  325. <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" />
  326. </div>
  327. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart1')">{{$t('errorAnalysis.confirm')}}</el-button>
  328. </div>
  329. <div>
  330. <div class="exportTable2" @click="handleExport('chart1')">{{$t('dashboard.Export')}}</div>
  331. <div class="exportTable2" @click="handleTable('chart1')">{{$t('errorAnalysis.changeTable')}}</div>
  332. </div>
  333. </div>
  334. <div v-if="tab.chart1.isChart" id="chartLine1" style="width:100%;height:385px;" />
  335. <div v-if="tab.chart1.isTable" class="table">
  336. <div class="button">
  337. <div class="exportTable" @click="handleExport('chart1')">{{$t('dashboard.Export')}}</div>
  338. <div class="exportTable" @click="handleChart('chart1')">{{$t('dashboard.sTable')}}</div>
  339. </div>
  340. <el-table
  341. :key="tab.chart1.table.tableKey"
  342. v-loading="tab.chart1.table.listLoading"
  343. :data="tab.chart1.table.list"
  344. border
  345. fit
  346. highlight-current-row
  347. style="width: 100%;"
  348. height="385"
  349. :row-style="rowStyle"
  350. :cell-style="cellStyle"
  351. class="elTable table-fixed"
  352. >
  353. <template slot="empty">
  354. <span style="color: #969799;">No Data</span>
  355. </template>
  356. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="90px" align="center" prop="日期" />
  357. <el-table-column :label="$t('errorAnalysis.feedName')" sortable min-width="90px" align="center" prop="名称" />
  358. <el-table-column :label="$t('errorAnalysis.jhzl')" sortable min-width="100px" align="center" prop="理论量" />
  359. <el-table-column :label="$t('errorAnalysis.skzl')"sortable min-width="100px" align="center" prop="实际量" />
  360. <el-table-column :label="$t('errorAnalysis.zql')" sortable min-width="90px" align="center" prop="准确率" />
  361. </el-table>
  362. </div>
  363. </div>
  364. </el-col>
  365. </el-row>
  366. <el-row :gutter="10" class="dashboard-editor-container">
  367. <el-col :span="12">
  368. <div class="grid-content">
  369. <h4>{{$t('errorAnalysis.nqName')}}</h4>
  370. <div v-if="tab.chart3.isChart" class="button">
  371. <div class="chartButton">
  372. <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" />
  373. <el-radio-group v-model="tab.chart3.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart3')">
  374. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  375. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  376. </el-radio-group>
  377. <div v-show="tab.chart3.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  378. <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" />
  379. </div>
  380. <div v-show="tab.chart3.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  381. <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')">
  382. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  383. </el-select>
  384. <el-select v-model="tab.chart3.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  385. <el-option v-for="(item,index) in tab.chart3.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  386. </el-select>
  387. </div>
  388. <div v-show="tab.chart3.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  389. <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" />
  390. </div>
  391. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart3')">{{$t('errorAnalysis.confirm')}}</el-button>
  392. </div>
  393. <div>
  394. <div class="exportTable2" @click="handleExport('chart3')">{{$t('dashboard.Export')}}</div>
  395. <div class="exportTable2" @click="handleTable('chart3')">{{$t('errorAnalysis.changeTable')}}</div>
  396. </div>
  397. </div>
  398. <div v-if="tab.chart3.isChart" id="chartLine3" style="width:100%;height:385px;" />
  399. <div v-if="tab.chart3.isTable" class="table">
  400. <div class="button">
  401. <div class="exportTable" @click="handleExport('chart3')">{{$t('dashboard.Export')}}</div>
  402. <div class="exportTable" @click="handleChart('chart3')">{{$t('dashboard.sTable')}}</div>
  403. </div>
  404. <el-table
  405. :key="tab.chart3.table.tableKey"
  406. v-loading="tab.chart3.table.listLoading"
  407. :element-loading-text="$t('common.tableMsg')"
  408. :data="tab.chart3.table.list"
  409. border
  410. fit
  411. highlight-current-row
  412. style="width: 100%;"
  413. height="385"
  414. :row-style="rowStyle"
  415. :cell-style="cellStyle"
  416. class="elTable table-fixed"
  417. empty-text="No Data"
  418. >
  419. <!-- <template slot="empty">
  420. <span style="color: #969799;">No Data</span>
  421. </template> -->
  422. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="90px" align="center" prop="日期" />
  423. <el-table-column :label="$t('errorAnalysis.sxlb')" sortable min-width="90px" align="center" prop="名称" />
  424. <el-table-column :label="$t('errorAnalysis.jhzl')" sortable min-width="100px" align="center" prop="理论量" />
  425. <el-table-column :label="$t('errorAnalysis.skzl')"sortable min-width="100px" align="center" prop="实际量" />
  426. <el-table-column :label="$t('errorAnalysis.zql')" sortable min-width="90px" align="center" prop="准确率" />
  427. </el-table>
  428. </div>
  429. </div>
  430. </el-col>
  431. <el-col :span="12">
  432. <div class="grid-content">
  433. <h4>{{$t('errorAnalysis.clzql')}}</h4>
  434. <div v-if="tab.chart4.isChart" class="button">
  435. <div class="chartButton">
  436. <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" />
  437. <el-radio-group v-model="tab.chart4.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart4')">
  438. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  439. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  440. </el-radio-group>
  441. <div v-show="tab.chart4.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  442. <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" />
  443. </div>
  444. <div v-show="tab.chart4.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  445. <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')">
  446. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  447. </el-select>
  448. <el-select v-model="tab.chart4.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  449. <el-option v-for="(item,index) in tab.chart4.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  450. </el-select>
  451. </div>
  452. <div v-show="tab.chart4.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  453. <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" />
  454. </div>
  455. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart4')">{{$t('errorAnalysis.confirm')}}</el-button>
  456. </div>
  457. <div>
  458. <div class="exportTable2" @click="handleExport('chart4')">{{$t('dashboard.Export')}}</div>
  459. <div class="exportTable2" @click="handleTable('chart4')">{{$t('errorAnalysis.changeTable')}}</div>
  460. </div>
  461. </div>
  462. <div v-if="tab.chart4.isChart" id="chartLine4" style="width:100%;height:385px;" />
  463. <div v-if="tab.chart4.isTable" class="table">
  464. <div class="button">
  465. <div class="exportTable" @click="handleExport('chart4')">{{$t('dashboard.Export')}}</div>
  466. <div class="exportTable" @click="handleChart('chart4')">{{$t('dashboard.sTable')}}</div>
  467. </div>
  468. <el-table
  469. :key="tab.chart4.table.tableKey"
  470. v-loading="tab.chart4.table.listLoading"
  471. :data="tab.chart4.table.list"
  472. border
  473. fit
  474. highlight-current-row
  475. style="width: 100%;"
  476. height="385"
  477. :row-style="rowStyle"
  478. :cell-style="cellStyle"
  479. class="elTable table-fixed"
  480. >
  481. <template slot="empty">
  482. <span style="color: #969799;">No Data</span>
  483. </template>
  484. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="90px" align="center" prop="日期" />
  485. <el-table-column :label="$t('errorAnalysis.projname')" sortable min-width="90px" align="center" prop="名称" />
  486. <el-table-column :label="$t('errorAnalysis.jhzl')" sortable min-width="100px" align="center" prop="理论量" />
  487. <el-table-column :label="$t('errorAnalysis.skzl')"sortable min-width="100px" align="center" prop="实际量" />
  488. <el-table-column :label="$t('errorAnalysis.zql')" sortable min-width="90px" align="center" prop="准确率" />
  489. </el-table>
  490. </div>
  491. </div>
  492. </el-col>
  493. </el-row>
  494. <el-row :gutter="10" class="dashboard-editor-container">
  495. <el-col :span="12">
  496. <div class="grid-content">
  497. <h4> {{$t('errorAnalysis.hltj')}} </h4>
  498. <div v-if="tab.chart5.isChart" class="button">
  499. <div class="chartButton">
  500. <el-radio-group v-model="tab.chart5.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart5')">
  501. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  502. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  503. </el-radio-group>
  504. <div v-show="tab.chart5.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  505. <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" />
  506. </div>
  507. <div v-show="tab.chart5.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  508. <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')">
  509. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  510. </el-select>
  511. <el-select v-model="tab.chart5.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  512. <el-option v-for="(item,index) in tab.chart5.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  513. </el-select>
  514. </div>
  515. <div v-show="tab.chart5.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  516. <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" />
  517. </div>
  518. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart5')">{{$t('errorAnalysis.confirm')}}</el-button>
  519. </div>
  520. <div>
  521. <div class="exportTable2" @click="handleExport('chart5')">{{$t('dashboard.Export')}}</div>
  522. <div class="exportTable2" @click="handleTable('chart5')">{{$t('errorAnalysis.changeTable')}}</div>
  523. </div>
  524. </div>
  525. <div v-if="tab.chart5.isChart" id="chartLine5" class="button" style="width:100%;height:385px;" />
  526. <div v-if="tab.chart5.isTable" class="table">
  527. <div class="button">
  528. <div class="exportTable" @click="handleExport('chart5')">{{$t('dashboard.Export')}}</div>
  529. <div class="exportTable" @click="handleChart('chart5')">{{$t('dashboard.sTable')}}</div>
  530. </div>
  531. <el-table
  532. :key="tab.chart5.table.tableKey"
  533. v-loading="tab.chart5.table.listLoading"
  534. :data="tab.chart5.table.list"
  535. ref='myTable'
  536. border
  537. fit
  538. highlight-current-row
  539. style="width: 100%;"
  540. height="385"
  541. :row-style="rowStyle"
  542. :cell-style="cellStyle"
  543. class="elTable table-fixed"
  544. >
  545. <template slot="empty">
  546. <span style="color: #969799;">No Data</span>
  547. </template>
  548. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="100px" align="center" prop="日期" />
  549. <el-table-column :label="$t('errorAnalysis.zdtzcs')" sortable min-width="130px" align="center" prop="field1" />
  550. <el-table-column :label="$t('errorAnalysis.sdtzcs')" sortable min-width="130px" align="center" prop="field2" />
  551. <el-table-column :label="$t('errorAnalysis.zdtzllzl')" sortable min-width="110px" align="center" prop="理论自动" />
  552. <el-table-column :label="$t('errorAnalysis.zdtzsjzl')" sortable min-width="110px" align="center" prop="实际自动" />
  553. <el-table-column :label="$t('errorAnalysis.zdtzzql')" sortable min-width="110px" align="center" prop="field3" />
  554. <el-table-column :label="$t('errorAnalysis.sdtzllzl')" sortable min-width="110px" align="center" prop="理论手动" />
  555. <el-table-column :label="$t('errorAnalysis.sdtzsjzl')" sortable min-width="110px" align="center" prop="实际手动" />
  556. <el-table-column :label="$t('errorAnalysis.sdtzzql')" sortable min-width="110px" align="center" prop="field4" />
  557. </el-table>
  558. </div>
  559. </div>
  560. </el-col>
  561. <el-col :span="12">
  562. <div class="grid-content">
  563. <h4>{{$t('errorAnalysis.hlqxcs')}}</h4>
  564. <div v-if="tab.chart6.isChart" class="button">
  565. <div class="chartButton">
  566. <el-radio-group v-model="tab.chart6.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart6')">
  567. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  568. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  569. </el-radio-group>
  570. <div v-show="tab.chart6.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  571. <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" />
  572. </div>
  573. <div v-show="tab.chart6.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  574. <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')">
  575. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  576. </el-select>
  577. <el-select v-model="tab.chart6.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  578. <el-option v-for="(item,index) in tab.chart6.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  579. </el-select>
  580. </div>
  581. <div v-show="tab.chart6.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  582. <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" />
  583. </div>
  584. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart6')">{{$t('errorAnalysis.confirm')}}</el-button>
  585. </div>
  586. <div>
  587. <div class="exportTable2" @click="handleExport('chart6')">{{$t('dashboard.Export')}}</div>
  588. <div class="exportTable2" @click="handleTable('chart6')">{{$t('errorAnalysis.changeTable')}}</div>
  589. </div>
  590. </div>
  591. <div v-if="tab.chart6.isChart" id="chartLine6" style="width:100%;height:385px;" />
  592. <div v-if="tab.chart6.isTable" class="table">
  593. <div class="button">
  594. <div class="exportTable" @click="handleExport('chart6')">{{$t('dashboard.Export')}}</div>
  595. <div class="exportTable" @click="handleChart('chart6')">{{$t('dashboard.sTable')}}</div>
  596. </div>
  597. <el-table
  598. :key="tab.chart6.table.tableKey"
  599. v-loading="tab.chart6.table.listLoading"
  600. :element-loading-text="$t('common.tableMsg')"
  601. :data="tab.chart6.table.list"
  602. border
  603. fit
  604. highlight-current-row
  605. style="width: 100%;"
  606. height="385"
  607. :row-style="rowStyle"
  608. :cell-style="cellStyle"
  609. class="elTable table-fixed"
  610. >
  611. <template slot="empty">
  612. <span style="color: #969799;">No Data</span>
  613. </template>
  614. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="110px" align="center" prop="日期" />
  615. <el-table-column :label="$t('errorAnalysis.hlqxcs')" sortable min-width="110px" align="center" prop="field1" />
  616. </el-table>
  617. </div>
  618. </div>
  619. </el-col>
  620. </el-row>
  621. <el-row :gutter="10" class="dashboard-editor-container" style="margin-bottom: 30px;">
  622. <el-col :span="24">
  623. <div class="grid-content">
  624. <h4>{{$t('errorAnalysis.lsslsjtj')}}</h4>
  625. <div v-if="tab.chart7.isChart" class="button">
  626. <div class="chartButton">
  627. <!-- 君盛-->
  628. <!-- <el-select v-model="tab.chart7.getdataListParm.parammaps.statisticsList" multiple :placeholder="$t('common.please')" collapse-tags @change="changeStatisticChart7">
  629. <el-option v-for="item in tab.chart7.statisticsList" :key="item.name" :label="item.name" :value="item.name" />
  630. </el-select> -->
  631. <!-- 其他牧场 -->
  632. <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" />
  633. <el-select v-model="tab.chart7.getdataListParm.parammaps.ftId" multiple collapse-tags :placeholder="$t('common.please')" @change="changeformula()">
  634. <el-option v-for="item in tab.chart7.formulaList" :key="item.id" :label="item.tname" :value="item.id" />
  635. </el-select>
  636. <el-radio-group v-model="tab.chart7.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;margin-left: 10px;" @change="changeChartSpecificDate('chart7')">
  637. <el-radio-button label="1" border>{{$t('errorAnalysis.day')}}</el-radio-button>
  638. <el-radio-button label="3" border>{{$t('errorAnalysis.month')}}</el-radio-button>
  639. </el-radio-group>
  640. <div v-show="tab.chart7.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
  641. <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" />
  642. </div>
  643. <div v-show="tab.chart7.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
  644. <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')">
  645. <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
  646. </el-select>
  647. <el-select v-model="tab.chart7.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" :placeholder="$t('errorAnalysis.qxzz')" >
  648. <el-option v-for="(item,index) in tab.chart7.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
  649. </el-select>
  650. </div>
  651. <div v-show="tab.chart7.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
  652. <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" />
  653. </div>
  654. <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart7')">{{$t('errorAnalysis.confirm')}}</el-button>
  655. </div>
  656. <div>
  657. <div class="exportTable2" @click="handleExport('chart7')">{{$t('dashboard.Export')}}</div>
  658. <div class="exportTable2" @click="handleTable('chart7')">{{$t('errorAnalysis.changeTable')}}</div>
  659. </div>
  660. </div>
  661. <div v-if="tab.chart7.isChart" id="chartLine7" style="width:100%;height:385px;" />
  662. <div v-if="tab.chart7.isTable" class="table">
  663. <div class="button">
  664. <div class="exportTable" @click="handleExport('chart7')">{{$t('dashboard.Export')}}</div>
  665. <div class="exportTable" @click="handleChart('chart7')">{{$t('dashboard.sTable')}}</div>
  666. </div>
  667. <el-table
  668. :key="tab.chart7.table.tableKey"
  669. v-loading="tab.chart7.table.listLoading"
  670. :data="tab.chart7.table.list"
  671. border
  672. fit
  673. highlight-current-row
  674. style="width: 100%;"
  675. height="385"
  676. :row-style="rowStyle"
  677. :cell-style="cellStyle"
  678. class="elTable table-fixed"
  679. >
  680. <template slot="empty">
  681. <span style="color: #969799;">No Data</span>
  682. </template>
  683. <el-table-column :label="$t('errorAnalysis.date')" sortable min-width="110px" align="center" prop="日期" />
  684. <el-table-column :label="$t('errorAnalysis.pen')" sortable min-width="110px" align="center" prop="fname" />
  685. <el-table-column :label="$t('errorAnalysis.slsj')" sortable min-width="110px" align="center" prop="撒料时间" />
  686. </el-table>
  687. </div>
  688. </div>
  689. </el-col>
  690. </el-row>
  691. </div>
  692. </div>
  693. </el-tab-pane>
  694. <el-tab-pane :label="$t('errorAnalysis.hltj')"name="second">
  695. <div class="search" ref="myHeightSecond">
  696. <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" />
  697. <!-- <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> -->
  698. <el-button class="el-icon-arrow-left elIconArrowLeft" style="display:inline-block;margin-top: 5px;" :disabled="Beforedisabled2" @click="handleBefore2" />
  699. <el-button class="el-icon-arrow-right elIconArrowRight" style="display:inline-block;margin-top: 5px;" :disabled="Nextdisabled2" @click="handleNext2" />
  700. <el-select clearable filterable v-model="tab2.table.getdataListParm.parammaps.tmrtname" :placeholder="$t('errorAnalysis.tmrName')" class="filter-item" style="width: 120px;">
  701. <el-option v-for="(item,index) in tab2.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
  702. </el-select>
  703. <el-input v-model="tab2.table.getdataListParm.parammaps.projname" style="margin-top: 5px;width: 110px;" :placeholder="$t('errorAnalysis.projname')" class="filter-item" clearable />
  704. <el-select v-model="tab2.table.getdataListParm.parammaps.times" style="margin-top: 5px;width: 110px;" filterable :placeholder="$t('errorAnalysis.isTrainNumber')" class="filter-item" clearable>
  705. <el-option v-for="item in tab2.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  706. </el-select>
  707. <el-input v-model="tab2.table.getdataListParm.parammaps.templetname" style="margin-top: 5px;width: 110px;" :placeholder="$t('errorAnalysis.feedName')" class="filter-item" clearable />
  708. <el-select v-model="tab2.table.getdataListParm.parammaps.buttontype" style="margin-top: 5px;width: 130px;" filterable :placeholder="$t('errorAnalysis.tzfs')" class="filter-item" clearable>
  709. <el-option v-for="item in tab2.jumpModeList" :key="item.id" :label="item.name" :value="item.id" />
  710. </el-select>
  711. <div style="display: inline-block;" class="filter-item1">
  712. <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 />
  713. <span>-</span>
  714. <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 />
  715. </div>
  716. <div style="display: inline-block;" class="filter-item1">
  717. <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 />
  718. <span>-</span>
  719. <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 />
  720. </div>
  721. <div style="display: inline-block;" class="filter-item1">
  722. <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 />
  723. <span>-</span>
  724. <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 />
  725. </div>
  726. <el-select v-model="tab2.table.getdataListParm.parammaps.premix" filterable :placeholder="$t('errorAnalysis.sfyhjh')" class="filter-item" style="width: 120px;" clearable>
  727. <el-option v-for="item in tab2.premixList" :key="item.id" :label="item.name" :value="item.id" />
  728. </el-select>
  729. <el-checkbox v-model="tab2.table.getdataListParm.parammaps.error" style="margin-right: 10px;">{{$t('processAnalysis.oName')}}</el-checkbox>
  730. <el-button class="successBorder" style="margin-top: 5px;" @click="form_search2">{{$t('common.query')}}</el-button>
  731. <el-button class="successBorder" style="margin-top: 5px;" @click="handleRefresh2">{{$t('common.reset')}}</el-button>
  732. <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>
  733. </div>
  734. <div class="table">
  735. <u-table
  736. ref="plTable2"
  737. :key="tab2.table.tableKey"
  738. v-loading="tab2.table.listLoading"
  739. :element-loading-text="$t('common.tableMsg')"
  740. :data="tab2.table.list"
  741. border
  742. fit
  743. highlight-current-row
  744. style="width: 100%;"
  745. :row-style="rowStyle"
  746. :cell-style="cellStyle"
  747. class="elTable table-fixed"
  748. :height="myHeightSecond"
  749. empty-text="No Data"
  750. >
  751. <!-- <u-table-column >
  752. <template slot="empty">
  753. <span style="color: #969799;">No Data</span>
  754. </template>
  755. </u-table-column> -->
  756. <u-table-column :key="Math.random()" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="日期" />
  757. <u-table-column sortable :label="$t('errorAnalysis.tmrnames')" min-width="70px" align="center" prop="TMR名称" />
  758. <u-table-column sortable :label="$t('errorAnalysis.czNum')" min-width="70px" align="center" prop="sort" />
  759. <u-table-column sortable :label="$t('errorAnalysis.projname')" min-width="50px" align="center" prop="车次" />
  760. <u-table-column sortable :label="$t('errorAnalysis.isTrainNumber')" min-width="50px" align="center" prop="班次" />
  761. <u-table-column sortable :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="配方名称">
  762. <template slot-scope="{row}">
  763. <a @click="clickRecipeName2(row)" style="text-decoration: underline;color: #0000FF;">{{ row.配方名称 }}</a>
  764. </template>
  765. </u-table-column>
  766. <u-table-column sortable :label="$t('errorAnalysis.Driver')" min-width="50px" align="center" prop="驾驶员" />
  767. <u-table-column sortable :label="$t('errorAnalysis.isFeed')" min-width="70px" align="center" prop="饲料">
  768. <template slot-scope="{row}">
  769. <a @click="clickFeed2(row)" style="text-decoration: underline;color: #0000FF;">{{ row.饲料 }}</a>
  770. </template>
  771. </u-table-column>
  772. <u-table-column sortable :label="$t('errorAnalysis.llzl')" min-width="55px" align="center" prop="理论重量" />
  773. <u-table-column sortable :label="$t('errorAnalysis.acWeight')" min-width="55px" align="center" prop="实际重量" />
  774. <u-table-column sortable :label="$t('errorAnalysis.wcz')" min-width="45px" align="center" prop="误差值" />
  775. <u-table-column sortable :label="$t('errorAnalysis.zql')" min-width="45px" align="center" prop="准确率" />
  776. <u-table-column sortable :label="$t('errorAnalysis.planTime')" min-width="55px" align="center" prop="计划时间" />
  777. <u-table-column sortable :label="$t('errorAnalysis.startTime')" min-width="55px" align="center" prop="开始时间" />
  778. <u-table-column sortable :label="$t('errorAnalysis.endTime')" min-width="55px" align="center" prop="结束时间" />
  779. <u-table-column sortable :label="$t('errorAnalysis.jsTime')" min-width="55px" align="center" prop="搅拌时间" />
  780. <u-table-column sortable :label="$t('errorAnalysis.tzfs')" min-width="55px" align="center" prop="跳转方式" />
  781. <u-table-column sortable :label="$t('errorAnalysis.stWeight')" min-width="55px" align="center" prop="开始重量" />
  782. <u-table-column sortable :label="$t('errorAnalysis.edWeight')" min-width="55px" align="center" prop="结束重量" />
  783. <u-table-column sortable :label="$t('errorAnalysis.ccms')" min-width="55px" align="center" prop="remark" />
  784. <u-table-column sortable :label="$t('errorAnalysis.isOK')" min-width="70px" align="center" prop="standard" />
  785. <u-table-column sortable :label="$t('errorAnalysis.area')" min-width="70px" align="center" prop="barname" />
  786. </u-table>
  787. <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>
  788. </div>
  789. </el-tab-pane>
  790. <el-tab-pane :label="$t('errorAnalysis.sltj')" name="third">
  791. <div class="search" ref="myHeightThird">
  792. <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" />
  793. <!-- <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> -->
  794. <el-button class="el-icon-arrow-left elIconArrowLeft" style="dispaly:inline-block;margin-top: 5px;" :disabled="Beforedisabled3" @click="handleBefore3" />
  795. <el-button class="el-icon-arrow-right elIconArrowRight" style="dispaly:inline-block;margin-top: 5px;" :disabled="Nextdisabled3" @click="handleNext3" />
  796. <el-select v-model="tab3.table.getdataListParm.parammaps.tmrtname" :placeholder="$t('errorAnalysis.tmrName')" class="filter-item" style="margin-top: 5px;width: 120px;" clearable filterable>
  797. <el-option v-for="(item,index) in tab3.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
  798. </el-select>
  799. <el-input v-model="tab3.table.getdataListParm.parammaps.projname" style="margin-top: 5px;width: 150px;" :placeholder="$t('errorAnalysis.projname')" class="filter-item" clearable />
  800. <el-select v-model="tab3.table.getdataListParm.parammaps.times" style="margin-top: 5px;width: 100px;" filterable :placeholder="$t('errorAnalysis.isTrainNumber')" class="filter-item" clearable>
  801. <el-option v-for="item in tab3.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
  802. </el-select>
  803. <el-input v-model="tab3.table.getdataListParm.parammaps.templetname" style="margin-top: 5px;width: 110px;" :placeholder="$t('errorAnalysis.feedName')" class="filter-item" clearable />
  804. <el-input v-model="tab3.table.getdataListParm.parammaps.fname" style="margin-top: 5px;width: 110px;" :placeholder="$t('errorAnalysis.isHouseName')" class="filter-item" clearable />
  805. <el-select v-model="tab3.table.getdataListParm.parammaps.buttontype" style="margin-top: 5px;width: 110px;" filterable :placeholder="$t('errorAnalysis.tzfs')"class="filter-item" clearable>
  806. <el-option v-for="item in tab3.jumpModeList" :key="item.id" :label="item.name" :value="item.id" />
  807. </el-select>
  808. <div style="display: inline-block;" class="filter-item1">
  809. <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 />
  810. <span>-</span>
  811. <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 />
  812. </div>
  813. <div style="display: inline-block;" class="filter-item1">
  814. <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 />
  815. <span>-</span>
  816. <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 />
  817. </div>
  818. <div style="display: inline-block;" class="filter-item1">
  819. <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 />
  820. <span>-</span>
  821. <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 />
  822. </div>
  823. <el-checkbox v-model="tab3.table.getdataListParm.parammaps.error" style="margin-right: 10px;">{{$t('processAnalysis.oName')}}</el-checkbox>
  824. <el-button class="successBorder" style="margin-top: 5px;" @click="form_search3">{{$t('common.query')}}</el-button>
  825. <el-button class="successBorder" style="margin-top: 5px;" @click="handleRefresh3">{{$t('common.reset')}}</el-button>
  826. <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>
  827. </div>
  828. <div class="table">
  829. <u-table
  830. ref="plTable3"
  831. :key="tab3.table.tableKey"
  832. v-loading="tab3.table.listLoading"
  833. :element-loading-text="$t('common.tableMsg')"
  834. :data="tab3.table.list"
  835. border
  836. fit
  837. highlight-current-row
  838. style="width: 100%;"
  839. :row-style="rowStyle"
  840. :cell-style="cellStyle"
  841. class="elTable table-fixed"
  842. :height="myHeightThird"
  843. empty-text="No Data"
  844. >
  845. <!-- <u-table-column >
  846. <template slot="empty">
  847. <span style="color: #969799;"></span>
  848. </template>
  849. </u-table-column> -->
  850. <u-table-column :key="Math.random()" sortable :label="$t('errorAnalysis.date')" min-width="70px" align="center" prop="日期" />
  851. <u-table-column sortable :label="$t('errorAnalysis.tmrnames')" min-width="70px" align="center" prop="TMR名称" />
  852. <u-table-column sortable :label="$t('errorAnalysis.czNum')" min-width="70px" align="center" prop="sort" />
  853. <u-table-column sortable :label="$t('errorAnalysis.projname')" min-width="45px" align="center" prop="车次" />
  854. <u-table-column sortable :label="$t('errorAnalysis.isTrainNumber')" min-width="45px" align="center" prop="班次" />
  855. <u-table-column sortable :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="配方名称">
  856. <template slot-scope="{row}">
  857. <a @click="clickRecipeName3(row)" style="text-decoration: underline;color: #0000FF;">{{ row.配方名称 }}</a>
  858. </template>
  859. </u-table-column>
  860. <u-table-column sortable :label="$t('errorAnalysis.Driver')" min-width="50px" align="center" prop="驾驶员" />
  861. <u-table-column sortable :label="$t('errorAnalysis.pen')" min-width="70px" align="center" prop="栏舍">
  862. <template slot-scope="{row}">
  863. <a @click="clickFence3(row)" style="text-decoration: underline;color: #0000FF;">{{ row.栏舍 }}</a>
  864. </template>
  865. </u-table-column>
  866. <u-table-column sortable :label="$t('errorAnalysis.llzl')" min-width="55px" align="center" prop="理论重量" />
  867. <u-table-column sortable :label="$t('errorAnalysis.acWeight')" min-width="55px" align="center" prop="实际重量" />
  868. <u-table-column sortable :label="$t('errorAnalysis.wcz')" min-width="45px" align="center" prop="误差值" />
  869. <u-table-column sortable :label="$t('errorAnalysis.zql')" min-width="45px" align="center" prop="准确率" />
  870. <u-table-column sortable :label="$t('errorAnalysis.startTime')" min-width="55px" align="center" prop="开始时间" />
  871. <u-table-column sortable :label="$t('errorAnalysis.endTime')" min-width="55px" align="center" prop="结束时间" />
  872. <u-table-column sortable :label="$t('errorAnalysis.tzfs')" min-width="55px" align="center" prop="跳转方式" />
  873. <u-table-column sortable :label="$t('errorAnalysis.stWeight')" min-width="55px" align="center" prop="开始重量" />
  874. <u-table-column sortable :label="$t('errorAnalysis.edWeight')" min-width="55px" align="center" prop="结束重量" />
  875. <u-table-column sortable :label="$t('errorAnalysis.isOK')" min-width="70px" align="center" prop="standard" />
  876. </u-table>
  877. <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>
  878. </div>
  879. </el-tab-pane>
  880. </el-tabs>
  881. <!-- 导出 -->
  882. <el-dialog :title="textMap[exportList.dialogStatus]" :visible.sync="exportList.dialogFormVisible" :close-on-click-modal="false" width="30%">
  883. <div>
  884. <span>{{$t('feedingEfficiency.dcskff')}}</span>
  885. <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" />
  886. </div>
  887. <div slot="footer" class="dialog-footer" style="margin-bottom: 10px;">
  888. <el-button class="cancelClose" @click="exportList.dialogFormVisible = false">{{$t('common.closed')}}</el-button>
  889. <el-button class="save" v-if="activeName=='second'" :disabled="isokDisable" @click="exportList2()">{{$t('errorAnalysis.confirm')}}</el-button>
  890. <el-button class="save" v-else-if="activeName=='third'" :disabled="isokDisable" @click="exportList3()">{{$t('errorAnalysis.confirm')}}</el-button>
  891. </div>
  892. </el-dialog>
  893. <!-- 查看 -->
  894. <See :show.sync="isShowDialog" :row-pid="rowPid" :start-time="startTime" :stop-time="stopTime" :optdevice="optdevice" :title-fname="titlefname" :method-name="methodName" :error="error" />
  895. <!-- 配方名称弹窗 -->
  896. <el-dialog :title="textMap[recipeNameTemp2.dialogStatus]" :visible.sync="recipeNameTemp2.dialogFormVisible" :close-on-click-modal="false" width="90%">
  897. <div class="recipeNameTemp2">
  898. <div class="search">
  899. <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')" />
  900. <el-button class="successBorder" @click="handleRecipeNameSearch2">{{$t('common.query')}}</el-button>
  901. </div>
  902. <div class="table">
  903. <el-table
  904. :key="recipeNameTemp2.tableKey"
  905. v-loading="recipeNameTemp2.listLoading"
  906. :element-loading-text="$t('common.tableMsg')"
  907. :data="recipeNameTemp2.list"
  908. border
  909. highlight-current-row
  910. style="width: 100%;"
  911. :row-style="rowStyle"
  912. :cell-style="cellStyle"
  913. class="elTable table-fixed"
  914. :max-height="450"
  915. >
  916. <template slot="empty">
  917. <span style="color: #969799;">No Data</span>
  918. </template>
  919. <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px" />
  920. <el-table-column :label="$t('formulationEvaluation.xgsj')" width="130px" align="center" prop="createdate" />
  921. <el-table-column :label="$t('formulationEvaluation.xgyh')" width="130px" align="center" prop="empname" />
  922. <el-table-column :label="$t('errorAnalysis.feedName')" min-width="70px" align="center" prop="tname">
  923. <template slot-scope="{row}">
  924. <span v-if="row.tname !==undefined &&row.tname.indexOf('/') !== -1" style="color: red;">
  925. {{row.tname}}
  926. </span>
  927. <span v-else>{{row.tname}}</span>
  928. </template>
  929. </el-table-column>
  930. <el-table-column :label="$t('formulationEvaluation.pfbm')" width="130px" align="center" prop="tcode" />
  931. <el-table-column :label="$t('formulationEvaluation.pfys')" min-width="70px" align="center">
  932. <template slot-scope="scope">
  933. <el-color-picker v-model="scope.row.tcolor" size="mini" :predefine="predefineColors" style="vertical-align: middle;" :disabled="scope.row.NoEdit" />
  934. </template>
  935. </el-table-column>
  936. <el-table-column :label="$t('errorAnalysis.sxlb')" width="130px" align="center" prop="ccname">
  937. <template slot-scope="{row}">
  938. <span v-if="row.ccname !==undefined &&row.ccname.indexOf('/') !== -1" style="color: red;">
  939. {{row.ccname}}
  940. </span>
  941. <span v-else>{{row.ccname}}</span>
  942. </template>
  943. </el-table-column>
  944. <el-table-column :label="$t('formulationEvaluation.pflx')" width="130px" align="center" prop="fttype">
  945. <template slot-scope="{row}">
  946. <span v-if="row.fttype !==undefined &&row.fttype.indexOf('/') !== -1" style="color: red;">
  947. {{row.fttype}}
  948. </span>
  949. <span v-else>{{row.fttype}}</span>
  950. </template>
  951. </el-table-column>
  952. <el-table-column :label="$t('formulationEvaluation.ly')" width="130px" align="center" prop="source">
  953. <template slot-scope="{row}">
  954. <span v-if="row.source !==undefined &&row.source.indexOf('/') !== -1" style="color: red;">
  955. {{row.source}}
  956. </span>
  957. <span v-else>{{row.source}}</span>
  958. </template>
  959. </el-table-column>
  960. <el-table-column :label="$t('formulationEvaluation.bbh')" width="130px" align="center" prop="version">
  961. <template slot-scope="{row}">
  962. <span v-if="row.version !== undefined && String(row.version).indexOf('/') !== -1" style="color: red;">
  963. {{row.version}}
  964. </span>
  965. <span v-else>{{row.version}}</span>
  966. </template>
  967. </el-table-column>
  968. <el-table-column :label="$t('formulationEvaluation.remark')" width="130px" align="center" prop="remark">
  969. <template slot-scope="{row}">
  970. <span v-if="row.remark !==undefined &&row.remark.indexOf('/') !== -1" style="color: red;">
  971. {{row.remark}}
  972. </span>
  973. <span v-else>{{row.remark}}</span>
  974. </template>
  975. </el-table-column>
  976. <el-table-column :label="$t('message.msg332')" min-width="70px" align="center">
  977. <template slot-scope="{row}">
  978. <a @click="clickSeeFeed(row)" style="text-decoration: underline;color: #0000FF;">查看</a>
  979. </template>
  980. </el-table-column>
  981. </el-table>
  982. <pagination v-show="recipeNameTemp2.total>0" :total="recipeNameTemp2.total" :page.sync="recipeNameTemp2.getdataListParm.offset" :limit.sync="recipeNameTemp2.getdataListParm.pagecount" @pagination="getRecipeNameList2()" />
  983. </div>
  984. </div>
  985. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  986. <el-button class="cancelClose1" @click="recipeNameTemp2.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
  987. </div>
  988. </el-dialog>
  989. <!-- 撒料统计-配方名称 -->
  990. <el-dialog :title="textMap[recipeNameTemp3.dialogStatus]" :visible.sync="recipeNameTemp3.dialogFormVisible" :close-on-click-modal="false" width="90%">
  991. <div class="recipeNameTemp3">
  992. <!-- <div class="search">
  993. <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')" />
  994. <el-button class="successBorder" @click="handleRecipeNameSearch3">{{$t('common.query')}}</el-button>
  995. </div> -->
  996. <div class="table">
  997. <el-table
  998. :key="recipeNameTemp3.tableKey"
  999. v-loading="recipeNameTemp3.listLoading"
  1000. :element-loading-text="$t('common.tableMsg')"
  1001. :data="recipeNameTemp3.list"
  1002. border
  1003. highlight-current-row
  1004. style="width: 100%;"
  1005. :row-style="rowStyle"
  1006. :cell-style="cellStyle"
  1007. class="elTable table-fixed"
  1008. :max-height="450"
  1009. >
  1010. <template slot="empty">
  1011. <span style="color: #969799;">No Data</span>
  1012. </template>
  1013. <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px" />
  1014. <el-table-column :label="$t('formulationEvaluation.slz')" width="130px" align="center" prop="feedgroup" />
  1015. <el-table-column :label="$t('InventoryManagement.silc')" min-width="70px" align="center" prop="fname">
  1016. <template slot-scope="{row}">
  1017. <span v-if="row.fweightstatus == 1" style="color: red;"> {{row.fname}} </span>
  1018. <span v-else>{{row.fname}}</span>
  1019. </template>
  1020. </el-table-column>
  1021. <el-table-column :label="$t('message.msg64')" width="130px" align="center" prop="fweight">
  1022. <template slot-scope="{row}">
  1023. <span v-if="row.fweight !==undefined &&row.fweight.indexOf('/') !== -1" style="color: red;">
  1024. {{row.fweight}}
  1025. </span>
  1026. <span v-else>{{row.fweight}}</span>
  1027. </template>
  1028. </el-table-column>
  1029. <el-table-column :label="$t('formulationEvaluation.jbys')" width="130px" align="center" prop="autosecond" />
  1030. </el-table>
  1031. <pagination v-show="recipeNameTemp3.total>0" :total="recipeNameTemp3.total" :page.sync="recipeNameTemp3.getdataListParm.offset" :limit.sync="recipeNameTemp3.getdataListParm.pagecount" @pagination="getRecipeNameList3()" />
  1032. </div>
  1033. </div>
  1034. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  1035. <el-button class="cancelClose1" @click="recipeNameTemp3.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
  1036. </div>
  1037. </el-dialog>
  1038. <!-- 饲料 -->
  1039. <el-dialog :title="textMap[feedTemp.dialogStatus]" :visible.sync="feedTemp.dialogFormVisible" :close-on-click-modal="false" width="98%">
  1040. <div class="feedTemp">
  1041. <div class="search">
  1042. <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')" />
  1043. <el-button class="successBorder" @click="handleFeedSearch">{{$t('common.query')}}</el-button>
  1044. </div>
  1045. <div class="table">
  1046. <el-table
  1047. :key="feedTemp.tableKey"
  1048. v-loading="feedTemp.listLoading"
  1049. :element-loading-text="$t('common.tableMsg')"
  1050. :data="feedTemp.list"
  1051. border
  1052. highlight-current-row
  1053. style="width: 100%;"
  1054. :row-style="rowStyle"
  1055. :cell-style="cellStyle"
  1056. class="elTable table-fixed"
  1057. >
  1058. <template slot="empty">
  1059. <span style="color: #969799;">No Data</span>
  1060. </template>
  1061. <el-table-column :label="$t('formulationEvaluation.xh')" align="center" type="index" width="50px">
  1062. <template slot-scope="scope">
  1063. <span>{{ scope.$index + (feedTemp.pageNum-1) * feedTemp.pageSize + 1 }}</span>
  1064. </template>
  1065. </el-table-column>
  1066. <el-table-column :label="$t('formulationEvaluation.xgsj')" min-width="100px" align="center" prop="updateTime" />
  1067. <el-table-column :label="$t('formulationEvaluation.xgyh')" width="130px" align="center" prop="empname" />
  1068. <el-table-column :label="$t('errorAnalysis.slzls')" min-width="100px" align="center">
  1069. <template slot-scope="{row}">
  1070. <span v-if="row.weight !==undefined &&row.weight.indexOf('/') !== -1" style="color: red;">
  1071. {{row.weight}}
  1072. </span>
  1073. <span v-else>{{row.weight}}</span>
  1074. </template>
  1075. </el-table-column>
  1076. </el-table>
  1077. <pagination v-show="feedTemp.total>0" :total="feedTemp.total" :page.sync="feedTemp.getdataListParm.offset" :limit.sync="feedTemp.getdataListParm.pagecount" @pagination="getFeedList()" />
  1078. </div>
  1079. </div>
  1080. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  1081. <el-button class="cancelClose1" @click="feedTemp.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
  1082. </div>
  1083. </el-dialog>
  1084. <!-- 栏舍 -->
  1085. <el-dialog :title="textMap[fenceTemp.dialogStatus]" :visible.sync="fenceTemp.dialogFormVisible" :close-on-click-modal="false" width="90%">
  1086. <div class="fenceTemp">
  1087. <el-tabs v-model="fenceTemp.activeName" @tab-click="handleFenceTabClick">
  1088. <el-tab-pane :label="$t('dhedFormula.bczl')" name="first">
  1089. <div class="search">
  1090. <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')" />
  1091. <el-button class="successBorder" @click="handleFenceSearch">{{$t('common.query')}}</el-button>
  1092. </div>
  1093. <div class="table">
  1094. <u-table
  1095. :key="fenceTemp.tab1.tableKey"
  1096. v-loading="fenceTemp.tab1.listLoading"
  1097. :element-loading-text="$t('common.tableMsg')"
  1098. :data="fenceTemp.tab1.list"
  1099. border
  1100. highlight-current-row
  1101. style="width: 100%;"
  1102. :row-style="rowStyle"
  1103. :cell-style="cellStyle"
  1104. class="elTable table-fixed"
  1105. :span-method="objectSpanMethod1"
  1106. >
  1107. <template slot="empty">
  1108. <span style="color: #969799;">No Data</span>
  1109. </template>
  1110. <u-table-column :label="$t('formulationEvaluation.xh')" width="50px" align="center" type="index" />
  1111. <u-table-column :label="$t('formulationEvaluation.xgsj')" width="100px" align="center" prop="createdate" />
  1112. <u-table-column :label="$t('formulationEvaluation.xgyh')" width="130px" align="center" prop="empname" />
  1113. <u-table-column :label="$t('errorAnalysis.isTrainNumber')" min-width="100px" align="center" prop="times" />
  1114. <u-table-column :label="$t('feedingEfficiency.sjnts')" min-width="100px" align="center" prop="ccount">
  1115. <template slot-scope="{row}">
  1116. <span v-if="row.ccountstatus == 1" style="color: red;">{{row.ccount}}</span>
  1117. <span v-else >{{row.ccount}}</span>
  1118. </template>
  1119. </u-table-column>
  1120. <u-table-column :label="$t('errorAnalysis.xs')" min-width="100px" align="center" prop="ratio">
  1121. <template slot-scope="{row}">
  1122. <span v-if="row.ratiostatus == 1" style="color: red;">{{row.ratio}}</span>
  1123. <span v-else >{{row.ratio}}</span>
  1124. </template>
  1125. </u-table-column>
  1126. <u-table-column :label="$t('dhedFormula.xsts')" min-width="100px" align="center" prop="ccountratio">
  1127. <template slot-scope="{row}">
  1128. <span v-if="row.ccountratiostatus == 1" style="color: red;">{{row.ccountratio}}</span>
  1129. <span v-else >{{row.ccountratio}}</span>
  1130. </template>
  1131. </u-table-column>
  1132. <u-table-column :label="$t('feedingEfficiency.pfmb')" min-width="70px" align="center" prop="ftname">
  1133. <template slot-scope="{row}">
  1134. <a v-if="row.ftnamestatus == 1" @click="clickRecipeTemplate3(row)" style="text-decoration: underline;color: red;">{{ row.ftname }}</a>
  1135. <a v-else @click="clickRecipeTemplate3(row)" style="text-decoration: underline;">{{ row.ftname }}</a>
  1136. </template>
  1137. </u-table-column>
  1138. <u-table-column :label="$t('errorAnalysis.bl')" min-width="100px" align="center">
  1139. <template slot-scope="{row}">
  1140. <span v-if="row.tratiostatus == 1" style="color: red;">{{row.tratio}}</span>
  1141. <span v-else >{{row.tratio}}</span>
  1142. </template>
  1143. </u-table-column>
  1144. <u-table-column :label="$t('formulationEvaluation.reset1')" min-width="100px" align="center" prop="weight">
  1145. <template slot-scope="{row}">
  1146. <span v-if="row.weightstatus == 1" style="color: red;">{{row.weight}}</span>
  1147. <span v-else>{{row.weight}}</span>
  1148. </template>
  1149. </u-table-column>
  1150. </u-table>
  1151. </div>
  1152. </el-tab-pane>
  1153. <el-tab-pane :label="$t('errorAnalysis.cczl')" name="second">
  1154. <div class="search">
  1155. <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')" />
  1156. <el-button class="successBorder" @click="handleFenceSearch">{{$t('common.query')}}</el-button>
  1157. </div>
  1158. <div class="table">
  1159. <u-table
  1160. :key="fenceTemp.tab2.tableKey"
  1161. v-loading="fenceTemp.tab2.listLoading"
  1162. :element-loading-text="$t('common.tableMsg')"
  1163. :data="fenceTemp.tab2.list"
  1164. border
  1165. highlight-current-row
  1166. style="width: 100%;"
  1167. :row-style="rowStyle"
  1168. class="elTable table-fixed"
  1169. :span-method="objectSpanMethod2"
  1170. empty-text="No Data"
  1171. >
  1172. <u-table-column :label="$t('formulationEvaluation.xh')" width="50px" :key="Math.random()" align="center" type="index" />
  1173. <u-table-column :label="$t('formulationEvaluation.xgsj')" width="100px" align="center" prop="createdate" />
  1174. <u-table-column :label="$t('formulationEvaluation.xgyh')" width="130px" align="center" prop="empname" />
  1175. <u-table-column :label="$t('errorAnalysis.isTrainNumber')" width="100px" align="center" prop="times" />
  1176. <!-- <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"> -->
  1177. <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">
  1178. <template slot-scope="scope">
  1179. <span v-if="scope.row[item.prop] !==undefined &&scope.row[item.prop].indexOf('/') !== -1" style="color: red;">
  1180. {{scope.row[item.prop]}}
  1181. </span>
  1182. <span v-else>{{scope.row[item.prop]}}</span>
  1183. </template>
  1184. </u-table-column>
  1185. </u-table>
  1186. </div>
  1187. </el-tab-pane>
  1188. </el-tabs>
  1189. </div>
  1190. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  1191. <el-button class="cancelClose1" @click="fenceTemp.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
  1192. </div>
  1193. </el-dialog>
  1194. <!-- this.$t('errorAnalysis.pfmbxgjl') -->
  1195. <el-dialog :title="textMap[modificationRecordTemp.dialogStatus]" :visible.sync="modificationRecordTemp.dialogFormVisible" :close-on-click-modal="false" width="90%">
  1196. <div class="modificationRecord">
  1197. <h3 style="flex: 1;">修改前</h3>
  1198. <div class="top">
  1199. <div class="left">
  1200. <div><b>配方名称:</b>{{modificationRecordTemp.list1.tname}}</div>
  1201. <div><b>配方编码:</b>{{modificationRecordTemp.list1.tcode}}</div>
  1202. <div><b>配方颜色:</b><el-color-picker v-model="modificationRecordTemp.list1.tcolor" size="mini" :predefine="predefineColors" style="vertical-align: middle;" disabled /></div>
  1203. <div><b>牲畜类别:</b>{{modificationRecordTemp.list1.ccname}}</div>
  1204. <div><b>配方类型:</b>{{modificationRecordTemp.list1.fttype}}</div>
  1205. <div><b>{{$t('formulationEvaluation.ly')}}:</b>{{modificationRecordTemp.list1.source}}</div>
  1206. <div><b>版本号:</b>{{modificationRecordTemp.list1.version}}</div>
  1207. <div><b>备注:</b>{{modificationRecordTemp.list1.remark}}</div>
  1208. </div>
  1209. <div class="right">
  1210. <el-table
  1211. :key="modificationRecordTemp.tableKey1"
  1212. v-loading="modificationRecordTemp.listLoading1"
  1213. :element-loading-text="$t('common.tableMsg')"
  1214. :data="modificationRecordTemp.list1.fit"
  1215. border
  1216. fit
  1217. highlight-current-row
  1218. style="width: 100%;"
  1219. height="280"
  1220. :row-style="rowStyle"
  1221. :cell-style="cellStyle"
  1222. class="elTable table-fixed"
  1223. show-summary
  1224. :summary-method="getSummaries1"
  1225. empty-text="No Data"
  1226. >
  1227. <el-table-column :label="$t('formulationEvaluation.slz')" min-width="90px" align="center" prop="feedgroup" />
  1228. <el-table-column :label="$t('InventoryManagement.silc')" min-width="90px" align="center" prop="fname" />
  1229. <el-table-column :label="$t('message.msg64')" min-width="100px" align="center" prop="fweight" />
  1230. <el-table-column :label="$t('formulationEvaluation.jbys')" min-width="100px" align="center">
  1231. <template slot-scope="{row}">
  1232. <span>{{ row.autosecond }}</span>
  1233. </template>
  1234. </el-table-column>
  1235. </el-table>
  1236. </div>
  1237. </div>
  1238. <hr/>
  1239. <h3 style="color: red;">修改后</h3>
  1240. <div class="bottom">
  1241. <div class="left">
  1242. <div><b>配方名称:</b>{{modificationRecordTemp.list2.tname}}</div>
  1243. <div><b>配方编码:</b>{{modificationRecordTemp.list2.tcode}}</div>
  1244. <div><b>配方颜色:</b><el-color-picker v-model="modificationRecordTemp.list2.tcolor" size="mini" :predefine="predefineColors" style="vertical-align: middle;" disabled /></div>
  1245. <div><b>牲畜类别:</b>{{modificationRecordTemp.list2.ccname}}</div>
  1246. <div><b>配方类型:</b>{{modificationRecordTemp.list2.fttype}}</div>
  1247. <div><b>{{$t('formulationEvaluation.ly')}}:</b>{{modificationRecordTemp.list2.source}}</div>
  1248. <div><b>版本号:</b>{{modificationRecordTemp.list2.version}}</div>
  1249. <div><b>备注:</b>{{modificationRecordTemp.list2.remark}}</div>
  1250. </div>
  1251. <div class="right">
  1252. <el-table
  1253. :key="modificationRecordTemp.tableKey2"
  1254. v-loading="modificationRecordTemp.listLoading2"
  1255. :element-loading-text="$t('common.tableMsg')"
  1256. :data="modificationRecordTemp.list2.fit"
  1257. border
  1258. fit
  1259. highlight-current-row
  1260. style="width: 100%;"
  1261. height="280"
  1262. :row-style="rowStyle"
  1263. :cell-style="cellStyle"
  1264. class="elTable table-fixed"
  1265. show-summary
  1266. empty-text="No Data"
  1267. :summary-method="getSummaries2"
  1268. >
  1269. <!-- <template slot="empty">
  1270. <span style="color: #969799;">No Data</span>
  1271. </template> -->
  1272. <el-table-column :label="$t('formulationEvaluation.slz')" min-width="90px" align="center" prop="feedgroup" />
  1273. <el-table-column :label="$t('InventoryManagement.silc')" min-width="90px" align="center" prop="fname" />
  1274. <el-table-column :label="$t('message.msg64')" min-width="100px" align="center" prop="fweight" />
  1275. <el-table-column :label="$t('formulationEvaluation.jbys')" min-width="100px" align="center">
  1276. <template slot-scope="{row}">
  1277. <span>{{ row.autosecond }}</span>
  1278. </template>
  1279. </el-table-column>
  1280. </el-table>
  1281. </div>
  1282. </div>
  1283. </div>
  1284. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  1285. <el-button class="cancelClose1" @click="modificationRecordTemp.dialogFormVisible = false; ">{{$t('common.closed')}}</el-button>
  1286. </div>
  1287. </el-dialog>
  1288. </div>
  1289. </template>
  1290. <script>
  1291. import echarts from 'echarts'
  1292. import See from './see.vue'
  1293. require('echarts/theme/macarons')
  1294. import { GetDataByName, GetReportform, whichWeek, postJson } from '@/api/common'
  1295. import Cookies from 'js-cookie'
  1296. import {
  1297. parseTime,
  1298. json2excel,
  1299. handleTableSpan,
  1300. handleObjectSpanMethod
  1301. } from '@/utils/index.js'
  1302. import Pagination from '@/components/Pagination'
  1303. import { MessageBox } from 'element-ui'
  1304. import mySelect from '@/components/mySelect'
  1305. export default {
  1306. name: 'PastureErrorAnalysis',
  1307. components: { Pagination, mySelect, See },
  1308. data() {
  1309. return {
  1310. error: '',
  1311. optdevice: '',
  1312. stopTime: '',
  1313. startTime: '',
  1314. Eweight: '',
  1315. predefineColors: [
  1316. '#E57373',
  1317. '#F06292',
  1318. '#BA68C8',
  1319. '#9575CD',
  1320. '#7986CB',
  1321. '#64B5F6',
  1322. '#4FC3F7',
  1323. '#4DD0E1',
  1324. '#4DB6AC',
  1325. '#81C784',
  1326. '#AED581',
  1327. '#DCE775',
  1328. '#FFF176',
  1329. '#FFD54F',
  1330. '#FFB74D',
  1331. '#FF8A65',
  1332. '#A1887F',
  1333. '#E0E0E0',
  1334. '#90A4AE'
  1335. ],
  1336. pickerMinMonth: '',
  1337. pickerOptionsMonth: {
  1338. onPick: ({ maxDate, minDate }) => {
  1339. this.pickerMinMonth = minDate.getTime()
  1340. if (maxDate) {
  1341. this.pickerMinMonth = ''
  1342. }
  1343. },
  1344. // 限制不能选择今天之后的日期
  1345. disabledDate: (time) => {
  1346. if (this.pickerMinMonth !== '') {
  1347. const one = 24 * 3600 * 1000 * 365 * 5
  1348. const minTime = this.pickerMinMonth - 0
  1349. let maxTime = this.pickerMinMonth + one
  1350. if (maxTime > new Date()) {
  1351. maxTime = new Date()
  1352. }
  1353. return time.getTime() < minTime || time.getTime() > maxTime
  1354. }
  1355. return time.getTime() >= Date.now()
  1356. }
  1357. },
  1358. pickerMinDate: '',
  1359. pickerOptionsDate: {
  1360. showWeekNumber: false,
  1361. onPick: ({ maxDate, minDate }) => {
  1362. this.pickerMinDate = minDate.getTime()
  1363. if (maxDate) {
  1364. this.pickerMinDate = ''
  1365. }
  1366. },
  1367. // 限制不能选择今天之后的日期
  1368. disabledDate: (time) => {
  1369. if (this.pickerMinDate !== '') {
  1370. const one = 31 * 24 * 3600 * 1000
  1371. const minTime = this.pickerMinDate - one
  1372. let maxTime = this.pickerMinDate + one
  1373. if (maxTime > new Date()) {
  1374. maxTime = new Date()
  1375. }
  1376. return time.getTime() < minTime || time.getTime() > maxTime
  1377. }
  1378. return time.getTime() > Date.now()
  1379. }
  1380. },
  1381. Beforedisabled: false,
  1382. Nextdisabled: false,
  1383. Beforedisabled2: false,
  1384. Nextdisabled2: false,
  1385. Beforedisabled3: false,
  1386. Nextdisabled3: false,
  1387. pickerOptions: {
  1388. onPick: ({ maxDate, minDate }) => {
  1389. this.pickerMinDate = minDate.getTime()
  1390. if (maxDate) {
  1391. this.pickerMinDate = ''
  1392. }
  1393. },
  1394. // 限制不能选择今天之后的日期
  1395. disabledDate: (time) => {
  1396. if (this.pickerMinDate !== '') {
  1397. const one = 31 * 24 * 3600 * 1000
  1398. const minTime = this.pickerMinDate - one
  1399. let maxTime = this.pickerMinDate + one
  1400. if (maxTime > new Date()) {
  1401. maxTime = new Date()
  1402. }
  1403. return time.getTime() < minTime || time.getTime() > maxTime
  1404. }
  1405. return time.getTime() > Date.now()
  1406. }
  1407. },
  1408. pickerOptions2: {
  1409. onPick: ({ maxDate, minDate }) => {
  1410. this.pickerMinDate = minDate.getTime()
  1411. if (maxDate) {
  1412. this.pickerMinDate = ''
  1413. }
  1414. },
  1415. // 限制不能选择今天之后的日期
  1416. disabledDate: (time) => {
  1417. if (this.pickerMinDate !== '') {
  1418. const one = 100 * 24 * 3600 * 1000
  1419. const minTime = this.pickerMinDate - one
  1420. let maxTime = this.pickerMinDate + one
  1421. if (maxTime > new Date()) {
  1422. maxTime = new Date()
  1423. }
  1424. return time.getTime() < minTime || time.getTime() > maxTime
  1425. }
  1426. return time.getTime() > Date.now()
  1427. }
  1428. },
  1429. pickerOptions3: {
  1430. onPick: ({ maxDate, minDate }) => {
  1431. this.pickerMinDate = minDate.getTime()
  1432. if (maxDate) {
  1433. this.pickerMinDate = ''
  1434. }
  1435. },
  1436. // 限制不能选择今天之后的日期
  1437. disabledDate: (time) => {
  1438. if (this.pickerMinDate !== '') {
  1439. const one = 365 * 24 * 3600 * 1000
  1440. const minTime = this.pickerMinDate - one
  1441. let maxTime = this.pickerMinDate + one
  1442. if (maxTime > new Date()) {
  1443. maxTime = new Date()
  1444. }
  1445. return time.getTime() < minTime || time.getTime() > maxTime
  1446. }
  1447. return time.getTime() > Date.now()
  1448. }
  1449. },
  1450. // 班次
  1451. maxTime: {
  1452. getMaxTimesParm: {
  1453. name: 'getSysoptEnable',
  1454. page: 1,
  1455. offset: 1,
  1456. pagecount: 1,
  1457. returntype: 'Map',
  1458. parammaps: {
  1459. pastureid: Cookies.get('pastureid'),
  1460. inforname: 'times'
  1461. }
  1462. }
  1463. },
  1464. activeName: 'first',
  1465. tab: {
  1466. TMRNameList: [],
  1467. radio: '7',
  1468. isDriver: false,
  1469. isFormulaName: false, // 配方名称
  1470. isHouseName: true, // 栏舍名称
  1471. isLivestockType: false, // 牲畜类别
  1472. isTrainNumber: false, // 车次
  1473. isTMRName: false, // TMR名称
  1474. isFeed: false, //饲料
  1475. checked: false, // 按日期统计
  1476. chartDate: [],
  1477. selectWeek: [],
  1478. chartMonth: [],
  1479. specificDate: '1',
  1480. selectYear: parseTime(new Date(), '{y}'),
  1481. yearList: [],
  1482. weekList: [],
  1483. table: {
  1484. getdataListParm: {
  1485. name: 'getAccuracyHFT',
  1486. page: 1,
  1487. offset: 1,
  1488. pagecount: '',
  1489. returntype: 'Map',
  1490. parammaps: {
  1491. pastureid: Cookies.get('pastureid'),
  1492. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1493. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1494. inputDatetime: [new Date(), new Date()],
  1495. inputDate: null,
  1496. fname: '',
  1497. sort: '',
  1498. times: ''
  1499. }
  1500. },
  1501. tableKey: 1,
  1502. list: [],
  1503. total: 0,
  1504. listLoading: true,
  1505. temp: {}
  1506. },
  1507. table2: {
  1508. getdataListParm: {
  1509. name: 'getAccuracySFT',
  1510. page: 1,
  1511. offset: 1,
  1512. pagecount: '',
  1513. returntype: 'Map',
  1514. parammaps: {
  1515. pastureid: Cookies.get('pastureid'),
  1516. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1517. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1518. inputDatetime: [new Date(), new Date()],
  1519. fname: '',
  1520. sort: '',
  1521. times: ''
  1522. }
  1523. },
  1524. tableKey: 2,
  1525. list: [],
  1526. total: 0,
  1527. listLoading: true,
  1528. temp: {}
  1529. },
  1530. chartDate: [],
  1531. // 配方准确率
  1532. chart1: {
  1533. chartLine: null,
  1534. chartLine_data: {},
  1535. getdataListParm: {
  1536. name: 'getAccuracyAllFT',
  1537. page: 1,
  1538. offset: 1,
  1539. pagecount: '',
  1540. returntype: 'Map',
  1541. parammaps: {
  1542. pastureid: Cookies.get('pastureid'),
  1543. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1544. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1545. inputDatetime: [new Date(), new Date()],
  1546. specificDate: '1',
  1547. selectYear: parseTime(new Date(), '{y}'),
  1548. selectWeek: '',
  1549. chartMonth: '',
  1550. yearList: [],
  1551. weekList: [],
  1552. status: 0
  1553. }
  1554. },
  1555. tableKey: 1,
  1556. list: [],
  1557. total: 0,
  1558. listLoading: true,
  1559. statisticsList: [],
  1560. chart1Data3: [],
  1561. isChart: true,
  1562. isTable: false,
  1563. table: {
  1564. tableKey: 1,
  1565. list: [],
  1566. total: 0,
  1567. listLoading: false
  1568. }
  1569. },
  1570. // 计划统计
  1571. chart2: {
  1572. chartLine: null,
  1573. chartLine_data: {},
  1574. getdataListParm: {
  1575. name: 'getAccuracyAllJH',
  1576. page: 1,
  1577. offset: 1,
  1578. pagecount: '',
  1579. returntype: 'Map',
  1580. parammaps: {
  1581. pastureid: Cookies.get('pastureid'),
  1582. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1583. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1584. inputDatetime: [new Date(), new Date()],
  1585. specificDate: '1',
  1586. selectYear: parseTime(new Date(), '{y}'),
  1587. selectWeek: '',
  1588. chartMonth: '',
  1589. yearList: [],
  1590. weekList: [],
  1591. status: 0
  1592. }
  1593. },
  1594. tableKey: 1,
  1595. list: [],
  1596. total: 0,
  1597. listLoading: true,
  1598. isChart: true,
  1599. isTable: false,
  1600. table: {
  1601. tableKey: 1,
  1602. list: [],
  1603. total: 0,
  1604. listLoading: false
  1605. }
  1606. },
  1607. // 牛群准确率
  1608. chart3: {
  1609. chartLine: null,
  1610. chartLine_data: {},
  1611. getdataListParm: {
  1612. name: 'getAccuracyAllNQ',
  1613. page: 1,
  1614. offset: 1,
  1615. pagecount: '',
  1616. returntype: 'Map',
  1617. parammaps: {
  1618. pastureid: Cookies.get('pastureid'),
  1619. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1620. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1621. inputDatetime: [new Date(), new Date()],
  1622. specificDate: '1',
  1623. selectYear: parseTime(new Date(), '{y}'),
  1624. selectWeek: '',
  1625. chartMonth: '',
  1626. yearList: [],
  1627. weekList: [],
  1628. status: 0
  1629. }
  1630. },
  1631. tableKey: 1,
  1632. list: [],
  1633. total: 0,
  1634. listLoading: true,
  1635. statisticsList: [],
  1636. chart1Data3: [],
  1637. isChart: true,
  1638. isTable: false,
  1639. table: {
  1640. tableKey: 1,
  1641. list: [],
  1642. total: 0,
  1643. listLoading: false
  1644. }
  1645. },
  1646. // 车辆准确率(重量)
  1647. chart4: {
  1648. chartLine: null,
  1649. chartLine_data: {},
  1650. getdataListParm: {
  1651. name: 'getAccuracyAllCC',
  1652. page: 1,
  1653. offset: 1,
  1654. pagecount: '',
  1655. returntype: 'Map',
  1656. parammaps: {
  1657. pastureid: Cookies.get('pastureid'),
  1658. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1659. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1660. inputDatetime: [new Date(), new Date()],
  1661. specificDate: '1',
  1662. selectYear: parseTime(new Date(), '{y}'),
  1663. selectWeek: '',
  1664. chartMonth: '',
  1665. yearList: [],
  1666. weekList: [],
  1667. status: 0
  1668. }
  1669. },
  1670. tableKey: 1,
  1671. list: [],
  1672. total: 0,
  1673. listLoading: true,
  1674. statisticsList: [],
  1675. chart4Data3: [],
  1676. isChart: true,
  1677. isTable: false,
  1678. table: {
  1679. tableKey: 1,
  1680. list: [],
  1681. total: 0,
  1682. listLoading: false
  1683. }
  1684. },
  1685. // 混料统计
  1686. chart5: {
  1687. chartLine: null,
  1688. chartLine_data: {},
  1689. getdataListParm: {
  1690. name: 'getAccuracyAllHL',
  1691. page: 1,
  1692. offset: 1,
  1693. pagecount: '',
  1694. returntype: 'Map',
  1695. parammaps: {
  1696. pastureid: Cookies.get('pastureid'),
  1697. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1698. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1699. inputDatetime: [new Date(), new Date()],
  1700. specificDate: '1',
  1701. selectYear: parseTime(new Date(), '{y}'),
  1702. selectWeek: '',
  1703. chartMonth: '',
  1704. yearList: [],
  1705. weekList: [],
  1706. status: 0
  1707. }
  1708. },
  1709. tableKey: 1,
  1710. list: [],
  1711. total: 0,
  1712. listLoading: true,
  1713. isChart: true,
  1714. isTable: false,
  1715. table: {
  1716. tableKey: 1,
  1717. list: [],
  1718. total: 0,
  1719. listLoading: false
  1720. }
  1721. },
  1722. // 混料计划取消次数
  1723. chart6: {
  1724. chartLine: null,
  1725. chartLine_data: {},
  1726. getdataListParm: {
  1727. name: 'getAccuracyAllQX',
  1728. page: 1,
  1729. offset: 1,
  1730. pagecount: '',
  1731. returntype: 'Map',
  1732. parammaps: {
  1733. pastureid: Cookies.get('pastureid'),
  1734. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1735. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1736. inputDatetime: [new Date(), new Date()],
  1737. specificDate: '1',
  1738. selectYear: parseTime(new Date(), '{y}'),
  1739. selectWeek: '',
  1740. chartMonth: '',
  1741. yearList: [],
  1742. weekList: [],
  1743. status: 0
  1744. }
  1745. },
  1746. tableKey: 1,
  1747. list: [],
  1748. total: 0,
  1749. listLoading: true,
  1750. isChart: true,
  1751. isTable: false,
  1752. table: {
  1753. tableKey: 1,
  1754. list: [],
  1755. total: 0,
  1756. listLoading: false
  1757. }
  1758. },
  1759. // 栏舍撒料时间统计
  1760. chart7: {
  1761. chartLine: null,
  1762. chartLine_data: {},
  1763. getdataListParm: {
  1764. name: 'getAccuracyAllLS',
  1765. page: 1,
  1766. offset: 1,
  1767. pagecount: '',
  1768. returntype: 'Map',
  1769. parammaps: {
  1770. pastureid: Cookies.get('pastureid'),
  1771. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1772. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1773. inputDatetime: [new Date(), new Date()],
  1774. specificDate: '1',
  1775. selectYear: parseTime(new Date(), '{y}'),
  1776. selectWeek: '',
  1777. chartMonth: '',
  1778. yearList: [],
  1779. weekList: [],
  1780. status: 0
  1781. }
  1782. },
  1783. tableKey: 1,
  1784. list: [],
  1785. total: 0,
  1786. listLoading: true,
  1787. statisticsList: [],
  1788. chart7Data3: [],
  1789. formulaList: [],
  1790. isChart: true,
  1791. isTable: false,
  1792. table: {
  1793. tableKey: 1,
  1794. list: [],
  1795. total: 0,
  1796. listLoading: false
  1797. }
  1798. }
  1799. },
  1800. tab2: {
  1801. TMRNameList: [],
  1802. premixList: [
  1803. { id: 0, name: this.$t('errorAnalysis.yh') },
  1804. { id: 1, name: this.$t('errorAnalysis.fyh') }
  1805. ],
  1806. table: {
  1807. getdataListParm: {
  1808. name: 'getStatisticsHL',
  1809. page: 1,
  1810. offset: 1,
  1811. pagecount: '',
  1812. returntype: 'Map',
  1813. parammaps: {
  1814. pastureid: Cookies.get('pastureid'),
  1815. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1816. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1817. inputDatetime: [new Date(), new Date()],
  1818. inputDatetime2: new Date(),
  1819. tmrtname: '',
  1820. projname: '',
  1821. times: '',
  1822. buttontype: '',
  1823. templetname: '',
  1824. isuse: '',
  1825. premix: ''
  1826. }
  1827. },
  1828. tableKey: 1,
  1829. list: [],
  1830. total: 0,
  1831. listLoading: true,
  1832. temp: {}
  1833. },
  1834. frequencyList: [],
  1835. jumpModeList: [
  1836. { id: '0', name: this.$t('errorAnalysis.sdtz') },
  1837. { id: '1', name: this.$t('errorAnalysis.zdtz') }
  1838. ],
  1839. isuseList: [
  1840. { id: '0', name: this.$t('errorAnalysis.wwc') },
  1841. { id: '2', name: this.$t('errorAnalysis.bfwc') },
  1842. { id: '1', name: this.$t('errorAnalysis.qbwc') }
  1843. ]
  1844. },
  1845. tab3: {
  1846. TMRNameList: [],
  1847. table: {
  1848. getdataListParm: {
  1849. name: 'getStatisticsSL',
  1850. page: 1,
  1851. offset: 1,
  1852. pagecount: '',
  1853. returntype: 'Map',
  1854. parammaps: {
  1855. pastureid: Cookies.get('pastureid'),
  1856. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1857. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  1858. inputDatetime: [new Date(), new Date()],
  1859. inputDatetime2: new Date(),
  1860. tmrtname: '',
  1861. projname: '',
  1862. times: '',
  1863. templetname: '',
  1864. fname: '',
  1865. buttontype: '',
  1866. isuse: ''
  1867. }
  1868. },
  1869. tableKey: 1,
  1870. list: [],
  1871. total: 0,
  1872. listLoading: true,
  1873. temp: {}
  1874. },
  1875. frequencyList: [],
  1876. jumpModeList: [
  1877. { id: '0', name: this.$t('errorAnalysis.sdtz') },
  1878. { id: '1', name: this.$t('errorAnalysis.zdtz') }
  1879. ],
  1880. isuseList: [
  1881. { id: '0', name: this.$t('errorAnalysis.wwc') },
  1882. { id: '2', name: this.$t('errorAnalysis.bfwc') },
  1883. { id: '1', name: this.$t('errorAnalysis.qbwc') }
  1884. ]
  1885. },
  1886. titlefname: '',
  1887. methodName: '',
  1888. rowPid: '',
  1889. optdevice: '',
  1890. startTime: '',
  1891. stopTime: '',
  1892. error: '',
  1893. isShowDialog: false,
  1894. statisticalTypeList: this.$t('errorAnalysis.statisticalTypeList'),
  1895. rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
  1896. cellStyle: { padding: 0 + 'px' },
  1897. exportList: {
  1898. dialogFormVisible: false,
  1899. inputDatetime: [new Date(), new Date()]
  1900. },
  1901. textMap: {
  1902. exportList: this.$t('errorAnalysis.export'),
  1903. recipeNameTxt: this.$t('errorAnalysis.pfxgjl'),
  1904. feedTxt: this.$t('errorAnalysis.isFeed'),
  1905. fenceTxt: this.$t('errorAnalysis.pen'),
  1906. modificationRecord: this.$t('errorAnalysis.pfmbxgjl')
  1907. },
  1908. isokDisable: false,
  1909. // search
  1910. myHeight1: document.documentElement.clientHeight - 85 - 80,
  1911. myHeight2: document.documentElement.clientHeight - 85 - 150,
  1912. myHeightSecond: '',
  1913. myHeightThird: '',
  1914. recipeNameTemp2: {
  1915. dialogStatus: '',
  1916. dialogFormVisible: false,
  1917. getdataListParm: {
  1918. name: 'getFitHistory1',
  1919. name1: 'getFitHistory2',
  1920. page: 1,
  1921. offset: 1,
  1922. pagecount: 10,
  1923. returntype: 'Map',
  1924. parammaps: { inputDatetime: [], pastureid: '', ftid: '' }
  1925. },
  1926. tableKey: 0,
  1927. total: 0,
  1928. listLoading: true,
  1929. list: []
  1930. },
  1931. recipeNameTemp3: {
  1932. dialogStatus: '',
  1933. dialogFormVisible: false,
  1934. getdataListParm: {
  1935. name: 'getFitHistory1',
  1936. name1: 'getFitHistory2',
  1937. page: 1,
  1938. offset: 1,
  1939. pagecount: 10,
  1940. returntype: 'Map',
  1941. parammaps: { inputDatetime: [], pastureid: '', fitid: '' }
  1942. },
  1943. tableKey: 0,
  1944. total: 0,
  1945. listLoading: true,
  1946. list: []
  1947. },
  1948. feedTemp: {
  1949. dialogStatus: '',
  1950. dialogFormVisible: false,
  1951. getdataListParm: {
  1952. name: 'getFitHistory1',
  1953. name1: 'getFitHistory2',
  1954. page: 1,
  1955. offset: 1,
  1956. pagecount: 10,
  1957. returntype: 'Map',
  1958. parammaps: { inputDatetime: [], pastureid: '', fitid: '' }
  1959. },
  1960. tableKey: 0,
  1961. total: 0,
  1962. listLoading: true,
  1963. list: []
  1964. },
  1965. fenceTemp: {
  1966. dialogStatus: '',
  1967. dialogFormVisible: false,
  1968. spanObj1: {},
  1969. spanObj2: {},
  1970. mergekeys1: ['createdate'],
  1971. mergekeys2: ['createdate'],
  1972. tab1: {
  1973. getdataListParm: {
  1974. name: 'getPlanModifyFPlist',
  1975. page: 1,
  1976. offset: 1,
  1977. pagecount: '',
  1978. returntype: 'Map',
  1979. parammaps: { inputDatetime: [], pastureid: '', fitid: '' }
  1980. },
  1981. tableKey: 0,
  1982. total: 0,
  1983. listLoading: true,
  1984. list: []
  1985. },
  1986. tab2: {
  1987. getdataListParm: {
  1988. name: 'getPlanModifyFPlist',
  1989. page: 1,
  1990. offset: 1,
  1991. pagecount: '',
  1992. returntype: 'Map',
  1993. parammaps: { inputDatetime: [], pastureid: '', fitid: '' }
  1994. },
  1995. tableKey: 0,
  1996. total: 0,
  1997. listLoading: true,
  1998. list: []
  1999. },
  2000. activeName: 'first'
  2001. },
  2002. modificationRecordTemp: {
  2003. dialogStatus: '',
  2004. dialogFormVisible: false,
  2005. tableKey1: 0,
  2006. total1: 0,
  2007. listLoading1: false,
  2008. list1: [],
  2009. tableKey2: 0,
  2010. total2: 0,
  2011. listLoading2: false,
  2012. list2: [],
  2013. temp1: {},
  2014. temp2: {},
  2015. lastdate: '',
  2016. currentdate: ''
  2017. }
  2018. }
  2019. },
  2020. created() {
  2021. this.getTimeFn()
  2022. this.getAllYear()
  2023. this.getIsDisplay()
  2024. this.getTabList()
  2025. this.getTabList2()
  2026. this.getformulaList()
  2027. // 暂时注释
  2028. // this.getChart1()
  2029. // this.getChart2()
  2030. // this.getChart3()
  2031. // this.getChart4()
  2032. // this.getChart5()
  2033. // this.getChart6()
  2034. },
  2035. mounted() {},
  2036. methods: {
  2037. // tab.chart7.formulaList
  2038. getformulaList() {
  2039. let url = 'authdata/GetDataByName'
  2040. let data = {
  2041. name: 'getFeedTempletName',
  2042. page: 1,
  2043. offset: 1,
  2044. pagecount: '',
  2045. returntype: 'Map',
  2046. parammaps: { pastureid: Cookies.get('pastureid') }
  2047. }
  2048. postJson(url, data).then((response) => {
  2049. if (response.data.list !== null) {
  2050. this.tab.chart7.formulaList = response.data.list
  2051. } else {
  2052. this.tab.chart7.formulaList = []
  2053. }
  2054. })
  2055. },
  2056. getAllYear() {
  2057. var myDate = new Date()
  2058. var thisYear = myDate.getFullYear() // 获取当年年份
  2059. var Section = thisYear - 2001 // 声明一个变量 获得当前年份至想获取年份差 eg.2008
  2060. this.tab.yearList = [] // 声明一个空数组 把遍历出的年份添加到数组里
  2061. for (var i = 0; i <= Section; i++) {
  2062. this.tab.yearList.push(thisYear--)
  2063. }
  2064. console.log(this.tab.yearList)
  2065. },
  2066. changeAllYear() {
  2067. console.log('this.selectYear==>', this.tab.selectYear)
  2068. this.tab.weekList = []
  2069. this.tab.selectWeek = []
  2070. var myWeekList = whichWeek(this.tab.selectYear)
  2071. console.log(myWeekList)
  2072. if (myWeekList !== null) {
  2073. for (let i = 0; i <= myWeekList.length; i++) {
  2074. var obj = {}
  2075. var a = i + 1
  2076. obj.name =
  2077. '第' +
  2078. a +
  2079. '周(' +
  2080. myWeekList[i].month +
  2081. '.' +
  2082. myWeekList[i].date +
  2083. '~' +
  2084. myWeekList[i].last.month +
  2085. '.' +
  2086. myWeekList[i].last.date +
  2087. ')'
  2088. obj.id = i
  2089. this.tab.weekList.push(obj)
  2090. }
  2091. }
  2092. },
  2093. changeAllSpecificDate() {
  2094. var start = ''
  2095. var end = ''
  2096. if (this.tab.specificDate == '2') {
  2097. this.tab.selectYear = parseTime(new Date(), '{y}')
  2098. this.changeAllYear()
  2099. } else if (this.tab.specificDate == '3') {
  2100. start =
  2101. parseTime(
  2102. new Date().setTime(
  2103. new Date().getTime() - 3600 * 1000 * 24 * 31 * 12
  2104. ),
  2105. '{y}-{m}'
  2106. ) + '-01'
  2107. end = parseTime(new Date(), '{y}-{m}-{d}')
  2108. this.tab.chartMonth = []
  2109. this.tab.chartMonth.push(start, end)
  2110. }
  2111. },
  2112. handleAllDate() {
  2113. console.log('点击了确认时间')
  2114. MessageBox.confirm(this.$t('errorAnalysis.msg1'), {
  2115. confirmButtonText: this.$t('common.confirm'),
  2116. cancelButtonText: this.$t('common.cancel'),
  2117. type: 'warning'
  2118. }).then(() => {
  2119. var startDate = ''
  2120. var endDate = ''
  2121. var status = ''
  2122. if (this.tab.specificDate == '1') {
  2123. startDate = parseTime(this.tab.chartDate[0], '{y}-{m}-{d}')
  2124. endDate = parseTime(this.tab.chartDate[1], '{y}-{m}-{d}')
  2125. this.tab.chart1.getdataListParm.parammaps.inputDatetime = [
  2126. startDate,
  2127. endDate
  2128. ]
  2129. this.tab.chart2.getdataListParm.parammaps.inputDatetime = [
  2130. startDate,
  2131. endDate
  2132. ]
  2133. this.tab.chart3.getdataListParm.parammaps.inputDatetime = [
  2134. startDate,
  2135. endDate
  2136. ]
  2137. this.tab.chart4.getdataListParm.parammaps.inputDatetime = [
  2138. startDate,
  2139. endDate
  2140. ]
  2141. this.tab.chart5.getdataListParm.parammaps.inputDatetime = [
  2142. startDate,
  2143. endDate
  2144. ]
  2145. this.tab.chart6.getdataListParm.parammaps.inputDatetime = [
  2146. startDate,
  2147. endDate
  2148. ]
  2149. this.tab.chart7.getdataListParm.parammaps.inputDatetime = [
  2150. startDate,
  2151. endDate
  2152. ]
  2153. status = 0
  2154. console.log('开始日时==>', startDate)
  2155. console.log('结束日时==>', endDate)
  2156. } else if (this.tab.specificDate == '2') {
  2157. if (this.tab.selectYear == '') {
  2158. this.$message({
  2159. type: 'error',
  2160. message: this.$t('errorAnalysis.msg2'),
  2161. duration: 2000
  2162. })
  2163. return
  2164. }
  2165. if (this.tab.selectWeek !== null) {
  2166. if (this.tab.selectWeek.length !== 2) {
  2167. this.$message({
  2168. type: 'error',
  2169. message: this.$t('errorAnalysis.msg3'),
  2170. duration: 2000
  2171. })
  2172. return
  2173. }
  2174. }
  2175. startDate =
  2176. this.tab.selectYear +
  2177. '-' +
  2178. whichWeek(this.tab.selectYear)[this.tab.selectWeek[0]].month +
  2179. '-' +
  2180. whichWeek(this.tab.selectYear)[this.tab.selectWeek[0]].date
  2181. endDate =
  2182. this.tab.selectYear +
  2183. '-' +
  2184. whichWeek(this.tab.selectYear)[this.tab.selectWeek[1]].last.month +
  2185. '-' +
  2186. whichWeek(this.tab.selectYear)[this.tab.selectWeek[1]].last.date
  2187. status = 1
  2188. this.tab.chart1.getdataListParm.parammaps.selectYear =
  2189. this.tab.selectYear
  2190. this.tab.chart1.getdataListParm.parammaps.selectWeek =
  2191. this.tab.selectWeek
  2192. this.tab.chart1.getdataListParm.parammaps.weekList = this.tab.weekList
  2193. this.tab.chart2.getdataListParm.parammaps.selectYear =
  2194. this.tab.selectYear
  2195. this.tab.chart2.getdataListParm.parammaps.selectWeek =
  2196. this.tab.selectWeek
  2197. this.tab.chart2.getdataListParm.parammaps.weekList = this.tab.weekList
  2198. this.tab.chart3.getdataListParm.parammaps.selectYear =
  2199. this.tab.selectYear
  2200. this.tab.chart3.getdataListParm.parammaps.selectWeek =
  2201. this.tab.selectWeek
  2202. this.tab.chart3.getdataListParm.parammaps.weekList = this.tab.weekList
  2203. this.tab.chart4.getdataListParm.parammaps.selectYear =
  2204. this.tab.selectYear
  2205. this.tab.chart4.getdataListParm.parammaps.selectWeek =
  2206. this.tab.selectWeek
  2207. this.tab.chart4.getdataListParm.parammaps.weekList = this.tab.weekList
  2208. this.tab.chart5.getdataListParm.parammaps.selectYear =
  2209. this.tab.selectYear
  2210. this.tab.chart5.getdataListParm.parammaps.selectWeek =
  2211. this.tab.selectWeek
  2212. this.tab.chart5.getdataListParm.parammaps.weekList = this.tab.weekList
  2213. this.tab.chart6.getdataListParm.parammaps.selectYear =
  2214. this.tab.selectYear
  2215. this.tab.chart6.getdataListParm.parammaps.selectWeek =
  2216. this.tab.selectWeek
  2217. this.tab.chart6.getdataListParm.parammaps.weekList = this.tab.weekList
  2218. this.tab.chart7.getdataListParm.parammaps.selectYear =
  2219. this.tab.selectYear
  2220. this.tab.chart7.getdataListParm.parammaps.selectWeek =
  2221. this.tab.selectWeek
  2222. this.tab.chart7.getdataListParm.parammaps.weekList = this.tab.weekList
  2223. console.log('开始周时间==>', startDate)
  2224. console.log('结束周时间==>', endDate)
  2225. } else if (this.tab.specificDate == '3') {
  2226. if (this.tab.chartMonth !== null) {
  2227. if (this.tab.chartMonth.length > 0) {
  2228. startDate = this.tab.chartMonth[0]
  2229. var dataArr = this.tab.chartMonth[1].substring(0, 7).split('-')
  2230. let temp = new Date(dataArr[0], dataArr[1], 0)
  2231. let mm = temp.getDate() //这里mm就是天数啦
  2232. endDate = this.tab.chartMonth[1].substring(0, 8) + mm
  2233. status = 2
  2234. this.tab.chart1.getdataListParm.parammaps.chartMonth = [
  2235. startDate,
  2236. endDate
  2237. ]
  2238. this.tab.chart2.getdataListParm.parammaps.chartMonth = [
  2239. startDate,
  2240. endDate
  2241. ]
  2242. this.tab.chart3.getdataListParm.parammaps.chartMonth = [
  2243. startDate,
  2244. endDate
  2245. ]
  2246. this.tab.chart4.getdataListParm.parammaps.chartMonth = [
  2247. startDate,
  2248. endDate
  2249. ]
  2250. this.tab.chart5.getdataListParm.parammaps.chartMonth = [
  2251. startDate,
  2252. endDate
  2253. ]
  2254. this.tab.chart6.getdataListParm.parammaps.chartMonth = [
  2255. startDate,
  2256. endDate
  2257. ]
  2258. this.tab.chart7.getdataListParm.parammaps.chartMonth = [
  2259. startDate,
  2260. endDate
  2261. ]
  2262. console.log('开始月时间==>', startDate)
  2263. console.log('结束月时间==>', endDate)
  2264. } else {
  2265. this.$message({
  2266. type: 'error',
  2267. message: this.$t('errorAnalysis.msg4'),
  2268. duration: 2000
  2269. })
  2270. }
  2271. }
  2272. }
  2273. this.tab.chart1.getdataListParm.parammaps.specificDate =
  2274. this.tab.specificDate
  2275. this.tab.chart1.getdataListParm.parammaps.startTime = startDate
  2276. this.tab.chart1.getdataListParm.parammaps.stopTime = endDate
  2277. this.tab.chart1.getdataListParm.parammaps.status = status
  2278. this.tab.chart2.getdataListParm.parammaps.startTime = startDate
  2279. this.tab.chart2.getdataListParm.parammaps.stopTime = endDate
  2280. this.tab.chart2.getdataListParm.parammaps.status = status
  2281. this.tab.chart2.getdataListParm.parammaps.specificDate =
  2282. this.tab.specificDate
  2283. this.tab.chart3.getdataListParm.parammaps.startTime = startDate
  2284. this.tab.chart3.getdataListParm.parammaps.stopTime = endDate
  2285. this.tab.chart3.getdataListParm.parammaps.status = status
  2286. this.tab.chart3.getdataListParm.parammaps.specificDate =
  2287. this.tab.specificDate
  2288. this.tab.chart4.getdataListParm.parammaps.startTime = startDate
  2289. this.tab.chart4.getdataListParm.parammaps.stopTime = endDate
  2290. this.tab.chart4.getdataListParm.parammaps.status = status
  2291. this.tab.chart4.getdataListParm.parammaps.specificDate =
  2292. this.tab.specificDate
  2293. this.tab.chart5.getdataListParm.parammaps.startTime = startDate
  2294. this.tab.chart5.getdataListParm.parammaps.stopTime = endDate
  2295. this.tab.chart5.getdataListParm.parammaps.status = status
  2296. this.tab.chart5.getdataListParm.parammaps.specificDate =
  2297. this.tab.specificDate
  2298. this.tab.chart6.getdataListParm.parammaps.startTime = startDate
  2299. this.tab.chart6.getdataListParm.parammaps.stopTime = endDate
  2300. this.tab.chart6.getdataListParm.parammaps.status = status
  2301. this.tab.chart6.getdataListParm.parammaps.specificDate =
  2302. this.tab.specificDate
  2303. this.tab.chart7.getdataListParm.parammaps.startTime = startDate
  2304. this.tab.chart7.getdataListParm.parammaps.stopTime = endDate
  2305. this.tab.chart7.getdataListParm.parammaps.status = status
  2306. this.tab.chart7.getdataListParm.parammaps.specificDate =
  2307. this.tab.specificDate
  2308. this.getChart1()
  2309. this.getChart2()
  2310. this.getChart3()
  2311. this.getChart4()
  2312. this.getChart5()
  2313. this.getChart6()
  2314. this.getChart7()
  2315. })
  2316. },
  2317. changeChartSpecificDate(item) {
  2318. var start = ''
  2319. var end = ''
  2320. if (item == 'chart1') {
  2321. if (this.tab.chart1.getdataListParm.parammaps.specificDate == '2') {
  2322. this.tab.chart1.getdataListParm.parammaps.selectYear = parseTime(
  2323. new Date(),
  2324. '{y}'
  2325. )
  2326. this.changeChartYear(item)
  2327. } else if (
  2328. this.tab.chart1.getdataListParm.parammaps.specificDate == '3'
  2329. ) {
  2330. start =
  2331. parseTime(
  2332. new Date().setTime(
  2333. new Date().getTime() - 3600 * 1000 * 24 * 31 * 12
  2334. ),
  2335. '{y}-{m}'
  2336. ) + '-01'
  2337. end = parseTime(new Date(), '{y}-{m}-{d}')
  2338. this.tab.chart1.getdataListParm.parammaps.weekList = []
  2339. this.tab.chart1.getdataListParm.parammaps.chartMonth = []
  2340. this.tab.chart1.getdataListParm.parammaps.chartMonth.push(start, end)
  2341. }
  2342. } else if (item == 'chart2') {
  2343. if (this.tab.chart2.getdataListParm.parammaps.specificDate == '2') {
  2344. this.tab.chart2.getdataListParm.parammaps.selectYear = parseTime(
  2345. new Date(),
  2346. '{y}'
  2347. )
  2348. this.changeChartYear(item)
  2349. } else if (
  2350. this.tab.chart2.getdataListParm.parammaps.specificDate == '3'
  2351. ) {
  2352. start =
  2353. parseTime(
  2354. new Date().setTime(
  2355. new Date().getTime() - 3600 * 1000 * 24 * 31 * 12
  2356. ),
  2357. '{y}-{m}'
  2358. ) + '-01'
  2359. end = parseTime(new Date(), '{y}-{m}-{d}')
  2360. this.tab.chart2.getdataListParm.parammaps.weekList = []
  2361. this.tab.chart2.getdataListParm.parammaps.chartMonth = []
  2362. this.tab.chart2.getdataListParm.parammaps.chartMonth.push(start, end)
  2363. }
  2364. } else if (item == 'chart3') {
  2365. if (this.tab.chart3.getdataListParm.parammaps.specificDate == '2') {
  2366. this.tab.chart3.getdataListParm.parammaps.selectYear = parseTime(
  2367. new Date(),
  2368. '{y}'
  2369. )
  2370. this.changeChartYear(item)
  2371. } else if (
  2372. this.tab.chart3.getdataListParm.parammaps.specificDate == '3'
  2373. ) {
  2374. start =
  2375. parseTime(
  2376. new Date().setTime(
  2377. new Date().getTime() - 3600 * 1000 * 24 * 31 * 12
  2378. ),
  2379. '{y}-{m}'
  2380. ) + '-01'
  2381. end = parseTime(new Date(), '{y}-{m}-{d}')
  2382. this.tab.chart3.getdataListParm.parammaps.weekList = []
  2383. this.tab.chart3.getdataListParm.parammaps.chartMonth = []
  2384. this.tab.chart3.getdataListParm.parammaps.chartMonth.push(start, end)
  2385. }
  2386. } else if (item == 'chart4') {
  2387. if (this.tab.chart4.getdataListParm.parammaps.specificDate == '2') {
  2388. this.tab.chart4.getdataListParm.parammaps.selectYear = parseTime(
  2389. new Date(),
  2390. '{y}'
  2391. )
  2392. this.changeChartYear(item)
  2393. } else if (
  2394. this.tab.chart4.getdataListParm.parammaps.specificDate == '3'
  2395. ) {
  2396. start =
  2397. parseTime(
  2398. new Date().setTime(
  2399. new Date().getTime() - 3600 * 1000 * 24 * 31 * 12
  2400. ),
  2401. '{y}-{m}'
  2402. ) + '-01'
  2403. end = parseTime(new Date(), '{y}-{m}-{d}')
  2404. this.tab.chart4.getdataListParm.parammaps.weekList = []
  2405. this.tab.chart4.getdataListParm.parammaps.chartMonth = []
  2406. this.tab.chart4.getdataListParm.parammaps.chartMonth.push(start, end)
  2407. }
  2408. } else if (item == 'chart5') {
  2409. if (this.tab.chart5.getdataListParm.parammaps.specificDate == '2') {
  2410. this.tab.chart5.getdataListParm.parammaps.selectYear = parseTime(
  2411. new Date(),
  2412. '{y}'
  2413. )
  2414. this.changeChartYear(item)
  2415. } else if (
  2416. this.tab.chart5.getdataListParm.parammaps.specificDate == '3'
  2417. ) {
  2418. start =
  2419. parseTime(
  2420. new Date().setTime(
  2421. new Date().getTime() - 3600 * 1000 * 24 * 31 * 12
  2422. ),
  2423. '{y}-{m}'
  2424. ) + '-01'
  2425. end = parseTime(new Date(), '{y}-{m}-{d}')
  2426. this.tab.chart5.getdataListParm.parammaps.weekList = []
  2427. this.tab.chart5.getdataListParm.parammaps.chartMonth = []
  2428. this.tab.chart5.getdataListParm.parammaps.chartMonth.push(start, end)
  2429. }
  2430. } else if (item == 'chart6') {
  2431. if (this.tab.chart6.getdataListParm.parammaps.specificDate == '2') {
  2432. this.tab.chart6.getdataListParm.parammaps.selectYear = parseTime(
  2433. new Date(),
  2434. '{y}'
  2435. )
  2436. this.changeChartYear(item)
  2437. } else if (
  2438. this.tab.chart6.getdataListParm.parammaps.specificDate == '3'
  2439. ) {
  2440. start =
  2441. parseTime(
  2442. new Date().setTime(
  2443. new Date().getTime() - 3600 * 1000 * 24 * 31 * 12
  2444. ),
  2445. '{y}-{m}'
  2446. ) + '-01'
  2447. end = parseTime(new Date(), '{y}-{m}-{d}')
  2448. this.tab.chart6.getdataListParm.parammaps.weekList = []
  2449. this.tab.chart6.getdataListParm.parammaps.chartMonth = []
  2450. this.tab.chart6.getdataListParm.parammaps.chartMonth.push(start, end)
  2451. }
  2452. } else if (item == 'chart7') {
  2453. if (this.tab.chart7.getdataListParm.parammaps.specificDate == '2') {
  2454. this.tab.chart7.getdataListParm.parammaps.selectYear = parseTime(
  2455. new Date(),
  2456. '{y}'
  2457. )
  2458. this.changeChartYear(item)
  2459. } else if (
  2460. this.tab.chart7.getdataListParm.parammaps.specificDate == '3'
  2461. ) {
  2462. start =
  2463. parseTime(
  2464. new Date().setTime(
  2465. new Date().getTime() - 3600 * 1000 * 24 * 31 * 12
  2466. ),
  2467. '{y}-{m}'
  2468. ) + '-01'
  2469. end = parseTime(new Date(), '{y}-{m}-{d}')
  2470. this.tab.chart7.getdataListParm.parammaps.weekList = []
  2471. this.tab.chart7.getdataListParm.parammaps.chartMonth = []
  2472. this.tab.chart7.getdataListParm.parammaps.chartMonth.push(start, end)
  2473. }
  2474. }
  2475. },
  2476. changeChartYear(item) {
  2477. var myWeekList = ''
  2478. if (item == 'chart1') {
  2479. this.tab.chart1.getdataListParm.parammaps.weekList = []
  2480. this.tab.chart1.getdataListParm.parammaps.selectWeek = []
  2481. myWeekList = whichWeek(
  2482. this.tab.chart1.getdataListParm.parammaps.selectYear
  2483. )
  2484. console.log(myWeekList)
  2485. if (myWeekList !== null) {
  2486. for (let i = 0; i <= myWeekList.length; i++) {
  2487. var obj = {}
  2488. var a = i + 1
  2489. obj.name =
  2490. '第' +
  2491. a +
  2492. '周(' +
  2493. myWeekList[i].month +
  2494. '.' +
  2495. myWeekList[i].date +
  2496. '~' +
  2497. myWeekList[i].last.month +
  2498. '.' +
  2499. myWeekList[i].last.date +
  2500. ')'
  2501. obj.id = i
  2502. this.tab.chart1.getdataListParm.parammaps.weekList.push(obj)
  2503. }
  2504. }
  2505. } else if (item == 'chart2') {
  2506. this.tab.chart2.getdataListParm.parammaps.selectWeek = []
  2507. this.tab.chart2.getdataListParm.parammaps.weekList = []
  2508. myWeekList = whichWeek(
  2509. this.tab.chart2.getdataListParm.parammaps.selectYear
  2510. )
  2511. console.log(myWeekList)
  2512. if (myWeekList !== null) {
  2513. for (let i = 0; i <= myWeekList.length; i++) {
  2514. var obj = {}
  2515. var a = i + 1
  2516. obj.name =
  2517. '第' +
  2518. a +
  2519. '周(' +
  2520. myWeekList[i].month +
  2521. '.' +
  2522. myWeekList[i].date +
  2523. '~' +
  2524. myWeekList[i].last.month +
  2525. '.' +
  2526. myWeekList[i].last.date +
  2527. ')'
  2528. obj.id = i
  2529. this.tab.chart2.getdataListParm.parammaps.weekList.push(obj)
  2530. }
  2531. }
  2532. } else if (item == 'chart3') {
  2533. this.tab.chart3.getdataListParm.parammaps.selectWeek = []
  2534. this.tab.chart3.getdataListParm.parammaps.weekList = []
  2535. myWeekList = whichWeek(
  2536. this.tab.chart3.getdataListParm.parammaps.selectYear
  2537. )
  2538. console.log(myWeekList)
  2539. if (myWeekList !== null) {
  2540. for (let i = 0; i <= myWeekList.length; i++) {
  2541. var obj = {}
  2542. var a = i + 1
  2543. obj.name =
  2544. '第' +
  2545. a +
  2546. '周(' +
  2547. myWeekList[i].month +
  2548. '.' +
  2549. myWeekList[i].date +
  2550. '~' +
  2551. myWeekList[i].last.month +
  2552. '.' +
  2553. myWeekList[i].last.date +
  2554. ')'
  2555. obj.id = i
  2556. this.tab.chart3.getdataListParm.parammaps.weekList.push(obj)
  2557. }
  2558. }
  2559. } else if (item == 'chart4') {
  2560. this.tab.chart4.getdataListParm.parammaps.selectWeek = []
  2561. this.tab.chart4.getdataListParm.parammaps.weekList = []
  2562. myWeekList = whichWeek(
  2563. this.tab.chart4.getdataListParm.parammaps.selectYear
  2564. )
  2565. console.log(myWeekList)
  2566. if (myWeekList !== null) {
  2567. for (let i = 0; i <= myWeekList.length; i++) {
  2568. var obj = {}
  2569. var a = i + 1
  2570. obj.name =
  2571. '第' +
  2572. a +
  2573. '周(' +
  2574. myWeekList[i].month +
  2575. '.' +
  2576. myWeekList[i].date +
  2577. '~' +
  2578. myWeekList[i].last.month +
  2579. '.' +
  2580. myWeekList[i].last.date +
  2581. ')'
  2582. obj.id = i
  2583. this.tab.chart4.getdataListParm.parammaps.weekList.push(obj)
  2584. }
  2585. }
  2586. } else if (item == 'chart5') {
  2587. this.tab.chart5.getdataListParm.parammaps.selectWeek = []
  2588. this.tab.chart5.getdataListParm.parammaps.weekList = []
  2589. myWeekList = whichWeek(
  2590. this.tab.chart5.getdataListParm.parammaps.selectYear
  2591. )
  2592. console.log(myWeekList)
  2593. if (myWeekList !== null) {
  2594. for (let i = 0; i <= myWeekList.length; i++) {
  2595. var obj = {}
  2596. var a = i + 1
  2597. obj.name =
  2598. '第' +
  2599. a +
  2600. '周(' +
  2601. myWeekList[i].month +
  2602. '.' +
  2603. myWeekList[i].date +
  2604. '~' +
  2605. myWeekList[i].last.month +
  2606. '.' +
  2607. myWeekList[i].last.date +
  2608. ')'
  2609. obj.id = i
  2610. this.tab.chart5.getdataListParm.parammaps.weekList.push(obj)
  2611. }
  2612. }
  2613. } else if (item == 'chart6') {
  2614. this.tab.chart6.getdataListParm.parammaps.selectWeek = []
  2615. this.tab.chart6.getdataListParm.parammaps.weekList = []
  2616. myWeekList = whichWeek(
  2617. this.tab.chart6.getdataListParm.parammaps.selectYear
  2618. )
  2619. console.log(myWeekList)
  2620. if (myWeekList !== null) {
  2621. for (let i = 0; i <= myWeekList.length; i++) {
  2622. var obj = {}
  2623. var a = i + 1
  2624. obj.name =
  2625. '第' +
  2626. a +
  2627. '周(' +
  2628. myWeekList[i].month +
  2629. '.' +
  2630. myWeekList[i].date +
  2631. '~' +
  2632. myWeekList[i].last.month +
  2633. '.' +
  2634. myWeekList[i].last.date +
  2635. ')'
  2636. obj.id = i
  2637. this.tab.chart6.getdataListParm.parammaps.weekList.push(obj)
  2638. }
  2639. }
  2640. } else if (item == 'chart7') {
  2641. this.tab.chart7.getdataListParm.parammaps.selectWeek = []
  2642. this.tab.chart7.getdataListParm.parammaps.weekList = []
  2643. myWeekList = whichWeek(
  2644. this.tab.chart7.getdataListParm.parammaps.selectYear
  2645. )
  2646. console.log(myWeekList)
  2647. if (myWeekList !== null) {
  2648. for (let i = 0; i <= myWeekList.length; i++) {
  2649. var obj = {}
  2650. var a = i + 1
  2651. obj.name =
  2652. '第' +
  2653. a +
  2654. '周(' +
  2655. myWeekList[i].month +
  2656. '.' +
  2657. myWeekList[i].date +
  2658. '~' +
  2659. myWeekList[i].last.month +
  2660. '.' +
  2661. myWeekList[i].last.date +
  2662. ')'
  2663. obj.id = i
  2664. this.tab.chart7.getdataListParm.parammaps.weekList.push(obj)
  2665. }
  2666. }
  2667. }
  2668. },
  2669. handleChartDate(item) {
  2670. console.log(item)
  2671. var startDate = ''
  2672. var endDate = ''
  2673. if (item == 'chart1') {
  2674. if (this.tab.chart1.getdataListParm.parammaps.specificDate == '1') {
  2675. startDate = parseTime(
  2676. this.tab.chart1.getdataListParm.parammaps.inputDatetime[0],
  2677. '{y}-{m}-{d}'
  2678. )
  2679. endDate = parseTime(
  2680. this.tab.chart1.getdataListParm.parammaps.inputDatetime[1],
  2681. '{y}-{m}-{d}'
  2682. )
  2683. console.log('配方准确率开始日期==>', startDate)
  2684. console.log('配方准确率结束日期==>', endDate)
  2685. this.tab.chart1.getdataListParm.parammaps.status = 0
  2686. } else if (
  2687. this.tab.chart1.getdataListParm.parammaps.specificDate == '2'
  2688. ) {
  2689. if (this.tab.chart1.getdataListParm.parammaps.selectYear == '') {
  2690. this.$message({
  2691. type: 'error',
  2692. message: this.$t('errorAnalysis.msg2'),
  2693. duration: 2000
  2694. })
  2695. return
  2696. }
  2697. if (this.tab.chart1.getdataListParm.parammaps.selectWeek !== null) {
  2698. if (
  2699. this.tab.chart1.getdataListParm.parammaps.selectWeek.length !== 2
  2700. ) {
  2701. this.$message({
  2702. type: 'error',
  2703. message: this.$t('errorAnalysis.msg3'),
  2704. duration: 2000
  2705. })
  2706. return
  2707. }
  2708. }
  2709. startDate =
  2710. this.tab.chart1.getdataListParm.parammaps.selectYear +
  2711. '-' +
  2712. whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)[
  2713. this.tab.chart1.getdataListParm.parammaps.selectWeek[0]
  2714. ].month +
  2715. '-' +
  2716. whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)[
  2717. this.tab.chart1.getdataListParm.parammaps.selectWeek[0]
  2718. ].date
  2719. endDate =
  2720. this.tab.chart1.getdataListParm.parammaps.selectYear +
  2721. '-' +
  2722. whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)[
  2723. this.tab.chart1.getdataListParm.parammaps.selectWeek[1]
  2724. ].last.month +
  2725. '-' +
  2726. whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)[
  2727. this.tab.chart1.getdataListParm.parammaps.selectWeek[1]
  2728. ].last.date
  2729. console.log('配方准确率开始周日期==>', startDate)
  2730. console.log('配方准确率结束周日期==>', endDate)
  2731. this.tab.chart1.getdataListParm.parammaps.status = 1
  2732. } else if (
  2733. this.tab.chart1.getdataListParm.parammaps.specificDate == '3'
  2734. ) {
  2735. startDate = this.tab.chart1.getdataListParm.parammaps.chartMonth[0]
  2736. endDate =
  2737. this.tab.chart1.getdataListParm.parammaps.chartMonth[1].substring(
  2738. 0,
  2739. 8
  2740. ) + '31'
  2741. console.log('配方准确率开始月日期==>', startDate)
  2742. console.log('配方准确率结束月日期==>', endDate)
  2743. this.tab.chart1.getdataListParm.parammaps.status = 2
  2744. }
  2745. this.tab.chart1.getdataListParm.parammaps.startTime = startDate
  2746. this.tab.chart1.getdataListParm.parammaps.stopTime = endDate
  2747. this.getChart1()
  2748. } else if (item == 'chart2') {
  2749. if (this.tab.chart2.getdataListParm.parammaps.specificDate == '1') {
  2750. startDate = parseTime(
  2751. this.tab.chart2.getdataListParm.parammaps.inputDatetime[0],
  2752. '{y}-{m}-{d}'
  2753. )
  2754. endDate = parseTime(
  2755. this.tab.chart2.getdataListParm.parammaps.inputDatetime[1],
  2756. '{y}-{m}-{d}'
  2757. )
  2758. this.tab.chart2.getdataListParm.parammaps.status = 0
  2759. console.log('计划统计开始日期==>', startDate)
  2760. console.log('计划统计结束日期==>', endDate)
  2761. } else if (
  2762. this.tab.chart2.getdataListParm.parammaps.specificDate == '2'
  2763. ) {
  2764. if (this.tab.chart2.getdataListParm.parammaps.selectYear == '') {
  2765. this.$message({
  2766. type: 'error',
  2767. message: this.$t('errorAnalysis.msg2'),
  2768. duration: 2000
  2769. })
  2770. return
  2771. }
  2772. if (this.tab.chart2.getdataListParm.parammaps.selectWeek !== null) {
  2773. if (
  2774. this.tab.chart2.getdataListParm.parammaps.selectWeek.length !== 2
  2775. ) {
  2776. this.$message({
  2777. type: 'error',
  2778. message: this.$t('errorAnalysis.msg3'),
  2779. duration: 2000
  2780. })
  2781. return
  2782. }
  2783. }
  2784. startDate =
  2785. this.tab.chart2.getdataListParm.parammaps.selectYear +
  2786. '-' +
  2787. whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)[
  2788. this.tab.chart2.getdataListParm.parammaps.selectWeek[0]
  2789. ].month +
  2790. '-' +
  2791. whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)[
  2792. this.tab.chart2.getdataListParm.parammaps.selectWeek[0]
  2793. ].date
  2794. endDate =
  2795. this.tab.chart2.getdataListParm.parammaps.selectYear +
  2796. '-' +
  2797. whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)[
  2798. this.tab.chart2.getdataListParm.parammaps.selectWeek[1]
  2799. ].last.month +
  2800. '-' +
  2801. whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)[
  2802. this.tab.chart2.getdataListParm.parammaps.selectWeek[1]
  2803. ].last.date
  2804. this.tab.chart2.getdataListParm.parammaps.status = 1
  2805. console.log('计划统计开始周日期==>', startDate)
  2806. console.log('计划统计结束周日期==>', endDate)
  2807. } else if (
  2808. this.tab.chart2.getdataListParm.parammaps.specificDate == '3'
  2809. ) {
  2810. console.log(
  2811. '计划统计开始月日期==>',
  2812. this.tab.chart2.getdataListParm.parammaps.chartMonth
  2813. )
  2814. startDate = this.tab.chart2.getdataListParm.parammaps.chartMonth[0]
  2815. endDate =
  2816. this.tab.chart2.getdataListParm.parammaps.chartMonth[1].substring(
  2817. 0,
  2818. 8
  2819. ) + '31'
  2820. this.tab.chart2.getdataListParm.parammaps.status = 2
  2821. console.log('计划统计开始月日期==>', startDate)
  2822. console.log('计划统计结束月日期==>', endDate)
  2823. }
  2824. this.tab.chart2.getdataListParm.parammaps.startTime = startDate
  2825. this.tab.chart2.getdataListParm.parammaps.stopTime = endDate
  2826. this.getChart2()
  2827. } else if (item == 'chart3') {
  2828. if (this.tab.chart3.getdataListParm.parammaps.specificDate == '1') {
  2829. startDate = parseTime(
  2830. this.tab.chart3.getdataListParm.parammaps.inputDatetime[0],
  2831. '{y}-{m}-{d}'
  2832. )
  2833. endDate = parseTime(
  2834. this.tab.chart3.getdataListParm.parammaps.inputDatetime[1],
  2835. '{y}-{m}-{d}'
  2836. )
  2837. this.tab.chart3.getdataListParm.parammaps.status = 0
  2838. console.log('牛群准确率开始日期==>', startDate)
  2839. console.log('牛群准确率结束日期==>', endDate)
  2840. } else if (
  2841. this.tab.chart3.getdataListParm.parammaps.specificDate == '2'
  2842. ) {
  2843. if (this.tab.chart3.getdataListParm.parammaps.selectYear == '') {
  2844. this.$message({
  2845. type: 'error',
  2846. message: this.$t('errorAnalysis.msg2'),
  2847. duration: 2000
  2848. })
  2849. return
  2850. }
  2851. if (this.tab.chart3.getdataListParm.parammaps.selectWeek !== null) {
  2852. if (
  2853. this.tab.chart3.getdataListParm.parammaps.selectWeek.length !== 2
  2854. ) {
  2855. this.$message({
  2856. type: 'error',
  2857. message: this.$t('errorAnalysis.msg3'),
  2858. duration: 2000
  2859. })
  2860. return
  2861. }
  2862. }
  2863. startDate =
  2864. this.tab.chart3.getdataListParm.parammaps.selectYear +
  2865. '-' +
  2866. whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)[
  2867. this.tab.chart3.getdataListParm.parammaps.selectWeek[0]
  2868. ].month +
  2869. '-' +
  2870. whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)[
  2871. this.tab.chart3.getdataListParm.parammaps.selectWeek[0]
  2872. ].date
  2873. endDate =
  2874. this.tab.chart3.getdataListParm.parammaps.selectYear +
  2875. '-' +
  2876. whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)[
  2877. this.tab.chart3.getdataListParm.parammaps.selectWeek[1]
  2878. ].last.month +
  2879. '-' +
  2880. whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)[
  2881. this.tab.chart3.getdataListParm.parammaps.selectWeek[1]
  2882. ].last.date
  2883. this.tab.chart3.getdataListParm.parammaps.status = 1
  2884. console.log('牛群准确率开始周日期==>', startDate)
  2885. console.log('牛群准确率结束周日期==>', endDate)
  2886. } else if (
  2887. this.tab.chart3.getdataListParm.parammaps.specificDate == '3'
  2888. ) {
  2889. startDate = this.tab.chart3.getdataListParm.parammaps.chartMonth[0]
  2890. endDate =
  2891. this.tab.chart3.getdataListParm.parammaps.chartMonth[1].substring(
  2892. 0,
  2893. 8
  2894. ) + '31'
  2895. this.tab.chart3.getdataListParm.parammaps.status = 2
  2896. console.log('牛群准确率开始月日期==>', startDate)
  2897. console.log('牛群准确率结束月日期==>', endDate)
  2898. }
  2899. this.tab.chart3.getdataListParm.parammaps.startTime = startDate
  2900. this.tab.chart3.getdataListParm.parammaps.stopTime = endDate
  2901. this.getChart3()
  2902. } else if (item == 'chart4') {
  2903. if (this.tab.chart4.getdataListParm.parammaps.specificDate == '1') {
  2904. startDate = parseTime(
  2905. this.tab.chart4.getdataListParm.parammaps.inputDatetime[0],
  2906. '{y}-{m}-{d}'
  2907. )
  2908. endDate = parseTime(
  2909. this.tab.chart4.getdataListParm.parammaps.inputDatetime[1],
  2910. '{y}-{m}-{d}'
  2911. )
  2912. this.tab.chart4.getdataListParm.parammaps.status = 0
  2913. console.log('车辆准确率(重量)开始日期==>', startDate)
  2914. console.log('车辆准确率(重量)结束日期==>', endDate)
  2915. } else if (
  2916. this.tab.chart4.getdataListParm.parammaps.specificDate == '2'
  2917. ) {
  2918. if (this.tab.chart4.getdataListParm.parammaps.selectYear == '') {
  2919. this.$message({
  2920. type: 'error',
  2921. message: this.$t('errorAnalysis.msg2'),
  2922. duration: 2000
  2923. })
  2924. return
  2925. }
  2926. if (this.tab.chart4.getdataListParm.parammaps.selectWeek !== null) {
  2927. if (
  2928. this.tab.chart4.getdataListParm.parammaps.selectWeek.length !== 2
  2929. ) {
  2930. this.$message({
  2931. type: 'error',
  2932. message: this.$t('errorAnalysis.msg3'),
  2933. duration: 2000
  2934. })
  2935. return
  2936. }
  2937. }
  2938. startDate =
  2939. this.tab.chart4.getdataListParm.parammaps.selectYear +
  2940. '-' +
  2941. whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)[
  2942. this.tab.chart4.getdataListParm.parammaps.selectWeek[0]
  2943. ].month +
  2944. '-' +
  2945. whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)[
  2946. this.tab.chart4.getdataListParm.parammaps.selectWeek[0]
  2947. ].date
  2948. endDate =
  2949. this.tab.chart4.getdataListParm.parammaps.selectYear +
  2950. '-' +
  2951. whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)[
  2952. this.tab.chart4.getdataListParm.parammaps.selectWeek[1]
  2953. ].last.month +
  2954. '-' +
  2955. whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)[
  2956. this.tab.chart4.getdataListParm.parammaps.selectWeek[1]
  2957. ].last.date
  2958. this.tab.chart4.getdataListParm.parammaps.status = 1
  2959. console.log('车辆准确率(重量)开始周日期==>', startDate)
  2960. console.log('车辆准确率(重量)结束周日期==>', endDate)
  2961. } else if (
  2962. this.tab.chart4.getdataListParm.parammaps.specificDate == '3'
  2963. ) {
  2964. startDate = this.tab.chart4.getdataListParm.parammaps.chartMonth[0]
  2965. endDate =
  2966. this.tab.chart4.getdataListParm.parammaps.chartMonth[1].substring(
  2967. 0,
  2968. 8
  2969. ) + '31'
  2970. this.tab.chart4.getdataListParm.parammaps.status = 2
  2971. console.log('车辆准确率(重量)开始月日期==>', startDate)
  2972. console.log('车辆准确率(重量)结束月日期==>', endDate)
  2973. }
  2974. this.tab.chart4.getdataListParm.parammaps.startTime = startDate
  2975. this.tab.chart4.getdataListParm.parammaps.stopTime = endDate
  2976. this.getChart4()
  2977. } else if (item == 'chart5') {
  2978. if (this.tab.chart5.getdataListParm.parammaps.specificDate == '1') {
  2979. startDate = parseTime(
  2980. this.tab.chart5.getdataListParm.parammaps.inputDatetime[0],
  2981. '{y}-{m}-{d}'
  2982. )
  2983. endDate = parseTime(
  2984. this.tab.chart5.getdataListParm.parammaps.inputDatetime[1],
  2985. '{y}-{m}-{d}'
  2986. )
  2987. this.tab.chart5.getdataListParm.parammaps.status = 0
  2988. console.log('混料统计开始日期==>', startDate)
  2989. console.log('混料统计结束日期==>', endDate)
  2990. } else if (
  2991. this.tab.chart5.getdataListParm.parammaps.specificDate == '2'
  2992. ) {
  2993. if (this.tab.chart5.getdataListParm.parammaps.selectYear == '') {
  2994. this.$message({
  2995. type: 'error',
  2996. message: this.$t('errorAnalysis.msg2'),
  2997. duration: 2000
  2998. })
  2999. return
  3000. }
  3001. if (this.tab.chart5.getdataListParm.parammaps.selectWeek !== null) {
  3002. if (
  3003. this.tab.chart5.getdataListParm.parammaps.selectWeek.length !== 2
  3004. ) {
  3005. this.$message({
  3006. type: 'error',
  3007. message: this.$t('errorAnalysis.msg3'),
  3008. duration: 2000
  3009. })
  3010. return
  3011. }
  3012. }
  3013. startDate =
  3014. this.tab.chart5.getdataListParm.parammaps.selectYear +
  3015. '-' +
  3016. whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)[
  3017. this.tab.chart5.getdataListParm.parammaps.selectWeek[0]
  3018. ].month +
  3019. '-' +
  3020. whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)[
  3021. this.tab.chart5.getdataListParm.parammaps.selectWeek[0]
  3022. ].date
  3023. endDate =
  3024. this.tab.chart5.getdataListParm.parammaps.selectYear +
  3025. '-' +
  3026. whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)[
  3027. this.tab.chart5.getdataListParm.parammaps.selectWeek[1]
  3028. ].last.month +
  3029. '-' +
  3030. whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)[
  3031. this.tab.chart5.getdataListParm.parammaps.selectWeek[1]
  3032. ].last.date
  3033. this.tab.chart5.getdataListParm.parammaps.status = 1
  3034. console.log('混料统计开始周日期==>', startDate)
  3035. console.log('混料统计结束周日期==>', endDate)
  3036. } else if (
  3037. this.tab.chart5.getdataListParm.parammaps.specificDate == '3'
  3038. ) {
  3039. startDate = this.tab.chart5.getdataListParm.parammaps.chartMonth[0]
  3040. endDate =
  3041. this.tab.chart5.getdataListParm.parammaps.chartMonth[1].substring(
  3042. 0,
  3043. 8
  3044. ) + '31'
  3045. this.tab.chart5.getdataListParm.parammaps.status = 2
  3046. console.log('混料统计开始月日期==>', startDate)
  3047. console.log('混料统计结束月日期==>', endDate)
  3048. }
  3049. this.tab.chart5.getdataListParm.parammaps.startTime = startDate
  3050. this.tab.chart5.getdataListParm.parammaps.stopTime = endDate
  3051. this.getChart5()
  3052. } else if (item == 'chart6') {
  3053. if (this.tab.chart6.getdataListParm.parammaps.specificDate == '1') {
  3054. startDate = parseTime(
  3055. this.tab.chart6.getdataListParm.parammaps.inputDatetime[0],
  3056. '{y}-{m}-{d}'
  3057. )
  3058. endDate = parseTime(
  3059. this.tab.chart6.getdataListParm.parammaps.inputDatetime[1],
  3060. '{y}-{m}-{d}'
  3061. )
  3062. this.tab.chart6.getdataListParm.parammaps.status = 0
  3063. console.log('混料计划取消次数开始日期==>', startDate)
  3064. console.log('混料计划取消次数结束日期==>', endDate)
  3065. } else if (
  3066. this.tab.chart6.getdataListParm.parammaps.specificDate == '2'
  3067. ) {
  3068. if (this.tab.chart6.getdataListParm.parammaps.selectYear == '') {
  3069. this.$message({
  3070. type: 'error',
  3071. message: this.$t('errorAnalysis.msg2'),
  3072. duration: 2000
  3073. })
  3074. return
  3075. }
  3076. if (this.tab.chart6.getdataListParm.parammaps.selectWeek !== null) {
  3077. if (
  3078. this.tab.chart6.getdataListParm.parammaps.selectWeek.length !== 2
  3079. ) {
  3080. this.$message({
  3081. type: 'error',
  3082. message: this.$t('errorAnalysis.msg3'),
  3083. duration: 2000
  3084. })
  3085. return
  3086. }
  3087. }
  3088. startDate =
  3089. this.tab.chart6.getdataListParm.parammaps.selectYear +
  3090. '-' +
  3091. whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)[
  3092. this.tab.chart6.getdataListParm.parammaps.selectWeek[0]
  3093. ].month +
  3094. '-' +
  3095. whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)[
  3096. this.tab.chart6.getdataListParm.parammaps.selectWeek[0]
  3097. ].date
  3098. endDate =
  3099. this.tab.chart6.getdataListParm.parammaps.selectYear +
  3100. '-' +
  3101. whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)[
  3102. this.tab.chart6.getdataListParm.parammaps.selectWeek[1]
  3103. ].last.month +
  3104. '-' +
  3105. whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)[
  3106. this.tab.chart6.getdataListParm.parammaps.selectWeek[1]
  3107. ].last.date
  3108. this.tab.chart6.getdataListParm.parammaps.status = 1
  3109. console.log('混料计划取消次数开始周日期==>', startDate)
  3110. console.log('混料计划取消次数结束周日期==>', endDate)
  3111. } else if (
  3112. this.tab.chart6.getdataListParm.parammaps.specificDate == '3'
  3113. ) {
  3114. startDate = this.tab.chart6.getdataListParm.parammaps.chartMonth[0]
  3115. endDate =
  3116. this.tab.chart6.getdataListParm.parammaps.chartMonth[1].substring(
  3117. 0,
  3118. 8
  3119. ) + '31'
  3120. this.tab.chart6.getdataListParm.parammaps.status = 2
  3121. console.log('混料计划取消次数开始月日期==>', startDate)
  3122. console.log('混料计划取消次数结束月日期==>', endDate)
  3123. }
  3124. this.tab.chart6.getdataListParm.parammaps.startTime = startDate
  3125. this.tab.chart6.getdataListParm.parammaps.stopTime = endDate
  3126. this.getChart6()
  3127. } else if (item == 'chart7') {
  3128. if (this.tab.chart7.getdataListParm.parammaps.specificDate == '1') {
  3129. startDate = parseTime(
  3130. this.tab.chart7.getdataListParm.parammaps.inputDatetime[0],
  3131. '{y}-{m}-{d}'
  3132. )
  3133. endDate = parseTime(
  3134. this.tab.chart7.getdataListParm.parammaps.inputDatetime[1],
  3135. '{y}-{m}-{d}'
  3136. )
  3137. this.tab.chart7.getdataListParm.parammaps.status = 0
  3138. console.log('栏舍撒料时间统计开始日期==>', startDate)
  3139. console.log('栏舍撒料时间统计结束日期==>', endDate)
  3140. } else if (
  3141. this.tab.chart7.getdataListParm.parammaps.specificDate == '2'
  3142. ) {
  3143. if (this.tab.chart7.getdataListParm.parammaps.selectYear == '') {
  3144. this.$message({
  3145. type: 'error',
  3146. message: this.$t('errorAnalysis.msg2'),
  3147. duration: 2000
  3148. })
  3149. return
  3150. }
  3151. if (this.tab.chart7.getdataListParm.parammaps.selectWeek !== null) {
  3152. if (
  3153. this.tab.chart7.getdataListParm.parammaps.selectWeek.length !== 2
  3154. ) {
  3155. this.$message({
  3156. type: 'error',
  3157. message: this.$t('errorAnalysis.msg3'),
  3158. duration: 2000
  3159. })
  3160. return
  3161. }
  3162. }
  3163. startDate =
  3164. this.tab.chart7.getdataListParm.parammaps.selectYear +
  3165. '-' +
  3166. whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)[
  3167. this.tab.chart7.getdataListParm.parammaps.selectWeek[0]
  3168. ].month +
  3169. '-' +
  3170. whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)[
  3171. this.tab.chart7.getdataListParm.parammaps.selectWeek[0]
  3172. ].date
  3173. endDate =
  3174. this.tab.chart7.getdataListParm.parammaps.selectYear +
  3175. '-' +
  3176. whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)[
  3177. this.tab.chart7.getdataListParm.parammaps.selectWeek[1]
  3178. ].last.month +
  3179. '-' +
  3180. whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)[
  3181. this.tab.chart7.getdataListParm.parammaps.selectWeek[1]
  3182. ].last.date
  3183. this.tab.chart7.getdataListParm.parammaps.status = 1
  3184. console.log('栏舍撒料时间统计开始周日期==>', startDate)
  3185. console.log('栏舍撒料时间统计结束周日期==>', endDate)
  3186. } else if (
  3187. this.tab.chart7.getdataListParm.parammaps.specificDate == '3'
  3188. ) {
  3189. startDate = this.tab.chart7.getdataListParm.parammaps.chartMonth[0]
  3190. endDate =
  3191. this.tab.chart7.getdataListParm.parammaps.chartMonth[1].substring(
  3192. 0,
  3193. 8
  3194. ) + '31'
  3195. this.tab.chart7.getdataListParm.parammaps.status = 2
  3196. console.log('栏舍撒料时间统计开始月日期==>', startDate)
  3197. console.log('栏舍撒料时间统计结束月日期==>', endDate)
  3198. }
  3199. this.tab.chart7.getdataListParm.parammaps.startTime = startDate
  3200. this.tab.chart7.getdataListParm.parammaps.stopTime = endDate
  3201. this.getChart7()
  3202. }
  3203. },
  3204. getTimeFn() {
  3205. const that = this
  3206. const start = new Date()
  3207. const end = new Date()
  3208. const start2 = new Date()
  3209. const end2 = new Date()
  3210. start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
  3211. end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 1)
  3212. // that.tab.table.getdataListParm.parammaps.inputDatetime[0] = parseTime(start2, '{y}-{m}-{d}')
  3213. // that.tab.table.getdataListParm.parammaps.inputDatetime[1] = parseTime(end2, '{y}-{m}-{d}')
  3214. that.tab.table.getdataListParm.parammaps.startTime = parseTime(
  3215. start2,
  3216. '{y}-{m}-{d}'
  3217. )
  3218. that.tab.table.getdataListParm.parammaps.stopTime = parseTime(
  3219. end2,
  3220. '{y}-{m}-{d}'
  3221. )
  3222. that.tab.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
  3223. that.tab.table2.getdataListParm.parammaps.startTime = parseTime(
  3224. start2,
  3225. '{y}-{m}-{d}'
  3226. )
  3227. that.tab.table2.getdataListParm.parammaps.stopTime = parseTime(
  3228. end2,
  3229. '{y}-{m}-{d}'
  3230. )
  3231. that.tab2.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
  3232. // that.tab2.table.getdataListParm.parammaps.inputDatetime[0] = parseTime(start2, '{y}-{m}-{d}')
  3233. // that.tab2.table.getdataListParm.parammaps.inputDatetime[1] = parseTime(end2, '{y}-{m}-{d}')
  3234. that.tab2.table.getdataListParm.parammaps.startTime = parseTime(
  3235. start2,
  3236. '{y}-{m}-{d}'
  3237. )
  3238. that.tab2.table.getdataListParm.parammaps.stopTime = parseTime(
  3239. end2,
  3240. '{y}-{m}-{d}'
  3241. )
  3242. that.tab3.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
  3243. // that.tab3.table.getdataListParm.parammaps.inputDatetime[0] = parseTime(start2, '{y}-{m}-{d}')
  3244. // that.tab3.table.getdataListParm.parammaps.inputDatetime[1] = parseTime(end2, '{y}-{m}-{d}')
  3245. that.tab3.table.getdataListParm.parammaps.startTime = parseTime(
  3246. start2,
  3247. '{y}-{m}-{d}'
  3248. )
  3249. that.tab3.table.getdataListParm.parammaps.stopTime = parseTime(
  3250. end2,
  3251. '{y}-{m}-{d}'
  3252. )
  3253. // start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
  3254. start.setTime(start.getTime() - 3600 * 1000 * 24 * 10)
  3255. end.setTime(end.getTime() - 3600 * 1000 * 24 * 1)
  3256. that.tab.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
  3257. that.tab.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
  3258. that.tab.chart1.getdataListParm.parammaps.inputDatetime[0] = parseTime(
  3259. start,
  3260. '{y}-{m}-{d}'
  3261. )
  3262. that.tab.chart1.getdataListParm.parammaps.inputDatetime[1] = parseTime(
  3263. end,
  3264. '{y}-{m}-{d}'
  3265. )
  3266. that.tab.chart1.getdataListParm.parammaps.startTime = parseTime(
  3267. start,
  3268. '{y}-{m}-{d}'
  3269. )
  3270. that.tab.chart1.getdataListParm.parammaps.stopTime = parseTime(
  3271. end,
  3272. '{y}-{m}-{d}'
  3273. )
  3274. that.tab.chart2.getdataListParm.parammaps.inputDatetime[0] = parseTime(
  3275. start,
  3276. '{y}-{m}-{d}'
  3277. )
  3278. that.tab.chart2.getdataListParm.parammaps.inputDatetime[1] = parseTime(
  3279. end,
  3280. '{y}-{m}-{d}'
  3281. )
  3282. that.tab.chart2.getdataListParm.parammaps.startTime = parseTime(
  3283. start,
  3284. '{y}-{m}-{d}'
  3285. )
  3286. that.tab.chart2.getdataListParm.parammaps.stopTime = parseTime(
  3287. end,
  3288. '{y}-{m}-{d}'
  3289. )
  3290. that.tab.chart3.getdataListParm.parammaps.inputDatetime[0] = parseTime(
  3291. start,
  3292. '{y}-{m}-{d}'
  3293. )
  3294. that.tab.chart3.getdataListParm.parammaps.inputDatetime[1] = parseTime(
  3295. end,
  3296. '{y}-{m}-{d}'
  3297. )
  3298. that.tab.chart3.getdataListParm.parammaps.startTime = parseTime(
  3299. start,
  3300. '{y}-{m}-{d}'
  3301. )
  3302. that.tab.chart3.getdataListParm.parammaps.stopTime = parseTime(
  3303. end,
  3304. '{y}-{m}-{d}'
  3305. )
  3306. that.tab.chart4.getdataListParm.parammaps.inputDatetime[0] = parseTime(
  3307. start,
  3308. '{y}-{m}-{d}'
  3309. )
  3310. that.tab.chart4.getdataListParm.parammaps.inputDatetime[1] = parseTime(
  3311. end,
  3312. '{y}-{m}-{d}'
  3313. )
  3314. that.tab.chart4.getdataListParm.parammaps.startTime = parseTime(
  3315. start,
  3316. '{y}-{m}-{d}'
  3317. )
  3318. that.tab.chart4.getdataListParm.parammaps.stopTime = parseTime(
  3319. end,
  3320. '{y}-{m}-{d}'
  3321. )
  3322. that.tab.chart5.getdataListParm.parammaps.inputDatetime[0] = parseTime(
  3323. start,
  3324. '{y}-{m}-{d}'
  3325. )
  3326. that.tab.chart5.getdataListParm.parammaps.inputDatetime[1] = parseTime(
  3327. end,
  3328. '{y}-{m}-{d}'
  3329. )
  3330. that.tab.chart5.getdataListParm.parammaps.startTime = parseTime(
  3331. start,
  3332. '{y}-{m}-{d}'
  3333. )
  3334. that.tab.chart5.getdataListParm.parammaps.stopTime = parseTime(
  3335. end,
  3336. '{y}-{m}-{d}'
  3337. )
  3338. that.tab.chart6.getdataListParm.parammaps.inputDatetime[0] = parseTime(
  3339. start,
  3340. '{y}-{m}-{d}'
  3341. )
  3342. that.tab.chart6.getdataListParm.parammaps.inputDatetime[1] = parseTime(
  3343. end,
  3344. '{y}-{m}-{d}'
  3345. )
  3346. that.tab.chart6.getdataListParm.parammaps.startTime = parseTime(
  3347. start,
  3348. '{y}-{m}-{d}'
  3349. )
  3350. that.tab.chart6.getdataListParm.parammaps.stopTime = parseTime(
  3351. end,
  3352. '{y}-{m}-{d}'
  3353. )
  3354. that.tab.chart7.getdataListParm.parammaps.inputDatetime[0] = parseTime(
  3355. start,
  3356. '{y}-{m}-{d}'
  3357. )
  3358. that.tab.chart7.getdataListParm.parammaps.inputDatetime[1] = parseTime(
  3359. end,
  3360. '{y}-{m}-{d}'
  3361. )
  3362. that.tab.chart7.getdataListParm.parammaps.startTime = parseTime(
  3363. start,
  3364. '{y}-{m}-{d}'
  3365. )
  3366. that.tab.chart7.getdataListParm.parammaps.stopTime = parseTime(
  3367. end,
  3368. '{y}-{m}-{d}'
  3369. )
  3370. },
  3371. getIsDisplay() {
  3372. GetDataByName(this.maxTime.getMaxTimesParm).then((response) => {
  3373. if (response.data.list[0].inforvalue == 1) {
  3374. this.tab2.frequencyList = [
  3375. { id: '1', name: this.$t('errorAnalysis.one') }
  3376. ]
  3377. this.tab3.frequencyList = [
  3378. { id: '1', name: this.$t('errorAnalysis.one') }
  3379. ]
  3380. } else if (response.data.list[0].inforvalue == 2) {
  3381. this.tab2.frequencyList = [
  3382. { id: '1', name: this.$t('errorAnalysis.one') },
  3383. { id: '2', name: this.$t('errorAnalysis.two') }
  3384. ]
  3385. this.tab3.frequencyList = [
  3386. { id: '1', name: this.$t('errorAnalysis.one') },
  3387. { id: '2', name: this.$t('errorAnalysis.two') }
  3388. ]
  3389. } else if (response.data.list[0].inforvalue == 3) {
  3390. this.tab2.frequencyList = [
  3391. { id: '1', name: this.$t('errorAnalysis.one') },
  3392. { id: '2', name: this.$t('errorAnalysis.two') },
  3393. { id: '3', name: this.$t('errorAnalysis.three') }
  3394. ]
  3395. this.tab3.frequencyList = [
  3396. { id: '1', name: this.$t('errorAnalysis.one') },
  3397. { id: '2', name: this.$t('errorAnalysis.two') },
  3398. { id: '3', name: this.$t('errorAnalysis.three') }
  3399. ]
  3400. this.frequencyList = [
  3401. { id: '1', name: this.$t('errorAnalysis.one') },
  3402. { id: '2', name: this.$t('errorAnalysis.two') },
  3403. { id: '3', name: this.$t('errorAnalysis.three') }
  3404. ]
  3405. } else if (response.data.list[0].inforvalue == 4) {
  3406. this.tab2.frequencyList = [
  3407. { id: '1', name: this.$t('errorAnalysis.one') },
  3408. { id: '2', name: this.$t('errorAnalysis.two') },
  3409. { id: '3', name: this.$t('errorAnalysis.three') },
  3410. { id: '4', name: this.$t('errorAnalysis.four') }
  3411. ]
  3412. this.tab3.frequencyList = [
  3413. { id: '1', name: this.$t('errorAnalysis.one') },
  3414. { id: '2', name: this.$t('errorAnalysis.two') },
  3415. { id: '3', name: this.$t('errorAnalysis.three') },
  3416. { id: '4', name: this.$t('errorAnalysis.four') }
  3417. ]
  3418. } else if (response.data.list[0].inforvalue == 5) {
  3419. this.tab2.frequencyList = [
  3420. { id: '1', name: this.$t('errorAnalysis.one') },
  3421. { id: '2', name: this.$t('errorAnalysis.two') },
  3422. { id: '3', name: this.$t('errorAnalysis.three') },
  3423. { id: '4', name: this.$t('errorAnalysis.four') },
  3424. { id: '5', name: this.$t('errorAnalysis.five') }
  3425. ]
  3426. this.tab3.frequencyList = [
  3427. { id: '1', name: this.$t('errorAnalysis.one') },
  3428. { id: '2', name: this.$t('errorAnalysis.two') },
  3429. { id: '3', name: this.$t('errorAnalysis.three') },
  3430. { id: '4', name: this.$t('errorAnalysis.four') },
  3431. { id: '5', name: this.$t('errorAnalysis.five') }
  3432. ]
  3433. } else if (response.data.list[0].inforvalue == 6) {
  3434. this.tab2.frequencyList = [
  3435. { id: '1', name: this.$t('errorAnalysis.one') },
  3436. { id: '2', name: this.$t('errorAnalysis.two') },
  3437. { id: '3', name: this.$t('errorAnalysis.three') },
  3438. { id: '4', name: this.$t('errorAnalysis.four') },
  3439. { id: '5', name: this.$t('errorAnalysis.five') },
  3440. { id: '6', name: this.$t('errorAnalysis.six') }
  3441. ]
  3442. this.tab3.frequencyList = [
  3443. { id: '1', name: this.$t('errorAnalysis.one') },
  3444. { id: '2', name: this.$t('errorAnalysis.two') },
  3445. { id: '3', name: this.$t('errorAnalysis.three') },
  3446. { id: '4', name: this.$t('errorAnalysis.four') },
  3447. { id: '5', name: this.$t('errorAnalysis.five') },
  3448. { id: '6', name: this.$t('errorAnalysis.six') }
  3449. ]
  3450. }
  3451. })
  3452. },
  3453. // 导出
  3454. handleDownload() {
  3455. // const exportTitle2 = [];
  3456. // const exportTitle3 = [];
  3457. // for (let j = 0; j < this.tab.table.tableConfig[i].children.length; j++) {
  3458. // exportTitle2.push(this.tab.table.tableConfig[i].children[j].label)
  3459. // for(let a = 0;a<this.tab.table.tableConfig[i].children[j].children.length;a++){
  3460. // exportTitle3.push(this.tab.table.tableConfig[i].children[j].children[a].label)
  3461. // }
  3462. // }
  3463. console.log(this.tab.table.tableConfig, 'this.tab.table.list121212')
  3464. // const columns = this.tab.table.parammaps;
  3465. // const labels = this.getColumnLabels(columns);
  3466. // console.log(labels); // 输出 ["日期", "姓名", "地址"]
  3467. if (this.tab.table.list == null) {
  3468. this.tab.table.list = []
  3469. }
  3470. if (this.tab.table2.list == null) {
  3471. this.tab.table2.list = []
  3472. }
  3473. if (this.tab.checked == true) {
  3474. if (this.tab.radio == '0') {
  3475. var excelDatas0 = [
  3476. {
  3477. tHeader: [
  3478. this.$t('errorAnalysis.date'),
  3479. this.$t('errorAnalysis.Driver'),
  3480. this.$t('errorAnalysis.llzl'),
  3481. this.$t('errorAnalysis.acWeight'),
  3482. this.$t('errorAnalysis.jshlczs'),
  3483. this.$t('errorAnalysis.yhlczs'),
  3484. this.$t('errorAnalysis.hlczl'),
  3485. this.$t('errorAnalysis.hlwczs'),
  3486. this.$t('errorAnalysis.hlzqls'),
  3487. this.$t('errorAnalysis.hlzdtzcs'),
  3488. this.$t('errorAnalysis.hlsdzdtzcs'),
  3489. this.$t('errorAnalysis.qxcs'),
  3490. this.$t('errorAnalysis.hlzqs'),
  3491. this.$t('errorAnalysis.hlzql'),
  3492. this.$t('errorAnalysis.qcqxzql'),
  3493. this.$t('errorAnalysis.bzc')
  3494. ],
  3495. filterVal: [
  3496. '计划时间',
  3497. '驾驶员',
  3498. '理论重量',
  3499. '实际重量',
  3500. '计划混料操作数',
  3501. '已混料操作数',
  3502. '混料操作率',
  3503. '混料误差值',
  3504. '混料准确率',
  3505. '混料自动跳转次数',
  3506. '混料手动跳转次数',
  3507. '取消次数',
  3508. '混料正确数',
  3509. '混料正确率',
  3510. '去除取消正确率',
  3511. '方差'
  3512. ],
  3513. tableDatas: this.tab.table.list,
  3514. sheetName: '混料'
  3515. },
  3516. {
  3517. tHeader: [
  3518. this.$t('errorAnalysis.date'),
  3519. this.$t('errorAnalysis.Driver'),
  3520. this.$t('errorAnalysis.llzl'),
  3521. this.$t('errorAnalysis.acWeight'),
  3522. this.$t('errorAnalysis.sljhczs'),
  3523. this.$t('errorAnalysis.yclczs'),
  3524. this.$t('errorAnalysis.slczl'),
  3525. this.$t('errorAnalysis.slwcz'),
  3526. this.$t('errorAnalysis.slzql'),
  3527. this.$t('errorAnalysis.slzdtzcs'),
  3528. this.$t('errorAnalysis.slsdzdtzcs'),
  3529. this.$t('errorAnalysis.qxcs'),
  3530. this.$t('errorAnalysis.slzqs'),
  3531. this.$t('errorAnalysis.slzqs'),
  3532. this.$t('errorAnalysis.qcqxzql'),
  3533. this.$t('errorAnalysis.bzc')
  3534. ],
  3535. filterVal: [
  3536. '计划时间',
  3537. '驾驶员',
  3538. '理论重量',
  3539. '实际重量',
  3540. '计划撒料操作数',
  3541. '已撒料操作数',
  3542. '撒料操作率',
  3543. '撒料误差值',
  3544. '撒料准确率',
  3545. '撒料自动跳转次数',
  3546. '撒料手动跳转次数',
  3547. '取消次数',
  3548. '撒料正确数',
  3549. '撒料正确率',
  3550. '去除取消正确率',
  3551. '方差'
  3552. ],
  3553. tableDatas: this.tab.table2.list,
  3554. sheetName: '撒料'
  3555. }
  3556. ]
  3557. json2excel(
  3558. excelDatas0,
  3559. this.$t('errorAnalysis.hztjjsy'),
  3560. true,
  3561. 'xlsx'
  3562. )
  3563. } else if (this.tab.radio == '1') {
  3564. var excelDatas = [
  3565. {
  3566. tHeader: [
  3567. this.$t('errorAnalysis.date'),
  3568. this.$t('errorAnalysis.feedName'),
  3569. this.$t('errorAnalysis.llzl'),
  3570. this.$t('errorAnalysis.acWeight'),
  3571. this.$t('errorAnalysis.jshlczs'),
  3572. this.$t('errorAnalysis.yhlczs'),
  3573. this.$t('errorAnalysis.hlczl'),
  3574. this.$t('errorAnalysis.hlwczs'),
  3575. this.$t('errorAnalysis.hlzqls'),
  3576. this.$t('errorAnalysis.hlzdtzcs'),
  3577. this.$t('errorAnalysis.hlsdzdtzcs'),
  3578. this.$t('errorAnalysis.qxcs'),
  3579. this.$t('errorAnalysis.hlzqs'),
  3580. this.$t('errorAnalysis.hlzql'),
  3581. this.$t('errorAnalysis.qcqxzql'),
  3582. this.$t('errorAnalysis.bzc')
  3583. ],
  3584. filterVal: [
  3585. '计划时间',
  3586. '配方名称',
  3587. '理论重量',
  3588. '实际重量',
  3589. '计划混料操作数',
  3590. '已混料操作数',
  3591. '混料操作率',
  3592. '混料误差值',
  3593. '混料准确率',
  3594. '混料自动跳转次数',
  3595. '混料手动跳转次数',
  3596. '取消次数',
  3597. '混料正确数',
  3598. '混料正确率',
  3599. '去除取消正确率',
  3600. '方差'
  3601. ],
  3602. tableDatas: this.tab.table.list,
  3603. sheetName: '混料'
  3604. },
  3605. {
  3606. tHeader: [
  3607. this.$t('errorAnalysis.date'),
  3608. this.$t('errorAnalysis.feedName'),
  3609. this.$t('errorAnalysis.llzl'),
  3610. this.$t('errorAnalysis.acWeight'),
  3611. this.$t('errorAnalysis.sljhczs'),
  3612. this.$t('errorAnalysis.yclczs'),
  3613. this.$t('errorAnalysis.slczl'),
  3614. this.$t('errorAnalysis.slwcz'),
  3615. this.$t('errorAnalysis.slzql'),
  3616. this.$t('errorAnalysis.slzdtzcs'),
  3617. this.$t('errorAnalysis.slsdzdtzcs'),
  3618. this.$t('errorAnalysis.qxcs'),
  3619. this.$t('errorAnalysis.slzqs'),
  3620. this.$t('errorAnalysis.slzqs'),
  3621. this.$t('errorAnalysis.qcqxzql'),
  3622. this.$t('errorAnalysis.bzc')
  3623. ],
  3624. filterVal: [
  3625. '计划时间',
  3626. '配方名称',
  3627. '理论重量',
  3628. '实际重量',
  3629. '计划撒料操作数',
  3630. '已撒料操作数',
  3631. '撒料操作率',
  3632. '撒料误差值',
  3633. '撒料准确率',
  3634. '撒料自动跳转次数',
  3635. '撒料手动跳转次数',
  3636. '取消次数',
  3637. '撒料正确数',
  3638. '撒料正确率',
  3639. '去除取消正确率',
  3640. '方差'
  3641. ],
  3642. tableDatas: this.tab.table2.list,
  3643. sheetName: '撒料'
  3644. }
  3645. ]
  3646. json2excel(
  3647. excelDatas,
  3648. this.$t('errorAnalysis.hztjpfmc'),
  3649. true,
  3650. 'xlsx'
  3651. )
  3652. } else if (this.tab.radio == '2') {
  3653. var excelDatas2 = [
  3654. {
  3655. tHeader: [
  3656. this.$t('errorAnalysis.date'),
  3657. this.$t('errorAnalysis.isHouseName'),
  3658. this.$t('errorAnalysis.llzl'),
  3659. this.$t('errorAnalysis.acWeight'),
  3660. this.$t('errorAnalysis.jshlczs'),
  3661. this.$t('errorAnalysis.yhlczs'),
  3662. this.$t('errorAnalysis.hlczl'),
  3663. this.$t('errorAnalysis.hlwczs'),
  3664. this.$t('errorAnalysis.hlzqls'),
  3665. this.$t('errorAnalysis.hlzdtzcs'),
  3666. this.$t('errorAnalysis.hlsdzdtzcs'),
  3667. this.$t('errorAnalysis.qxcs'),
  3668. this.$t('errorAnalysis.hlzqs'),
  3669. this.$t('errorAnalysis.hlzql'),
  3670. this.$t('errorAnalysis.qcqxzql'),
  3671. this.$t('errorAnalysis.bzc')
  3672. ],
  3673. filterVal: [
  3674. '计划时间',
  3675. '栏舍名称',
  3676. '理论重量',
  3677. '实际重量',
  3678. '计划混料操作数',
  3679. '已混料操作数',
  3680. '混料操作率',
  3681. '混料误差值',
  3682. '混料准确率',
  3683. '混料自动跳转次数',
  3684. '混料手动跳转次数',
  3685. '取消次数',
  3686. '混料正确数',
  3687. '混料正确率',
  3688. '去除取消正确率',
  3689. '方差'
  3690. ],
  3691. tableDatas: this.tab.table.list,
  3692. sheetName: '混料'
  3693. },
  3694. {
  3695. tHeader: [
  3696. this.$t('errorAnalysis.date'),
  3697. this.$t('errorAnalysis.isHouseName'),
  3698. this.$t('errorAnalysis.llzl'),
  3699. this.$t('errorAnalysis.acWeight'),
  3700. this.$t('errorAnalysis.sljhczs'),
  3701. this.$t('errorAnalysis.yclczs'),
  3702. this.$t('errorAnalysis.slczl'),
  3703. this.$t('errorAnalysis.slwcz'),
  3704. this.$t('errorAnalysis.slzql'),
  3705. this.$t('errorAnalysis.slzdtzcs'),
  3706. this.$t('errorAnalysis.slsdzdtzcs'),
  3707. this.$t('errorAnalysis.qxcs'),
  3708. this.$t('errorAnalysis.slzqs'),
  3709. this.$t('errorAnalysis.slzqs'),
  3710. this.$t('errorAnalysis.qcqxzql'),
  3711. this.$t('errorAnalysis.bzc')
  3712. ],
  3713. filterVal: [
  3714. '计划时间',
  3715. this.$t('errorAnalysis.isHouseName'),
  3716. '理论重量',
  3717. '实际重量',
  3718. '计划撒料操作数',
  3719. '已撒料操作数',
  3720. '撒料操作率',
  3721. '撒料误差值',
  3722. '撒料准确率',
  3723. '撒料自动跳转次数',
  3724. '撒料手动跳转次数',
  3725. '取消次数',
  3726. '撒料正确数',
  3727. '撒料正确率',
  3728. '去除取消正确率',
  3729. '方差'
  3730. ],
  3731. tableDatas: this.tab.table2.list,
  3732. sheetName: '撒料'
  3733. }
  3734. ]
  3735. json2excel(
  3736. excelDatas2,
  3737. this.$t('errorAnalysis.hztjlsmz'),
  3738. true,
  3739. 'xlsx'
  3740. )
  3741. } else if (this.tab.radio == '3') {
  3742. var excelDatas3 = [
  3743. {
  3744. tHeader: [
  3745. this.$t('errorAnalysis.date'),
  3746. this.$t('errorAnalysis.sxlb'),
  3747. this.$t('errorAnalysis.llzl'),
  3748. this.$t('errorAnalysis.acWeight'),
  3749. this.$t('errorAnalysis.jshlczs'),
  3750. this.$t('errorAnalysis.yhlczs'),
  3751. this.$t('errorAnalysis.hlczl'),
  3752. this.$t('errorAnalysis.hlwczs'),
  3753. this.$t('errorAnalysis.hlzqls'),
  3754. this.$t('errorAnalysis.hlzdtzcs'),
  3755. this.$t('errorAnalysis.hlsdzdtzcs'),
  3756. this.$t('errorAnalysis.qxcs'),
  3757. this.$t('errorAnalysis.hlzqs'),
  3758. this.$t('errorAnalysis.hlzql'),
  3759. this.$t('errorAnalysis.qcqxzql'),
  3760. this.$t('errorAnalysis.bzc')
  3761. ],
  3762. filterVal: [
  3763. '计划时间',
  3764. '牲畜类别',
  3765. '理论重量',
  3766. '实际重量',
  3767. '计划混料操作数',
  3768. '已混料操作数',
  3769. '混料操作率',
  3770. '混料误差值',
  3771. '混料准确率',
  3772. '混料自动跳转次数',
  3773. '混料手动跳转次数',
  3774. '取消次数',
  3775. '混料正确数',
  3776. '混料正确率',
  3777. '去除取消正确率',
  3778. '方差'
  3779. ],
  3780. tableDatas: this.tab.table.list,
  3781. sheetName: '混料'
  3782. },
  3783. {
  3784. tHeader: [
  3785. this.$t('errorAnalysis.date'),
  3786. this.$t('errorAnalysis.sxlb'),
  3787. this.$t('errorAnalysis.llzl'),
  3788. this.$t('errorAnalysis.acWeight'),
  3789. this.$t('errorAnalysis.sljhczs'),
  3790. this.$t('errorAnalysis.yclczs'),
  3791. this.$t('errorAnalysis.slczl'),
  3792. this.$t('errorAnalysis.slwcz'),
  3793. this.$t('errorAnalysis.slzql'),
  3794. this.$t('errorAnalysis.slzdtzcs'),
  3795. this.$t('errorAnalysis.slsdzdtzcs'),
  3796. this.$t('errorAnalysis.qxcs'),
  3797. this.$t('errorAnalysis.slzqs'),
  3798. this.$t('errorAnalysis.slzqs'),
  3799. this.$t('errorAnalysis.qcqxzql'),
  3800. this.$t('errorAnalysis.bzc')
  3801. ],
  3802. filterVal: [
  3803. '计划时间',
  3804. '牲畜类别',
  3805. '理论重量',
  3806. '实际重量',
  3807. '计划撒料操作数',
  3808. '已撒料操作数',
  3809. '撒料操作率',
  3810. '撒料误差值',
  3811. '撒料准确率',
  3812. '撒料自动跳转次数',
  3813. '撒料手动跳转次数',
  3814. '取消次数',
  3815. '撒料正确数',
  3816. '撒料正确率',
  3817. '去除取消正确率',
  3818. '方差'
  3819. ],
  3820. tableDatas: this.tab.table2.list,
  3821. sheetName: '撒料'
  3822. }
  3823. ]
  3824. json2excel(
  3825. excelDatas3,
  3826. this.$t('errorAnalysis.hztjxslb'),
  3827. true,
  3828. 'xlsx'
  3829. )
  3830. } else if (this.tab.radio == '4') {
  3831. var excelDatas4 = [
  3832. {
  3833. tHeader: [
  3834. this.$t('errorAnalysis.date'),
  3835. this.$t('errorAnalysis.feedName'),
  3836. this.$t('errorAnalysis.drivername'),
  3837. this.$t('errorAnalysis.stratJl'),
  3838. this.$t('errorAnalysis.endJl'),
  3839. this.$t('errorAnalysis.tmrnames'),
  3840. this.$t('errorAnalysis.projname'),
  3841. this.$t('errorAnalysis.isTrainNumber'),
  3842. this.$t('errorAnalysis.Driver'),
  3843. this.$t('errorAnalysis.llzl'),
  3844. this.$t('errorAnalysis.acWeight'),
  3845. this.$t('errorAnalysis.jshlczs'),
  3846. this.$t('errorAnalysis.yhlczs'),
  3847. this.$t('errorAnalysis.hlczl'),
  3848. this.$t('errorAnalysis.hlwczs'),
  3849. this.$t('errorAnalysis.hlzqls'),
  3850. this.$t('errorAnalysis.hlsj'),
  3851. this.$t('errorAnalysis.flstartTime'),
  3852. this.$t('errorAnalysis.waitTime'),
  3853. this.$t('errorAnalysis.hlzdtzcs'),
  3854. this.$t('errorAnalysis.hlsdzdtzcs'),
  3855. this.$t('errorAnalysis.qxcs'),
  3856. this.$t('errorAnalysis.hlzqs'),
  3857. this.$t('errorAnalysis.hlzql'),
  3858. this.$t('errorAnalysis.qcqxzql'),
  3859. this.$t('errorAnalysis.bzc'),
  3860. this.$t('errorAnalysis.area')
  3861. ],
  3862. filterVal: [
  3863. '计划时间1',
  3864. 'templetname',
  3865. 'TMR名称',
  3866. 'startTime',
  3867. 'endTime',
  3868. 'TMR名称',
  3869. '车次',
  3870. '班次',
  3871. '驾驶员',
  3872. '理论重量',
  3873. '实际重量',
  3874. '计划混料操作数',
  3875. '已混料操作数',
  3876. '混料操作率',
  3877. '混料误差值',
  3878. '混料准确率',
  3879. '混料时间',
  3880. 'startMaterialTime',
  3881. '等待时间',
  3882. '混料自动跳转次数',
  3883. '混料手动跳转次数',
  3884. '取消次数',
  3885. '混料正确数',
  3886. '混料正确率',
  3887. '去除取消正确率',
  3888. '方差',
  3889. 'barname'
  3890. ],
  3891. tableDatas: this.tab.table.list,
  3892. sheetName: '混料'
  3893. },
  3894. {
  3895. tHeader: [
  3896. this.$t('errorAnalysis.date'),
  3897. this.$t('errorAnalysis.feedName'),
  3898. this.$t('errorAnalysis.drivername'),
  3899. this.$t('errorAnalysis.stratJl'),
  3900. this.$t('errorAnalysis.endJl'),
  3901. this.$t('errorAnalysis.tmrnames'),
  3902. this.$t('errorAnalysis.projname'),
  3903. this.$t('errorAnalysis.isTrainNumber'),
  3904. this.$t('errorAnalysis.Driver'),
  3905. this.$t('errorAnalysis.llzl'),
  3906. this.$t('errorAnalysis.acWeight'),
  3907. this.$t('errorAnalysis.sljhczs'),
  3908. this.$t('errorAnalysis.yclczs'),
  3909. this.$t('errorAnalysis.slczl'),
  3910. this.$t('errorAnalysis.slwcz'),
  3911. this.$t('errorAnalysis.slzql'),
  3912. this.$t('errorAnalysis.slsj'),
  3913. this.$t('errorAnalysis.flstartTime'),
  3914. this.$t('errorAnalysis.waitTime'),
  3915. this.$t('errorAnalysis.slzdtzcs'),
  3916. this.$t('errorAnalysis.slsdzdtzcs'),
  3917. this.$t('errorAnalysis.qxcs'),
  3918. this.$t('errorAnalysis.slzqs'),
  3919. this.$t('errorAnalysis.slzqs'),
  3920. this.$t('errorAnalysis.qcqxzql'),
  3921. this.$t('errorAnalysis.bzc'),
  3922. this.$t('errorAnalysis.area')
  3923. ],
  3924. filterVal: [
  3925. '计划时间1',
  3926. 'templetname',
  3927. 'TMR名称',
  3928. 'startTime',
  3929. 'endTime',
  3930. 'TMR名称',
  3931. '车次',
  3932. '班次',
  3933. '驾驶员',
  3934. '理论重量',
  3935. '实际重量',
  3936. '计划撒料操作数',
  3937. '已撒料操作数',
  3938. '撒料操作率',
  3939. '撒料误差值',
  3940. '撒料准确率',
  3941. '撒料时间',
  3942. 'startMaterialTime',
  3943. '等待时间',
  3944. '撒料自动跳转次数',
  3945. '撒料手动跳转次数',
  3946. '取消次数',
  3947. '撒料正确数',
  3948. '撒料正确率',
  3949. '去除取消正确率',
  3950. '方差',
  3951. 'barname'
  3952. ],
  3953. tableDatas: this.tab.table2.list,
  3954. sheetName: '撒料'
  3955. }
  3956. ]
  3957. json2excel(excelDatas4, this.$t('errorAnalysis.hztjcc'), true, 'xlsx')
  3958. } else if (this.tab.radio == '5') {
  3959. var excelDatas4 = [
  3960. {
  3961. tHeader: [
  3962. this.$t('errorAnalysis.date'),
  3963. this.$t('errorAnalysis.tmrnames'),
  3964. this.$t('errorAnalysis.isTrainNumber'),
  3965. this.$t('errorAnalysis.projname'),
  3966. this.$t('errorAnalysis.Driver'),
  3967. this.$t('errorAnalysis.llzl'),
  3968. this.$t('errorAnalysis.acWeight'),
  3969. this.$t('errorAnalysis.jshlczs'),
  3970. this.$t('errorAnalysis.yhlczs'),
  3971. this.$t('errorAnalysis.hlczl'),
  3972. this.$t('errorAnalysis.hlwczs'),
  3973. this.$t('errorAnalysis.hlzqls'),
  3974. this.$t('errorAnalysis.hlzdtzcs'),
  3975. this.$t('errorAnalysis.hlsdzdtzcs'),
  3976. this.$t('errorAnalysis.qxcs'),
  3977. this.$t('errorAnalysis.hlzqs'),
  3978. this.$t('errorAnalysis.hlzql'),
  3979. this.$t('errorAnalysis.qcqxzql'),
  3980. this.$t('errorAnalysis.bzc')
  3981. ],
  3982. filterVal: [
  3983. '计划时间',
  3984. 'TMR名称',
  3985. '班次',
  3986. '车次',
  3987. '驾驶员',
  3988. '理论重量',
  3989. '实际重量',
  3990. '计划混料操作数',
  3991. '已混料操作数',
  3992. '混料操作率',
  3993. '混料误差值',
  3994. '混料准确率',
  3995. '混料自动跳转次数',
  3996. '混料手动跳转次数',
  3997. '取消次数',
  3998. '混料正确数',
  3999. '混料正确率',
  4000. '去除取消正确率',
  4001. '方差'
  4002. ],
  4003. tableDatas: this.tab.table.list,
  4004. sheetName: '混料'
  4005. },
  4006. {
  4007. tHeader: [
  4008. this.$t('errorAnalysis.date'),
  4009. this.$t('errorAnalysis.tmrnames'),
  4010. this.$t('errorAnalysis.isTrainNumber'),
  4011. this.$t('errorAnalysis.projname'),
  4012. this.$t('errorAnalysis.Driver'),
  4013. this.$t('errorAnalysis.llzl'),
  4014. this.$t('errorAnalysis.acWeight'),
  4015. this.$t('errorAnalysis.sljhczs'),
  4016. this.$t('errorAnalysis.yclczs'),
  4017. this.$t('errorAnalysis.slczl'),
  4018. this.$t('errorAnalysis.slwcz'),
  4019. this.$t('errorAnalysis.slzql'),
  4020. this.$t('errorAnalysis.slzdtzcs'),
  4021. this.$t('errorAnalysis.slsdzdtzcs'),
  4022. this.$t('errorAnalysis.qxcs'),
  4023. this.$t('errorAnalysis.slzqs'),
  4024. this.$t('errorAnalysis.slzqs'),
  4025. this.$t('errorAnalysis.qcqxzql'),
  4026. this.$t('errorAnalysis.bzc')
  4027. ],
  4028. filterVal: [
  4029. '计划时间',
  4030. 'TMR名称',
  4031. '班次',
  4032. '车次',
  4033. '驾驶员',
  4034. '理论重量',
  4035. '实际重量',
  4036. '计划撒料操作数',
  4037. '已撒料操作数',
  4038. '撒料操作率',
  4039. '撒料误差值',
  4040. '撒料准确率',
  4041. '撒料自动跳转次数',
  4042. '撒料手动跳转次数',
  4043. '取消次数',
  4044. '撒料正确数',
  4045. '撒料正确率',
  4046. '去除取消正确率',
  4047. '方差'
  4048. ],
  4049. tableDatas: this.tab.table2.list,
  4050. sheetName: '撒料'
  4051. }
  4052. ]
  4053. json2excel(
  4054. excelDatas4,
  4055. this.$t('errorAnalysis.hztjtmr'),
  4056. true,
  4057. 'xlsx'
  4058. )
  4059. } else if (this.tab.radio == '6') {
  4060. var excelDatas5 = [
  4061. {
  4062. tHeader: [
  4063. this.$t('errorAnalysis.date'),
  4064. this.$t('errorAnalysis.isFeed'),
  4065. this.$t('errorAnalysis.llzl'),
  4066. this.$t('errorAnalysis.acWeight'),
  4067. this.$t('errorAnalysis.jshlczs'),
  4068. this.$t('errorAnalysis.yhlczs'),
  4069. this.$t('errorAnalysis.hlczl'),
  4070. this.$t('errorAnalysis.hlwczs'),
  4071. this.$t('errorAnalysis.hlzqls'),
  4072. this.$t('errorAnalysis.hlzdtzcs'),
  4073. this.$t('errorAnalysis.hlsdzdtzcs'),
  4074. this.$t('errorAnalysis.qxcs'),
  4075. this.$t('errorAnalysis.hlzqs'),
  4076. this.$t('errorAnalysis.hlzql'),
  4077. this.$t('errorAnalysis.qcqxzql'),
  4078. this.$t('errorAnalysis.bzc')
  4079. ],
  4080. filterVal: [
  4081. '计划时间',
  4082. 'fname',
  4083. '理论重量',
  4084. '实际重量',
  4085. '计划混料操作数',
  4086. '已混料操作数',
  4087. '混料操作率',
  4088. '混料误差值',
  4089. '混料准确率',
  4090. '混料自动跳转次数',
  4091. '混料手动跳转次数',
  4092. '取消次数',
  4093. '混料正确数',
  4094. '混料正确率',
  4095. '去除取消正确率',
  4096. '方差'
  4097. ],
  4098. tableDatas: this.tab.table.list,
  4099. sheetName: '混料'
  4100. }
  4101. ]
  4102. json2excel(excelDatas5, this.$t('errorAnalysis.hztjsl'), true, 'xlsx')
  4103. } else if (this.tab.radio == '7') {
  4104. var excelDatas7 = [
  4105. {
  4106. tHeader: [
  4107. this.$t('errorAnalysis.date'),
  4108. this.$t('errorAnalysis.llzl'),
  4109. this.$t('errorAnalysis.acWeight'),
  4110. this.$t('errorAnalysis.jshlczs'),
  4111. this.$t('errorAnalysis.yhlczs'),
  4112. this.$t('errorAnalysis.hlczl'),
  4113. this.$t('errorAnalysis.hlwczs'),
  4114. this.$t('errorAnalysis.hlzqls'),
  4115. this.$t('errorAnalysis.hlzdtzcs'),
  4116. this.$t('errorAnalysis.hlsdzdtzcs'),
  4117. this.$t('errorAnalysis.qxcs'),
  4118. this.$t('errorAnalysis.hlzqs'),
  4119. this.$t('errorAnalysis.hlzql'),
  4120. this.$t('errorAnalysis.qcqxzql'),
  4121. this.$t('errorAnalysis.bzc')
  4122. ],
  4123. filterVal: [
  4124. '计划时间',
  4125. '理论重量',
  4126. '实际重量',
  4127. '计划混料操作数',
  4128. '已混料操作数',
  4129. '混料操作率',
  4130. '混料误差值',
  4131. '混料准确率',
  4132. '混料自动跳转次数',
  4133. '混料手动跳转次数',
  4134. '取消次数',
  4135. '混料正确数',
  4136. '混料正确率',
  4137. '去除取消正确率',
  4138. '方差'
  4139. ],
  4140. tableDatas: this.tab.table.list,
  4141. sheetName: '混料'
  4142. },
  4143. {
  4144. tHeader: [
  4145. this.$t('errorAnalysis.date'),
  4146. this.$t('errorAnalysis.llzl'),
  4147. this.$t('errorAnalysis.acWeight'),
  4148. this.$t('errorAnalysis.sljhczs'),
  4149. this.$t('errorAnalysis.yclczs'),
  4150. this.$t('errorAnalysis.slczl'),
  4151. this.$t('errorAnalysis.slwcz'),
  4152. this.$t('errorAnalysis.slzql'),
  4153. this.$t('errorAnalysis.slzdtzcs'),
  4154. this.$t('errorAnalysis.slsdzdtzcs'),
  4155. this.$t('errorAnalysis.qxcs'),
  4156. this.$t('errorAnalysis.slzqs'),
  4157. this.$t('errorAnalysis.slzqs'),
  4158. this.$t('errorAnalysis.qcqxzql'),
  4159. this.$t('errorAnalysis.bzc')
  4160. ],
  4161. filterVal: [
  4162. '计划时间',
  4163. '理论重量',
  4164. '实际重量',
  4165. '计划撒料操作数',
  4166. '已撒料操作数',
  4167. '撒料操作率',
  4168. '撒料误差值',
  4169. '撒料准确率',
  4170. '撒料自动跳转次数',
  4171. '撒料手动跳转次数',
  4172. '取消次数',
  4173. '撒料正确数',
  4174. '撒料正确率',
  4175. '去除取消正确率',
  4176. '方差'
  4177. ],
  4178. tableDatas: this.tab.table2.list,
  4179. sheetName: '撒料'
  4180. }
  4181. ]
  4182. json2excel(
  4183. excelDatas7,
  4184. this.$t('errorAnalysis.hztjwfl'),
  4185. true,
  4186. 'xlsx'
  4187. )
  4188. }
  4189. } else {
  4190. if (this.tab.radio == '0') {
  4191. var excelDatas0 = [
  4192. {
  4193. tHeader: [
  4194. this.$t('errorAnalysis.Driver'),
  4195. this.$t('errorAnalysis.llzl'),
  4196. this.$t('errorAnalysis.acWeight'),
  4197. this.$t('errorAnalysis.jshlczs'),
  4198. this.$t('errorAnalysis.yhlczs'),
  4199. this.$t('errorAnalysis.hlczl'),
  4200. this.$t('errorAnalysis.hlwczs'),
  4201. this.$t('errorAnalysis.hlzqls'),
  4202. this.$t('errorAnalysis.hlzdtzcs'),
  4203. this.$t('errorAnalysis.hlsdzdtzcs'),
  4204. this.$t('errorAnalysis.qxcs'),
  4205. this.$t('errorAnalysis.hlzqs'),
  4206. this.$t('errorAnalysis.hlzql'),
  4207. this.$t('errorAnalysis.qcqxzql'),
  4208. this.$t('errorAnalysis.bzc')
  4209. ],
  4210. filterVal: [
  4211. '驾驶员',
  4212. '理论重量',
  4213. '实际重量',
  4214. '计划混料操作数',
  4215. '已混料操作数',
  4216. '混料操作率',
  4217. '混料误差值',
  4218. '混料准确率',
  4219. '混料自动跳转次数',
  4220. '混料手动跳转次数',
  4221. '取消次数',
  4222. '混料正确数',
  4223. '混料正确率',
  4224. '去除取消正确率',
  4225. '方差'
  4226. ],
  4227. tableDatas: this.tab.table.list,
  4228. sheetName: '混料'
  4229. },
  4230. {
  4231. tHeader: [
  4232. this.$t('errorAnalysis.Driver'),
  4233. this.$t('errorAnalysis.llzl'),
  4234. this.$t('errorAnalysis.acWeight'),
  4235. this.$t('errorAnalysis.sljhczs'),
  4236. this.$t('errorAnalysis.yclczs'),
  4237. this.$t('errorAnalysis.slczl'),
  4238. this.$t('errorAnalysis.slwcz'),
  4239. this.$t('errorAnalysis.slzql'),
  4240. this.$t('errorAnalysis.slzdtzcs'),
  4241. this.$t('errorAnalysis.slsdzdtzcs'),
  4242. this.$t('errorAnalysis.qxcs'),
  4243. this.$t('errorAnalysis.slzqs'),
  4244. this.$t('errorAnalysis.slzqs'),
  4245. this.$t('errorAnalysis.qcqxzql'),
  4246. this.$t('errorAnalysis.bzc')
  4247. ],
  4248. filterVal: [
  4249. '驾驶员',
  4250. '理论重量',
  4251. '实际重量',
  4252. '计划撒料操作数',
  4253. '已撒料操作数',
  4254. '撒料操作率',
  4255. '撒料误差值',
  4256. '撒料准确率',
  4257. '撒料自动跳转次数',
  4258. '撒料手动跳转次数',
  4259. '取消次数',
  4260. '撒料正确数',
  4261. '撒料正确率',
  4262. '去除取消正确率',
  4263. '方差'
  4264. ],
  4265. tableDatas: this.tab.table2.list,
  4266. sheetName: '撒料'
  4267. }
  4268. ]
  4269. json2excel(
  4270. excelDatas0,
  4271. this.$t('errorAnalysis.sumName'),
  4272. true,
  4273. 'xlsx'
  4274. )
  4275. } else if (this.tab.radio == '1') {
  4276. var excelDatas = [
  4277. {
  4278. tHeader: [
  4279. this.$t('errorAnalysis.feedName'),
  4280. this.$t('errorAnalysis.llzl'),
  4281. this.$t('errorAnalysis.acWeight'),
  4282. this.$t('errorAnalysis.jshlczs'),
  4283. this.$t('errorAnalysis.yhlczs'),
  4284. this.$t('errorAnalysis.hlczl'),
  4285. this.$t('errorAnalysis.hlwczs'),
  4286. this.$t('errorAnalysis.hlzqls'),
  4287. this.$t('errorAnalysis.hlzdtzcs'),
  4288. this.$t('errorAnalysis.hlsdzdtzcs'),
  4289. this.$t('errorAnalysis.qxcs'),
  4290. this.$t('errorAnalysis.hlzqs'),
  4291. this.$t('errorAnalysis.hlzql'),
  4292. this.$t('errorAnalysis.qcqxzql'),
  4293. this.$t('errorAnalysis.bzc')
  4294. ],
  4295. filterVal: [
  4296. '配方名称',
  4297. '理论重量',
  4298. '实际重量',
  4299. '计划混料操作数',
  4300. '已混料操作数',
  4301. '混料操作率',
  4302. '混料误差值',
  4303. '混料准确率',
  4304. '混料自动跳转次数',
  4305. '混料手动跳转次数',
  4306. '取消次数',
  4307. '混料正确数',
  4308. '混料正确率',
  4309. '去除取消正确率',
  4310. '方差'
  4311. ],
  4312. tableDatas: this.tab.table.list,
  4313. sheetName: '混料'
  4314. },
  4315. {
  4316. tHeader: [
  4317. this.$t('errorAnalysis.feedName'),
  4318. this.$t('errorAnalysis.llzl'),
  4319. this.$t('errorAnalysis.acWeight'),
  4320. this.$t('errorAnalysis.sljhczs'),
  4321. this.$t('errorAnalysis.yclczs'),
  4322. this.$t('errorAnalysis.slczl'),
  4323. this.$t('errorAnalysis.slwcz'),
  4324. this.$t('errorAnalysis.slzql'),
  4325. this.$t('errorAnalysis.slzdtzcs'),
  4326. this.$t('errorAnalysis.slsdzdtzcs'),
  4327. this.$t('errorAnalysis.qxcs'),
  4328. this.$t('errorAnalysis.slzqs'),
  4329. this.$t('errorAnalysis.slzqs'),
  4330. this.$t('errorAnalysis.qcqxzql'),
  4331. this.$t('errorAnalysis.bzc')
  4332. ],
  4333. filterVal: [
  4334. '配方名称',
  4335. '理论重量',
  4336. '实际重量',
  4337. '计划撒料操作数',
  4338. '已撒料操作数',
  4339. '撒料操作率',
  4340. '撒料误差值',
  4341. '撒料准确率',
  4342. '撒料自动跳转次数',
  4343. '撒料手动跳转次数',
  4344. '取消次数',
  4345. '撒料正确数',
  4346. '撒料正确率',
  4347. '去除取消正确率',
  4348. '方差'
  4349. ],
  4350. tableDatas: this.tab.table2.list,
  4351. sheetName: '撒料'
  4352. }
  4353. ]
  4354. json2excel(
  4355. excelDatas,
  4356. this.$t('errorAnalysis.hztjpfmc'),
  4357. true,
  4358. 'xlsx'
  4359. )
  4360. } else if (this.tab.radio == '2') {
  4361. var excelDatas2 = [
  4362. {
  4363. tHeader: [
  4364. this.$t('errorAnalysis.isHouseName'),
  4365. this.$t('errorAnalysis.llzl'),
  4366. this.$t('errorAnalysis.acWeight'),
  4367. this.$t('errorAnalysis.jshlczs'),
  4368. this.$t('errorAnalysis.yhlczs'),
  4369. this.$t('errorAnalysis.hlczl'),
  4370. this.$t('errorAnalysis.hlwczs'),
  4371. this.$t('errorAnalysis.hlzqls'),
  4372. this.$t('errorAnalysis.hlzdtzcs'),
  4373. this.$t('errorAnalysis.hlsdzdtzcs'),
  4374. this.$t('errorAnalysis.qxcs'),
  4375. this.$t('errorAnalysis.hlzqs'),
  4376. this.$t('errorAnalysis.hlzql'),
  4377. this.$t('errorAnalysis.qcqxzql'),
  4378. this.$t('errorAnalysis.bzc')
  4379. ],
  4380. filterVal: [
  4381. '栏舍名称',
  4382. '理论重量',
  4383. '实际重量',
  4384. '计划混料操作数',
  4385. '已混料操作数',
  4386. '混料操作率',
  4387. '混料误差值',
  4388. '混料准确率',
  4389. '混料自动跳转次数',
  4390. '混料手动跳转次数',
  4391. '取消次数',
  4392. '混料正确数',
  4393. '混料正确率',
  4394. '去除取消正确率',
  4395. '方差'
  4396. ],
  4397. tableDatas: this.tab.table.list,
  4398. sheetName: '混料'
  4399. },
  4400. {
  4401. tHeader: [
  4402. this.$t('errorAnalysis.isHouseName'),
  4403. this.$t('errorAnalysis.llzl'),
  4404. this.$t('errorAnalysis.acWeight'),
  4405. this.$t('errorAnalysis.sljhczs'),
  4406. this.$t('errorAnalysis.yclczs'),
  4407. this.$t('errorAnalysis.slczl'),
  4408. this.$t('errorAnalysis.slwcz'),
  4409. this.$t('errorAnalysis.slzql'),
  4410. this.$t('errorAnalysis.slzdtzcs'),
  4411. this.$t('errorAnalysis.slsdzdtzcs'),
  4412. this.$t('errorAnalysis.qxcs'),
  4413. this.$t('errorAnalysis.slzqs'),
  4414. this.$t('errorAnalysis.slzqs'),
  4415. this.$t('errorAnalysis.qcqxzql'),
  4416. this.$t('errorAnalysis.bzc')
  4417. ],
  4418. filterVal: [
  4419. this.$t('errorAnalysis.isHouseName'),
  4420. '理论重量',
  4421. '实际重量',
  4422. '计划撒料操作数',
  4423. '已撒料操作数',
  4424. '撒料操作率',
  4425. '撒料误差值',
  4426. '撒料准确率',
  4427. '撒料自动跳转次数',
  4428. '撒料手动跳转次数',
  4429. '取消次数',
  4430. '撒料正确数',
  4431. '撒料正确率',
  4432. '去除取消正确率',
  4433. '方差'
  4434. ],
  4435. tableDatas: this.tab.table2.list,
  4436. sheetName: '撒料'
  4437. }
  4438. ]
  4439. json2excel(
  4440. excelDatas2,
  4441. this.$t('errorAnalysis.hztjlsmz'),
  4442. true,
  4443. 'xlsx'
  4444. )
  4445. } else if (this.tab.radio == '3') {
  4446. var excelDatas3 = [
  4447. {
  4448. tHeader: [
  4449. this.$t('errorAnalysis.sxlb'),
  4450. this.$t('errorAnalysis.llzl'),
  4451. this.$t('errorAnalysis.acWeight'),
  4452. this.$t('errorAnalysis.jshlczs'),
  4453. this.$t('errorAnalysis.yhlczs'),
  4454. this.$t('errorAnalysis.hlczl'),
  4455. this.$t('errorAnalysis.hlwczs'),
  4456. this.$t('errorAnalysis.hlzqls'),
  4457. this.$t('errorAnalysis.hlzdtzcs'),
  4458. this.$t('errorAnalysis.hlsdzdtzcs'),
  4459. this.$t('errorAnalysis.qxcs'),
  4460. this.$t('errorAnalysis.hlzqs'),
  4461. this.$t('errorAnalysis.hlzql'),
  4462. this.$t('errorAnalysis.qcqxzql'),
  4463. this.$t('errorAnalysis.bzc')
  4464. ],
  4465. filterVal: [
  4466. '牲畜类别',
  4467. '理论重量',
  4468. '实际重量',
  4469. '计划混料操作数',
  4470. '已混料操作数',
  4471. '混料操作率',
  4472. '混料误差值',
  4473. '混料准确率',
  4474. '混料自动跳转次数',
  4475. '混料手动跳转次数',
  4476. '取消次数',
  4477. '混料正确数',
  4478. '混料正确率',
  4479. '去除取消正确率',
  4480. '方差'
  4481. ],
  4482. tableDatas: this.tab.table.list,
  4483. sheetName: '混料'
  4484. },
  4485. {
  4486. tHeader: [
  4487. this.$t('errorAnalysis.sxlb'),
  4488. this.$t('errorAnalysis.llzl'),
  4489. this.$t('errorAnalysis.acWeight'),
  4490. this.$t('errorAnalysis.sljhczs'),
  4491. this.$t('errorAnalysis.yclczs'),
  4492. this.$t('errorAnalysis.slczl'),
  4493. this.$t('errorAnalysis.slwcz'),
  4494. this.$t('errorAnalysis.slzql'),
  4495. this.$t('errorAnalysis.slzdtzcs'),
  4496. this.$t('errorAnalysis.slsdzdtzcs'),
  4497. this.$t('errorAnalysis.qxcs'),
  4498. this.$t('errorAnalysis.slzqs'),
  4499. this.$t('errorAnalysis.slzqs'),
  4500. this.$t('errorAnalysis.qcqxzql'),
  4501. this.$t('errorAnalysis.bzc')
  4502. ],
  4503. filterVal: [
  4504. '牲畜类别',
  4505. '理论重量',
  4506. '实际重量',
  4507. '计划撒料操作数',
  4508. '已撒料操作数',
  4509. '撒料操作率',
  4510. '撒料误差值',
  4511. '撒料准确率',
  4512. '撒料自动跳转次数',
  4513. '撒料手动跳转次数',
  4514. '取消次数',
  4515. '撒料正确数',
  4516. '撒料正确率',
  4517. '去除取消正确率',
  4518. '方差'
  4519. ],
  4520. tableDatas: this.tab.table2.list,
  4521. sheetName: '撒料'
  4522. }
  4523. ]
  4524. json2excel(
  4525. excelDatas3,
  4526. this.$t('errorAnalysis.hztjxslb'),
  4527. true,
  4528. 'xlsx'
  4529. )
  4530. } else if (this.tab.radio == '4') {
  4531. var excelDatas4 = [
  4532. {
  4533. tHeader: [
  4534. this.$t('errorAnalysis.date'),
  4535. this.$t('errorAnalysis.feedName'),
  4536. this.$t('errorAnalysis.drivername'),
  4537. this.$t('errorAnalysis.stratJl'),
  4538. this.$t('errorAnalysis.endJl'),
  4539. this.$t('errorAnalysis.tmrnames'),
  4540. this.$t('errorAnalysis.projname'),
  4541. this.$t('errorAnalysis.isTrainNumber'),
  4542. this.$t('errorAnalysis.Driver'),
  4543. this.$t('errorAnalysis.llzl'),
  4544. this.$t('errorAnalysis.acWeight'),
  4545. this.$t('errorAnalysis.jshlczs'),
  4546. this.$t('errorAnalysis.yhlczs'),
  4547. this.$t('errorAnalysis.hlczl'),
  4548. this.$t('errorAnalysis.hlwczs'),
  4549. this.$t('errorAnalysis.hlzqls'),
  4550. this.$t('errorAnalysis.hlsj'),
  4551. this.$t('errorAnalysis.flstartTime'),
  4552. this.$t('errorAnalysis.waitTime'),
  4553. this.$t('errorAnalysis.hlzdtzcs'),
  4554. this.$t('errorAnalysis.hlsdzdtzcs'),
  4555. this.$t('errorAnalysis.qxcs'),
  4556. this.$t('errorAnalysis.hlzqs'),
  4557. this.$t('errorAnalysis.hlzql'),
  4558. this.$t('errorAnalysis.qcqxzql'),
  4559. this.$t('errorAnalysis.bzc'),
  4560. this.$t('errorAnalysis.area')
  4561. ],
  4562. filterVal: [
  4563. '计划时间1',
  4564. 'templetname',
  4565. 'TMR名称',
  4566. 'startTime',
  4567. 'endTime',
  4568. 'TMR名称',
  4569. '车次',
  4570. '班次',
  4571. '驾驶员',
  4572. '理论重量',
  4573. '实际重量',
  4574. '计划混料操作数',
  4575. '已混料操作数',
  4576. '混料操作率',
  4577. '混料误差值',
  4578. '混料准确率',
  4579. '混料时间',
  4580. 'startMaterialTime',
  4581. '等待时间',
  4582. '混料自动跳转次数',
  4583. '混料手动跳转次数',
  4584. '取消次数',
  4585. '混料正确数',
  4586. '混料正确率',
  4587. '去除取消正确率',
  4588. '方差',
  4589. 'barname'
  4590. ],
  4591. tableDatas: this.tab.table.list,
  4592. sheetName: '混料'
  4593. },
  4594. {
  4595. tHeader: [
  4596. this.$t('errorAnalysis.date'),
  4597. this.$t('errorAnalysis.feedName'),
  4598. this.$t('errorAnalysis.drivername'),
  4599. this.$t('errorAnalysis.stratJl'),
  4600. this.$t('errorAnalysis.endJl'),
  4601. this.$t('errorAnalysis.tmrnames'),
  4602. this.$t('errorAnalysis.projname'),
  4603. this.$t('errorAnalysis.isTrainNumber'),
  4604. this.$t('errorAnalysis.Driver'),
  4605. this.$t('errorAnalysis.llzl'),
  4606. this.$t('errorAnalysis.acWeight'),
  4607. this.$t('errorAnalysis.sljhczs'),
  4608. this.$t('errorAnalysis.yclczs'),
  4609. this.$t('errorAnalysis.slczl'),
  4610. this.$t('errorAnalysis.slwcz'),
  4611. this.$t('errorAnalysis.slzql'),
  4612. this.$t('errorAnalysis.slsj'),
  4613. this.$t('errorAnalysis.flstartTime'),
  4614. this.$t('errorAnalysis.waitTime'),
  4615. this.$t('errorAnalysis.slzdtzcs'),
  4616. this.$t('errorAnalysis.slsdzdtzcs'),
  4617. this.$t('errorAnalysis.qxcs'),
  4618. this.$t('errorAnalysis.slzqs'),
  4619. this.$t('errorAnalysis.slzqs'),
  4620. this.$t('errorAnalysis.qcqxzql'),
  4621. this.$t('errorAnalysis.bzc'),
  4622. this.$t('errorAnalysis.area')
  4623. ],
  4624. filterVal: [
  4625. '计划时间1',
  4626. 'templetname',
  4627. 'TMR名称',
  4628. 'startTime',
  4629. 'endTime',
  4630. 'TMR名称',
  4631. '车次',
  4632. '班次',
  4633. '驾驶员',
  4634. '理论重量',
  4635. '实际重量',
  4636. '计划撒料操作数',
  4637. '已撒料操作数',
  4638. '撒料操作率',
  4639. '撒料误差值',
  4640. '撒料准确率',
  4641. '撒料时间',
  4642. 'startMaterialTime',
  4643. '等待时间',
  4644. '撒料自动跳转次数',
  4645. '撒料手动跳转次数',
  4646. '取消次数',
  4647. '撒料正确数',
  4648. '撒料正确率',
  4649. '去除取消正确率',
  4650. '方差',
  4651. 'barname'
  4652. ],
  4653. tableDatas: this.tab.table2.list,
  4654. sheetName: '撒料'
  4655. }
  4656. ]
  4657. json2excel(excelDatas4, this.$t('errorAnalysis.hztjcc'), true, 'xlsx')
  4658. } else if (this.tab.radio == '5') {
  4659. var excelDatas5 = [
  4660. {
  4661. tHeader: [
  4662. this.$t('errorAnalysis.tmrnames'),
  4663. this.$t('errorAnalysis.isTrainNumber'),
  4664. this.$t('errorAnalysis.projname'),
  4665. this.$t('errorAnalysis.Driver'),
  4666. this.$t('errorAnalysis.llzl'),
  4667. this.$t('errorAnalysis.acWeight'),
  4668. this.$t('errorAnalysis.jshlczs'),
  4669. this.$t('errorAnalysis.yhlczs'),
  4670. this.$t('errorAnalysis.hlczl'),
  4671. this.$t('errorAnalysis.hlwczs'),
  4672. this.$t('errorAnalysis.hlzqls'),
  4673. this.$t('errorAnalysis.hlzdtzcs'),
  4674. this.$t('errorAnalysis.hlsdzdtzcs'),
  4675. this.$t('errorAnalysis.qxcs'),
  4676. this.$t('errorAnalysis.hlzqs'),
  4677. this.$t('errorAnalysis.hlzql'),
  4678. this.$t('errorAnalysis.qcqxzql'),
  4679. this.$t('errorAnalysis.bzc')
  4680. ],
  4681. filterVal: [
  4682. 'TMR名称',
  4683. '班次',
  4684. '车次',
  4685. '驾驶员',
  4686. '理论重量',
  4687. '实际重量',
  4688. '计划混料操作数',
  4689. '已混料操作数',
  4690. '混料操作率',
  4691. '混料误差值',
  4692. '混料准确率',
  4693. '混料自动跳转次数',
  4694. '混料手动跳转次数',
  4695. '取消次数',
  4696. '混料正确数',
  4697. '混料正确率',
  4698. '去除取消正确率',
  4699. '方差'
  4700. ],
  4701. tableDatas: this.tab.table.list,
  4702. sheetName: '混料'
  4703. },
  4704. {
  4705. tHeader: [
  4706. this.$t('errorAnalysis.tmrnames'),
  4707. this.$t('errorAnalysis.isTrainNumber'),
  4708. this.$t('errorAnalysis.projname'),
  4709. this.$t('errorAnalysis.Driver'),
  4710. this.$t('errorAnalysis.llzl'),
  4711. this.$t('errorAnalysis.acWeight'),
  4712. this.$t('errorAnalysis.sljhczs'),
  4713. this.$t('errorAnalysis.yclczs'),
  4714. this.$t('errorAnalysis.slczl'),
  4715. this.$t('errorAnalysis.slwcz'),
  4716. this.$t('errorAnalysis.slzql'),
  4717. this.$t('errorAnalysis.slzdtzcs'),
  4718. this.$t('errorAnalysis.slsdzdtzcs'),
  4719. this.$t('errorAnalysis.qxcs'),
  4720. this.$t('errorAnalysis.slzqs'),
  4721. this.$t('errorAnalysis.slzqs'),
  4722. this.$t('errorAnalysis.qcqxzql'),
  4723. this.$t('errorAnalysis.bzc')
  4724. ],
  4725. filterVal: [
  4726. 'TMR名称',
  4727. '班次',
  4728. '车次',
  4729. '驾驶员',
  4730. '理论重量',
  4731. '实际重量',
  4732. '计划撒料操作数',
  4733. '已撒料操作数',
  4734. '撒料操作率',
  4735. '撒料误差值',
  4736. '撒料准确率',
  4737. '撒料自动跳转次数',
  4738. '撒料手动跳转次数',
  4739. '取消次数',
  4740. '撒料正确数',
  4741. '撒料正确率',
  4742. '去除取消正确率',
  4743. '方差'
  4744. ],
  4745. tableDatas: this.tab.table2.list,
  4746. sheetName: '撒料'
  4747. }
  4748. ]
  4749. json2excel(
  4750. excelDatas5,
  4751. this.$t('errorAnalysis.hztjtmr'),
  4752. true,
  4753. 'xlsx'
  4754. )
  4755. } else if (this.tab.radio == '6') {
  4756. var excelDatas6 = [
  4757. {
  4758. tHeader: [
  4759. this.$t('errorAnalysis.isFeed'),
  4760. this.$t('errorAnalysis.llzl'),
  4761. this.$t('errorAnalysis.acWeight'),
  4762. this.$t('errorAnalysis.jshlczs'),
  4763. this.$t('errorAnalysis.yhlczs'),
  4764. this.$t('errorAnalysis.hlczl'),
  4765. this.$t('errorAnalysis.hlwczs'),
  4766. this.$t('errorAnalysis.hlzqls'),
  4767. this.$t('errorAnalysis.hlzdtzcs'),
  4768. this.$t('errorAnalysis.hlsdzdtzcs'),
  4769. this.$t('errorAnalysis.qxcs'),
  4770. this.$t('errorAnalysis.hlzqs'),
  4771. this.$t('errorAnalysis.hlzql'),
  4772. this.$t('errorAnalysis.qcqxzql'),
  4773. this.$t('errorAnalysis.bzc')
  4774. ],
  4775. filterVal: [
  4776. 'fname',
  4777. '理论重量',
  4778. '实际重量',
  4779. '计划混料操作数',
  4780. '已混料操作数',
  4781. '混料操作率',
  4782. '混料误差值',
  4783. '混料准确率',
  4784. '混料自动跳转次数',
  4785. '混料手动跳转次数',
  4786. '取消次数',
  4787. '混料正确数',
  4788. '混料正确率',
  4789. '去除取消正确率',
  4790. '方差'
  4791. ],
  4792. tableDatas: this.tab.table.list,
  4793. sheetName: '混料'
  4794. }
  4795. ]
  4796. json2excel(excelDatas6, this.$t('errorAnalysis.hztjsl'), true, 'xlsx')
  4797. } else if (this.tab.radio == '7') {
  4798. var excelDatas7 = [
  4799. {
  4800. tHeader: [
  4801. this.$t('errorAnalysis.llzl'),
  4802. this.$t('errorAnalysis.acWeight'),
  4803. this.$t('errorAnalysis.jshlczs'),
  4804. this.$t('errorAnalysis.yhlczs'),
  4805. this.$t('errorAnalysis.hlczl'),
  4806. this.$t('errorAnalysis.hlwczs'),
  4807. this.$t('errorAnalysis.hlzqls'),
  4808. this.$t('errorAnalysis.hlzdtzcs'),
  4809. this.$t('errorAnalysis.hlsdzdtzcs'),
  4810. this.$t('errorAnalysis.qxcs'),
  4811. this.$t('errorAnalysis.hlzqs'),
  4812. this.$t('errorAnalysis.hlzql'),
  4813. this.$t('errorAnalysis.qcqxzql'),
  4814. this.$t('errorAnalysis.bzc')
  4815. ],
  4816. filterVal: [
  4817. '理论重量',
  4818. '实际重量',
  4819. '计划混料操作数',
  4820. '已混料操作数',
  4821. '混料操作率',
  4822. '混料误差值',
  4823. '混料准确率',
  4824. '混料自动跳转次数',
  4825. '混料手动跳转次数',
  4826. '取消次数',
  4827. '混料正确数',
  4828. '混料正确率',
  4829. '去除取消正确率',
  4830. '方差'
  4831. ],
  4832. tableDatas: this.tab.table.list,
  4833. sheetName: '混料'
  4834. },
  4835. {
  4836. tHeader: [
  4837. this.$t('errorAnalysis.llzl'),
  4838. this.$t('errorAnalysis.acWeight'),
  4839. this.$t('errorAnalysis.sljhczs'),
  4840. this.$t('errorAnalysis.yclczs'),
  4841. this.$t('errorAnalysis.slczl'),
  4842. this.$t('errorAnalysis.slwcz'),
  4843. this.$t('errorAnalysis.slzql'),
  4844. this.$t('errorAnalysis.slzdtzcs'),
  4845. this.$t('errorAnalysis.slsdzdtzcs'),
  4846. this.$t('errorAnalysis.qxcs'),
  4847. this.$t('errorAnalysis.slzqs'),
  4848. this.$t('errorAnalysis.slzqs'),
  4849. this.$t('errorAnalysis.qcqxzql'),
  4850. this.$t('errorAnalysis.bzc')
  4851. ],
  4852. filterVal: [
  4853. '理论重量',
  4854. '实际重量',
  4855. '计划撒料操作数',
  4856. '已撒料操作数',
  4857. '撒料操作率',
  4858. '撒料误差值',
  4859. '撒料准确率',
  4860. '撒料自动跳转次数',
  4861. '撒料手动跳转次数',
  4862. '取消次数',
  4863. '撒料正确数',
  4864. '撒料正确率',
  4865. '去除取消正确率',
  4866. '方差'
  4867. ],
  4868. tableDatas: this.tab.table2.list,
  4869. sheetName: '撒料'
  4870. }
  4871. ]
  4872. json2excel(
  4873. excelDatas7,
  4874. this.$t('errorAnalysis.hztjwfl'),
  4875. true,
  4876. 'xlsx'
  4877. )
  4878. }
  4879. }
  4880. },
  4881. // 切换Tab
  4882. handleTabClick() {
  4883. if (this.activeName == 'first') {
  4884. const start = new Date()
  4885. const end = new Date()
  4886. start.setTime(start.getTime() - 3600 * 1000 * 24 * 1)
  4887. end.setTime(end.getTime() - 3600 * 1000 * 24 * 1)
  4888. this.tab.table.getdataListParm.parammaps.inputDatetime = [start, end]
  4889. this.tab.table.getdataListParm.parammaps.startTime = parseTime(
  4890. this.tab.table.getdataListParm.parammaps.inputDatetime[0],
  4891. '{y}-{m}-{d}'
  4892. )
  4893. this.tab.table.getdataListParm.parammaps.stopTime = parseTime(
  4894. this.tab.table.getdataListParm.parammaps.inputDatetime[1],
  4895. '{y}-{m}-{d}'
  4896. )
  4897. this.tab.table2.getdataListParm.parammaps.startTime = parseTime(
  4898. this.tab.table.getdataListParm.parammaps.inputDatetime[0],
  4899. '{y}-{m}-{d}'
  4900. )
  4901. this.tab.table2.getdataListParm.parammaps.stopTime = parseTime(
  4902. this.tab.table.getdataListParm.parammaps.inputDatetime[1],
  4903. '{y}-{m}-{d}'
  4904. )
  4905. this.tab.table.getdataListParm.parammaps.fname = ''
  4906. this.tab.table.getdataListParm.parammaps.sort = ''
  4907. this.tab.table.getdataListParm.parammaps.times = ''
  4908. this.tab.table2.getdataListParm.parammaps.fname = ''
  4909. this.tab.table2.getdataListParm.parammaps.sort = ''
  4910. this.tab.table2.getdataListParm.parammaps.times = ''
  4911. this.getTabList()
  4912. this.getTabList2()
  4913. this.getChart1()
  4914. this.getChart2()
  4915. this.getChart3()
  4916. this.getChart4()
  4917. this.getChart5()
  4918. this.getChart6()
  4919. // this.$nextTick(() => {
  4920. // this.$refs.plTable3.doLayout()
  4921. // this.$refs.plTable3.doLayout()
  4922. // })
  4923. } else if (this.activeName == 'second') {
  4924. this.$nextTick(() => {
  4925. this.myHeightSecond =
  4926. document.documentElement.clientHeight -
  4927. 40 -
  4928. this.$refs.myHeightSecond.offsetHeight -
  4929. 150
  4930. const start2 = new Date()
  4931. start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
  4932. this.tab2.table.getdataListParm.parammaps.inputDatetime2 = start2
  4933. this.tab2.table.getdataListParm.parammaps.startTime = parseTime(
  4934. this.tab2.table.getdataListParm.parammaps.inputDatetime2,
  4935. '{y}-{m}-{d}'
  4936. )
  4937. this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(
  4938. this.tab2.table.getdataListParm.parammaps.inputDatetime2,
  4939. '{y}-{m}-{d}'
  4940. )
  4941. this.tab2.table.getdataListParm.parammaps.tmrtname = ''
  4942. this.tab2.table.getdataListParm.parammaps.projname = ''
  4943. this.tab2.table.getdataListParm.parammaps.times = ''
  4944. this.tab2.table.getdataListParm.parammaps.buttontype = ''
  4945. this.tab2.table.getdataListParm.parammaps.templetname = ''
  4946. this.getTab2List()
  4947. this.getTMRNameList2()
  4948. // this.$nextTick(() => {
  4949. // this.$refs.plTable3.doLayout()
  4950. // })
  4951. })
  4952. } else if (this.activeName == 'third') {
  4953. this.$nextTick(() => {
  4954. console.log(this.$refs.myHeightThird.offsetHeight, 'myHeightThird')
  4955. this.myHeightThird =
  4956. document.documentElement.clientHeight -
  4957. 40 -
  4958. this.$refs.myHeightThird.offsetHeight -
  4959. 150
  4960. const start3 = new Date()
  4961. start3.setTime(start3.getTime() - 3600 * 1000 * 24 * 1)
  4962. this.tab3.table.getdataListParm.parammaps.inputDatetime2 = start3
  4963. this.tab3.table.getdataListParm.parammaps.startTime = parseTime(
  4964. this.tab3.table.getdataListParm.parammaps.inputDatetime2,
  4965. '{y}-{m}-{d}'
  4966. )
  4967. this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(
  4968. this.tab3.table.getdataListParm.parammaps.inputDatetime2,
  4969. '{y}-{m}-{d}'
  4970. )
  4971. this.tab3.table.getdataListParm.parammaps.tmrtname = ''
  4972. this.tab3.table.getdataListParm.parammaps.projname = ''
  4973. this.tab3.table.getdataListParm.parammaps.times = ''
  4974. this.tab3.table.getdataListParm.parammaps.templetname = ''
  4975. this.tab3.table.getdataListParm.parammaps.buttontype = ''
  4976. this.getTab3List()
  4977. this.getTMRNameList3()
  4978. // this.$nextTick(() => {
  4979. // this.$refs.plTable3.doLayout()
  4980. // })
  4981. })
  4982. }
  4983. this.$forceUpdate()
  4984. },
  4985. // 切换统计类型
  4986. changeRadio() {
  4987. this.tab.table.getdataListParm.parammaps.sort = ''
  4988. this.tab.table.getdataListParm.parammaps.times = ''
  4989. this.tab.table.getdataListParm.parammaps.fname = ''
  4990. this.tab.table2.getdataListParm.parammaps.sort = ''
  4991. this.tab.table2.getdataListParm.parammaps.times = ''
  4992. this.tab.table2.getdataListParm.parammaps.fname = ''
  4993. if (this.tab.radio == '0') {
  4994. console.log('驾驶员')
  4995. this.tab.isDriver = true
  4996. this.tab.isFormulaName = false
  4997. this.tab.isHouseName = false
  4998. this.tab.isLivestockType = false
  4999. this.tab.isTrainNumber = false
  5000. this.tab.isTMRName = false
  5001. this.tab.isFeed = false
  5002. this.tab.table.getdataListParm.offset = 1
  5003. this.getTabList()
  5004. this.tab.table2.getdataListParm.offset = 1
  5005. this.getTabList2()
  5006. } else if (this.tab.radio == '1') {
  5007. console.log('配方名称')
  5008. this.tab.isDriver = false
  5009. this.tab.isFormulaName = true
  5010. this.tab.isHouseName = false
  5011. this.tab.isLivestockType = false
  5012. this.tab.isTrainNumber = false
  5013. this.tab.isTMRName = false
  5014. this.tab.isFeed = false
  5015. this.tab.table.getdataListParm.offset = 1
  5016. this.getTabList()
  5017. this.tab.table2.getdataListParm.offset = 1
  5018. this.getTabList2()
  5019. } else if (this.tab.radio == '2') {
  5020. console.log('栏舍名称')
  5021. this.tab.isDriver = false
  5022. this.tab.isFormulaName = false
  5023. this.tab.isHouseName = true
  5024. this.tab.isLivestockType = false
  5025. this.tab.isTrainNumber = false
  5026. this.tab.isTMRName = false
  5027. this.tab.isFeed = false
  5028. this.tab.table.getdataListParm.offset = 1
  5029. this.getTabList()
  5030. this.tab.table2.getdataListParm.offset = 1
  5031. this.getTabList2()
  5032. } else if (this.tab.radio == '3') {
  5033. console.log(' 牲畜类别')
  5034. this.tab.isDriver = false
  5035. this.tab.isFormulaName = false
  5036. this.tab.isHouseName = false
  5037. this.tab.isLivestockType = true
  5038. this.tab.isTrainNumber = false
  5039. this.tab.isTMRName = false
  5040. this.tab.isFeed = false
  5041. this.tab.table.getdataListParm.offset = 1
  5042. this.getTabList()
  5043. this.tab.table2.getdataListParm.offset = 1
  5044. this.getTabList2()
  5045. } else if (this.tab.radio == '4') {
  5046. console.log('车次')
  5047. this.tab.isDriver = false
  5048. this.tab.isFormulaName = false
  5049. this.tab.isHouseName = false
  5050. this.tab.isLivestockType = false
  5051. this.tab.isTrainNumber = true
  5052. this.tab.isTMRName = false
  5053. this.tab.isFeed = false
  5054. this.tab.table.getdataListParm.offset = 1
  5055. this.getTabList()
  5056. this.tab.table2.getdataListParm.offset = 1
  5057. this.getTabList2()
  5058. } else if (this.tab.radio == '5') {
  5059. console.log('TMR名称')
  5060. this.tab.isDriver = false
  5061. this.tab.isFormulaName = false
  5062. this.tab.isHouseName = false
  5063. this.tab.isLivestockType = false
  5064. this.tab.isTrainNumber = false
  5065. this.tab.isTMRName = true
  5066. this.tab.isFeed = false
  5067. this.tab.table.getdataListParm.offset = 1
  5068. this.getTabList()
  5069. this.tab.table2.getdataListParm.offset = 1
  5070. this.getTabList2()
  5071. this.getTMRNameList()
  5072. } else if (this.tab.radio == '6') {
  5073. console.log('饲料')
  5074. this.tab.isDriver = false
  5075. this.tab.isFormulaName = false
  5076. this.tab.isHouseName = false
  5077. this.tab.isLivestockType = false
  5078. this.tab.isTrainNumber = false
  5079. this.tab.isTMRName = false
  5080. this.tab.isFeed = true
  5081. this.tab.table.getdataListParm.offset = 1
  5082. this.getTabList()
  5083. } else if (this.tab.radio == '7') {
  5084. console.log('无分类')
  5085. this.tab.isDriver = false
  5086. this.tab.isFormulaName = false
  5087. this.tab.isHouseName = false
  5088. this.tab.isLivestockType = false
  5089. this.tab.isTrainNumber = false
  5090. this.tab.isTMRName = false
  5091. this.tab.isFeed = false
  5092. this.tab.table.getdataListParm.offset = 1
  5093. this.getTabList()
  5094. this.tab.table2.getdataListParm.offset = 1
  5095. this.getTabList2()
  5096. }
  5097. },
  5098. // 按日期统计
  5099. changeChecked() {
  5100. console.log(this.tab.checked)
  5101. this.form_search()
  5102. },
  5103. // 汇总统计/混料
  5104. getTabList() {
  5105. this.tab.table.listLoading = true
  5106. this.tab.table.getdataListParm.parammaps.status = this.tab.radio
  5107. this.tab.table.getdataListParm.parammaps.genre = 0
  5108. if (
  5109. this.tab.table.getdataListParm.parammaps.inputDatetime !== '' &&
  5110. this.tab.table.getdataListParm.parammaps.inputDatetime !== null
  5111. ) {
  5112. this.tab.table.getdataListParm.parammaps.startTime = parseTime(
  5113. this.tab.table.getdataListParm.parammaps.inputDatetime[0],
  5114. '{y}-{m}-{d}'
  5115. )
  5116. this.tab.table.getdataListParm.parammaps.stopTime = parseTime(
  5117. this.tab.table.getdataListParm.parammaps.inputDatetime[1],
  5118. '{y}-{m}-{d}'
  5119. )
  5120. } else {
  5121. this.tab.table.getdataListParm.parammaps.inputDatetime = ''
  5122. this.tab.table.getdataListParm.parammaps.startTime = ''
  5123. this.tab.table.getdataListParm.parammaps.stopTime = ''
  5124. }
  5125. let url = 'authdata/summary'
  5126. let data = {}
  5127. if (this.tab.checked == false) {
  5128. this.tab.table.getdataListParm.parammaps.isdate = 0
  5129. } else {
  5130. this.tab.table.getdataListParm.parammaps.isdate = 1
  5131. }
  5132. data.parammaps = this.tab.table.getdataListParm.parammaps
  5133. postJson(url, data).then((response) => {
  5134. if (response.data !== null && response.data.list !== null) {
  5135. console.log('汇总统计/混料table数据', response.data.list)
  5136. this.$refs.plTable1.reloadData(response.data.list)
  5137. this.tab.table.list = response.data.list
  5138. this.tab.table.total = response.data.total
  5139. } else {
  5140. this.$refs.plTable2.reloadData([])
  5141. this.tab.table.list = []
  5142. this.tab.table.total = 0
  5143. }
  5144. setTimeout(() => {
  5145. this.tab.table.listLoading = false
  5146. }, 100)
  5147. })
  5148. },
  5149. // 汇总统计/撒料
  5150. getTabList2() {
  5151. this.tab.table2.listLoading = true
  5152. this.tab.table2.getdataListParm.parammaps.status = this.tab.radio
  5153. this.tab.table2.getdataListParm.parammaps.genre = 1
  5154. this.tab.table2.getdataListParm.parammaps.startTime =
  5155. this.tab.table.getdataListParm.parammaps.startTime
  5156. this.tab.table2.getdataListParm.parammaps.stopTime =
  5157. this.tab.table.getdataListParm.parammaps.stopTime
  5158. this.tab.table2.getdataListParm.parammaps.hlwc1 =
  5159. this.tab.table.getdataListParm.parammaps.hlwc1
  5160. this.tab.table2.getdataListParm.parammaps.hlwc2 =
  5161. this.tab.table.getdataListParm.parammaps.hlwc2
  5162. this.tab.table2.getdataListParm.parammaps.hlzq1 =
  5163. this.tab.table.getdataListParm.parammaps.hlzq1
  5164. this.tab.table2.getdataListParm.parammaps.hlzq2 =
  5165. this.tab.table.getdataListParm.parammaps.hlzq2
  5166. this.tab.table2.getdataListParm.parammaps.hlzql1 =
  5167. this.tab.table.getdataListParm.parammaps.hlzql1
  5168. this.tab.table2.getdataListParm.parammaps.hlzql2 =
  5169. this.tab.table.getdataListParm.parammaps.hlzql2
  5170. this.tab.table2.getdataListParm.parammaps.slwc1 =
  5171. this.tab.table.getdataListParm.parammaps.slwc1
  5172. this.tab.table2.getdataListParm.parammaps.slwc2 =
  5173. this.tab.table.getdataListParm.parammaps.slwc2
  5174. this.tab.table2.getdataListParm.parammaps.slzq1 =
  5175. this.tab.table.getdataListParm.parammaps.slzq1
  5176. this.tab.table2.getdataListParm.parammaps.slzq2 =
  5177. this.tab.table.getdataListParm.parammaps.slzq2
  5178. this.tab.table2.getdataListParm.parammaps.slzql1 =
  5179. this.tab.table.getdataListParm.parammaps.slzql1
  5180. this.tab.table2.getdataListParm.parammaps.slzql2 =
  5181. this.tab.table.getdataListParm.parammaps.slzql2
  5182. this.tab.table2.getdataListParm.parammaps.templetname =
  5183. this.tab.table.getdataListParm.parammaps.templetname
  5184. this.tab.table2.getdataListParm.parammaps.startdate =
  5185. this.tab.table.getdataListParm.parammaps.startdate
  5186. this.tab.table2.getdataListParm.parammaps.enddate =
  5187. this.tab.table.getdataListParm.parammaps.enddate
  5188. this.tab.table2.getdataListParm.parammaps.error =
  5189. this.tab.table.getdataListParm.parammaps.error
  5190. let url = 'authdata/summary'
  5191. let data = {}
  5192. if (this.tab.checked == false) {
  5193. this.tab.table2.getdataListParm.parammaps.isdate = 0
  5194. } else {
  5195. this.tab.table2.getdataListParm.parammaps.isdate = 1
  5196. }
  5197. data.parammaps = this.tab.table2.getdataListParm.parammaps
  5198. postJson(url, data).then((response) => {
  5199. if (response.data !== null && response.data.list !== null) {
  5200. console.log('汇总统计/撒料table数据', response.data.list)
  5201. this.$refs.plTable22.reloadData(response.data.list)
  5202. this.tab.table2.list = response.data.list
  5203. this.tab.table2.total = response.data.total
  5204. } else {
  5205. this.$refs.plTable22.reloadData([])
  5206. this.tab.table2.list = []
  5207. this.tab.table2.total = 0
  5208. }
  5209. setTimeout(() => {
  5210. this.tab.table2.listLoading = false
  5211. }, 100)
  5212. })
  5213. },
  5214. // 查询
  5215. form_search() {
  5216. if (this.tab.radio == '0') {
  5217. console.log('驾驶员/查询111')
  5218. this.tab.isDriver = true
  5219. this.tab.isFormulaName = false
  5220. this.tab.isHouseName = false
  5221. this.tab.isLivestockType = false
  5222. this.tab.isTrainNumber = false
  5223. this.tab.isTMRName = false
  5224. this.tab.isFeed = false
  5225. this.tab.table.getdataListParm.offset = 1
  5226. this.getTabList()
  5227. this.tab.table2.getdataListParm.offset = 1
  5228. this.getTabList2()
  5229. } else if (this.tab.radio == '1') {
  5230. console.log('配方名称/查询111')
  5231. this.tab.isDriver = false
  5232. this.tab.isFormulaName = true
  5233. this.tab.isHouseName = false
  5234. this.tab.isLivestockType = false
  5235. this.tab.isTrainNumber = false
  5236. this.tab.isTMRName = false
  5237. this.tab.isFeed = false
  5238. this.tab.table.getdataListParm.offset = 1
  5239. this.getTabList()
  5240. this.tab.table2.getdataListParm.offset = 1
  5241. this.getTabList2()
  5242. } else if (this.tab.radio == '2') {
  5243. console.log('栏舍名称/查询')
  5244. this.tab.isDriver = false
  5245. this.tab.isFormulaName = false
  5246. this.tab.isHouseName = true
  5247. this.tab.isLivestockType = false
  5248. this.tab.isTrainNumber = false
  5249. this.tab.isTMRName = false
  5250. this.tab.isFeed = false
  5251. this.tab.table.getdataListParm.offset = 1
  5252. this.getTabList()
  5253. this.tab.table2.getdataListParm.offset = 1
  5254. this.getTabList2()
  5255. } else if (this.tab.radio == '3') {
  5256. console.log(' 牲畜类别/查询')
  5257. this.tab.isDriver = false
  5258. this.tab.isFormulaName = false
  5259. this.tab.isHouseName = false
  5260. this.tab.isLivestockType = true
  5261. this.tab.isTrainNumber = false
  5262. this.tab.isTMRName = false
  5263. this.tab.isFeed = false
  5264. this.tab.table.getdataListParm.offset = 1
  5265. this.getTabList()
  5266. this.tab.table2.getdataListParm.offset = 1
  5267. this.getTabList2()
  5268. } else if (this.tab.radio == '4') {
  5269. console.log('车次/查询')
  5270. this.tab.isDriver = false
  5271. this.tab.isFormulaName = false
  5272. this.tab.isHouseName = false
  5273. this.tab.isLivestockType = false
  5274. this.tab.isTrainNumber = true
  5275. this.tab.isTMRName = false
  5276. this.tab.isFeed = false
  5277. this.tab.table.getdataListParm.offset = 1
  5278. this.getTabList()
  5279. this.tab.table2.getdataListParm.offset = 1
  5280. this.getTabList2()
  5281. } else if (this.tab.radio == '5') {
  5282. console.log('TMR名称/查询')
  5283. this.tab.isDriver = false
  5284. this.tab.isFormulaName = false
  5285. this.tab.isHouseName = false
  5286. this.tab.isLivestockType = false
  5287. this.tab.isTrainNumber = false
  5288. this.tab.isTMRName = true
  5289. this.tab.isFeed = false
  5290. this.tab.table.getdataListParm.offset = 1
  5291. this.getTabList()
  5292. this.tab.table2.getdataListParm.offset = 1
  5293. this.getTabList2()
  5294. this.getTMRNameList()
  5295. } else if (this.tab.radio == '6') {
  5296. this.tab.isDriver = false
  5297. this.tab.isFormulaName = false
  5298. this.tab.isHouseName = false
  5299. this.tab.isLivestockType = false
  5300. this.tab.isTrainNumber = false
  5301. this.tab.isTMRName = false
  5302. this.tab.isFeed = true
  5303. this.tab.table.getdataListParm.offset = 1
  5304. this.getTabList()
  5305. } else if (this.tab.radio == '7') {
  5306. this.tab.isDriver = false
  5307. this.tab.isFormulaName = false
  5308. this.tab.isHouseName = false
  5309. this.tab.isLivestockType = false
  5310. this.tab.isTrainNumber = false
  5311. this.tab.isTMRName = false
  5312. this.tab.isFeed = false
  5313. this.tab.table.getdataListParm.offset = 1
  5314. this.getTabList()
  5315. this.tab.table2.getdataListParm.offset = 1
  5316. this.getTabList2()
  5317. }
  5318. this.tab.table2.getdataListParm.parammaps.fname =
  5319. this.tab.table.getdataListParm.parammaps.fname
  5320. },
  5321. handleRefresh1() {
  5322. this.tab.table.getdataListParm.parammaps.fname = ''
  5323. this.tab.table.getdataListParm.parammaps.projname = ''
  5324. this.tab.table.getdataListParm.parammaps.times = ''
  5325. this.tab.table.getdataListParm.parammaps.hlwc1 = undefined
  5326. this.tab.table.getdataListParm.parammaps.hlwc2 = undefined
  5327. this.tab.table.getdataListParm.parammaps.hlzq1 = undefined
  5328. this.tab.table.getdataListParm.parammaps.hlzq2 = undefined
  5329. this.tab.table.getdataListParm.parammaps.hlzql1 = undefined
  5330. this.tab.table.getdataListParm.parammaps.hlzql2 = undefined
  5331. this.tab.table.getdataListParm.parammaps.slwc1 = undefined
  5332. this.tab.table.getdataListParm.parammaps.slwc2 = undefined
  5333. this.tab.table.getdataListParm.parammaps.slzq1 = undefined
  5334. this.tab.table.getdataListParm.parammaps.slzq2 = undefined
  5335. this.tab.table.getdataListParm.parammaps.slzql1 = undefined
  5336. this.tab.table.getdataListParm.parammaps.slzql2 = undefined
  5337. this.tab.table.getdataListParm.parammaps.templetname = ''
  5338. this.tab.table.getdataListParm.parammaps.startdate = undefined
  5339. this.tab.table.getdataListParm.parammaps.enddate = undefined
  5340. this.tab.table.getdataListParm.parammaps.error = false
  5341. this.form_search()
  5342. },
  5343. handleBefore() {
  5344. this.$forceUpdate()
  5345. if (
  5346. this.tab.table.getdataListParm.parammaps.inputDatetime !== '' &&
  5347. this.tab.table.getdataListParm.parammaps.inputDatetime !== null
  5348. ) {
  5349. var start = new Date(
  5350. this.tab.table.getdataListParm.parammaps.inputDatetime[0].setDate(
  5351. this.tab.table.getdataListParm.parammaps.inputDatetime[0].getDate() -
  5352. 1
  5353. )
  5354. )
  5355. var stop = new Date(
  5356. this.tab.table.getdataListParm.parammaps.inputDatetime[1].setDate(
  5357. this.tab.table.getdataListParm.parammaps.inputDatetime[1].getDate() -
  5358. 1
  5359. )
  5360. )
  5361. if (stop > Date.now() - 8.64e7) {
  5362. this.Nextdisabled = true
  5363. this.Beforedisabled = false
  5364. } else {
  5365. this.Nextdisabled = false
  5366. this.Beforedisabled = false
  5367. }
  5368. this.tab.table.getdataListParm.parammaps.inputDatetime = []
  5369. this.tab.table.getdataListParm.parammaps.inputDatetime.length = 0
  5370. this.tab.table.getdataListParm.parammaps.inputDatetime.push(start, stop)
  5371. this.$forceUpdate()
  5372. }
  5373. this.tab.table.getdataListParm.parammaps.startTime = parseTime(
  5374. this.tab.table.getdataListParm.parammaps.inputDatetime[0],
  5375. '{y}-{m}-{d}'
  5376. )
  5377. this.tab.table.getdataListParm.parammaps.stopTime = parseTime(
  5378. this.tab.table.getdataListParm.parammaps.inputDatetime[1],
  5379. '{y}-{m}-{d}'
  5380. )
  5381. this.getTabList()
  5382. this.tab.table2.getdataListParm.parammaps.startTime =
  5383. this.tab.table.getdataListParm.parammaps.startTime
  5384. this.tab.table2.getdataListParm.parammaps.stopTime =
  5385. this.tab.table.getdataListParm.parammaps.stopTime
  5386. this.getTabList2()
  5387. this.getTMRNameList()
  5388. },
  5389. handleNext() {
  5390. this.$forceUpdate()
  5391. if (
  5392. this.tab.table.getdataListParm.parammaps.inputDatetime !== '' &&
  5393. this.tab.table.getdataListParm.parammaps.inputDatetime !== null
  5394. ) {
  5395. var start2 = new Date(
  5396. this.tab.table.getdataListParm.parammaps.inputDatetime[0].setDate(
  5397. this.tab.table.getdataListParm.parammaps.inputDatetime[0].getDate() +
  5398. 1
  5399. )
  5400. )
  5401. var stop2 = new Date(
  5402. this.tab.table.getdataListParm.parammaps.inputDatetime[1].setDate(
  5403. this.tab.table.getdataListParm.parammaps.inputDatetime[1].getDate() +
  5404. 1
  5405. )
  5406. )
  5407. if (stop2 > Date.now() - 8.64e7) {
  5408. this.Nextdisabled = true
  5409. this.Beforedisabled = false
  5410. } else {
  5411. this.Nextdisabled = false
  5412. this.Beforedisabled = false
  5413. }
  5414. this.tab.table.getdataListParm.parammaps.inputDatetime = []
  5415. this.tab.table.getdataListParm.parammaps.inputDatetime.length = 0
  5416. this.tab.table.getdataListParm.parammaps.inputDatetime.push(
  5417. start2,
  5418. stop2
  5419. )
  5420. this.$forceUpdate()
  5421. }
  5422. this.tab.table.getdataListParm.parammaps.startTime = parseTime(
  5423. this.tab.table.getdataListParm.parammaps.inputDatetime[0],
  5424. '{y}-{m}-{d}'
  5425. )
  5426. this.tab.table.getdataListParm.parammaps.stopTime = parseTime(
  5427. this.tab.table.getdataListParm.parammaps.inputDatetime[1],
  5428. '{y}-{m}-{d}'
  5429. )
  5430. this.getTabList()
  5431. this.tab.table2.getdataListParm.parammaps.startTime =
  5432. this.tab.table.getdataListParm.parammaps.startTime
  5433. this.tab.table2.getdataListParm.parammaps.stopTime =
  5434. this.tab.table.getdataListParm.parammaps.stopTime
  5435. this.getTabList2()
  5436. this.getTMRNameList()
  5437. },
  5438. handleBefore2() {
  5439. this.$forceUpdate()
  5440. if (
  5441. this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' &&
  5442. this.tab2.table.getdataListParm.parammaps.inputDatetime !== null
  5443. ) {
  5444. var start3 = new Date(
  5445. this.tab2.table.getdataListParm.parammaps.inputDatetime[0].setDate(
  5446. this.tab2.table.getdataListParm.parammaps.inputDatetime[0].getDate() -
  5447. 1
  5448. )
  5449. )
  5450. var stop3 = new Date(
  5451. this.tab2.table.getdataListParm.parammaps.inputDatetime[1].setDate(
  5452. this.tab2.table.getdataListParm.parammaps.inputDatetime[1].getDate() -
  5453. 1
  5454. )
  5455. )
  5456. if (stop3 > Date.now() - 8.64e7) {
  5457. this.Nextdisabled = true
  5458. this.Beforedisabled = false
  5459. } else {
  5460. this.Nextdisabled = false
  5461. this.Beforedisabled = false
  5462. }
  5463. this.tab2.table.getdataListParm.parammaps.inputDatetime = []
  5464. this.tab2.table.getdataListParm.parammaps.inputDatetime.length = 0
  5465. this.tab2.table.getdataListParm.parammaps.inputDatetime.push(
  5466. start3,
  5467. stop3
  5468. )
  5469. this.$forceUpdate()
  5470. }
  5471. this.tab2.table.getdataListParm.parammaps.startTime = parseTime(
  5472. start3,
  5473. '{y}-{m}-{d}'
  5474. )
  5475. this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(
  5476. stop3,
  5477. '{y}-{m}-{d}'
  5478. )
  5479. this.getTab2List()
  5480. this.getTMRNameList2()
  5481. },
  5482. handleNext2() {
  5483. if (
  5484. this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' &&
  5485. this.tab2.table.getdataListParm.parammaps.inputDatetime !== null
  5486. ) {
  5487. var start4 = new Date(
  5488. this.tab2.table.getdataListParm.parammaps.inputDatetime[0].setDate(
  5489. this.tab2.table.getdataListParm.parammaps.inputDatetime[0].getDate() +
  5490. 1
  5491. )
  5492. )
  5493. var stop4 = new Date(
  5494. this.tab2.table.getdataListParm.parammaps.inputDatetime[1].setDate(
  5495. this.tab2.table.getdataListParm.parammaps.inputDatetime[1].getDate() +
  5496. 1
  5497. )
  5498. )
  5499. if (stop4 > Date.now() - 8.64e7) {
  5500. this.Nextdisabled = true
  5501. this.Beforedisabled = false
  5502. } else {
  5503. this.Nextdisabled = false
  5504. this.Beforedisabled = false
  5505. }
  5506. this.tab2.table.getdataListParm.parammaps.inputDatetime = []
  5507. this.tab2.table.getdataListParm.parammaps.inputDatetime.length = 0
  5508. this.tab2.table.getdataListParm.parammaps.inputDatetime.push(
  5509. start4,
  5510. stop4
  5511. )
  5512. this.$forceUpdate()
  5513. }
  5514. this.tab2.table.getdataListParm.parammaps.startTime = parseTime(
  5515. start4,
  5516. '{y}-{m}-{d}'
  5517. )
  5518. this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(
  5519. start4,
  5520. '{y}-{m}-{d}'
  5521. )
  5522. this.getTab2List()
  5523. this.getTMRNameList2()
  5524. },
  5525. handleBefore3() {
  5526. this.$forceUpdate()
  5527. if (
  5528. this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' &&
  5529. this.tab3.table.getdataListParm.parammaps.inputDatetime !== null
  5530. ) {
  5531. var start5 = new Date(
  5532. this.tab3.table.getdataListParm.parammaps.inputDatetime[0].setDate(
  5533. this.tab3.table.getdataListParm.parammaps.inputDatetime[0].getDate() -
  5534. 1
  5535. )
  5536. )
  5537. var stop5 = new Date(
  5538. this.tab3.table.getdataListParm.parammaps.inputDatetime[1].setDate(
  5539. this.tab3.table.getdataListParm.parammaps.inputDatetime[1].getDate() -
  5540. 1
  5541. )
  5542. )
  5543. if (stop5 > Date.now() - 8.64e7) {
  5544. this.Nextdisabled = true
  5545. this.Beforedisabled = false
  5546. } else {
  5547. this.Nextdisabled = false
  5548. this.Beforedisabled = false
  5549. }
  5550. this.tab3.table.getdataListParm.parammaps.inputDatetime = []
  5551. this.tab3.table.getdataListParm.parammaps.inputDatetime.length = 0
  5552. this.tab3.table.getdataListParm.parammaps.inputDatetime.push(
  5553. start5,
  5554. stop5
  5555. )
  5556. this.$forceUpdate()
  5557. }
  5558. this.tab3.table.getdataListParm.parammaps.startTime = parseTime(
  5559. start5,
  5560. '{y}-{m}-{d}'
  5561. )
  5562. this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(
  5563. stop5,
  5564. '{y}-{m}-{d}'
  5565. )
  5566. this.getTab3List()
  5567. this.getTMRNameList3()
  5568. },
  5569. handleNext3() {
  5570. if (
  5571. this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' &&
  5572. this.tab3.table.getdataListParm.parammaps.inputDatetime !== null
  5573. ) {
  5574. var start6 = new Date(
  5575. this.tab3.table.getdataListParm.parammaps.inputDatetime[0].setDate(
  5576. this.tab3.table.getdataListParm.parammaps.inputDatetime[0].getDate() +
  5577. 1
  5578. )
  5579. )
  5580. var stop6 = new Date(
  5581. this.tab3.table.getdataListParm.parammaps.inputDatetime[1].setDate(
  5582. this.tab3.table.getdataListParm.parammaps.inputDatetime[1].getDate() +
  5583. 1
  5584. )
  5585. )
  5586. if (stop6 > Date.now() - 8.64e7) {
  5587. this.Nextdisabled = true
  5588. this.Beforedisabled = false
  5589. } else {
  5590. this.Nextdisabled = false
  5591. this.Beforedisabled = false
  5592. }
  5593. this.tab3.table.getdataListParm.parammaps.inputDatetime = []
  5594. this.tab3.table.getdataListParm.parammaps.inputDatetime.length = 0
  5595. this.tab3.table.getdataListParm.parammaps.inputDatetime.push(
  5596. start6,
  5597. stop6
  5598. )
  5599. this.$forceUpdate()
  5600. }
  5601. this.tab3.table.getdataListParm.parammaps.startTime = parseTime(
  5602. start6,
  5603. '{y}-{m}-{d}'
  5604. )
  5605. this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(
  5606. stop6,
  5607. '{y}-{m}-{d}'
  5608. )
  5609. this.getTab3List()
  5610. this.getTMRNameList3()
  5611. },
  5612. // 快速跳转到图表
  5613. handleQuickJumpChart() {
  5614. var myHeight = document.getElementById('table').offsetHeight + 120
  5615. window.scrollTo(myHeight, myHeight)
  5616. },
  5617. // 快速回到顶部
  5618. handleQuickJumpTop() {
  5619. window.scrollTo(0, 0)
  5620. },
  5621. // 配方准确率
  5622. changeStatisticChart1(arr) {
  5623. var arr1 = []
  5624. if (arr !== null) {
  5625. for (let i = 0; i < arr.length; i++) {
  5626. if (arr[i] !== 'all') {
  5627. arr1.push(arr[i])
  5628. }
  5629. }
  5630. }
  5631. this.tab.chart1.getdataListParm.parammaps.statisticsList = arr1
  5632. var arrData3 = []
  5633. if (this.tab.chart1.getdataListParm.parammaps.statisticsList !== null) {
  5634. for (
  5635. let i = 0;
  5636. i < this.tab.chart1.getdataListParm.parammaps.statisticsList.length;
  5637. i++
  5638. ) {
  5639. const myId = this.tab.chart1.statisticsList.find(
  5640. (obj) =>
  5641. obj.name ==
  5642. this.tab.chart1.getdataListParm.parammaps.statisticsList[i]
  5643. ).id
  5644. if (this.tab.chart1.chart1Data3 !== null) {
  5645. for (let j = 0; j < this.tab.chart1.chart1Data3.length; j++) {
  5646. if (j == myId) {
  5647. arrData3.push(this.tab.chart1.chart1Data3[j])
  5648. }
  5649. }
  5650. }
  5651. }
  5652. }
  5653. this.tab.chart1.chartLine_data.data3 = arrData3
  5654. this.tab.chart1.chartLine_data.data1 =
  5655. this.tab.chart1.getdataListParm.parammaps.statisticsList
  5656. this.roadChartLine1(this.tab.chart1.chartLine_data)
  5657. },
  5658. // 配方准确率
  5659. getChart1() {
  5660. this.tab.chart1.listLoading = true
  5661. const url = 'authdata/chart/accuracyAllFT'
  5662. const data = {}
  5663. data.parammaps = {}
  5664. if (this.tab.chart2.getdataListParm.parammaps.specificDate == '1') {
  5665. data.parammaps.pastureid =
  5666. this.tab.chart2.getdataListParm.parammaps.pastureid
  5667. data.parammaps.startTime = parseTime(
  5668. this.tab.chart2.getdataListParm.parammaps.inputDatetime[0],
  5669. '{y}-{m}-{d}'
  5670. )
  5671. data.parammaps.stopTime = parseTime(
  5672. this.tab.chart2.getdataListParm.parammaps.inputDatetime[1],
  5673. '{y}-{m}-{d}'
  5674. )
  5675. data.parammaps.status = this.tab.chart2.getdataListParm.parammaps.status
  5676. } else {
  5677. data.parammaps.pastureid =
  5678. this.tab.chart2.getdataListParm.parammaps.pastureid
  5679. data.parammaps.startTime =
  5680. this.tab.chart2.getdataListParm.parammaps.startTime
  5681. data.parammaps.stopTime =
  5682. this.tab.chart2.getdataListParm.parammaps.stopTime
  5683. data.parammaps.status = this.tab.chart2.getdataListParm.parammaps.status
  5684. }
  5685. postJson(url, data).then((response) => {
  5686. if (
  5687. response.data !== null &&
  5688. response.data.list !== null &&
  5689. response.data.data !== null
  5690. ) {
  5691. for (let i = 0; i < response.data.data.length; i++) {
  5692. for (let i = 0; i < response.data.data.length; i++) {
  5693. if (
  5694. response.data.data[i].准确率 !== '' &&
  5695. response.data.data[i].准确率 !== undefined
  5696. ) {
  5697. response.data.data[i].准确率 =
  5698. parseFloat(response.data.data[i].准确率) + '%'
  5699. }
  5700. if (
  5701. response.data.data[i].理论量 !== '' &&
  5702. response.data.data[i].理论量 !== undefined
  5703. ) {
  5704. response.data.data[i].理论量 = parseFloat(
  5705. response.data.data[i].理论量
  5706. )
  5707. }
  5708. if (
  5709. response.data.data[i].实际量 !== '' &&
  5710. response.data.data[i].实际量 !== undefined
  5711. ) {
  5712. response.data.data[i].实际量 = parseFloat(
  5713. response.data.data[i].实际量
  5714. )
  5715. }
  5716. }
  5717. }
  5718. this.tab.chart1.table.list = response.data.data
  5719. this.tab.chart1.chartLine_data = response.data.list
  5720. this.tab.chart1.statisticsList = []
  5721. this.tab.chart1.getdataListParm.parammaps.statisticsList = []
  5722. if (response.data.list.data1 !== null) {
  5723. for (let i = 0; i < response.data.list.data1.length; i++) {
  5724. this.tab.chart1.getdataListParm.parammaps.statisticsList.push(
  5725. response.data.list.data1[i]
  5726. )
  5727. var obj = {}
  5728. obj.id = i
  5729. obj.name = response.data.list.data1[i]
  5730. this.tab.chart1.statisticsList.push(obj)
  5731. }
  5732. }
  5733. console.log(this.tab.chart1.statisticsList, '配方准确率下拉内容')
  5734. this.tab.chart1.chart1Data3 = response.data.list.data3
  5735. this.tab.chart1.total = response.data.total
  5736. console.log('配方准确率表数据', this.tab.chart1.table.list)
  5737. console.log('配方准确率图数据', this.tab.chart1.chartLine_data)
  5738. var arrData3 = []
  5739. if (
  5740. this.tab.chart1.getdataListParm.parammaps.statisticsList !== null
  5741. ) {
  5742. for (
  5743. let i = 0;
  5744. i <
  5745. this.tab.chart1.getdataListParm.parammaps.statisticsList.length;
  5746. i++
  5747. ) {
  5748. const myId = this.tab.chart1.statisticsList.find(
  5749. (obj) =>
  5750. obj.name ==
  5751. this.tab.chart1.getdataListParm.parammaps.statisticsList[i]
  5752. ).id
  5753. if (this.tab.chart1.chart1Data3 !== null) {
  5754. for (let j = 0; j < this.tab.chart1.chart1Data3.length; j++) {
  5755. if (j == myId) {
  5756. this.tab.chart1.chart1Data3[j].checkedState = true
  5757. arrData3.push(this.tab.chart1.chart1Data3[j])
  5758. }
  5759. }
  5760. }
  5761. }
  5762. }
  5763. this.tab.chart1.chartLine_data.data3 = arrData3
  5764. this.tab.chart1.chartLine_data.data1 =
  5765. this.tab.chart1.getdataListParm.parammaps.statisticsList
  5766. this.roadChartLine1(this.tab.chart1.chartLine_data)
  5767. } else {
  5768. this.tab.chart1.list = []
  5769. }
  5770. setTimeout(() => {
  5771. this.tab.chart1.listLoading = false
  5772. }, 100)
  5773. })
  5774. },
  5775. roadChartLine1(chartLine_data) {
  5776. if (this.tab.chart1.chartLine != null) {
  5777. this.tab.chart1.chartLine.dispose()
  5778. }
  5779. this.tab.chart1.chartLine = echarts.init(
  5780. document.getElementById('chartLine1'),
  5781. null,
  5782. { renderer: 'svg' }
  5783. )
  5784. var option = {
  5785. title: {
  5786. text: ''
  5787. },
  5788. tooltip: {
  5789. trigger: 'axis'
  5790. },
  5791. legend: {
  5792. data: chartLine_data.data1,
  5793. right: 10,
  5794. show: true,
  5795. type: 'scroll'
  5796. },
  5797. grid: {
  5798. top: '20%',
  5799. left: '5%',
  5800. right: '8%',
  5801. containLabel: true
  5802. },
  5803. toolbox: {
  5804. show: true,
  5805. right: '2%',
  5806. feature: {}
  5807. },
  5808. xAxis: {
  5809. type: 'category',
  5810. boundaryGap: false,
  5811. data: chartLine_data.data2,
  5812. name: this.$t('errorAnalysis.date')
  5813. },
  5814. yAxis: {
  5815. min: 0, //取0为最小刻度
  5816. max: 100, //取100为最大刻度
  5817. min: 'min', //取最小值为最小刻度
  5818. max: 'max', //取最大值为最大刻度
  5819. min: function (value) {
  5820. //取最小值向下取整为最小刻度
  5821. return Math.floor(value.min)
  5822. },
  5823. max: function (value) {
  5824. //取最大值向上取整为最大刻度
  5825. return Math.ceil(value.max)
  5826. },
  5827. type: 'value',
  5828. name: this.$t('errorAnalysis.bfb'),
  5829. axisLabel: { formatter: '{value} %' }
  5830. },
  5831. series: (function () {
  5832. var serie = []
  5833. if (chartLine_data.data3 !== null) {
  5834. for (var i = 0; i < chartLine_data.data3.length; i++) {
  5835. var item = {
  5836. name: chartLine_data.data1[i],
  5837. type: 'line',
  5838. data: chartLine_data.data3[i].data
  5839. }
  5840. serie.push(item)
  5841. }
  5842. }
  5843. return serie
  5844. })()
  5845. }
  5846. this.tab.chart1.chartLine.setOption(option)
  5847. window.onresize = () => {
  5848. this.tab.chart1.chartLine.resize()
  5849. }
  5850. },
  5851. // 计划统计
  5852. getChart2() {
  5853. this.tab.chart2.listLoading = true
  5854. const url = 'authdata/chart/accuracyAllJH'
  5855. const data = {}
  5856. data.parammaps = {}
  5857. if (this.tab.chart2.getdataListParm.parammaps.specificDate == '1') {
  5858. data.parammaps.pastureid =
  5859. this.tab.chart2.getdataListParm.parammaps.pastureid
  5860. data.parammaps.startTime = parseTime(
  5861. this.tab.chart2.getdataListParm.parammaps.inputDatetime[0],
  5862. '{y}-{m}-{d}'
  5863. )
  5864. data.parammaps.stopTime = parseTime(
  5865. this.tab.chart2.getdataListParm.parammaps.inputDatetime[1],
  5866. '{y}-{m}-{d}'
  5867. )
  5868. data.parammaps.status = this.tab.chart2.getdataListParm.parammaps.status
  5869. } else {
  5870. data.parammaps.pastureid =
  5871. this.tab.chart2.getdataListParm.parammaps.pastureid
  5872. data.parammaps.startTime =
  5873. this.tab.chart2.getdataListParm.parammaps.startTime
  5874. data.parammaps.stopTime =
  5875. this.tab.chart2.getdataListParm.parammaps.stopTime
  5876. data.parammaps.status = this.tab.chart2.getdataListParm.parammaps.status
  5877. }
  5878. postJson(url, data).then((response) => {
  5879. if (
  5880. response.data !== null &&
  5881. response.data.list !== null &&
  5882. response.data.data !== null
  5883. ) {
  5884. for (let i = 0; i < response.data.data.length; i++) {
  5885. if (
  5886. response.data.data[i].实际量 !== '' &&
  5887. response.data.data[i].实际量 !== undefined
  5888. ) {
  5889. response.data.data[i].实际量 = parseFloat(
  5890. response.data.data[i].实际量
  5891. )
  5892. }
  5893. if (
  5894. response.data.data[i].理论量 !== '' &&
  5895. response.data.data[i].理论量 !== undefined
  5896. ) {
  5897. response.data.data[i].理论量 = parseFloat(
  5898. response.data.data[i].理论量
  5899. )
  5900. }
  5901. if (
  5902. response.data.data[i].field1 !== '' &&
  5903. response.data.data[i].field1 !== undefined
  5904. ) {
  5905. response.data.data[i].field1 = parseFloat(
  5906. response.data.data[i].field1
  5907. )
  5908. }
  5909. if (
  5910. response.data.data[i].计划取消重量 !== '' &&
  5911. response.data.data[i].计划取消重量 !== undefined
  5912. ) {
  5913. response.data.data[i].计划取消重量 = parseFloat(
  5914. response.data.data[i].计划取消重量
  5915. )
  5916. }
  5917. if (
  5918. response.data.data[i].field3 !== '' &&
  5919. response.data.data[i].field3 !== undefined
  5920. ) {
  5921. response.data.data[i].field3 = parseFloat(
  5922. response.data.data[i].field3
  5923. )
  5924. }
  5925. if (
  5926. response.data.data[i].正确数 !== '' &&
  5927. response.data.data[i].正确数 !== undefined
  5928. ) {
  5929. response.data.data[i].正确数 = parseFloat(
  5930. response.data.data[i].正确数
  5931. )
  5932. }
  5933. if (
  5934. response.data.data[i].计划数 !== '' &&
  5935. response.data.data[i].计划数 !== undefined
  5936. ) {
  5937. response.data.data[i].计划数 = parseFloat(
  5938. response.data.data[i].计划数
  5939. )
  5940. }
  5941. if (
  5942. response.data.data[i].field2 !== '' &&
  5943. response.data.data[i].field2 !== undefined
  5944. ) {
  5945. response.data.data[i].field2 = parseFloat(
  5946. response.data.data[i].field2
  5947. )
  5948. }
  5949. }
  5950. this.tab.chart2.table.list = response.data.data
  5951. this.tab.chart2.chartLine_data = response.data.list
  5952. this.tab.chart2.total = response.data.total
  5953. console.log('计划统计图数据', this.tab.chart2.chartLine_data)
  5954. console.log('计划统计表数据', this.tab.chart2.table.list)
  5955. this.roadChartLine2(this.tab.chart2.chartLine_data)
  5956. } else {
  5957. this.tab.chart2.list = []
  5958. }
  5959. setTimeout(() => {
  5960. this.tab.chart2.listLoading = false
  5961. }, 100)
  5962. })
  5963. },
  5964. roadChartLine2(chartLine_data) {
  5965. if (this.tab.chart2.chartLine != null) {
  5966. this.tab.chart2.chartLine.dispose()
  5967. }
  5968. this.tab.chart2.chartLine = echarts.init(
  5969. document.getElementById('chartLine2'),
  5970. null,
  5971. { renderer: 'svg' }
  5972. )
  5973. var option = {
  5974. title: {
  5975. text: ''
  5976. },
  5977. tooltip: {
  5978. trigger: 'axis'
  5979. },
  5980. legend: {
  5981. data: [
  5982. this.$t('errorAnalysis.jhzql'),
  5983. this.$t('errorAnalysis.jhzql1'),
  5984. this.$t('errorAnalysis.jhzqll')
  5985. ],
  5986. right: 10
  5987. },
  5988. grid: {
  5989. top: '20%',
  5990. left: '5%',
  5991. right: '8%',
  5992. containLabel: true
  5993. },
  5994. toolbox: {
  5995. show: true,
  5996. right: '2%',
  5997. feature: {}
  5998. },
  5999. xAxis: {
  6000. type: 'category',
  6001. boundaryGap: false,
  6002. data: chartLine_data.data1,
  6003. name: this.$t('errorAnalysis.date')
  6004. },
  6005. yAxis: {
  6006. min: 0, //取0为最小刻度
  6007. max: 100, //取100为最大刻度
  6008. min: 'min', //取最小值为最小刻度
  6009. max: 'max', //取最大值为最大刻度
  6010. min: function (value) {
  6011. //取最小值向下取整为最小刻度
  6012. return Math.floor(value.min)
  6013. },
  6014. max: function (value) {
  6015. //取最大值向上取整为最大刻度
  6016. return Math.ceil(value.max)
  6017. },
  6018. type: 'value',
  6019. name: this.$t('errorAnalysis.bfb'),
  6020. axisLabel: { formatter: '{value} %' }
  6021. },
  6022. series: [
  6023. {
  6024. name: this.$t('errorAnalysis.jhzql'),
  6025. type: 'line',
  6026. data: chartLine_data.data2
  6027. },
  6028. {
  6029. name: this.$t('errorAnalysis.jhzql1'),
  6030. type: 'line',
  6031. data: chartLine_data.data3
  6032. },
  6033. {
  6034. name: this.$t('errorAnalysis.jhzqll'),
  6035. type: 'line',
  6036. data: chartLine_data.data4
  6037. }
  6038. ]
  6039. }
  6040. this.tab.chart2.chartLine.setOption(option)
  6041. window.onresize = () => {
  6042. this.tab.chart2.chartLine.resize()
  6043. }
  6044. },
  6045. // 牛群准确率
  6046. changeStatisticChart3(arr) {
  6047. var arr1 = []
  6048. for (let i = 0; i < arr.length; i++) {
  6049. if (arr[i] !== 'all') {
  6050. arr1.push(arr[i])
  6051. }
  6052. }
  6053. this.tab.chart3.getdataListParm.parammaps.statisticsList = arr1
  6054. var arrData3 = []
  6055. for (
  6056. let i = 0;
  6057. i < this.tab.chart3.getdataListParm.parammaps.statisticsList.length;
  6058. i++
  6059. ) {
  6060. const myId = this.tab.chart3.statisticsList.find(
  6061. (obj) =>
  6062. obj.name ==
  6063. this.tab.chart3.getdataListParm.parammaps.statisticsList[i]
  6064. ).id
  6065. for (let j = 0; j < this.tab.chart3.chart3Data3.length; j++) {
  6066. if (j == myId) {
  6067. arrData3.push(this.tab.chart3.chart3Data3[j])
  6068. }
  6069. }
  6070. }
  6071. this.tab.chart3.chartLine_data.data3 = arrData3
  6072. this.tab.chart3.chartLine_data.data1 =
  6073. this.tab.chart3.getdataListParm.parammaps.statisticsList
  6074. this.roadChartLine3(this.tab.chart3.chartLine_data)
  6075. },
  6076. // 牛群准确率
  6077. getChart3() {
  6078. this.tab.chart3.listLoading = true
  6079. const url = 'authdata/chart/accuracyAllNQ'
  6080. const data = {}
  6081. data.parammaps = {}
  6082. if (this.tab.chart3.getdataListParm.parammaps.specificDate == '1') {
  6083. data.parammaps.pastureid =
  6084. this.tab.chart3.getdataListParm.parammaps.pastureid
  6085. data.parammaps.startTime = parseTime(
  6086. this.tab.chart3.getdataListParm.parammaps.inputDatetime[0],
  6087. '{y}-{m}-{d}'
  6088. )
  6089. data.parammaps.stopTime = parseTime(
  6090. this.tab.chart3.getdataListParm.parammaps.inputDatetime[1],
  6091. '{y}-{m}-{d}'
  6092. )
  6093. data.parammaps.status = this.tab.chart3.getdataListParm.parammaps.status
  6094. } else {
  6095. data.parammaps.pastureid =
  6096. this.tab.chart3.getdataListParm.parammaps.pastureid
  6097. data.parammaps.startTime =
  6098. this.tab.chart3.getdataListParm.parammaps.startTime
  6099. data.parammaps.stopTime =
  6100. this.tab.chart3.getdataListParm.parammaps.stopTime
  6101. data.parammaps.status = this.tab.chart3.getdataListParm.parammaps.status
  6102. }
  6103. postJson(url, data).then((response) => {
  6104. if (
  6105. response.data !== null &&
  6106. response.data.list !== null &&
  6107. response.data.data !== null
  6108. ) {
  6109. for (let i = 0; i < response.data.data.length; i++) {
  6110. if (
  6111. response.data.data[i].理论量 !== '' &&
  6112. response.data.data[i].理论量 !== undefined
  6113. ) {
  6114. response.data.data[i].理论量 = parseFloat(
  6115. response.data.data[i].理论量
  6116. )
  6117. }
  6118. if (
  6119. response.data.data[i].实际量 !== '' &&
  6120. response.data.data[i].实际量 !== undefined
  6121. ) {
  6122. response.data.data[i].实际量 = parseFloat(
  6123. response.data.data[i].实际量
  6124. )
  6125. }
  6126. if (
  6127. response.data.data[i].准确率 !== '' &&
  6128. response.data.data[i].准确率 !== undefined
  6129. ) {
  6130. response.data.data[i].准确率 =
  6131. parseFloat(response.data.data[i].准确率) + '%'
  6132. }
  6133. }
  6134. this.tab.chart3.table.list = response.data.data
  6135. this.tab.chart3.chartLine_data = response.data.list
  6136. this.tab.chart3.total = response.data.total
  6137. this.tab.chart3.statisticsList = []
  6138. this.tab.chart3.getdataListParm.parammaps.statisticsList = []
  6139. for (let i = 0; i < response.data.list.data1.length; i++) {
  6140. // if (i < 10) {
  6141. this.tab.chart3.getdataListParm.parammaps.statisticsList.push(
  6142. response.data.list.data1[i]
  6143. )
  6144. // }
  6145. var obj = {}
  6146. obj.id = i
  6147. obj.name = response.data.list.data1[i]
  6148. this.tab.chart3.statisticsList.push(obj)
  6149. }
  6150. this.tab.chart3.chart3Data3 = response.data.list.data3
  6151. this.tab.chart3.total = response.data.total
  6152. console.log('牛群准确率图数据', this.tab.chart3.chartLine_data)
  6153. console.log('牛群准确率表数据', this.tab.chart3.table.list)
  6154. var arrData3 = []
  6155. for (
  6156. let i = 0;
  6157. i < this.tab.chart3.getdataListParm.parammaps.statisticsList.length;
  6158. i++
  6159. ) {
  6160. const myId = this.tab.chart3.statisticsList.find(
  6161. (obj) =>
  6162. obj.name ==
  6163. this.tab.chart3.getdataListParm.parammaps.statisticsList[i]
  6164. ).id
  6165. for (let j = 0; j < this.tab.chart3.chart3Data3.length; j++) {
  6166. if (j == myId) {
  6167. arrData3.push(this.tab.chart3.chart3Data3[j])
  6168. }
  6169. }
  6170. }
  6171. this.tab.chart3.chartLine_data.data3 = arrData3
  6172. this.tab.chart3.chartLine_data.data1 =
  6173. this.tab.chart3.getdataListParm.parammaps.statisticsList
  6174. this.roadChartLine3(this.tab.chart3.chartLine_data)
  6175. } else {
  6176. this.tab.chart3.list = []
  6177. }
  6178. setTimeout(() => {
  6179. this.tab.chart3.listLoading = false
  6180. }, 100)
  6181. })
  6182. },
  6183. roadChartLine3(chartLine_data) {
  6184. if (this.tab.chart3.chartLine != null) {
  6185. this.tab.chart3.chartLine.dispose()
  6186. }
  6187. this.tab.chart3.chartLine = echarts.init(
  6188. document.getElementById('chartLine3'),
  6189. null,
  6190. { renderer: 'svg' }
  6191. )
  6192. var option = {
  6193. title: {
  6194. text: ''
  6195. },
  6196. tooltip: {
  6197. trigger: 'axis'
  6198. },
  6199. legend: {
  6200. data: chartLine_data.data1,
  6201. right: 10,
  6202. show: true,
  6203. type: 'scroll'
  6204. },
  6205. grid: {
  6206. top: '20%',
  6207. left: '5%',
  6208. right: '8%',
  6209. containLabel: true
  6210. },
  6211. toolbox: {
  6212. show: true,
  6213. right: '2%',
  6214. feature: {}
  6215. },
  6216. xAxis: {
  6217. type: 'category',
  6218. boundaryGap: false,
  6219. data: chartLine_data.data2,
  6220. name: this.$t('errorAnalysis.date')
  6221. },
  6222. yAxis: {
  6223. min: 0, //取0为最小刻度
  6224. max: 100, //取100为最大刻度
  6225. min: 'min', //取最小值为最小刻度
  6226. max: 'max', //取最大值为最大刻度
  6227. min: function (value) {
  6228. //取最小值向下取整为最小刻度
  6229. return Math.floor(value.min)
  6230. },
  6231. max: function (value) {
  6232. //取最大值向上取整为最大刻度
  6233. return Math.ceil(value.max)
  6234. },
  6235. type: 'value',
  6236. name: this.$t('errorAnalysis.bfb'),
  6237. axisLabel: { formatter: '{value} %' }
  6238. },
  6239. series: (function () {
  6240. var serie = []
  6241. for (var i = 0; i < chartLine_data.data3.length; i++) {
  6242. var item = {
  6243. name: chartLine_data.data1[i],
  6244. type: 'line',
  6245. data: chartLine_data.data3[i].data
  6246. }
  6247. serie.push(item)
  6248. }
  6249. return serie
  6250. })()
  6251. }
  6252. this.tab.chart3.chartLine.setOption(option)
  6253. window.onresize = () => {
  6254. this.tab.chart3.chartLine.resize()
  6255. }
  6256. },
  6257. // 车辆准确率(重量)
  6258. changeStatisticChart4(arr) {
  6259. var arr1 = []
  6260. for (let i = 0; i < arr.length; i++) {
  6261. if (arr[i] !== 'all') {
  6262. arr1.push(arr[i])
  6263. }
  6264. }
  6265. this.tab.chart4.getdataListParm.parammaps.statisticsList = arr1
  6266. var arrData3 = []
  6267. for (
  6268. let i = 0;
  6269. i < this.tab.chart4.getdataListParm.parammaps.statisticsList.length;
  6270. i++
  6271. ) {
  6272. const myId = this.tab.chart4.statisticsList.find(
  6273. (obj) =>
  6274. obj.name ==
  6275. this.tab.chart4.getdataListParm.parammaps.statisticsList[i]
  6276. ).id
  6277. for (let j = 0; j < this.tab.chart4.chart4Data3.length; j++) {
  6278. if (j == myId) {
  6279. arrData3.push(this.tab.chart4.chart4Data3[j])
  6280. }
  6281. }
  6282. }
  6283. this.tab.chart4.chartLine_data.data3 = arrData3
  6284. this.tab.chart4.chartLine_data.data1 =
  6285. this.tab.chart4.getdataListParm.parammaps.statisticsList
  6286. this.roadChartLine4(this.tab.chart4.chartLine_data)
  6287. },
  6288. // 车辆准确率
  6289. getChart4() {
  6290. this.tab.chart4.listLoading = true
  6291. const url = 'authdata/chart/accuracyAllCC'
  6292. const data = {}
  6293. data.parammaps = {}
  6294. if (this.tab.chart4.getdataListParm.parammaps.specificDate == '1') {
  6295. data.parammaps.pastureid =
  6296. this.tab.chart4.getdataListParm.parammaps.pastureid
  6297. data.parammaps.startTime = parseTime(
  6298. this.tab.chart4.getdataListParm.parammaps.inputDatetime[0],
  6299. '{y}-{m}-{d}'
  6300. )
  6301. data.parammaps.stopTime = parseTime(
  6302. this.tab.chart4.getdataListParm.parammaps.inputDatetime[1],
  6303. '{y}-{m}-{d}'
  6304. )
  6305. data.parammaps.status = this.tab.chart4.getdataListParm.parammaps.status
  6306. } else {
  6307. data.parammaps.pastureid =
  6308. this.tab.chart4.getdataListParm.parammaps.pastureid
  6309. data.parammaps.startTime =
  6310. this.tab.chart4.getdataListParm.parammaps.startTime
  6311. data.parammaps.stopTime =
  6312. this.tab.chart4.getdataListParm.parammaps.stopTime
  6313. data.parammaps.status = this.tab.chart4.getdataListParm.parammaps.status
  6314. }
  6315. postJson(url, data).then((response) => {
  6316. if (
  6317. response.data !== null &&
  6318. response.data.list !== null &&
  6319. response.data.data !== null
  6320. ) {
  6321. for (let i = 0; i < response.data.data.length; i++) {
  6322. if (
  6323. response.data.data[i].理论量 !== '' &&
  6324. response.data.data[i].理论量 !== undefined
  6325. ) {
  6326. response.data.data[i].理论量 = parseFloat(
  6327. response.data.data[i].理论量
  6328. )
  6329. }
  6330. if (
  6331. response.data.data[i].实际量 !== '' &&
  6332. response.data.data[i].实际量 !== undefined
  6333. ) {
  6334. response.data.data[i].实际量 = parseFloat(
  6335. response.data.data[i].实际量
  6336. )
  6337. }
  6338. if (
  6339. response.data.data[i].准确率 !== '' &&
  6340. response.data.data[i].准确率 !== undefined
  6341. ) {
  6342. response.data.data[i].准确率 =
  6343. parseFloat(response.data.data[i].准确率) + '%'
  6344. }
  6345. }
  6346. this.tab.chart4.table.list = response.data.data
  6347. this.tab.chart4.chartLine_data = response.data.list
  6348. this.tab.chart4.total = response.data.total
  6349. this.tab.chart4.statisticsList = []
  6350. this.tab.chart4.getdataListParm.parammaps.statisticsList = []
  6351. for (let i = 0; i < response.data.list.data1.length; i++) {
  6352. // if (i < 10) {
  6353. this.tab.chart4.getdataListParm.parammaps.statisticsList.push(
  6354. response.data.list.data1[i]
  6355. )
  6356. // }
  6357. var obj = {}
  6358. obj.id = i
  6359. obj.name = response.data.list.data1[i]
  6360. this.tab.chart4.statisticsList.push(obj)
  6361. }
  6362. this.tab.chart4.chart4Data3 = response.data.list.data3
  6363. this.tab.chart4.total = response.data.total
  6364. console.log('车辆准确率(重量)图', this.tab.chart4.chartLine_data)
  6365. console.log('车辆准确率(重量)表', this.tab.chart4.table.list)
  6366. var arrData3 = []
  6367. for (
  6368. let i = 0;
  6369. i < this.tab.chart4.getdataListParm.parammaps.statisticsList.length;
  6370. i++
  6371. ) {
  6372. const myId = this.tab.chart4.statisticsList.find(
  6373. (obj) =>
  6374. obj.name ==
  6375. this.tab.chart4.getdataListParm.parammaps.statisticsList[i]
  6376. ).id
  6377. for (let j = 0; j < this.tab.chart4.chart4Data3.length; j++) {
  6378. if (j == myId) {
  6379. arrData3.push(this.tab.chart4.chart4Data3[j])
  6380. }
  6381. }
  6382. }
  6383. this.tab.chart4.chartLine_data.data3 = arrData3
  6384. this.tab.chart4.chartLine_data.data1 =
  6385. this.tab.chart4.getdataListParm.parammaps.statisticsList
  6386. this.roadChartLine4(this.tab.chart4.chartLine_data)
  6387. } else {
  6388. this.tab.chart4.list = []
  6389. }
  6390. setTimeout(() => {
  6391. this.tab.chart4.listLoading = false
  6392. }, 100)
  6393. })
  6394. },
  6395. roadChartLine4(chartLine_data) {
  6396. if (this.tab.chart4.chartLine != null) {
  6397. this.tab.chart4.chartLine.dispose()
  6398. }
  6399. this.tab.chart4.chartLine = echarts.init(
  6400. document.getElementById('chartLine4'),
  6401. null,
  6402. { renderer: 'svg' }
  6403. )
  6404. var option = {
  6405. title: {
  6406. text: ''
  6407. },
  6408. tooltip: {
  6409. trigger: 'axis'
  6410. },
  6411. legend: {
  6412. data: chartLine_data.data1,
  6413. right: 10,
  6414. show: true,
  6415. type: 'scroll'
  6416. },
  6417. grid: {
  6418. top: '20%',
  6419. left: '5%',
  6420. right: '8%',
  6421. containLabel: true
  6422. },
  6423. toolbox: {
  6424. show: true,
  6425. right: '2%',
  6426. feature: {}
  6427. },
  6428. xAxis: {
  6429. type: 'category',
  6430. boundaryGap: false,
  6431. data: chartLine_data.data2,
  6432. name: this.$t('errorAnalysis.date')
  6433. },
  6434. yAxis: {
  6435. min: 0, //取0为最小刻度
  6436. max: 100, //取100为最大刻度
  6437. min: 'min', //取最小值为最小刻度
  6438. max: 'max', //取最大值为最大刻度
  6439. min: function (value) {
  6440. //取最小值向下取整为最小刻度
  6441. return Math.floor(value.min)
  6442. },
  6443. max: function (value) {
  6444. //取最大值向上取整为最大刻度
  6445. return Math.ceil(value.max)
  6446. },
  6447. type: 'value',
  6448. name: this.$t('errorAnalysis.bfb'),
  6449. axisLabel: { formatter: '{value} %' }
  6450. },
  6451. series: (function () {
  6452. var serie = []
  6453. for (var i = 0; i < chartLine_data.data3.length; i++) {
  6454. var item = {
  6455. name: chartLine_data.data1[i],
  6456. type: 'line',
  6457. data: chartLine_data.data3[i].data
  6458. }
  6459. serie.push(item)
  6460. }
  6461. return serie
  6462. })()
  6463. }
  6464. this.tab.chart4.chartLine.setOption(option)
  6465. window.onresize = () => {
  6466. this.tab.chart4.chartLine.resize()
  6467. }
  6468. },
  6469. // 混料统计
  6470. getChart5() {
  6471. this.tab.chart5.listLoading = true
  6472. const url = 'authdata/chart/accuracyAllHL'
  6473. const data = {}
  6474. data.parammaps = {}
  6475. if (this.tab.chart5.getdataListParm.parammaps.specificDate == '1') {
  6476. data.parammaps.pastureid =
  6477. this.tab.chart5.getdataListParm.parammaps.pastureid
  6478. data.parammaps.startTime = parseTime(
  6479. this.tab.chart5.getdataListParm.parammaps.inputDatetime[0],
  6480. '{y}-{m}-{d}'
  6481. )
  6482. data.parammaps.stopTime = parseTime(
  6483. this.tab.chart5.getdataListParm.parammaps.inputDatetime[1],
  6484. '{y}-{m}-{d}'
  6485. )
  6486. data.parammaps.status = this.tab.chart5.getdataListParm.parammaps.status
  6487. } else {
  6488. data.parammaps.pastureid =
  6489. this.tab.chart5.getdataListParm.parammaps.pastureid
  6490. data.parammaps.startTime =
  6491. this.tab.chart5.getdataListParm.parammaps.startTime
  6492. data.parammaps.stopTime =
  6493. this.tab.chart5.getdataListParm.parammaps.stopTime
  6494. data.parammaps.status = this.tab.chart5.getdataListParm.parammaps.status
  6495. }
  6496. postJson(url, data).then((response) => {
  6497. if (
  6498. response.data !== null &&
  6499. response.data.list !== null &&
  6500. response.data.data !== null
  6501. ) {
  6502. for (let i = 0; i < response.data.data.length; i++) {
  6503. if (
  6504. response.data.data[i].field1 !== '' &&
  6505. response.data.data[i].field1 !== undefined
  6506. ) {
  6507. response.data.data[i].field1 = parseFloat(
  6508. response.data.data[i].field1
  6509. )
  6510. }
  6511. if (
  6512. response.data.data[i].field2 !== '' &&
  6513. response.data.data[i].field2 !== undefined
  6514. ) {
  6515. response.data.data[i].field2 = parseFloat(
  6516. response.data.data[i].field2
  6517. )
  6518. }
  6519. if (
  6520. response.data.data[i].理论自动 !== '' &&
  6521. response.data.data[i].理论自动 !== undefined
  6522. ) {
  6523. response.data.data[i].理论自动 = parseFloat(
  6524. response.data.data[i].理论自动
  6525. )
  6526. }
  6527. if (
  6528. response.data.data[i].实际自动 !== '' &&
  6529. response.data.data[i].实际自动 !== undefined
  6530. ) {
  6531. response.data.data[i].实际自动 = parseFloat(
  6532. response.data.data[i].实际自动
  6533. )
  6534. }
  6535. if (
  6536. response.data.data[i].field3 !== '' &&
  6537. response.data.data[i].field3 !== undefined
  6538. ) {
  6539. response.data.data[i].field3 = parseFloat(
  6540. response.data.data[i].field3
  6541. )
  6542. }
  6543. if (
  6544. response.data.data[i].理论手动 !== '' &&
  6545. response.data.data[i].理论手动 !== undefined
  6546. ) {
  6547. response.data.data[i].理论手动 = parseFloat(
  6548. response.data.data[i].理论手动
  6549. )
  6550. }
  6551. if (
  6552. response.data.data[i].实际手动 !== '' &&
  6553. response.data.data[i].实际手动 !== undefined
  6554. ) {
  6555. response.data.data[i].实际手动 = parseFloat(
  6556. response.data.data[i].实际手动
  6557. )
  6558. }
  6559. if (
  6560. response.data.data[i].field4 !== '' &&
  6561. response.data.data[i].field4 !== undefined
  6562. ) {
  6563. response.data.data[i].field4 = parseFloat(
  6564. response.data.data[i].field4
  6565. )
  6566. }
  6567. }
  6568. this.tab.chart5.table.list = response.data.data
  6569. this.tab.chart5.chartLine_data = response.data.list
  6570. this.tab.chart5.total = response.data.total
  6571. console.log('混料统计图', this.tab.chart5.chartLine_data)
  6572. console.log('混料统计表', this.tab.chart5.table.list)
  6573. this.roadChartLine5(this.tab.chart5.chartLine_data)
  6574. } else {
  6575. this.tab.chart5.list = []
  6576. }
  6577. setTimeout(() => {
  6578. this.tab.chart5.listLoading = false
  6579. }, 100)
  6580. })
  6581. },
  6582. roadChartLine5(chartLine_data) {
  6583. if (this.tab.chart5.chartLine != null) {
  6584. this.tab.chart5.chartLine.dispose()
  6585. }
  6586. this.tab.chart5.chartLine = echarts.init(
  6587. document.getElementById('chartLine5'),
  6588. null,
  6589. { renderer: 'svg' }
  6590. )
  6591. var option = {
  6592. tooltip: {
  6593. trigger: 'axis',
  6594. axisPointer: {
  6595. type: 'cross',
  6596. crossStyle: {
  6597. color: '#999'
  6598. }
  6599. }
  6600. },
  6601. toolbox: {
  6602. feature: {}
  6603. },
  6604. legend: {
  6605. data: [
  6606. this.$t('errorAnalysis.zdtzcs'),
  6607. this.$t('errorAnalysis.sdtzcs'),
  6608. this.$t('errorAnalysis.zdtzzql'),
  6609. this.$t('errorAnalysis.sdtzzql')
  6610. ]
  6611. },
  6612. grid: {
  6613. top: '20%',
  6614. left: '5%',
  6615. right: '8%',
  6616. containLabel: true
  6617. },
  6618. xAxis: [
  6619. {
  6620. type: 'category',
  6621. data: chartLine_data.data1,
  6622. axisPointer: {
  6623. type: 'shadow'
  6624. }
  6625. }
  6626. ],
  6627. yAxis: [
  6628. {
  6629. splitLine: { show: false },
  6630. type: 'value',
  6631. name: this.$t('errorAnalysis.tzcs'),
  6632. axisLabel: {
  6633. formatter: '{value}'
  6634. }
  6635. },
  6636. {
  6637. splitLine: { show: false },
  6638. type: 'value',
  6639. name: this.$t('errorAnalysis.hlzqls'),
  6640. min: 0,
  6641. max: 100,
  6642. interval: 10,
  6643. axisLabel: {
  6644. formatter: '{value} %'
  6645. }
  6646. }
  6647. ],
  6648. series: [
  6649. {
  6650. name: this.$t('errorAnalysis.zdtzcs'),
  6651. type: 'bar',
  6652. data: chartLine_data.data2
  6653. },
  6654. {
  6655. name: this.$t('errorAnalysis.sdtzcs'),
  6656. type: 'bar',
  6657. data: chartLine_data.data3
  6658. },
  6659. {
  6660. name: this.$t('errorAnalysis.zdtzzql'),
  6661. type: 'line',
  6662. yAxisIndex: 1,
  6663. data: chartLine_data.data4
  6664. },
  6665. {
  6666. name: this.$t('errorAnalysis.sdtzzql'),
  6667. type: 'line',
  6668. yAxisIndex: 1,
  6669. data: chartLine_data.data5
  6670. }
  6671. ]
  6672. }
  6673. this.tab.chart5.chartLine.setOption(option)
  6674. window.onresize = () => {
  6675. this.tab.chart5.chartLine.resize()
  6676. }
  6677. },
  6678. // 混料计划取消次数
  6679. getChart6() {
  6680. this.tab.chart6.listLoading = true
  6681. const url = 'authdata/chart/accuracyAllQX'
  6682. const data = {}
  6683. data.parammaps = {}
  6684. if (this.tab.chart6.getdataListParm.parammaps.specificDate == '1') {
  6685. data.parammaps.pastureid =
  6686. this.tab.chart6.getdataListParm.parammaps.pastureid
  6687. data.parammaps.startTime = parseTime(
  6688. this.tab.chart6.getdataListParm.parammaps.inputDatetime[0],
  6689. '{y}-{m}-{d}'
  6690. )
  6691. data.parammaps.stopTime = parseTime(
  6692. this.tab.chart6.getdataListParm.parammaps.inputDatetime[1],
  6693. '{y}-{m}-{d}'
  6694. )
  6695. data.parammaps.status = this.tab.chart6.getdataListParm.parammaps.status
  6696. } else {
  6697. data.parammaps.pastureid =
  6698. this.tab.chart6.getdataListParm.parammaps.pastureid
  6699. data.parammaps.startTime =
  6700. this.tab.chart6.getdataListParm.parammaps.startTime
  6701. data.parammaps.stopTime =
  6702. this.tab.chart6.getdataListParm.parammaps.stopTime
  6703. data.parammaps.status = this.tab.chart6.getdataListParm.parammaps.status
  6704. }
  6705. postJson(url, data).then((response) => {
  6706. if (
  6707. response.data !== null &&
  6708. response.data.list !== null &&
  6709. response.data.data !== null
  6710. ) {
  6711. for (let i = 0; i < response.data.data.length; i++) {
  6712. if (
  6713. response.data.data[i].field1 !== '' &&
  6714. response.data.data[i].field1 !== undefined
  6715. ) {
  6716. response.data.data[i].field1 = parseFloat(
  6717. response.data.data[i].field1
  6718. )
  6719. }
  6720. }
  6721. this.tab.chart6.table.list = response.data.data
  6722. this.tab.chart6.chartLine_data = response.data.list
  6723. this.tab.chart6.total = response.data.total
  6724. console.log('混料计划取消次数图', this.tab.chart6.chartLine_data)
  6725. console.log('混料计划取消次数表', this.tab.chart6.table.list)
  6726. this.roadChartLine6(this.tab.chart6.chartLine_data)
  6727. } else {
  6728. this.tab.chart6.list = []
  6729. }
  6730. setTimeout(() => {
  6731. this.tab.chart6.listLoading = false
  6732. }, 100)
  6733. })
  6734. },
  6735. roadChartLine6(chartLine_data) {
  6736. if (this.tab.chart6.chartLine != null) {
  6737. this.tab.chart6.chartLine.dispose()
  6738. }
  6739. this.tab.chart6.chartLine = echarts.init(
  6740. document.getElementById('chartLine6'),
  6741. null,
  6742. { renderer: 'svg' }
  6743. )
  6744. var option = {
  6745. color: ['#3398DB'],
  6746. tooltip: {
  6747. trigger: 'axis',
  6748. axisPointer: {
  6749. // 坐标轴指示器,坐标轴触发有效
  6750. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  6751. }
  6752. },
  6753. legend: {
  6754. data: [this.$t('errorAnalysis.qxcs')],
  6755. right: 10,
  6756. show: true,
  6757. type: 'scroll'
  6758. },
  6759. grid: {
  6760. top: '20%',
  6761. left: '5%',
  6762. right: '8%',
  6763. containLabel: true
  6764. },
  6765. xAxis: [
  6766. {
  6767. name: this.$t('errorAnalysis.date'),
  6768. type: 'category',
  6769. data: chartLine_data.data1,
  6770. axisTick: {
  6771. alignWithLabel: true
  6772. }
  6773. }
  6774. ],
  6775. yAxis: [
  6776. {
  6777. name: this.$t('errorAnalysis.not'),
  6778. interval: 1, // 会出现负数刻度
  6779. min: 0,
  6780. type: 'value'
  6781. }
  6782. ],
  6783. series: [
  6784. {
  6785. name: this.$t('errorAnalysis.qxcs'),
  6786. type: 'bar',
  6787. barWidth: '60%',
  6788. data: chartLine_data.data2
  6789. }
  6790. ]
  6791. }
  6792. this.tab.chart6.chartLine.setOption(option)
  6793. window.onresize = () => {
  6794. this.tab.chart6.chartLine.resize()
  6795. }
  6796. },
  6797. changeformula() {
  6798. this.getChart7()
  6799. },
  6800. // 栏舍撒料时间统计
  6801. changeStatisticChart7(arr) {
  6802. console.log(arr, 'arr')
  6803. var arr1 = []
  6804. for (let i = 0; i < arr.length; i++) {
  6805. if (arr[i] !== 'all') {
  6806. arr1.push(arr[i])
  6807. }
  6808. }
  6809. this.tab.chart7.getdataListParm.parammaps.statisticsList = arr1
  6810. var arrData3 = []
  6811. for (
  6812. let i = 0;
  6813. i < this.tab.chart7.getdataListParm.parammaps.statisticsList.length;
  6814. i++
  6815. ) {
  6816. const myId = this.tab.chart7.statisticsList.find(
  6817. (obj) =>
  6818. obj.name ==
  6819. this.tab.chart7.getdataListParm.parammaps.statisticsList[i]
  6820. ).id
  6821. for (let j = 0; j < this.tab.chart7.chart7Data3.length; j++) {
  6822. if (j == myId) {
  6823. arrData3.push(this.tab.chart7.chart7Data3[j])
  6824. }
  6825. }
  6826. }
  6827. this.tab.chart7.chartLine_data.data3 = arrData3
  6828. this.tab.chart7.chartLine_data.data1 =
  6829. this.tab.chart7.getdataListParm.parammaps.statisticsList
  6830. // console.log(this.tab.chart7.getdataListParm.parammaps.statisticsList,'我要看到v-model')
  6831. // console.log(JSON.parse(this.tab.chart7.statisticsList),'我要看的下拉数据')
  6832. // console.log(JSON.stringify(this.tab.chart7.statisticsList),'我要看的下拉数据')
  6833. this.roadChartLine7(this.tab.chart7.chartLine_data)
  6834. },
  6835. handleScroll() {
  6836. // 获取滚动容器的DOM元素
  6837. const scrollContainer = this.$refs.scrollContainer
  6838. // 计算滚动条距离底部的距离
  6839. const distanceToBottom =
  6840. scrollContainer.scrollHeight -
  6841. (scrollContainer.scrollTop + scrollContainer.clientHeight)
  6842. // 如果滚动条已经滚到最下方
  6843. if (distanceToBottom === 0) {
  6844. console.log('滚动条已经滚到最下方')
  6845. this.getChart7()
  6846. // 在这里可以执行相应的操作
  6847. }
  6848. },
  6849. getChart7() {
  6850. this.tab.chart7.listLoading = true
  6851. const url = 'authdata/chart/accuracyAllLS'
  6852. const data = {}
  6853. data.parammaps = {}
  6854. if (this.tab.chart7.getdataListParm.parammaps.specificDate == '1') {
  6855. data.parammaps.pastureid =
  6856. this.tab.chart7.getdataListParm.parammaps.pastureid
  6857. data.parammaps.startTime = parseTime(
  6858. this.tab.chart7.getdataListParm.parammaps.inputDatetime[0],
  6859. '{y}-{m}-{d}'
  6860. )
  6861. data.parammaps.stopTime = parseTime(
  6862. this.tab.chart7.getdataListParm.parammaps.inputDatetime[1],
  6863. '{y}-{m}-{d}'
  6864. )
  6865. data.parammaps.status = this.tab.chart7.getdataListParm.parammaps.status
  6866. data.parammaps.ftId =
  6867. this.tab.chart7.getdataListParm.parammaps.ftId.join(',')
  6868. } else {
  6869. data.parammaps.pastureid =
  6870. this.tab.chart7.getdataListParm.parammaps.pastureid
  6871. data.parammaps.startTime =
  6872. this.tab.chart7.getdataListParm.parammaps.startTime
  6873. data.parammaps.stopTime =
  6874. this.tab.chart7.getdataListParm.parammaps.stopTime
  6875. data.parammaps.status = this.tab.chart7.getdataListParm.parammaps.status
  6876. data.parammaps.ftId =
  6877. this.tab.chart7.getdataListParm.parammaps.ftId.join(',')
  6878. }
  6879. postJson(url, data).then((response) => {
  6880. if (
  6881. response.data !== null &&
  6882. response.data.list !== null &&
  6883. response.data.data !== null
  6884. ) {
  6885. for (let i = 0; i < response.data.data.length; i++) {
  6886. // 撒料时间
  6887. var b = []
  6888. for (let j = 0; j <= response.data.data[i].准确率.length; j++) {
  6889. // console.log(response.data.data[i].准确率)
  6890. if (response.data.data[i].准确率.charAt(j) == '.') {
  6891. b[j] = response.data.data[i].准确率.replace('.', ':')
  6892. }
  6893. }
  6894. response.data.data[i].准确率 = b[b.length - 1]
  6895. response.data.data[i].撒料时间 = response.data.data[i].准确率
  6896. }
  6897. this.tab.chart7.table.list = response.data.data
  6898. this.tab.chart7.chartLine_data = response.data.list
  6899. this.tab.chart7.statisticsList = []
  6900. this.tab.chart7.getdataListParm.parammaps.statisticsList = []
  6901. for (let i = 0; i < response.data.list.data1.length; i++) {
  6902. // 君盛
  6903. // if (i < 10) {
  6904. // this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
  6905. // }
  6906. // 其他牧场
  6907. this.tab.chart7.getdataListParm.parammaps.statisticsList.push(
  6908. response.data.list.data1[i]
  6909. )
  6910. var obj = {}
  6911. obj.id = i
  6912. obj.name = response.data.list.data1[i]
  6913. this.tab.chart7.statisticsList.push(obj)
  6914. }
  6915. console.log('------->', this.tab.chart7)
  6916. this.tab.chart7.chart7Data3 = response.data.list.data3
  6917. this.tab.chart7.total = response.data.total
  6918. console.log('栏舍撒料时间统计图', this.tab.chart7.chartLine_data)
  6919. console.log('栏舍撒料时间统计表', this.tab.chart7.table.list)
  6920. var arrData3 = []
  6921. for (
  6922. let i = 0;
  6923. i < this.tab.chart7.getdataListParm.parammaps.statisticsList.length;
  6924. i++
  6925. ) {
  6926. const myId = this.tab.chart7.statisticsList.find(
  6927. (obj) =>
  6928. obj.name ==
  6929. this.tab.chart7.getdataListParm.parammaps.statisticsList[i]
  6930. ).id
  6931. for (let j = 0; j < this.tab.chart7.chart7Data3.length; j++) {
  6932. if (j == myId) {
  6933. arrData3.push(this.tab.chart7.chart7Data3[j])
  6934. }
  6935. }
  6936. }
  6937. this.tab.chart7.chartLine_data.data3 = arrData3
  6938. this.tab.chart7.chartLine_data.data1 =
  6939. this.tab.chart7.getdataListParm.parammaps.statisticsList
  6940. // console.log(this.tab.chart7.getdataListParm.parammaps.statisticsList,'我要看到v-model')
  6941. // console.log(JSON.stringify(this.tab.chart7.statisticsList),'我要看的下拉数据')
  6942. this.roadChartLine7(this.tab.chart7.chartLine_data)
  6943. } else {
  6944. this.tab.chart7.list = []
  6945. }
  6946. setTimeout(() => {
  6947. this.tab.chart7.listLoading = false
  6948. }, 100)
  6949. })
  6950. },
  6951. roadChartLine7(chartLine_data) {
  6952. console.log(chartLine_data, 'chartLine_data777')
  6953. if (this.tab.chart7.chartLine != null) {
  6954. this.tab.chart7.chartLine.dispose()
  6955. }
  6956. this.tab.chart7.chartLine = echarts.init(
  6957. document.getElementById('chartLine7'),
  6958. null,
  6959. { renderer: 'svg' }
  6960. )
  6961. var option = {
  6962. useWorker: true,
  6963. title: {
  6964. text: ''
  6965. },
  6966. tooltip: {
  6967. trigger: 'axis',
  6968. formatter: function (params) {
  6969. // console.log(params)
  6970. var tip = params[0].name
  6971. if (params !== null && params !== '') {
  6972. for (let i = 0; i < params.length; i++) {
  6973. var b = []
  6974. // var str = params[i].value
  6975. for (let j = 0; j <= params[i].value.length; j++) {
  6976. if (params[i].value !== '') {
  6977. if (params[i].value.charAt(j) == '.') {
  6978. b[j] = params[i].value.replace('.', ':')
  6979. }
  6980. } else {
  6981. b[j] = ''
  6982. }
  6983. }
  6984. tip += '<br>' + params[i].seriesName + ': ' + b[b.length - 1]
  6985. }
  6986. }
  6987. return tip
  6988. }
  6989. },
  6990. legend: {
  6991. data: chartLine_data.data1,
  6992. top: 10,
  6993. right: 10,
  6994. show: true,
  6995. type: 'scroll'
  6996. },
  6997. grid: {
  6998. top: '20%',
  6999. left: '5%',
  7000. right: '8%',
  7001. containLabel: true
  7002. },
  7003. toolbox: {
  7004. show: true,
  7005. right: '2%',
  7006. feature: {}
  7007. },
  7008. xAxis: {
  7009. type: 'category',
  7010. boundaryGap: false,
  7011. data: chartLine_data.data2,
  7012. name: this.$t('errorAnalysis.date')
  7013. },
  7014. yAxis: [
  7015. {
  7016. type: '',
  7017. name: this.$t('errorAnalysis.time'),
  7018. mix: 0,
  7019. max: 24,
  7020. interval: 2,
  7021. axisLabel: {
  7022. formatter: function (value) {
  7023. var texts = []
  7024. if (value < 10) {
  7025. texts.push('0' + value + ':00')
  7026. } else {
  7027. texts.push(value + ':00')
  7028. }
  7029. return texts
  7030. }
  7031. }
  7032. }
  7033. ],
  7034. series: (function () {
  7035. var serie = []
  7036. for (var i = 0; i < chartLine_data.data3.length; i++) {
  7037. var item = {
  7038. name: chartLine_data.data1[i],
  7039. type: 'line',
  7040. data: chartLine_data.data3[i].data
  7041. }
  7042. serie.push(item)
  7043. }
  7044. return serie
  7045. })()
  7046. }
  7047. this.tab.chart7.chartLine.setOption(option)
  7048. if (this.tab.chart7.chartLine != null) {
  7049. window.onresize = () => {
  7050. this.tab.chart7.chartLine.resize()
  7051. }
  7052. }
  7053. },
  7054. // 导出
  7055. handleExport(item) {
  7056. if (item == 'chart1') {
  7057. console.log('配方准确率导出')
  7058. var excelDatasTabChart1 = [
  7059. {
  7060. tHeader: [
  7061. this.$t('errorAnalysis.date'),
  7062. this.$t('errorAnalysis.feedName'),
  7063. this.$t('errorAnalysis.jhzl'),
  7064. this.$t('errorAnalysis.skzl'),
  7065. this.$t('errorAnalysis.zql')
  7066. ],
  7067. filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
  7068. tableDatas: this.tab.chart1.table.list,
  7069. sheetName: this.$t('errorAnalysis.feedName')
  7070. }
  7071. ]
  7072. json2excel(
  7073. excelDatasTabChart1,
  7074. this.$t('errorAnalysis.feedName'),
  7075. true,
  7076. 'xlsx'
  7077. )
  7078. } else if (item == 'chart2') {
  7079. console.log('计划统计导出')
  7080. var excelDatasTabChart2 = [
  7081. {
  7082. tHeader: [
  7083. this.$t('errorAnalysis.date'),
  7084. this.$t('errorAnalysis.jhzxzl'),
  7085. this.$t('errorAnalysis.pfllzl'),
  7086. this.$t('errorAnalysis.jhzql'),
  7087. this.$t('errorAnalysis.jhqxzl'),
  7088. this.$t('errorAnalysis.jhzqll'),
  7089. this.$t('errorAnalysis.jhzql1'),
  7090. this.$t('errorAnalysis.jhs'),
  7091. this.$t('errorAnalysis.jhzql1')
  7092. ],
  7093. filterVal: [
  7094. '日期',
  7095. '实际量',
  7096. '理论量',
  7097. 'field1',
  7098. '计划取消重量',
  7099. 'field3',
  7100. '正确数',
  7101. '计划数',
  7102. 'field2'
  7103. ],
  7104. tableDatas: this.tab.chart2.table.list,
  7105. sheetName: '计划统计'
  7106. }
  7107. ]
  7108. json2excel(
  7109. excelDatasTabChart2,
  7110. this.$t('errorAnalysis.planName'),
  7111. true,
  7112. 'xlsx'
  7113. )
  7114. } else if (item == 'chart3') {
  7115. console.log('牛群准确率导出')
  7116. var excelDatasTabChart3 = [
  7117. {
  7118. tHeader: [
  7119. this.$t('errorAnalysis.date'),
  7120. this.$t('errorAnalysis.sxlb'),
  7121. this.$t('errorAnalysis.jhzl'),
  7122. this.$t('errorAnalysis.skzl'),
  7123. this.$t('errorAnalysis.zql')
  7124. ],
  7125. filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
  7126. tableDatas: this.tab.chart3.table.list,
  7127. sheetName: '牛群准确率'
  7128. }
  7129. ]
  7130. json2excel(
  7131. excelDatasTabChart3,
  7132. this.$t('errorAnalysis.nqName'),
  7133. true,
  7134. 'xlsx'
  7135. )
  7136. } else if (item == 'chart4') {
  7137. console.log('车辆准确率(重量)导出')
  7138. var excelDatasTabChart4 = [
  7139. {
  7140. tHeader: [
  7141. this.$t('errorAnalysis.date'),
  7142. this.$t('errorAnalysis.projname'),
  7143. this.$t('errorAnalysis.jhzl'),
  7144. this.$t('errorAnalysis.skzl'),
  7145. this.$t('errorAnalysis.zql')
  7146. ],
  7147. filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
  7148. tableDatas: this.tab.chart4.table.list,
  7149. sheetName: '车辆准确率(重量)'
  7150. }
  7151. ]
  7152. json2excel(
  7153. excelDatasTabChart4,
  7154. this.$t('errorAnalysis.clzql'),
  7155. true,
  7156. 'xlsx'
  7157. )
  7158. } else if (item == 'chart5') {
  7159. console.log('混料统计导出')
  7160. const table = this.$refs.myTable
  7161. const columns = table.columns
  7162. const labels = columns.map((column) => column.label)
  7163. console.log('labels', labels)
  7164. var excelDatasTabChart5 = [
  7165. {
  7166. tHeader: labels,
  7167. filterVal: [
  7168. '日期',
  7169. 'field1',
  7170. 'field2',
  7171. '理论自动',
  7172. '实际自动',
  7173. 'field3',
  7174. '理论手动',
  7175. '实际手动',
  7176. 'field4'
  7177. ],
  7178. tableDatas: this.tab.chart5.table.list,
  7179. sheetName: '混料统计'
  7180. }
  7181. ]
  7182. json2excel(
  7183. excelDatasTabChart5,
  7184. this.$t('errorAnalysis.hltj'),
  7185. true,
  7186. 'xlsx'
  7187. )
  7188. } else if (item == 'chart6') {
  7189. console.log('混料计划取消次数导出')
  7190. var excelDatasTabChart6 = [
  7191. {
  7192. tHeader: [
  7193. this.$t('errorAnalysis.date'),
  7194. this.$t('errorAnalysis.hlqxcs')
  7195. ],
  7196. filterVal: ['日期', 'field1'],
  7197. tableDatas: this.tab.chart6.table.list,
  7198. sheetName: '混料计划取消次数'
  7199. }
  7200. ]
  7201. json2excel(
  7202. excelDatasTabChart6,
  7203. this.$t('errorAnalysis.hlqxcs'),
  7204. true,
  7205. 'xlsx'
  7206. )
  7207. } else if (item == 'chart7') {
  7208. console.log('栏舍撒料时间统计导出')
  7209. var excelDatasTabChart7 = [
  7210. {
  7211. tHeader: [
  7212. this.$t('errorAnalysis.date'),
  7213. this.$t('errorAnalysis.pen'),
  7214. this.$t('errorAnalysis.slsj')
  7215. ],
  7216. filterVal: ['日期', 'fname', '准确率'],
  7217. tableDatas: this.tab.chart7.table.list,
  7218. sheetName: '栏舍撒料时间统计'
  7219. }
  7220. ]
  7221. json2excel(
  7222. excelDatasTabChart7,
  7223. this.$t('errorAnalysis.lsslsjtj'),
  7224. true,
  7225. 'xlsx'
  7226. )
  7227. }
  7228. },
  7229. // 切换表格
  7230. handleTable(item) {
  7231. // 显示切换表格
  7232. if (item == 'chart1') {
  7233. console.log('配方准确率表格')
  7234. this.tab.chart1.isTable = true
  7235. this.tab.chart1.isChart = false
  7236. } else if (item == 'chart2') {
  7237. console.log('计划统计表格')
  7238. this.tab.chart2.isTable = true
  7239. this.tab.chart2.isChart = false
  7240. } else if (item == 'chart3') {
  7241. console.log('牛群准确率表格')
  7242. this.tab.chart3.isTable = true
  7243. this.tab.chart3.isChart = false
  7244. } else if (item == 'chart4') {
  7245. console.log('车辆准确率(重量)表格')
  7246. this.tab.chart4.isTable = true
  7247. this.tab.chart4.isChart = false
  7248. } else if (item == 'chart5') {
  7249. console.log('混料统计表格')
  7250. this.tab.chart5.isTable = true
  7251. this.tab.chart5.isChart = false
  7252. } else if (item == 'chart6') {
  7253. console.log('混料计划取消次数表格')
  7254. this.tab.chart6.isTable = true
  7255. this.tab.chart6.isChart = false
  7256. } else if (item == 'chart7') {
  7257. console.log('栏舍撒料时间统计表格')
  7258. this.tab.chart7.isTable = true
  7259. this.tab.chart7.isChart = false
  7260. }
  7261. },
  7262. // 切换图表
  7263. handleChart(item) {
  7264. // 显示切换图表
  7265. if (item == 'chart1') {
  7266. console.log('配方准确率图表')
  7267. this.tab.chart1.isTable = false
  7268. this.tab.chart1.isChart = true
  7269. this.getChart1()
  7270. } else if (item == 'chart2') {
  7271. console.log('计划统计图表')
  7272. this.tab.chart2.isTable = false
  7273. this.tab.chart2.isChart = true
  7274. this.getChart2()
  7275. } else if (item == 'chart3') {
  7276. console.log('牛群准确率图表')
  7277. this.tab.chart3.isTable = false
  7278. this.tab.chart3.isChart = true
  7279. this.getChart3()
  7280. } else if (item == 'chart4') {
  7281. console.log('车辆准确率(重量)图表')
  7282. this.tab.chart4.isTable = false
  7283. this.tab.chart4.isChart = true
  7284. this.getChart4()
  7285. } else if (item == 'chart5') {
  7286. console.log('混料统计图表')
  7287. this.tab.chart5.isTable = false
  7288. this.tab.chart5.isChart = true
  7289. this.getChart5()
  7290. } else if (item == 'chart6') {
  7291. console.log('混料计划取消次数图表')
  7292. this.tab.chart6.isTable = false
  7293. this.tab.chart6.isChart = true
  7294. this.getChart6()
  7295. } else if (item == 'chart7') {
  7296. console.log('栏舍撒料时间统计图表')
  7297. this.tab.chart7.isTable = false
  7298. this.tab.chart7.isChart = true
  7299. this.getChart7()
  7300. }
  7301. },
  7302. // 混料统计
  7303. getTab2List() {
  7304. this.tab2.table.listLoading = true
  7305. GetDataByName(this.tab2.table.getdataListParm).then((response) => {
  7306. if (response.data.list !== null) {
  7307. console.log('混料统计table数据', response.data.list)
  7308. // this.tab2.table.list = response.data.list
  7309. this.$refs.plTable2.reloadData(response.data.list)
  7310. this.tab2.table.total = response.data.total
  7311. } else {
  7312. this.$refs.plTable2.reloadData([])
  7313. this.tab2.table.total = 0
  7314. // this.tab2.table.list = []
  7315. }
  7316. setTimeout(() => {
  7317. this.tab2.table.listLoading = false
  7318. }, 100)
  7319. })
  7320. },
  7321. form_search2() {
  7322. this.tab2.table.getdataListParm.name = 'getStatisticsHL'
  7323. if (
  7324. this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' &&
  7325. this.tab2.table.getdataListParm.parammaps.inputDatetime !== null
  7326. ) {
  7327. console.log(this.tab2.table.getdataListParm.parammaps.inputDatetime)
  7328. this.tab2.table.getdataListParm.parammaps.startTime = parseTime(
  7329. this.tab2.table.getdataListParm.parammaps.inputDatetime[0],
  7330. '{y}-{m}-{d}'
  7331. )
  7332. this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(
  7333. this.tab2.table.getdataListParm.parammaps.inputDatetime[1],
  7334. '{y}-{m}-{d}'
  7335. )
  7336. } else {
  7337. this.tab2.table.getdataListParm.parammaps.inputDatetime = ''
  7338. this.tab2.table.getdataListParm.parammaps.startTime = ''
  7339. this.tab2.table.getdataListParm.parammaps.stopTime = ''
  7340. }
  7341. // this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
  7342. // this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
  7343. this.tab2.table.getdataListParm.offset = 1
  7344. this.getTab2List()
  7345. this.getTMRNameList2()
  7346. },
  7347. handleRefresh2() {
  7348. this.tab2.table.getdataListParm.parammaps.tmrtname = ''
  7349. this.tab2.table.getdataListParm.parammaps.projname = ''
  7350. this.tab2.table.getdataListParm.parammaps.times = ''
  7351. this.tab2.table.getdataListParm.parammaps.templetname = ''
  7352. this.tab2.table.getdataListParm.parammaps.buttontype = ''
  7353. this.tab2.table.getdataListParm.parammaps.hlwc1 = undefined
  7354. this.tab2.table.getdataListParm.parammaps.hlwc2 = undefined
  7355. this.tab2.table.getdataListParm.parammaps.hlzq1 = undefined
  7356. this.tab2.table.getdataListParm.parammaps.hlzq2 = undefined
  7357. this.tab2.table.getdataListParm.parammaps.hlzql1 = undefined
  7358. this.tab2.table.getdataListParm.parammaps.hlzql2 = undefined
  7359. this.tab2.table.getdataListParm.parammaps.error = false
  7360. this.getTab2List()
  7361. },
  7362. handleExport2() {
  7363. console.log('导出')
  7364. this.exportList.dialogFormVisible = true
  7365. this.exportList.dialogStatus = 'exportList'
  7366. // var excelDatasTab2 = [
  7367. // {
  7368. // tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间'],
  7369. // filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
  7370. // tableDatas: this.tab2.table.list,
  7371. // sheetName: '混料统计'
  7372. // }
  7373. // ]
  7374. // json2excel(excelDatasTab2, '混料统计', true, 'xlsx')
  7375. },
  7376. exportList2() {
  7377. this.isokDisable = true
  7378. var url = 'authdata/GetDataByName'
  7379. var data = {
  7380. name: 'getStatisticsHL',
  7381. page: 1,
  7382. offset: 1,
  7383. pagecount: '',
  7384. returntype: 'Map',
  7385. parammaps: {
  7386. pastureid: Cookies.get('pastureid'),
  7387. startTime: '',
  7388. stopTime: '',
  7389. templetname: '',
  7390. isuse: ''
  7391. }
  7392. }
  7393. data.parammaps.startTime = parseTime(
  7394. this.exportList.inputDatetime[0],
  7395. '{y}-{m}-{d}'
  7396. )
  7397. data.parammaps.stopTime = parseTime(
  7398. this.exportList.inputDatetime[1],
  7399. '{y}-{m}-{d}'
  7400. )
  7401. data.parammaps.tmrtname =
  7402. this.tab2.table.getdataListParm.parammaps.tmrtname
  7403. data.parammaps.projname =
  7404. this.tab2.table.getdataListParm.parammaps.projname
  7405. data.parammaps.times = this.tab2.table.getdataListParm.parammaps.times
  7406. data.parammaps.buttontype =
  7407. this.tab2.table.getdataListParm.parammaps.buttontype
  7408. data.parammaps.templetname =
  7409. this.tab2.table.getdataListParm.parammaps.templetname
  7410. data.parammaps.isuse = this.tab2.table.getdataListParm.parammaps.isuse
  7411. postJson(url, data).then((response) => {
  7412. var exportList = []
  7413. if (response.data.list !== null) {
  7414. console.log('混料统计table数据', response.data.list)
  7415. exportList = response.data.list
  7416. } else {
  7417. exportList = []
  7418. }
  7419. var excelDatasTab2 = [
  7420. {
  7421. tHeader: [
  7422. this.$t('errorAnalysis.date'),
  7423. this.$t('errorAnalysis.tmrnames'),
  7424. this.$t('errorAnalysis.czNum'),
  7425. this.$t('errorAnalysis.projname'),
  7426. this.$t('errorAnalysis.isTrainNumber'),
  7427. this.$t('errorAnalysis.feedName'),
  7428. this.$t('errorAnalysis.Driver'),
  7429. this.$t('errorAnalysis.isFeed'),
  7430. this.$t('errorAnalysis.llzl'),
  7431. this.$t('errorAnalysis.acWeight'),
  7432. this.$t('errorAnalysis.wcz'),
  7433. this.$t('errorAnalysis.zql'),
  7434. this.$t('errorAnalysis.planTime'),
  7435. this.$t('errorAnalysis.startTime'),
  7436. this.$t('errorAnalysis.endTime'),
  7437. this.$t('errorAnalysis.tzfs'),
  7438. this.$t('errorAnalysis.stWeight'),
  7439. this.$t('errorAnalysis.edWeight'),
  7440. this.$t('errorAnalysis.jsTime'),
  7441. this.$t('errorAnalysis.isOK'),
  7442. this.$t('errorAnalysis.area')
  7443. ],
  7444. filterVal: [
  7445. '日期',
  7446. 'TMR名称',
  7447. 'sort',
  7448. '车次',
  7449. '班次',
  7450. '配方名称',
  7451. '驾驶员',
  7452. '饲料',
  7453. '理论重量',
  7454. '实际重量',
  7455. '误差值',
  7456. '准确率',
  7457. '计划时间',
  7458. '开始时间',
  7459. '结束时间',
  7460. '跳转方式',
  7461. '开始重量',
  7462. '结束重量',
  7463. '搅拌时间',
  7464. 'standard',
  7465. 'barname'
  7466. ],
  7467. tableDatas: exportList,
  7468. sheetName: '混料统计'
  7469. }
  7470. ]
  7471. json2excel(excelDatasTab2, this.$t('errorAnalysis.hltj'), true, 'xlsx')
  7472. this.isokDisable = false
  7473. this.exportList.dialogFormVisible = false
  7474. })
  7475. },
  7476. // 撒料统计
  7477. getTab3List() {
  7478. this.tab3.table.listLoading = true
  7479. GetDataByName(this.tab3.table.getdataListParm).then((response) => {
  7480. console.log('撒料统计table数据', response.data.list)
  7481. if (response.data.list !== null) {
  7482. // this.tab3.table.list = response.data.list
  7483. this.$refs.plTable3.reloadData(response.data.list)
  7484. this.tab3.table.total = response.data.total
  7485. } else {
  7486. // this.tab3.table.list = []
  7487. this.$refs.plTable3.reloadData([])
  7488. this.tab3.table.total = 0
  7489. }
  7490. setTimeout(() => {
  7491. this.tab3.table.listLoading = false
  7492. }, 100)
  7493. })
  7494. },
  7495. form_search3() {
  7496. this.tab3.table.getdataListParm.name = 'getStatisticsSL'
  7497. if (
  7498. this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' &&
  7499. this.tab3.table.getdataListParm.parammaps.inputDatetime !== null
  7500. ) {
  7501. this.tab3.table.getdataListParm.parammaps.startTime = parseTime(
  7502. this.tab3.table.getdataListParm.parammaps.inputDatetime[0],
  7503. '{y}-{m}-{d}'
  7504. )
  7505. this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(
  7506. this.tab3.table.getdataListParm.parammaps.inputDatetime[1],
  7507. '{y}-{m}-{d}'
  7508. )
  7509. } else {
  7510. this.tab3.table.getdataListParm.parammaps.inputDatetime = ''
  7511. this.tab3.table.getdataListParm.parammaps.startTime = ''
  7512. this.tab3.table.getdataListParm.parammaps.stopTime = ''
  7513. }
  7514. // this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
  7515. // this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
  7516. this.tab3.table.getdataListParm.offset = 1
  7517. this.getTab3List()
  7518. this.getTMRNameList3()
  7519. },
  7520. handleRefresh3() {
  7521. this.tab3.table.getdataListParm.parammaps.tmrtname = ''
  7522. this.tab3.table.getdataListParm.parammaps.projname = ''
  7523. this.tab3.table.getdataListParm.parammaps.times = ''
  7524. this.tab3.table.getdataListParm.parammaps.templetname = ''
  7525. this.tab3.table.getdataListParm.parammaps.buttontype = ''
  7526. this.tab3.table.getdataListParm.parammaps.fname = ''
  7527. this.tab3.table.getdataListParm.parammaps.slwc1 = undefined
  7528. this.tab3.table.getdataListParm.parammaps.slwc2 = undefined
  7529. this.tab3.table.getdataListParm.parammaps.slzq1 = undefined
  7530. this.tab3.table.getdataListParm.parammaps.slzq2 = undefined
  7531. this.tab3.table.getdataListParm.parammaps.slzql1 = undefined
  7532. this.tab3.table.getdataListParm.parammaps.slzql2 = undefined
  7533. this.tab3.table.getdataListParm.parammaps.error = false
  7534. this.getTab3List()
  7535. },
  7536. handleExport3() {
  7537. this.exportList.dialogFormVisible = true
  7538. this.exportList.dialogStatus = 'exportList'
  7539. // var excelDatasTab3 = [
  7540. // {
  7541. // tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
  7542. // filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
  7543. // tableDatas: this.tab3.table.list,
  7544. // sheetName: '撒料统计'
  7545. // }
  7546. // ]
  7547. // json2excel(excelDatasTab3, '撒料统计', true, 'xlsx')
  7548. },
  7549. exportList3() {
  7550. this.isokDisable = true
  7551. var url = 'authdata/GetDataByName'
  7552. var data = {
  7553. name: 'getStatisticsSL',
  7554. page: 1,
  7555. offset: 1,
  7556. pagecount: '',
  7557. returntype: 'Map',
  7558. parammaps: {
  7559. pastureid: Cookies.get('pastureid'),
  7560. startTime: '',
  7561. stopTime: '',
  7562. templetname: '',
  7563. isuse: ''
  7564. }
  7565. }
  7566. data.parammaps.startTime = parseTime(
  7567. this.exportList.inputDatetime[0],
  7568. '{y}-{m}-{d}'
  7569. )
  7570. data.parammaps.stopTime = parseTime(
  7571. this.exportList.inputDatetime[1],
  7572. '{y}-{m}-{d}'
  7573. )
  7574. data.parammaps.tmrtname =
  7575. this.tab3.table.getdataListParm.parammaps.tmrtname
  7576. data.parammaps.projname =
  7577. this.tab3.table.getdataListParm.parammaps.projname
  7578. data.parammaps.times = this.tab3.table.getdataListParm.parammaps.times
  7579. data.parammaps.buttontype =
  7580. this.tab3.table.getdataListParm.parammaps.buttontype
  7581. data.parammaps.templetname =
  7582. this.tab3.table.getdataListParm.parammaps.templetname
  7583. data.parammaps.isuse = this.tab3.table.getdataListParm.parammaps.isuse
  7584. postJson(url, data).then((response) => {
  7585. console.log('混料统计table数据', response.data.list)
  7586. var exportList = []
  7587. if (response.data.list !== null) {
  7588. exportList = response.data.list
  7589. } else {
  7590. exportList = []
  7591. }
  7592. var excelDatasTab3 = [
  7593. {
  7594. tHeader: [
  7595. this.$t('errorAnalysis.date'),
  7596. this.$t('errorAnalysis.tmrnames'),
  7597. this.$t('errorAnalysis.czNum'),
  7598. this.$t('errorAnalysis.projname'),
  7599. this.$t('errorAnalysis.isTrainNumber'),
  7600. this.$t('errorAnalysis.feedName'),
  7601. this.$t('errorAnalysis.Driver'),
  7602. this.$t('errorAnalysis.pen'),
  7603. this.$t('errorAnalysis.llzl'),
  7604. this.$t('errorAnalysis.acWeight'),
  7605. this.$t('errorAnalysis.wcz'),
  7606. this.$t('errorAnalysis.zql'),
  7607. this.$t('errorAnalysis.startTime'),
  7608. this.$t('errorAnalysis.endTime'),
  7609. this.$t('errorAnalysis.tzfs'),
  7610. this.$t('errorAnalysis.stWeight'),
  7611. this.$t('errorAnalysis.edWeight'),
  7612. this.$t('errorAnalysis.jsTime'),
  7613. this.$t('errorAnalysis.isOK')
  7614. ],
  7615. filterVal: [
  7616. '日期',
  7617. 'TMR名称',
  7618. 'sort',
  7619. '车次',
  7620. '班次',
  7621. '配方名称',
  7622. '驾驶员',
  7623. '栏舍',
  7624. '理论重量',
  7625. '实际重量',
  7626. '误差值',
  7627. '准确率',
  7628. '开始时间',
  7629. '结束时间',
  7630. '跳转方式',
  7631. this.$t('errorAnalysis.stWeight'),
  7632. '结束重量',
  7633. '搅拌时间',
  7634. 'standard'
  7635. ],
  7636. tableDatas: exportList,
  7637. sheetName: '撒料统计'
  7638. }
  7639. ]
  7640. json2excel(excelDatasTab3, this.$t('errorAnalysis.sltj'), true, 'xlsx')
  7641. this.isokDisable = false
  7642. this.exportList.dialogFormVisible = false
  7643. })
  7644. },
  7645. handleSee(item, row) {
  7646. if (this.tab.table.getdataListParm.parammaps.error == true) {
  7647. this.error = true
  7648. } else {
  7649. this.error = ''
  7650. }
  7651. if (item == 1) {
  7652. // 混料
  7653. if (this.tab.radio == 0) {
  7654. this.methodName = 'getDownloadedplanByJsyHL'
  7655. this.optdevice = row.驾驶员
  7656. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.驾驶员
  7657. } else if (this.tab.radio == 1) {
  7658. this.methodName = 'getDownloadedplanByTemHL'
  7659. this.optdevice = row.配方名称
  7660. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.配方名称
  7661. } else if (this.tab.radio == 2) {
  7662. this.methodName = 'getDownloadedplanByBarHL'
  7663. this.optdevice = row.栏舍名称
  7664. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.栏舍名称
  7665. } else if (this.tab.radio == 3) {
  7666. this.methodName = 'getDownloadedplanBySCHL'
  7667. this.optdevice = row.牲畜类别
  7668. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.牲畜类别
  7669. } else if (this.tab.radio == 4) {
  7670. this.methodName = 'getDownloadedplanByTrainsHL'
  7671. this.optdevice = row.车次
  7672. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.车次
  7673. } else if (this.tab.radio == 5) {
  7674. this.methodName = 'getDownloadedplanByTmrHL'
  7675. this.optdevice = row.TMR名称
  7676. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.TMR名称
  7677. } else if (this.tab.radio == 6) {
  7678. this.methodName = 'getDownloadedplanByFeedHL'
  7679. this.optdevice = row.fname
  7680. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.fname
  7681. } else if (this.tab.radio == 7) {
  7682. this.methodName = 'getDownloadedplanByWflHL'
  7683. this.optdevice = row.fname
  7684. this.titlefname = this.$t('errorAnalysis.zqxxq')
  7685. }
  7686. } else {
  7687. // 撒料
  7688. if (this.tab.radio == 0) {
  7689. this.methodName = 'getDownloadedplanByJsySL'
  7690. this.optdevice = row.驾驶员
  7691. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.驾驶员
  7692. } else if (this.tab.radio == 1) {
  7693. this.methodName = 'getDownloadedplanByTemSL'
  7694. this.optdevice = row.配方名称
  7695. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.配方名称
  7696. } else if (this.tab.radio == 2) {
  7697. this.methodName = 'getDownloadedplanByBarSL'
  7698. this.optdevice = row.栏舍名称
  7699. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.栏舍名称
  7700. } else if (this.tab.radio == 3) {
  7701. this.methodName = 'getDownloadedplanBySCSL'
  7702. this.optdevice = row.牲畜类别
  7703. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.牲畜类别
  7704. } else if (this.tab.radio == 4) {
  7705. this.methodName = 'getDownloadedplanByTrainsSL'
  7706. this.optdevice = row.车次
  7707. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.车次
  7708. } else if (this.tab.radio == 5) {
  7709. this.methodName = 'getDownloadedplanByTmrSL'
  7710. this.optdevice = row.TMR名称
  7711. this.titlefname = this.$t('errorAnalysis.zqxxq') + row.TMR名称
  7712. } else if (this.tab.radio == 7) {
  7713. this.methodName = 'getDownloadedplanByWflSL'
  7714. this.optdevice = row.fname
  7715. this.titlefname = this.$t('errorAnalysis.zqxxq')
  7716. }
  7717. }
  7718. console.log(row, 'row')
  7719. // this.rowPid = row.pid
  7720. this.startTime = parseTime(
  7721. this.tab.table.getdataListParm.parammaps.inputDatetime[0],
  7722. '{y}-{m}-{d}'
  7723. )
  7724. this.stopTime = parseTime(
  7725. this.tab.table.getdataListParm.parammaps.inputDatetime[1],
  7726. '{y}-{m}-{d}'
  7727. )
  7728. this.isShowDialog = true
  7729. },
  7730. getTMRNameList() {
  7731. var data = {}
  7732. data.name = 'getAccuracyMCTmrName'
  7733. data.parammaps = {}
  7734. data.parammaps.pastureid = Cookies.get('pastureid')
  7735. data.parammaps.startTime =
  7736. this.tab.table.getdataListParm.parammaps.startTime
  7737. data.parammaps.stopTime =
  7738. this.tab.table.getdataListParm.parammaps.stopTime
  7739. GetDataByName(data).then((response) => {
  7740. if (response.data.list !== null) {
  7741. this.tab.TMRNameList = response.data.list
  7742. } else {
  7743. this.tab.TMRNameList = []
  7744. }
  7745. })
  7746. },
  7747. getTMRNameList2() {
  7748. var data = {}
  7749. data.name = 'getAccuracyMCTmrName'
  7750. data.parammaps = {}
  7751. data.parammaps.pastureid = Cookies.get('pastureid')
  7752. data.parammaps.startTime =
  7753. this.tab2.table.getdataListParm.parammaps.startTime
  7754. data.parammaps.stopTime =
  7755. this.tab2.table.getdataListParm.parammaps.stopTime
  7756. GetDataByName(data).then((response) => {
  7757. if (response.data !== null) {
  7758. this.tab2.TMRNameList = response.data.list
  7759. } else {
  7760. this.tab2.TMRNameList = []
  7761. }
  7762. })
  7763. },
  7764. getTMRNameList3() {
  7765. var data = {}
  7766. data.name = 'getAccuracyMCTmrName'
  7767. data.parammaps = {}
  7768. data.parammaps.pastureid = Cookies.get('pastureid')
  7769. data.parammaps.startTime =
  7770. this.tab3.table.getdataListParm.parammaps.startTime
  7771. data.parammaps.stopTime =
  7772. this.tab3.table.getdataListParm.parammaps.stopTime
  7773. GetDataByName(data).then((response) => {
  7774. if (response.data.list !== null) {
  7775. this.tab3.TMRNameList = response.data.list
  7776. } else {
  7777. this.tab3.TMRNameList = []
  7778. }
  7779. })
  7780. },
  7781. clickRecipeName2(row) {
  7782. console.log('点击了混料统计-配方名称', row)
  7783. this.recipeNameTemp2.temp = Object.assign({}, row)
  7784. this.recipeNameTemp2.dialogFormVisible = true
  7785. this.textMap.recipeNameTxt =
  7786. this.$t('errorAnalysis.pfxgjl') + row.配方名称
  7787. this.recipeNameTemp2.dialogStatus = 'recipeNameTxt'
  7788. this.recipeNameTemp2.getdataListParm.parammaps.pastureid =
  7789. Cookies.get('pastureid')
  7790. this.recipeNameTemp2.getdataListParm.parammaps.ftid = row.ftid
  7791. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime = []
  7792. const start = new Date()
  7793. const end = new Date()
  7794. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[0] =
  7795. parseTime(
  7796. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7),
  7797. '{y}-{m}-{d}'
  7798. )
  7799. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[1] =
  7800. parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  7801. this.getRecipeNameList2()
  7802. },
  7803. getRecipeNameList2() {
  7804. this.recipeNameTemp2.listLoading = true
  7805. if (
  7806. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime == null
  7807. ) {
  7808. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime = ''
  7809. this.recipeNameTemp2.getdataListParm.parammaps.startdate = ''
  7810. this.recipeNameTemp2.getdataListParm.parammaps.enddate = ''
  7811. } else {
  7812. this.recipeNameTemp2.getdataListParm.parammaps.startdate =
  7813. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[0] +
  7814. ' 00:00'
  7815. this.recipeNameTemp2.getdataListParm.parammaps.enddate =
  7816. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[1] +
  7817. ' 23:59'
  7818. }
  7819. const url = 'authdata/feedtemplet/history'
  7820. const data = {
  7821. pastureid: this.recipeNameTemp2.getdataListParm.parammaps.pastureid,
  7822. ftid: this.recipeNameTemp2.getdataListParm.parammaps.ftid,
  7823. startdate: this.recipeNameTemp2.getdataListParm.parammaps.startdate,
  7824. enddate: this.recipeNameTemp2.getdataListParm.parammaps.enddate
  7825. }
  7826. postJson(url, data).then((response) => {
  7827. if (response.data !== null && response.data !== '') {
  7828. this.recipeNameTemp2.list = response.data
  7829. } else {
  7830. this.recipeNameTemp2.list = []
  7831. this.recipeNameTemp2.total = 0
  7832. }
  7833. console.log(response.data, 'response.data')
  7834. setTimeout(() => {
  7835. this.recipeNameTemp2.listLoading = false
  7836. }, 100)
  7837. })
  7838. },
  7839. handleRecipeNameSearch2() {
  7840. this.getRecipeNameList2()
  7841. },
  7842. clickSeeFeed(row) {
  7843. this.recipeNameTemp3.listLoading = false
  7844. this.recipeNameTemp3.list = row.fit
  7845. this.recipeNameTemp3.temp = Object.assign({}, row)
  7846. this.recipeNameTemp3.dialogFormVisible = true
  7847. this.textMap.recipeNameTxt = this.$t('errorAnalysis.pfxgjl')
  7848. this.recipeNameTemp3.dialogStatus = 'recipeNameTxt'
  7849. const start = new Date()
  7850. const end = new Date()
  7851. this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime = []
  7852. this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime[0] =
  7853. parseTime(
  7854. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7),
  7855. '{y}-{m}-{d}'
  7856. )
  7857. this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime[1] =
  7858. parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  7859. },
  7860. clickFeed2(row) {
  7861. console.log('点击了混料统计-饲料', row)
  7862. this.feedTemp.temp = Object.assign({}, row)
  7863. this.feedTemp.dialogFormVisible = true
  7864. this.textMap.feedTxt = this.$t('errorAnalysis.pfxgjl') + row.饲料
  7865. this.feedTemp.dialogStatus = 'feedTxt'
  7866. this.feedTemp.getdataListParm.parammaps.pastureid = row.pastureid
  7867. this.feedTemp.getdataListParm.parammaps.ftid = row.ftid
  7868. this.feedTemp.getdataListParm.parammaps.name = row.饲料
  7869. this.feedTemp.getdataListParm.parammaps.inputDatetime = []
  7870. const start = new Date()
  7871. const end = new Date()
  7872. this.feedTemp.getdataListParm.parammaps.inputDatetime[0] = parseTime(
  7873. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7),
  7874. '{y}-{m}-{d}'
  7875. )
  7876. this.feedTemp.getdataListParm.parammaps.inputDatetime[1] = parseTime(
  7877. end.setTime(end.getTime()),
  7878. '{y}-{m}-{d}'
  7879. )
  7880. this.getFeedList()
  7881. },
  7882. getFeedList() {
  7883. this.feedTemp.listLoading = true
  7884. if (this.feedTemp.getdataListParm.parammaps.inputDatetime == null) {
  7885. this.feedTemp.getdataListParm.parammaps.inputDatetime = ''
  7886. this.feedTemp.getdataListParm.parammaps.startTime = ''
  7887. this.feedTemp.getdataListParm.parammaps.stopTime = ''
  7888. } else {
  7889. this.feedTemp.getdataListParm.parammaps.startTime =
  7890. this.feedTemp.getdataListParm.parammaps.inputDatetime[0] + ' 00:00'
  7891. this.feedTemp.getdataListParm.parammaps.stopTime =
  7892. this.feedTemp.getdataListParm.parammaps.inputDatetime[1] + ' 23:59'
  7893. }
  7894. const url = 'authdata/GetDataByName'
  7895. const data = {
  7896. name: 'getFitistoryByName',
  7897. page: this.feedTemp.getdataListParm.page,
  7898. offset: this.feedTemp.getdataListParm.offset,
  7899. pagecount: this.feedTemp.getdataListParm.pagecount,
  7900. returntype: this.feedTemp.getdataListParm.returntype,
  7901. parammaps: this.feedTemp.getdataListParm.parammaps
  7902. }
  7903. postJson(url, data).then((response) => {
  7904. if (response.data.list !== null && response.data.list !== '') {
  7905. for (let i = 0; i < response.data.list.length; i++) {
  7906. if (response.data.list[i].arrList == null) {
  7907. this.$set(response.data.list[i], 'arrList', [])
  7908. }
  7909. }
  7910. this.feedTemp.list = response.data.list
  7911. this.feedTemp.pageNum = response.data.pageNum
  7912. this.feedTemp.pageSize = response.data.pageSize
  7913. this.feedTemp.total = response.data.total
  7914. } else {
  7915. this.feedTemp.list = []
  7916. this.feedTemp.total = 0
  7917. }
  7918. console.log(response.data, 'response.data')
  7919. setTimeout(() => {
  7920. this.feedTemp.listLoading = false
  7921. }, 100)
  7922. })
  7923. },
  7924. handleFeedSearch() {
  7925. this.getFeedList()
  7926. },
  7927. clickRecipeName3(row) {
  7928. console.log('点击了撒料统计-配方名称', row)
  7929. this.recipeNameTemp2.temp = Object.assign({}, row)
  7930. this.recipeNameTemp2.dialogFormVisible = true
  7931. this.textMap.recipeNameTxt =
  7932. this.$t('errorAnalysis.pfxgjl') + row.配方名称
  7933. this.recipeNameTemp2.dialogStatus = 'recipeNameTxt'
  7934. this.recipeNameTemp2.getdataListParm.parammaps.pastureid =
  7935. Cookies.get('pastureid')
  7936. this.recipeNameTemp2.getdataListParm.parammaps.ftid = row.ftid
  7937. const start = new Date()
  7938. const end = new Date()
  7939. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime = []
  7940. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[0] =
  7941. parseTime(
  7942. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7),
  7943. '{y}-{m}-{d}'
  7944. )
  7945. this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[1] =
  7946. parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  7947. this.getRecipeNameList2()
  7948. },
  7949. getRecipeNameList3() {
  7950. this.recipeNameTemp3.listLoading = true
  7951. if (
  7952. this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime == null
  7953. ) {
  7954. this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime = ''
  7955. this.recipeNameTemp3.getdataListParm.parammaps.startTime = ''
  7956. this.recipeNameTemp3.getdataListParm.parammaps.stopTime = ''
  7957. } else {
  7958. this.recipeNameTemp3.getdataListParm.parammaps.startTime =
  7959. this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime[0] +
  7960. ' 00:00'
  7961. this.recipeNameTemp3.getdataListParm.parammaps.stopTime =
  7962. this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime[1] +
  7963. ' 23:59'
  7964. }
  7965. const url = 'authdata/GetArrList'
  7966. const data = {
  7967. name: 'getFitHistory1',
  7968. name1: 'getFitHistory2',
  7969. page: this.recipeNameTemp3.getdataListParm.page,
  7970. offset: this.recipeNameTemp3.getdataListParm.offset,
  7971. pagecount: this.recipeNameTemp3.getdataListParm.pagecount,
  7972. returntype: this.recipeNameTemp3.getdataListParm.returntype,
  7973. parammaps: this.recipeNameTemp3.getdataListParm.parammaps
  7974. }
  7975. postJson(url, data).then((response) => {
  7976. if (response.data.list !== null && response.data.list !== '') {
  7977. for (let i = 0; i < response.data.list.length; i++) {
  7978. if (response.data.list[i].arrList == null) {
  7979. this.$set(response.data.list[i], 'arrList', [])
  7980. }
  7981. }
  7982. this.recipeNameTemp3.list = response.data.list
  7983. this.recipeNameTemp3.pageNum = response.data.pageNum
  7984. this.recipeNameTemp3.pageSize = response.data.pageSize
  7985. this.recipeNameTemp3.total = response.data.total
  7986. } else {
  7987. this.recipeNameTemp3.list = []
  7988. this.recipeNameTemp3.total = 0
  7989. }
  7990. console.log(response.data, 'response.data')
  7991. setTimeout(() => {
  7992. this.recipeNameTemp3.listLoading = false
  7993. }, 100)
  7994. })
  7995. },
  7996. handleRecipeNameSearch3() {
  7997. this.getRecipeNameList2()
  7998. },
  7999. clickFence3(row) {
  8000. console.log('点击了撒料统计-栏舍', row)
  8001. this.fenceTemp.temp = Object.assign({}, row)
  8002. this.fenceTemp.dialogFormVisible = true
  8003. this.textMap.fenceTxt = this.$t('errorAnalysis.pfxgjl') + row.栏舍
  8004. this.fenceTemp.dialogStatus = 'fenceTxt'
  8005. this.fenceTemp.activeName = 'first'
  8006. this.fenceTemp.tab1.getdataListParm.parammaps.barname = row.栏舍
  8007. this.fenceTemp.tab2.getdataListParm.parammaps.barname = row.栏舍
  8008. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime = []
  8009. const start = new Date()
  8010. const end = new Date()
  8011. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[0] =
  8012. parseTime(
  8013. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7),
  8014. '{y}-{m}-{d}'
  8015. )
  8016. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[1] =
  8017. parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  8018. this.getFenceList1()
  8019. },
  8020. getFenceList1() {
  8021. this.fenceTemp.tab1.listLoading = true
  8022. this.fenceTemp.tab1.getdataListParm.parammaps.fitid =
  8023. this.fenceTemp.temp.id
  8024. if (this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime == null) {
  8025. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime = ''
  8026. this.fenceTemp.tab1.getdataListParm.parammaps.startDate = ''
  8027. this.fenceTemp.tab1.getdataListParm.parammaps.endDate = ''
  8028. } else {
  8029. this.fenceTemp.tab1.getdataListParm.parammaps.startDate =
  8030. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[0] +
  8031. ' 00:00'
  8032. this.fenceTemp.tab1.getdataListParm.parammaps.endDate =
  8033. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[1] +
  8034. ' 23:59'
  8035. }
  8036. const url = 'authdata/feedp/history'
  8037. // const data = this.fenceTemp.tab1.getdataListParm
  8038. const data = {
  8039. barname: this.fenceTemp.tab1.getdataListParm.parammaps.barname,
  8040. startDate: this.fenceTemp.tab1.getdataListParm.parammaps.startDate,
  8041. endDate: this.fenceTemp.tab1.getdataListParm.parammaps.endDate
  8042. }
  8043. postJson(url, data).then((response) => {
  8044. this.fenceTemp.tab1.listLoading = false
  8045. if (response.data !== null && response.data !== '') {
  8046. for (let i = 0; i < response.data.length; i++) {
  8047. if (
  8048. response.data[i].ptid == undefined ||
  8049. response.data[i].ptname == ''
  8050. ) {
  8051. this.$set(response.data[i], 'ptid', '')
  8052. this.$set(response.data[i], 'ptname', '')
  8053. }
  8054. }
  8055. this.fenceTemp.tab1.list = response.data
  8056. this.handleSpan1()
  8057. } else {
  8058. this.fenceTemp.tab1.list = []
  8059. this.fenceTemp.tab1.total = 0
  8060. }
  8061. console.log(response.data, 'response.data')
  8062. setTimeout(() => {
  8063. this.fenceTemp.tab1.listLoading = false
  8064. }, 100)
  8065. })
  8066. },
  8067. getFenceList2() {
  8068. this.fenceTemp.tab2.listLoading = true
  8069. this.fenceTemp.tab2.getdataListParm.parammaps.fitid =
  8070. this.fenceTemp.temp.id
  8071. if (this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime == null) {
  8072. this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime = ''
  8073. this.fenceTemp.tab2.getdataListParm.parammaps.startDate = ''
  8074. this.fenceTemp.tab2.getdataListParm.parammaps.endDate = ''
  8075. } else {
  8076. this.fenceTemp.tab2.getdataListParm.parammaps.startDate =
  8077. this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime[0] +
  8078. ' 00:00'
  8079. this.fenceTemp.tab2.getdataListParm.parammaps.endDate =
  8080. this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime[1] +
  8081. ' 23:59'
  8082. }
  8083. const url = 'authdata/spillageall/history'
  8084. const data = {
  8085. barname: this.fenceTemp.tab2.getdataListParm.parammaps.barname,
  8086. pastureid: Cookies.get('pastureid'),
  8087. startDate: this.fenceTemp.tab2.getdataListParm.parammaps.startDate,
  8088. endDate: this.fenceTemp.tab2.getdataListParm.parammaps.endDate
  8089. }
  8090. postJson(url, data).then((response) => {
  8091. if (response.data.data !== null) {
  8092. // 表数据
  8093. this.fenceTemp.tab2.list = response.data.data
  8094. this.fenceTemp.tab2.tableLabel = response.data.trains
  8095. this.handleSpan2()
  8096. } else {
  8097. this.fenceTemp.tab2.list = []
  8098. this.fenceTemp.tab2.total = 0
  8099. }
  8100. console.log(response.data, 'response.data')
  8101. setTimeout(() => {
  8102. this.fenceTemp.tab2.listLoading = false
  8103. }, 100)
  8104. })
  8105. },
  8106. handleFenceSearch() {
  8107. if (this.fenceTemp.activeName == 'first') {
  8108. this.getFenceList1()
  8109. } else {
  8110. this.getFenceList2()
  8111. }
  8112. },
  8113. handleFenceTabClick(item) {
  8114. const start = new Date()
  8115. const end = new Date()
  8116. if (item == 'first') {
  8117. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime = []
  8118. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[0] =
  8119. parseTime(
  8120. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7),
  8121. '{y}-{m}-{d}'
  8122. )
  8123. this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[1] =
  8124. parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  8125. this.getFenceList1()
  8126. } else {
  8127. this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime = []
  8128. this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime[0] =
  8129. parseTime(
  8130. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7),
  8131. '{y}-{m}-{d}'
  8132. )
  8133. this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime[1] =
  8134. parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
  8135. this.getFenceList2()
  8136. }
  8137. },
  8138. handleSpan1() {
  8139. this.fenceTemp.mergekeys1.forEach((key) => {
  8140. this.fenceTemp.spanObj1[key] = []
  8141. let position = 0
  8142. this.fenceTemp.tab1.list.forEach((item, index) => {
  8143. if (index === 0) {
  8144. this.fenceTemp.spanObj1[key].push(1)
  8145. position = 0
  8146. } else {
  8147. if (
  8148. this.fenceTemp.tab1.list[index][key] ===
  8149. this.fenceTemp.tab1.list[index - 1][key]
  8150. ) {
  8151. this.fenceTemp.spanObj1[key][position] += 1
  8152. this.fenceTemp.spanObj1[key].push(0)
  8153. } else {
  8154. this.fenceTemp.spanObj1[key].push(1)
  8155. position = index
  8156. }
  8157. }
  8158. })
  8159. })
  8160. },
  8161. handleSpan2() {
  8162. this.fenceTemp.mergekeys2.forEach((key) => {
  8163. this.fenceTemp.spanObj2[key] = []
  8164. let position = 0
  8165. this.fenceTemp.tab2.list.forEach((item, index) => {
  8166. if (index === 0) {
  8167. this.fenceTemp.spanObj2[key].push(1)
  8168. position = 0
  8169. } else {
  8170. if (
  8171. this.fenceTemp.tab2.list[index][key] ===
  8172. this.fenceTemp.tab2.list[index - 1][key]
  8173. ) {
  8174. this.fenceTemp.spanObj2[key][position] += 1
  8175. this.fenceTemp.spanObj2[key].push(0)
  8176. } else {
  8177. this.fenceTemp.spanObj2[key].push(1)
  8178. position = index
  8179. }
  8180. }
  8181. })
  8182. })
  8183. },
  8184. objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
  8185. if (
  8186. this.fenceTemp.mergekeys1 !== null &&
  8187. this.fenceTemp.mergekeys1 !== ''
  8188. ) {
  8189. for (let i = 0; i < this.fenceTemp.mergekeys1.length; i++) {
  8190. if (column.property === this.fenceTemp.mergekeys1[i]) {
  8191. const _row =
  8192. this.fenceTemp.spanObj1[this.fenceTemp.mergekeys1[i]][rowIndex]
  8193. const _col = _row > 0 ? 1 : 0
  8194. return {
  8195. rowspan: _row,
  8196. colspan: _col
  8197. }
  8198. }
  8199. }
  8200. }
  8201. },
  8202. objectSpanMethod2({ row, column, rowIndex, columnIndex }) {
  8203. if (
  8204. this.fenceTemp.mergekeys2 !== null &&
  8205. this.fenceTemp.mergekeys2 !== ''
  8206. ) {
  8207. for (let i = 0; i < this.fenceTemp.mergekeys2.length; i++) {
  8208. if (column.property === this.fenceTemp.mergekeys2[i]) {
  8209. const _row =
  8210. this.fenceTemp.spanObj2[this.fenceTemp.mergekeys2[i]][rowIndex]
  8211. const _col = _row > 0 ? 1 : 0
  8212. return {
  8213. rowspan: _row,
  8214. colspan: _col
  8215. }
  8216. }
  8217. }
  8218. }
  8219. },
  8220. clickRecipeTemplate3(row) {
  8221. this.modificationRecordTemp.temp1 = Object.assign({}, row)
  8222. // setTimeout(()=>{
  8223. // this.modificationRecordTemp.dialogFormVisible = true
  8224. // },500)
  8225. this.modificationRecordTemp.dialogStatus = 'modificationRecord'
  8226. this.getFTHisdryweightList()
  8227. this.getRecipeTemplateList1()
  8228. },
  8229. getRecipeTemplateList1() {
  8230. this.modificationRecordTemp.listLoading1 = true
  8231. let url = 'authdata/recipetemplate/history'
  8232. let data = {
  8233. ftid: this.modificationRecordTemp.temp1.ftid,
  8234. pastureid: Cookies.get('pastureid'),
  8235. createdate: this.modificationRecordTemp.temp1.createdate,
  8236. lastftid: this.modificationRecordTemp.temp1.lastftid
  8237. }
  8238. postJson(url, data).then((response) => {
  8239. if (response.data !== null) {
  8240. this.modificationRecordTemp.list1 = response.data.current
  8241. this.modificationRecordTemp.list2 = response.data.last
  8242. } else {
  8243. this.modificationRecordTemp.list1 = []
  8244. }
  8245. this.modificationRecordTemp.dialogFormVisible = true
  8246. setTimeout(() => {
  8247. this.modificationRecordTemp.listLoading1 = false
  8248. }, 100)
  8249. })
  8250. },
  8251. getFTHisdryweightList() {
  8252. let url = 'authdata/GetDataByName'
  8253. let data = {
  8254. name: 'getFTHisdryweight',
  8255. parammaps: {
  8256. ftid: this.modificationRecordTemp.temp1.ftid,
  8257. pastureid: Cookies.get('pastureid'),
  8258. createdate: this.modificationRecordTemp.temp1.createdate
  8259. }
  8260. }
  8261. postJson(url, data).then((response) => {
  8262. console.log(response)
  8263. if (response.data !== null) {
  8264. this.modificationRecordTemp.lastdate = response.data.list.lastdate
  8265. this.modificationRecordTemp.currentdate =
  8266. response.data.list.currentdate
  8267. } else {
  8268. this.modificationRecordTemp.lastdate = ''
  8269. this.modificationRecordTemp.currentdate = ''
  8270. }
  8271. })
  8272. },
  8273. changeccysChecked(item) {
  8274. if (item == false) {
  8275. this.tab.table.getdataListParm.parammaps.error = ''
  8276. }
  8277. this.getTabList()
  8278. this.getTabList2()
  8279. },
  8280. getSummaries1(param) {
  8281. const { columns, data } = param
  8282. const sums = []
  8283. columns.forEach((column, index) => {
  8284. if (index === 0) {
  8285. sums[index] = this.$t('common.sum')
  8286. return
  8287. }
  8288. if (column.property !== undefined) {
  8289. // 加了prop属性的el-table-column 才能找到column.property
  8290. const values = data.map((item) => Number(item[column.property]))
  8291. if (!values.every((value) => isNaN(value))) {
  8292. sums[index] = values.reduce((prev, curr) => {
  8293. const value = Number(curr)
  8294. if (!isNaN(value)) {
  8295. return prev + curr // 多行相加
  8296. } else {
  8297. return prev
  8298. }
  8299. }, 0)
  8300. if (this.modificationRecordTemp.lastdate == undefined) {
  8301. this.modificationRecordTemp.lastdate = ''
  8302. }
  8303. sums[index] =
  8304. sums[index].toFixed(4) +
  8305. '(干物质量:' +
  8306. this.modificationRecordTemp.lastdate +
  8307. ')'
  8308. } else {
  8309. sums[index] = ''
  8310. }
  8311. }
  8312. })
  8313. // console.log(sums, 'sums[index]')
  8314. return sums
  8315. },
  8316. getSummaries2(param) {
  8317. const { columns, data } = param
  8318. const sums = []
  8319. columns.forEach((column, index) => {
  8320. if (index === 0) {
  8321. sums[index] = this.$t('common.sum')
  8322. return
  8323. }
  8324. if (column.property !== undefined) {
  8325. // 加了prop属性的el-table-column 才能找到column.property
  8326. const values = data.map((item) => Number(item[column.property]))
  8327. if (!values.every((value) => isNaN(value))) {
  8328. sums[index] = values.reduce((prev, curr) => {
  8329. const value = Number(curr)
  8330. if (!isNaN(value)) {
  8331. return prev + curr // 多行相加
  8332. } else {
  8333. return prev
  8334. }
  8335. }, 0)
  8336. if (this.modificationRecordTemp.currentdate == undefined) {
  8337. this.modificationRecordTemp.currentdate = ''
  8338. }
  8339. sums[index] =
  8340. sums[index].toFixed(4) +
  8341. '(干物质量:' +
  8342. this.modificationRecordTemp.currentdate +
  8343. ')'
  8344. } else {
  8345. sums[index] = ''
  8346. }
  8347. }
  8348. })
  8349. // console.log(sums, 'sums[index]')
  8350. return sums
  8351. }
  8352. }
  8353. }
  8354. </script>
  8355. <style lang="scss" scoped>
  8356. .search {
  8357. .el-radio {
  8358. margin-right: 10px;
  8359. }
  8360. }
  8361. .filter-item1 {
  8362. margin-top: 10px;
  8363. span {
  8364. margin-right: 5px;
  8365. }
  8366. }
  8367. .button {
  8368. height: 95px;
  8369. .exportTable2 {
  8370. float: right;
  8371. margin-right: 5px;
  8372. margin-top: 5px;
  8373. width: auto;
  8374. padding: 0 6px;
  8375. }
  8376. }
  8377. .app-container1 {
  8378. padding-left: 10px;
  8379. background-color: #f4f4f4;
  8380. }
  8381. .dashboard-editor-container {
  8382. background-color: #f4f4f4;
  8383. .grid-content {
  8384. background-color: #fff;
  8385. padding: 0 10px;
  8386. h4 {
  8387. text-align: center;
  8388. line-height: 50px;
  8389. }
  8390. }
  8391. }
  8392. .table {
  8393. margin-bottom: 10px;
  8394. }
  8395. /deep/ .el-table th > .cell {
  8396. padding-left: 0 !important;
  8397. padding-right: 0 !important;
  8398. }
  8399. /deep/ .el-table td > .cell {
  8400. padding-left: 0 !important;
  8401. padding-right: 0 !important;
  8402. }
  8403. /deep/ .specificDate .el-radio {
  8404. margin-right: 0px;
  8405. }
  8406. /deep/ .el-radio-button__inner {
  8407. padding: 7px 7px;
  8408. }
  8409. /deep/ .el-range-editor.el-input__inner .el-input__icon {
  8410. width: 0;
  8411. }
  8412. .modificationRecord .top {
  8413. height: 300px;
  8414. width: 100%;
  8415. display: flex;
  8416. flex-direction: row;
  8417. .left {
  8418. width: 200px;
  8419. height: 100%;
  8420. div {
  8421. line-height: 35px;
  8422. }
  8423. }
  8424. .right {
  8425. height: 200px;
  8426. flex: 1;
  8427. }
  8428. }
  8429. .modificationRecord .bottom {
  8430. height: 300px;
  8431. width: 100%;
  8432. display: flex;
  8433. flex-direction: row;
  8434. .left {
  8435. width: 200px;
  8436. height: 100%;
  8437. div {
  8438. line-height: 35px;
  8439. }
  8440. }
  8441. .right {
  8442. height: 200px;
  8443. flex: 1;
  8444. }
  8445. }
  8446. </style>