123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606 |
- <template>
- <div class="main-contain">
- <el-dialog
- title="提示"
- :visible.sync="exportVisible"
- width="40%"
- >
-
- <div>
- 您提交的排班信息已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果
- </div>
-
- <span slot="footer" class="dialog-footer">
- <el-button @click="exportVisible = false">取 消</el-button>
- <el-button type="primary" @click="exportVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog
- title="提示"
- :visible.sync="exportLogVisible"
- width="40%"
- >
-
- <div v-for="(item,index) in logs" :key="index">
- <span> {{ item.export_time | parseTime('{y}-{m}-{d} {h}:{i}:{s}') }}</span>
- <br/>
- <br/>
- <span>{{ getContent(item) }}</span>
- <span>点击</span>
- <span style="color:blue" @click="generateTxt(item)">查看详情</span>
- <br/>
- <br/>
- </div>
-
- <span slot="footer" class="dialog-footer">
- <el-button @click="exportLogVisible = false">取 消</el-button>
- <el-button type="primary" @click="exportLogVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog
- title="提示"
- :visible.sync="dialogVisible"
- width="40%"
- >
- <span>您提交的文档不是系统标准导入模板,请检查您的文档或重新下载文档</span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog
- title="提示"
- :visible.sync="isExistRepeatVisible"
- width="40%"
- >
- <span>检查到文档中同一天同个人存在多个排班,请检查并修改您的文档,重新导入</span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="isExistRepeatVisible = false">取 消</el-button>
- <el-button type="primary" @click="isExistRepeatVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
- <div class="position">
- <bread-crumb :crumbs="crumbs"></bread-crumb>
- <div style="display:flex;align-items:center">
- <el-button type="primary" size="small" icon="el-icon-printer" @click="printScheduleAction" v-if="activeName !='historyWeek'">打印排班</el-button>
- <el-button type="primary" size="small" icon="el-icon-printer" @click="printScheduleActionOne" v-if="activeName == 'historyWeek'">打印排班</el-button>
- <el-button type="primary" size="small" icon="el-icon-printer" @click="printScheduleActionTwo">治疗签到</el-button>
- <!-- <schedule-upload-excel style="margin-right:10px;" :on-success='handleSuccess' v-if="is_edit"></schedule-upload-excel> -->
- <!-- <el-button @click="printTable" type="primary" size="small">打印排班</el-button> -->
- <el-button v-if="isShow()" type="primary" size="small" @click="export_file()" :loading="downloadLoading">
- 导出排班
- </el-button>
- <!-- <el-button
- @click="generateLog()"
- class="filter-item"
- type="primary"
- v-if="is_edit"
- size="small"
- >下载日志
- </el-button> -->
- <el-button type="primary" size="small" icon="el-icon-setting" @click="setScheduleTemplateAction">排班模板
- </el-button>
- <!-- <el-button type="primary" size="small" @click="copySchedule" v-if="is_edit">复制排班</el-button>
- <el-button type="primary" size="small" v-if="is_edit" @click="smartsch">智能排班</el-button> -->
- <el-button type="primary" size="small" v-if="!is_edit" @click="editsch">编辑排班</el-button>
- <!-- <el-button type="danger" size="small" v-if="is_edit" @click="outisedit">退出编辑</el-button> -->
- </div>
- </div>
- <div class="app-container">
- <div style="right:30px;position:absolute;z-index:99">
- <span>导出周次:</span>
- <el-date-picker
- v-model="weekTime"
- type="week"
- format="yyyy 第 WW 周"
- placeholder="选择周"
- :picker-options="{'firstDayOfWeek': 1}"
- @change="changeWeek"
- >
- </el-date-picker>
- </div>
- <el-tabs v-model="activeName" :tab-position="tabPosition" ref="elTabs" @tab-click="handleClick">
- <el-tab-pane name="historyWeek">
- <span slot="label"><i class="el-icon-date"></i> 历史周期 ({{ theWeek.historyWeek }}) </span>
- </el-tab-pane>
- <el-tab-pane name="lastWeek">
- <span slot="label"><i class="el-icon-date"></i> 上周 ({{ theWeek.lastWeek }})</span>
- </el-tab-pane>
- <el-tab-pane name="thisWeek">
- <span slot="label"><i class="el-icon-date"></i> 本周 ({{ theWeek.thisWeek }})</span>
- </el-tab-pane>
- <el-tab-pane name="nextWeek">
- <span slot="label"><i class="el-icon-date"></i> 下一周 ({{ theWeek.nextWeek }})</span>
- </el-tab-pane>
- <el-tab-pane name="nextTwoWeek">
- <span slot="label"><i class="el-icon-date"></i> 下下周 ({{ theWeek.nextTwoWeek }})</span>
- </el-tab-pane>
- </el-tabs>
- <div v-if="!is_edit">
- <table-data ref="tableData" :week-time="activeName" :partitions-prop="partitions"
- :schedule-zone-row-prop="scheduleZoneRow"
- :schedule-zone-prop="scheduleZone" title="" @event1="changePartition"
- @event2="changeSchedule" @event3="changeWeekDay" @event6="changeScheduleType" @guanliu_show="guanliu" v-show="showtableOne">
- </table-data>
- </div>
- <!-- 编辑 -->
- <edit-table-data ref="edittableData" :week-time="activeName" :partitions-prop="partitions"
- :schedule-zone-row-prop="scheduleZoneRow" :schedule-zone-prop="scheduleZone"
- title="" @event1="changePartition"
- @event2="changeSchedule" v-if="is_edit" @event3="changeWeekDay">
- <div class="position">
- <!-- <bread-crumb :crumbs="crumbs"></bread-crumb> -->
- <div>
- <el-tabs v-model="activeName" :tab-position="tabPosition" ref="elTabs" @tab-click="historyclick">
- <el-tab-pane name="beforeWeek">
- <span slot="label"><i class="el-icon-date"></i> 上上周 ({{ theWeek.historyWeek }})</span>
- </el-tab-pane>
- <el-tab-pane name="lastWeek">
- <span slot="label"><i class="el-icon-date"></i> 上周 ({{ theWeek.lastWeek }})</span>
- </el-tab-pane>
- <el-tab-pane name="thisWeek">
- <span slot="label"><i class="el-icon-date"></i> 本周 ({{ theWeek.thisWeek }})</span>
- </el-tab-pane>
- <el-tab-pane name="nextWeek">
- <span slot="label"><i class="el-icon-date"></i> 下一周 ({{ theWeek.nextWeek }})</span>
- </el-tab-pane>
- <el-tab-pane name="nextTwoWeek">
- <span slot="label"><i class="el-icon-date"></i> 下下周 ({{ theWeek.nextTwoWeek }})</span>
- </el-tab-pane>
- </el-tabs>
- </div>
- <div style="display:flex;align-items:center">
- <el-button type="primary" size="small" icon="el-icon-printer" @click="printScheduleAction">打印排班</el-button>
- <!-- <schedule-upload-excel style="margin-right:10px;" :on-success='handleSuccess' v-if="is_edit"></schedule-upload-excel> -->
- <el-button v-if="isShow()" type="primary" size="small" @click="export_file()" :loading="downloadLoading">
- 导出排班
- </el-button>
- <el-button
- @click="generateLog()"
- class="filter-item"
- type="primary"
- v-if="is_edit"
- size="small"
- >下载日志
- </el-button>
- <el-button type="primary" size="small" icon="el-icon-setting" @click="setScheduleTemplateAction">排班模板
- </el-button>
- <el-button type="primary" size="small" @click="copySchedule" v-if="is_edit">复制排班</el-button>
- <el-button type="primary" size="small" v-if="is_edit" @click="smartsch">智能排班</el-button>
- <el-button type="primary" size="small" v-if="!is_edit" @click="editsch">编辑排班</el-button>
- <el-button type="danger" size="small" v-if="is_edit" @click="outisedit">退出编辑</el-button>
- </div>
- </div>
-
- </edit-table-data>
- <!-- 编辑上上周 -->
- <beforeweekTable ref="beforeweeks" v-show="beforeshow" :week-time="activeName" :partitions-prop="partitions"
- :schedule-zone-row-prop="scheduleZoneRow" :schedule-zone-prop="scheduleZone" @event3="changeWeekDay">
- <div class="position">
- <div>
- <el-tabs v-model="activeName" :tab-position="tabPosition" ref="elTabs" @tab-click="historyclick">
- <el-tab-pane name="beforeWeek">
- <span slot="label"><i class="el-icon-date"></i> 上上周 ({{ theWeek.historyWeek }})</span>
- </el-tab-pane>
- <el-tab-pane name="lastWeek">
- <span slot="label"><i class="el-icon-date"></i> 上周 ({{ theWeek.lastWeek }})</span>
- </el-tab-pane>
- <el-tab-pane name="thisWeek">
- <span slot="label"><i class="el-icon-date"></i> 本周 ({{ theWeek.thisWeek }})</span>
- </el-tab-pane>
- <el-tab-pane name="nextWeek">
- <span slot="label"><i class="el-icon-date"></i> 下一周 ({{ theWeek.nextWeek }})</span>
- </el-tab-pane>
- <el-tab-pane name="nextTwoWeek">
- <span slot="label"><i class="el-icon-date"></i> 下下周 ({{ theWeek.nextTwoWeek }})</span>
- </el-tab-pane>
- </el-tabs>
- </div>
- <div style="display:flex;align-items:center">
- <el-button type="primary" size="small" icon="el-icon-printer" @click="printScheduleAction">打印排班</el-button>
- <el-button v-if="isShow()" type="primary" size="small" @click="export_file()" :loading="downloadLoading">
- 导出排班
- </el-button>
- <el-button
- @click="generateLog()"
- class="filter-item"
- type="primary"
- v-if="is_edit"
- size="small"
- >下载日志
- </el-button>
- <el-button type="primary" size="small" icon="el-icon-setting" @click="setScheduleTemplateAction">排班模板
- </el-button>
- <el-button type="primary" size="small" @click="copySchedule" v-if="is_edit">复制排班</el-button>
- <el-button type="primary" size="small" v-if="is_edit" @click="smartsch">智能排班</el-button>
- <el-button type="primary" size="small" v-if="!is_edit" @click="editsch">编辑排班</el-button>
- <el-button type="danger" size="small" v-if="is_edit" @click="outisedit">退出编辑</el-button>
- </div>
- </div>
- </beforeweekTable>
- <!-- 历史 -->
- <HistoryWeekTable v-show="showtable" ref="tableDataZero" :week-time="activeName" :partitions-prop="partitions"
- :schedule-zone-row-prop="scheduleZoneRow"
- :schedule-zone-prop="scheduleZone" title="" >
- </HistoryWeekTable>
- <el-dialog title="复制排班" width="600px" :visible.sync="newVisible">
- <el-form :model="form" ref="form" label-width="90px" :rules="rules">
- <el-form-item label="周次:">
- <el-radio v-model="form.lastweek" label="1">上周排班信息</el-radio>
- <el-radio v-model="form.lastweek" label="2">本周排班信息</el-radio>
- </el-form-item>
- <el-form-item label="复制到 : " required prop="copyWeek">
- <el-select v-model="form.copyWeek" placeholder="请选择">
- <el-option
- v-for="item in typeOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
-
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="newVisible=false">取 消</el-button>
- <el-button v-loading="copySchLoading" type="primary" @click="submitAction('form')">保 存</el-button>
- </div>
- </el-dialog>
- </div>
- </div>
- </template>
-
- <script>
- import moment from 'moment'
- import {parseTime} from '@/utils'
- import tableData from './components/tableData'
-
- import {
- copyPatientSchedule,
- exportSchedule,
- getScheduleTemplate,
- getThreeWeekList,
- getWeekPanels,
- initDate,
- getAllZones
- } from '@/api/schedule'
- import {
- patientLists
- } from '@/api/schedule_template/sch_template'
- import BreadCrumb from '@/xt_pages/components/bread-crumb'
- import UploadExcel from '@/xt_pages/components/UploadExcel'
- import ScheduleUploadExcel from './components/scheduleUploadExcel/index'
- import {generateLog} from '@/api/config'
- import {uParseTime} from '@/utils/tools'
- import EditTableData from "./components/editTableData";
- import HistoryWeekTable from './components/historyWeekTable'
- import beforeweekTable from './components/beforeweekTable'
-
- export default {
- name: 'appointment',
- data() {
- return {
- options:[
- {id:0,name:"全部"},
- {id:1,name:"上午"},
- {id:2,name:"下午"},
- {id:3,name:"晚上"},
- ],
- patientList:[],
- scheduleType: [
- { id: 1, name: "上午" },
- { id: 2, name: "下午" },
- { id: 3, name: "晚上" }
- ],weekType:[
- { id: 1, name: "周一" },
- { id: 2, name: "周二" },
- { id: 3, name: "周三" },
- { id: 4, name: "周四" },
- { id: 5, name: "周五" },
- { id: 6, name: "周六" },
- { id: 7, name: "周日" },
- ],
- query_date:"",
- query_sch_type:"",
- query_week_type:"",
- query_zone:"",
- crumbs: [
- {path: false, name: '排班管理'},
- {path: '/workforce/appointment', name: '排班管理'}
- ],
- activeName: 'thisWeek',
- tabPosition: 'top',
- partitions: {},
- scheduleZone: [],
- days: [],
- logs: [],
- showtable:false,
- showtableOne:true,
- is_edit: false,
- schedulingTableVisible:false,//全屏
- scheduleZoneRow: [],
- downloadLoading: false,
- msgTipVisible: false,
- dialogVisible: false,
- isExistRepeatVisible: false,
- exportVisible: false,
- exportLogVisible: false,
- beforeshow:false,//编辑页面的上上周
- // 周期
- theWeek: {
- historyWeek:0,
- lastWeek: 0,
- thisWeek: 0,
- nextWeek: 0,
- nextTwoWeek: 0
- },
-
- tableList: [],
- weekTime: "",
- schedule_type: 0,
- partition_id: 0,
- zones: [],
- start_time: "",
- end_time: "",
- export_type: 0,
- form: {
- lastweek: "1",
- copyWeek: "",
- },
- newVisible: false,
- copySchLoading:false,
- typeOptions: [],
- timeOptions: [],
- copyWeek: '',
- weekList: [],
- currentFirstDate1: '',
- rules: {
- copyWeek: [{required: true, message: "请选择复制时间段", trigger: "blur"}],
- },
- weekNum: '',
- weekDayArr: [],
- todayDate: '',
- clen: 7,
- nowYear: new Date().getFullYear(),
- schedule_week: 0,
- newDay: [],
- templateObj: {},
- week_date:"",
- guanliu_show:false,
-
- }
- },
- components: {
- EditTableData,
- ScheduleUploadExcel,
- tableData,
- BreadCrumb,
- UploadExcel,
- HistoryWeekTable,
- beforeweekTable
- },
- methods: {
- //
- guanliu(value){
- this.guanliu_show=value
- console.log('1111',value);
- this.getThreeWeekList()
- },
- handleClick(e,tab){
- if(e.name == 'historyWeek'){
- this.showtable=true
- this.showtableOne=false
- this.$nextTick(() => {
- this.$refs.tableDataZero.start()
- })
- // console.log('12343545',this.$refs.tableDataZero);
- }else{
- this.showtable=false
- this.showtableOne=true
- }
-
- },
- // 打开编辑上上周
- historyclick(e){
- console.log('vvvvwwww',e);
- if(e.name=='beforeWeek'){
- console.log('gggggwerwe');
- this.beforeshow=true
- this.schedulingTableVisible=false
- this.$nextTick(function() {//, this.days,this.zones
- this.$refs.beforeweeks.setEditData(this.patientList, this.$store.getters.treatment_mode, this.days,this.zones)
- })
- }else{
- this.beforeshow=false
- this.schedulingTableVisible=true
- }
- },
-
- dragstart(event, item) {
- // console.log('start的索引',item.moveIndex)
- // 开始移动的时候将移动的索引值+图片的url存储下来
-
- },
- dragend(event,item) {
- // console.log('dragend',item)
-
- },
- getAllZones(){
- getAllZones().then(response=>{
- if(response.data.state == 1){
- var zones = response.data.data.zones
- this.zones = zones
-
- }
- })
- },
- compare(p) { //这是比较函数
- return function (m, n) {
- var a = m[p];
- var b = n[p];
- return a - b; //升序
- }
- },
- // printTable(){
- // this.$router.push({path: '/scheduleTablePrint?partition_id='+this.partition_id+"&weekTime="+this.activeName})
- // },
- generateTxt: function (log) {
- var content = ''
- var errlog = log.err_logs
- content = this.getContent(log)
-
- for (let i = 0; i < errlog.length; i++) {
- if (content.length == 0) {
- content = errlog[i].err_msg
- } else {
- content = content + '\n' + errlog[i].err_msg
- }
- }
-
- var url = new Blob(['\ufeff' + content], {type: 'text/txt,charset=UTF-8'})
- if (typeof url === 'object' && url instanceof Blob) {
- url = URL.createObjectURL(url) // 创建blob地址
- }
- const aLink = document.createElement('a')
- aLink.href = url
- aLink.download = this.timestampToTime(log.export_time) + '临时排班导入日志.txt'
- aLink.click()
-
- },
- timestampToTime(timestamp) {
- var date = new Date(timestamp * 1000)//时间戳为10位需*1000,时间戳为13位的话不需乘1000
- var Y = date.getFullYear() + '年'
- var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月'
- var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
- var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
- var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
- var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
- return Y + M + D + h + m + s
- },
- getContent(log) {
- return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
- },
- generateLog() {
- let params = {
- 'log_type': 2
- }
- generateLog(params).then(
- response => {
- if (response.data.state === 1) {
- this.logs = response.data.data.logs
- this.exportLogVisible = true
- } else {
- this.$message.error(response.data.msg)
- }
- }
- )
-
- },
- getWeekPanels() {
- // this.scheduleZoneRow = []
- // this.scheduleZone = []
- getWeekPanels(1, this.partition_id).then(response => {
- if (response.data.state == 0) {
- return false
- }
- var partitions = response.data.data.partitions
- console.log("分区",response.data.data)
- this.theWeek.thisWeek = response.data.data.theWeek
- this.theWeek.lastWeek = response.data.data.theLastWeek
- this.theWeek.nextWeek = response.data.data.theNextWeek
- this.theWeek.nextTwoWeek = response.data.data.theNextSecWeek
- this.theWeek.historyWeek = response.data.data.theWeek - 2
- // 在控制变量改变的时候进行 强制渲染更新
- let childrenRefs = this.$refs.elTabs.$children
- this.$nextTick(() => {
- childrenRefs.forEach(child => child.$forceUpdate())
- })
- var that = this
-
- if (partitions.length > 0) {
- let arrSort = []
- partitions.forEach((item) => {
- let num = Math.max.apply(Math, item.jihaos.map(function (o) {
- return o.sort
- }))
- item.sort = num
- arrSort.push(item)
- })
- arrSort.sort(this.compare('sort'))
- partitions = arrSort
- partitions.forEach(function (partition) {
- if (partition.jihaos.length == 0) {
- return false
- }
- that.scheduleZoneRow.push(partition.jihaos.length)
- that.partitions[partition.id] = partition
- partition.jihaos.forEach(function (jihao) {
- var thisPa = {
- area: partition.name,
- zone_id: partition.id,
- zone_type: partition.type,
- cut: jihao.number,
- jihao_id: jihao.id,
- Mon_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- dialysis_machine_name:"",
- patient_id: 0,
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Mon_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- dialysis_machine_name:"",
-
- patient_id: 0,
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Mon_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- dialysis_machine_name:"",
-
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Tue_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- dialysis_machine_name:"",
-
- patient_id: 0,
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Tue_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- dialysis_machine_name:"",
-
- patient_id: 0,
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Tue_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- dialysis_machine_name:"",
-
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Wed_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- dialysis_machine_name:"",
-
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Wed_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- dialysis_machine_name:"",
-
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Wed_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- dialysis_machine_name:"",
-
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Thurs_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- dialysis_machine_name:"",
-
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Thurs_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- dialysis_machine_name:"",
-
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Thurs_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- dialysis_machine_name:"",
-
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Fri_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- dialysis_machine_name:"",
-
- patient_id: 0,
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Fri_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- dialysis_machine_name:"",
-
- patient_id: 0,
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Fri_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- dialysis_machine_name:"",
-
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Sat_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- dialysis_machine_name:"",
-
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Sat_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- dialysis_machine_name:"",
-
- patient_id: 0,
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Sat_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- dialysis_machine_name:"",
-
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Sun_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- dialysis_machine_name:"",
-
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Sun_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- dialysis_machine_name:"",
-
- patient_id: 0,
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- Sun_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- dialysis_machine_name:"",
-
- patient_id: 0,
- patient: '',
- zone_id:partition.id,
- jihao_id: jihao.id,
- },
- total: 0
- }
- that.scheduleZone.push(thisPa)
- })
- })
-
- }
- // console.log("111111111")
- console.log(that.scheduleZone)
- })
- },
- changeSch(val){
- // console.log(this.partitions)
- // console.log(this.scheduleZoneRow)
- // console.log(this.scheduleZone)
-
- },
- changeWeekType(val){
- },
- changeZone(val){
- },
- setScheduleTemplateAction: function () {
- this.schedulingTableVisible=true
- this.$router.push({path: '/workforce/template'})
- },
- export_file: function () {
- // this.getThreeWeekList()
- if(this.$refs.tableData.value1==false){
- this.guanliu_show=false
- // this.export_file_step_two()
- }else{
- this.guanliu_show=true
- // this.export_file_step_two()
- }
- // this.getWeekPanelsTwo()
- this.export_file_step_two()
- },
- export_file_step_two: function(){
-
- this.downloadLoading = true
- import('@/vendor/Export2Excel').then(excel => {
- const filterVal = [
- '区号',
- '机号'
- ]
- if (this.export_type == 0) {
- const multiHeader = [['区号', '机号', '周一' + "(" + this.days[0] + ")", '', '', '周二' + "(" + this.days[1] + ")", '', '', '周三' + "(" + this.days[2] + ")", '', '', '周四' + "(" + this.days[3] + ")", '', '', '周五' + "(" + this.days[4] + ")", '', '', '周六' + "(" + this.days[5] + ")", '', '', '周日' + "(" + this.days[6] + ")", '', '', '周一' + "(" + this.days[7] + ")", '', '', '周二' + "(" + this.days[8] + ")", '', '', '周三' + "(" + this.days[9] + ")", '', '', '周四' + "(" + this.days[10] + ")", '', '', '周五' + "(" + this.days[11] + ")", '', '', '周六' + "(" + this.days[12] + ")", '', '', '周日' + "(" + this.days[13] + ")", '', '', '周一' + "(" + this.days[14] + ")", '', '', '周二' + "(" + this.days[15] + ")", '', '', '周三' + "(" + this.days[16] + ")", '', '', '周四' + "(" + this.days[17] + ")", '', '', '周五' + "(" + this.days[18] + ")", '', '', '周六' + "(" + this.days[19] + ")", '', '', '周日' + "(" + this.days[20] + ")", '', '']]
- const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
- const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
- var list = []
- let i = 0
- for (let key in this.partitions) {
- var tempValue
- var jihaos = this.partitions[key].jihaos
-
- if (i == 0) {
- let m = 'A3' + ':' + 'A' + (2 + jihaos.length)
- tempValue = (2 + jihaos.length)
- merges.push(m)
- } else {
- let m = 'A' + (tempValue + 1) + ':' + 'A' + ((tempValue + 1) + jihaos.length - 1)
- tempValue = ((tempValue + 1) + jihaos.length - 1)
- merges.push(m)
- }
- for (let b = 0; b < jihaos.length; b++) {
- let obj = {}
- obj['区号'] = this.partitions[key].name
- obj['机号'] = jihaos[b].number.toString()
- list.push(obj)
- }
- i++
- }
- var data = []
-
- this.tableList.map(item => {
- data.push(Object.values(item))
- })
-
- const filename = '排班模版'
-
- console.log('333333333',this.tableList),
- excel.export_json_to_excel({
-
- multiHeader,
- header,
- merges,
- data,
- filename
- })
- this.downloadLoading = false
- }
-
- if (this.export_type == 1) {
-
- const multiHeader = [['区号', '机号', '周一' + "(" + this.newDay[0] + ")", '', '', '周二' + "(" + this.newDay[1] + ")", '', '', '周三' + "(" + this.newDay[2] + ")", '', '', '周四' + "(" + this.newDay[3] + ")", '', '', '周五' + "(" + this.newDay[4] + ")", '', '', '周六' + "(" + this.newDay[5] + ")", '', '', '周日' + "(" + this.newDay[6] + ")", '', '']]
- const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
- const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
- var list = []
- let i = 0
- for (let key in this.partitions) {
- var tempValue
- var jihaos = this.partitions[key].jihaos
-
- if (i == 0) {
- let m = 'A3' + ':' + 'A' + (2 + jihaos.length)
- tempValue = (2 + jihaos.length)
- merges.push(m)
- } else {
- let m = 'A' + (tempValue + 1) + ':' + 'A' + ((tempValue + 1) + jihaos.length - 1)
- tempValue = ((tempValue + 1) + jihaos.length - 1)
- merges.push(m)
- }
- for (let b = 0; b < jihaos.length; b++) {
- let obj = {}
- obj['区号'] = this.partitions[key].name
- obj['机号'] = jihaos[b].number.toString()
- list.push(obj)
- }
- i++
- }
-
- var data = []
- this.tableList.map(item => {
- data.push(Object.values(item))
-
- })
-
- const filename = '排班模版'
-
- if (this.$store.getters.xt_user.org.id == 10234) {
- excel.export_json_to_excel1({
- multiHeader,
- header,
- merges,
- data,
- filename,
- ref: this.$refs['tableData'].$refs['table'].$el
- })
- } else {
- excel.export_json_to_excel({
- multiHeader,
- header,
- merges,
- data,
- filename
- })
- }
- this.downloadLoading = false
- }
- })
-
- },
- export_fileTwo: function () {
-
- import('@/vendor/Export2Excel').then(excel => {
- const filterVal = [
- '区号',
- '机号'
- ]
- const multiHeader = [['区号', '机号', '周一' + "(" + this.days[0] + ")", '', '', '周二' + "(" + this.days[1] + ")", '', '', '周三' + "(" + this.days[2] + ")", '', '', '周四' + "(" + this.days[3] + ")", '', '', '周五' + "(" + this.days[4] + ")", '', '', '周六' + "(" + this.days[5] + ")", '', '', '周日' + "(" + this.days[6] + ")", '', '', '周一' + "(" + this.days[7] + ")", '', '', '周二' + "(" + this.days[8] + ")", '', '', '周三' + "(" + this.days[9] + ")", '', '', '周四' + "(" + this.days[10] + ")", '', '', '周五' + "(" + this.days[11] + ")", '', '', '周六' + "(" + this.days[12] + ")", '', '', '周日' + "(" + this.days[13] + ")", '', '', '周一' + "(" + this.days[14] + ")", '', '', '周二' + "(" + this.days[15] + ")", '', '', '周三' + "(" + this.days[16] + ")", '', '', '周四' + "(" + this.days[17] + ")", '', '', '周五' + "(" + this.days[18] + ")", '', '', '周六' + "(" + this.days[19] + ")", '', '', '周日' + "(" + this.days[20] + ")", '', '']]
- const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
- const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
-
- var data = []
- // console.log("33333",this.tableList)
-
- this.tableList.map(item => {
- data.push(Object.values(item))
-
- })
-
- const filename = '排班模版'
- excel.export_json_to_excel({
- multiHeader,
- header,
- merges,
- data,
- filename
- })
-
- })
- },
- // formatJson(filterVal, jsonData) {
- // return jsonData.map(v => filterVal.map(j => v[j]))
- // },
-
- formatJson(filterVal, jsonData) {
- return jsonData.map(v =>
- filterVal.map(j => {
-
- if (j === 'timestamp') {
- return parseTime(v[j])
- } else {
- return v[j]
- }
- })
- )
- },
-
- printScheduleAction: function () {
- var date = new Date().getTime()
- if(this.activeName == 'historyWeek'){
- date = date - 14 * 24 * 60 * 60 * 1000
- }else if (this.activeName == 'lastWeek') {
- date = date - 7 * 24 * 60 * 60 * 1000
- } else if (this.activeName == 'nextWeek') {
- date = date + 7 * 24 * 60 * 60 * 1000
- } else if (this.activeName == 'nextTwoWeek') {
- date = date + 14 * 24 * 60 * 60 * 1000
- }
- console.log("whhwhwhwhwhwh",date)
- console.log("this.templateObj.template_id == 1",this.templateObj.template_id)
- console.log("week2333333333333333",this.week_date)
- console.log("woowowowow",this.schedule_type)
- if (this.templateObj.template_id == 1) {
- this.$router.push({path: '/workforce/schedule/print', query: {date: date}})
- }
- if (this.templateObj.template_id == 2) {
- this.$router.push({path: '/scheduleTablePrint?partition_id=' + this.partition_id + "&weekTime=" + this.activeName+"&week_date="+this.week_date+"&schedule_type="+this.schedule_type})
- }
- if (this.templateObj.template_id == 3) {
- this.$router.push({path: '/scheduleTablePrintOne?partition_id=' + this.partition_id + "&weekTime=" + this.activeName+"&week_date="+this.week_date+"&schedule_type="+this.schedule_type})
- }
- if(this.templateObj.template_id == 4){
- this.$router.push({path: '/scheduleTablePrintTwo?partition_id=' + this.partition_id + "&weekTime=" + this.activeName+"&week_date="+this.week_date+"&schedule_type="+this.schedule_type})
- }
- if(this.templateObj.template_id == 5){
- this.$router.push({path: '/scheduleTablePrintFive?partition_id=' + this.partition_id + "&weekTime=" + this.activeName+"&week_date="+this.week_date+"&schedule_type="+this.schedule_type})
- }
- // +"&schedule_type"+scheduleTablePrintFive
- },
- printScheduleActionOne:function(){
-
- var start_time = this.$refs.tableDataZero.start_time
-
- var end_time = this.$refs.tableDataZero.end_time
-
- var partition_id = this.$refs.tableDataZero.partition_id
-
- var nextTwoWeek = "nextTwoWeek"
-
- var week_date = []
-
-
- this.$router.push({path:'/scheduleTablePrintThree?partition_id='+partition_id+"&weekTime="+nextTwoWeek+"&week_date="+week_date+"&start_time="+start_time+"&end_time="+end_time})
- },
- printScheduleActionTwo:function(){
- var date = new Date().getTime()
- if(this.activeName == 'historyWeek'){
- date = date - 14 * 24 * 60 * 60 * 1000
- }else if (this.activeName == 'lastWeek') {
- date = date - 7 * 24 * 60 * 60 * 1000
- } else if (this.activeName == 'nextWeek') {
- date = date + 7 * 24 * 60 * 60 * 1000
- } else if (this.activeName == 'nextTwoWeek') {
- date = date + 14 * 24 * 60 * 60 * 1000
- }
- this.$router.push({path: '/scheduleTablePrintSix?partition_id=' + this.partition_id + "&weekTime=" + this.activeName+"&week_date="+this.week_date+"&schedule_type="+this.schedule_type})
-
- },
- isShow() {
- let isShow = false
- if (Object.keys(this.partitions).length != 0) {
- isShow = true
- let i = 0
- for (let key in this.partitions) {
- if (i == 0) {
- if (this.partitions[key].jihaos.length > 0) {
- isShow = true
-
- }
- }
- i++
- }
- }
- return isShow
- },
- handleSuccess({results, header}) {
-
- let headers = []
- for (let key in results[0]) {
- headers.push(key)
- }
- if (header.length == 65) {
-
- var isHas_1 = headers.includes('区号')
-
- var isHas_2 = headers.includes('机号')
-
- var isHas_3 = headers.includes('周一' + "(" + this.days[0] + ")")
-
- var isHas_4 = headers.includes('')
-
- var isHas_5 = headers.includes('_1')
-
- var isHas_6 = headers.includes('周二' + "(" + this.days[1] + ")")
-
- var isHas_7 = headers.includes('_2')
-
- var isHas_8 = headers.includes('_3')
-
- var isHas_9 = headers.includes('周三' + "(" + this.days[2] + ")")
-
- var isHas_10 = headers.includes('_4')
- console.log("10" + isHas_10)
-
- var isHas_11 = headers.includes('_5')
- console.log("11" + isHas_11)
-
- var isHas_12 = headers.includes('周四' + "(" + this.days[3] + ")")
- console.log("12" + isHas_12)
-
- var isHas_13 = headers.includes('_6')
- console.log("13" + isHas_13)
-
- var isHas_14 = headers.includes('_7')
- console.log("14" + isHas_14)
-
- var isHas_15 = headers.includes('周五' + "(" + this.days[4] + ")")
- console.log("15" + isHas_15)
-
- var isHas_16 = headers.includes('_8')
- console.log("16" + isHas_16)
-
- var isHas_17 = headers.includes('_9')
- console.log("17" + isHas_17)
-
- var isHas_18 = headers.includes('周六' + "(" + this.days[5] + ")")
- console.log("18" + isHas_18)
-
- var isHas_19 = headers.includes('_10')
- console.log("19" + isHas_19)
-
- var isHas_20 = headers.includes('_11')
- console.log("20" + isHas_20)
-
- var isHas_21 = headers.includes('周日' + "(" + this.days[6] + ")")
- console.log("21" + isHas_21)
-
- var isHas_22 = headers.includes('_12')
- console.log("22" + isHas_22)
-
- var isHas_23 = headers.includes('_13')
- console.log("23" + isHas_23)
-
- var isHas_24 = headers.includes('周一' + "(" + this.days[7] + ")")
- console.log("24" + isHas_24)
-
- var isHas_25 = headers.includes('_14')
- console.log("25" + isHas_25)
-
- var isHas_26 = headers.includes('_15')
- console.log("26" + isHas_26)
-
- var isHas_27 = headers.includes('周二' + "(" + this.days[8] + ")")
- console.log("27" + isHas_27)
-
- var isHas_28 = headers.includes('_16')
- console.log("28" + isHas_28)
-
- var isHas_29 = headers.includes('_17')
- console.log("29" + isHas_29)
-
- var isHas_30 = headers.includes('周三' + "(" + this.days[9] + ")")
- console.log("30" + isHas_30)
-
- var isHas_31 = headers.includes('_18')
- console.log("31" + isHas_31)
-
- var isHas_32 = headers.includes('_19')
- console.log("32" + isHas_32)
-
- var isHas_33 = headers.includes('周四' + "(" + this.days[10] + ")")
- console.log("33" + isHas_33)
-
- var isHas_34 = headers.includes('_20')
- console.log("34" + isHas_34)
-
- var isHas_35 = headers.includes('_21')
- console.log("35" + isHas_35)
-
- var isHas_36 = headers.includes('周五' + "(" + this.days[11] + ")")
- console.log("36" + isHas_36)
-
- var isHas_37 = headers.includes('_22')
- console.log("37" + isHas_37)
-
- var isHas_38 = headers.includes('_23')
- console.log("38" + isHas_38)
-
- var isHas_39 = headers.includes('周六' + "(" + this.days[12] + ")")
- console.log("39" + isHas_39)
-
- var isHas_40 = headers.includes('_24')
- console.log("40" + isHas_40)
-
- var isHas_41 = headers.includes('_25')
- console.log("41" + isHas_41)
-
- var isHas_42 = headers.includes('周日' + "(" + this.days[13] + ")")
- console.log("42" + isHas_42)
-
- var isHas_43 = headers.includes('_26')
- console.log("43" + isHas_43)
-
- var isHas_44 = headers.includes('_27')
- console.log("44" + isHas_44)
-
- var isHas_45 = headers.includes('周一' + "(" + this.days[14] + ")")
- console.log("45" + isHas_45)
-
- var isHas_46 = headers.includes('_28')
- console.log("46" + isHas_46)
-
- var isHas_47 = headers.includes('_29')
- console.log("47" + isHas_47)
-
- var isHas_48 = headers.includes('周二' + "(" + this.days[15] + ")")
- console.log("48" + isHas_48)
-
- var isHas_49 = headers.includes('_30')
- console.log("49" + isHas_49)
-
- var isHas_50 = headers.includes('_31')
- console.log("50" + isHas_50)
-
- var isHas_51 = headers.includes('周三' + "(" + this.days[16] + ")")
- console.log("51" + isHas_51)
-
- var isHas_52 = headers.includes('_32')
- console.log("52" + isHas_52)
-
- var isHas_53 = headers.includes('_33')
- console.log("53" + isHas_53)
-
- var isHas_54 = headers.includes('周四' + "(" + this.days[17] + ")")
- console.log("54" + isHas_54)
-
- var isHas_55 = headers.includes('_34')
- console.log("55" + isHas_55)
-
- var isHas_56 = headers.includes('_35')
- console.log("56" + isHas_56)
-
- var isHas_57 = headers.includes('周五' + "(" + this.days[18] + ")")
- console.log("57" + isHas_57)
-
- var isHas_58 = headers.includes('_36')
- console.log("58" + isHas_58)
-
- var isHas_59 = headers.includes('_37')
- console.log("59" + isHas_59)
-
- var isHas_60 = headers.includes('周六' + "(" + this.days[19] + ")")
- console.log("60" + isHas_60)
-
- var isHas_61 = headers.includes('_38')
- console.log("61" + isHas_61)
-
- var isHas_62 = headers.includes('_39')
- console.log("62" + isHas_62)
-
- var isHas_63 = headers.includes('周日' + "(" + this.days[20] + ")")
- console.log("63" + isHas_63)
-
- var isHas_64 = headers.includes('_40')
- console.log("64" + isHas_64)
-
- var isHas_65 = headers.includes('_41')
- console.log("65" + isHas_65)
-
- if (!(isHas_1 && isHas_2 && isHas_3 && isHas_4 && isHas_5 &&
- isHas_6 && isHas_7 && isHas_8 && isHas_9 && isHas_10 &&
- isHas_11 && isHas_12 && isHas_13 && isHas_14 && isHas_15 &&
- isHas_16 && isHas_17 && isHas_18 && isHas_19 && isHas_20 &&
- isHas_21 && isHas_22 && isHas_23 && isHas_24 && isHas_25 &&
- isHas_26 && isHas_27 && isHas_28 && isHas_29 && isHas_30 &&
- isHas_31 && isHas_32 && isHas_33 && isHas_34 && isHas_35 &&
- isHas_36 && isHas_37 && isHas_38 && isHas_39 && isHas_40 &&
- isHas_41 && isHas_42 && isHas_43 && isHas_44 && isHas_45 &&
- isHas_46 && isHas_47 && isHas_48 && isHas_49 && isHas_50 &&
- isHas_51 && isHas_52 && isHas_53 && isHas_54 && isHas_55 &&
- isHas_56 && isHas_57 && isHas_58 && isHas_59 && isHas_60 &&
- isHas_61 && isHas_62 && isHas_63 && isHas_64 && isHas_65)) {
-
- this.dialogVisible = true
- return
- }
- } else if (header.length == 23) {
- var isHas_1 = headers.includes('区号')
- console.log("1" + isHas_1)
- var isHas_2 = headers.includes('机号')
- console.log("2" + isHas_2)
-
- var isHas_3 = headers.includes('周一' + "(" + this.days[0] + ")")
- console.log("3" + isHas_3)
-
- var isHas_4 = headers.includes('')
- console.log("4" + isHas_4)
-
- var isHas_5 = headers.includes('_1')
- console.log("5" + isHas_5)
-
- var isHas_6 = headers.includes('周二' + "(" + this.days[1] + ")")
- console.log("6" + isHas_6)
-
- var isHas_7 = headers.includes('_2')
- console.log("7" + isHas_7)
-
- var isHas_8 = headers.includes('_3')
- console.log("8" + isHas_8)
-
- var isHas_9 = headers.includes('周三' + "(" + this.days[2] + ")")
- console.log("9" + isHas_9)
-
- var isHas_10 = headers.includes('_4')
- console.log("10" + isHas_10)
-
- var isHas_11 = headers.includes('_5')
- console.log("11" + isHas_11)
-
- var isHas_12 = headers.includes('周四' + "(" + this.days[3] + ")")
- console.log("12" + isHas_12)
-
- var isHas_13 = headers.includes('_6')
- console.log("13" + isHas_13)
-
- var isHas_14 = headers.includes('_7')
- console.log("14" + isHas_14)
-
- var isHas_15 = headers.includes('周五' + "(" + this.days[4] + ")")
- console.log("15" + isHas_15)
-
- var isHas_16 = headers.includes('_8')
- console.log("16" + isHas_16)
-
- var isHas_17 = headers.includes('_9')
- console.log("17" + isHas_17)
-
- var isHas_18 = headers.includes('周六' + "(" + this.days[5] + ")")
- console.log("18" + isHas_18)
-
- var isHas_19 = headers.includes('_10')
- console.log("19" + isHas_19)
-
- var isHas_20 = headers.includes('_11')
- console.log("20" + isHas_20)
-
- var isHas_21 = headers.includes('周日' + "(" + this.days[6] + ")")
- console.log("21" + isHas_21)
-
- var isHas_22 = headers.includes('_12')
- console.log("22" + isHas_22)
-
- var isHas_23 = headers.includes('_13')
- console.log("23" + isHas_23)
-
- if (!(isHas_1 && isHas_2 && isHas_3 && isHas_4 && isHas_5 &&
- isHas_6 && isHas_7 && isHas_8 && isHas_9 && isHas_10 &&
- isHas_11 && isHas_12 && isHas_13 && isHas_14 && isHas_15 &&
- isHas_16 && isHas_17 && isHas_18 && isHas_19 && isHas_20 &&
- isHas_21)) {
- this.dialogVisible = true
- return
- }
-
- } else {
-
- this.dialogVisible = true
- return
- }
- let is_system_zone = true
- let is_device_number = true
- let zones = []
- let deviceNumber = []
- for (let i = 0; i < results.length; i++) {
- if (results[i + 1] && results[i + 1]['区号'] != undefined) {
- zones.push(results[i + 1]['区号'])
- }
- if (results[i + 1] && results[i + 1]['机号'] != undefined) {
- deviceNumber.push(results[i + 1]['机号'])
- }
- }
- const obj = {}
- zones = zones.reduce((cur, next) => {
- obj[next] ? '' : obj[next] = true && cur.push(next)
- return cur
- }, []) // 设置cur默认类型为数组,并且初始值为空的数组
-
- const obj2 = {}
- deviceNumber = deviceNumber.reduce((cur, next) => {
- obj2[next] ? '' : obj2[next] = true && cur.push(next)
- return cur
- }, []) // 设置cur默认类型为数组,并且初始值为空的数组
-
- var total_zones = []
- var total_device_number = []
-
- for (let key in this.partitions) {
- total_zones.push(this.partitions[key].name)
- }
-
- for (let key in this.partitions) {
- var jihaos = this.partitions[key].jihaos
-
- for (let i = 0; i < jihaos.length; i++) {
- total_device_number.push(jihaos[i].number)
- }
- }
-
- for (let i = 0; i < zones.length; i++) {
-
- if (!total_zones.includes(zones[i])) {
- is_system_zone = false
- }
- }
-
- for (let i = 0; i < deviceNumber.length; i++) {
- if (!total_device_number.includes(deviceNumber[i])) {
-
- is_device_number = false
- }
- }
-
- let tempObj = null
- if (results.length > 0) {
- tempObj = results[0]
- }
-
- let datas = []
- let failed_datas = []
-
- console.log("结果22222222222", results)
-
- for (let i = 0; i < results.length; i++) {
-
- for (let key in results[i + 1]) {
- let tempObjTwo = {partition_name: '', device_number_name: ''}
-
- if (key != '区号' && key != '机号' && results[i + 1][key] != "") {
- let obj = {}
-
- obj['name'] = results[i + 1][key].replace(/\s/g, '')
-
- if (tempObj[key] == '上午') {
- obj['schedule_type'] = 1
- } else if (tempObj[key] == '下午') {
- obj['schedule_type'] = 2
- } else if (tempObj[key] == '晚上') {
- obj['schedule_type'] = 3
- } else {
- obj['schedule_type'] = 0
-
- }
- obj['schedule_week'] = this.getWeekByResultsStr(key)
- obj['schedule_date'] = this.getDateByResultsStr(key)
- obj['row'] = this.getRow(key)
-
- tempObjTwo = obj
- }
-
- tempObjTwo['partition_name'] = results[i + 1]['区号']
- tempObjTwo['device_number_name'] = results[i + 1]['机号']
- tempObjTwo['index'] = i + 3
-
- if (tempObjTwo['schedule_week'] != undefined && tempObjTwo['name'] != undefined && tempObjTwo['schedule_type'] != undefined && tempObjTwo['schedule_date'] != undefined) {
- var current_date = new Date()
- var m_year = current_date.getFullYear()
- var m_month = current_date.getMonth() + 1
- m_month = m_month < 10 ? '0' + m_month.toString() : m_month.toString()
- var m_date = current_date.getDate() < 10 ? '0' + current_date.getDate().toString() : current_date.getDate().toString()
- var current_date_two = new Date(m_year + '-' + m_month + '-' + m_date)
- if (new Date(tempObjTwo['schedule_date']).getTime() > new Date(current_date_two).getTime()) {
- datas.push(tempObjTwo)
- } else {
- failed_datas.push(tempObjTwo)
- }
- }
- }
-
- }
-
- console.log("datas", datas)
-
- let date_arr = []
- //校验文档是否规范
- for (let i = 0; i < datas.length; i++) {
- if (datas[i].schedule_date !== '0') {
- date_arr.push(datas[i].schedule_date)
- }
-
- if (datas[i].device_number_name == undefined) {
- console.log("err1" + datas[i].device_number_name)
-
- is_device_number = false
-
- }
-
- if (datas[i].partition_name == undefined) {
- console.log("err2" + datas[i].partition_name)
-
- is_system_zone = false
- }
-
- if (datas[i].schedule_date === '0') {
- console.log("err23" + datas[i].schedule_date)
-
- is_system_zone = false
-
- }
-
- if (datas[i].schedule_week === '0') {
- console.log("err234" + datas[i].schedule_week)
-
- is_system_zone = false
-
- }
-
- if (datas[i].schedule_type === 0) {
- console.log("err2345" + datas[i].schedule_type)
-
- is_system_zone = false
-
- }
- }
-
- console.log("date_arr", date_arr)
- //校验文档中同一天同个人是否存在多个排班
- let is_exist_repeat = false
- const obj3 = {}
- date_arr = date_arr.reduce((cur, next) => {
- obj3[next] ? '' : obj3[next] = true && cur.push(next)
- return cur
- }, []) // 设置cur默认类型为数组,并且初始值为空的数组
-
- let tempObjArr = []
- for (let i = 0; i < date_arr.length; i++) {
- let obj = {}
- let key = date_arr[i]
- let value = []
-
- for (let b = 0; b < datas.length; b++) {
- if (key == datas[b].schedule_date) {
- value.push(datas[b].name)
- }
- }
- obj[key] = value
- tempObjArr.push(obj)
- }
-
- for (let i = 0; i < tempObjArr.length; i++) {
- for (let key in tempObjArr[i]) {
- let arr = tempObjArr[i][key]
- const obj = {}
- arr = arr.reduce((cur, next) => {
- obj[next] ? '' : obj[next] = true && cur.push(next)
- return cur
- }, []) // 设置cur默认类型为数组,并且初始值为空的数组
-
- if (tempObjArr[i][key].length > arr.length) { //比对原数组和去重后的原数组总数,不同的话则存在重复元素
- is_exist_repeat = true
- }
- }
- }
-
- if (headers.length > 65 || !is_system_zone || !is_device_number) {
-
- this.dialogVisible = true
- return
- } else {
-
- if (is_exist_repeat) {
- this.isExistRepeatVisible = true
- return
- } else {
- this.exportVisible = true
-
- this.$alert('您提交的排班信息已上传成功,系统正在执行导入,请稍候点击当前页面右上角“下载日志”查看导入结果', '上传成功', {
- confirmButtonText: '确定',
- callback: action => {
-
- }
- });
- console.log("data232332233223", datas)
- console.log("failed_datas33332332", failed_datas)
- var newSchedule = datas.sort((a, b) => {
- return a.schedule_date - b.schedule_date
- })
- var start_time = ""
- var type = 0
- if (failed_datas.length > 0) {
- var oldSchedule = failed_datas.sort((a, b) => {
- return a.schedule_date - b.schedule_date
- })
- start_time = oldSchedule[0].schedule_date
- type = 0
- }
-
- if (failed_datas.length == 0) {
- start_time = newSchedule[0].schedule_date
- type = 1
- }
-
- console.log("newSchedule2323223", newSchedule)
- console.log("oldSchedule344433434", oldSchedule)
-
- var length = newSchedule.length - 1
- let params = {
- schedule: datas,
- failed_schedule: failed_datas,
- start_time: start_time,
- end_time: newSchedule[length].schedule_date,
- delete_type: type,
- }
- console.log("param2323233223", params)
- //今天的时间
- var day2 = new Date()
- day2.setTime(day2.getTime())
- var month = day2.getMonth() + 1 < 10 ? '0' + (day2.getMonth() + 1).toString() : (day2.getMonth() + 1).toString()
- var day = day2.getDate() < 10 ? '0' + (day2.getDate()).toString() : (day2.getMonth() + 1).toString()
- var date = day2.getFullYear() + '-' + month + '-' + day
-
- exportSchedule(params, date).then(response => {
- if (response.data.state == 0) {
- return false
- }
- this.getWeekPanels()
-
- })
- }
-
- }
-
- },
- sortData(a, b) {
- return a.schedule_date - b.schedule_date
- },
- getInitDate() {
- initDate().then(response => {
- if (response.data.state == 0) {
- return false
- }
- this.days = response.data.data.days
- console.log("日期22222222", this.days)
- })
- },
- getWeekByResultsStr(key) {
-
- switch (key) {
- case '周一' + "(" + this.days[0] + ")":
- return '1'
- break
- case '周一' + "(" + this.days[7] + ")":
- return '1'
- break
-
- case '周一' + "(" + this.days[14] + ")":
- return '1'
- break
-
- case '':
- return '1'
- break
-
- case '_1':
- return '1'
- break
-
- case '_14':
- return '1'
- break
-
- case '_15':
- return '1'
- break
-
- case '_28':
- return '1'
- break
-
- case '_29':
- return '1'
- break
-
- case '周二' + "(" + this.days[1] + ")" :
- return '2'
- break
- case '周二' + "(" + this.days[8] + ")":
- return '2'
- break
- case '周二' + "(" + this.days[15] + ")" :
- return '2'
- break
-
- case '_2':
- return '2'
- break
-
- case '_3':
- return '2'
- break
-
- case '_16' :
- return '2'
- break
-
- case '_17' :
- return '2'
- break
-
- case '_30':
- return '2'
- break
-
- case '_31':
- return '2'
- break
-
- case '周三' + "(" + this.days[2] + ")":
- return '3'
- break
- case '周三' + "(" + this.days[9] + ")":
- return '3'
- break
- case '周三' + "(" + this.days[16] + ")":
- return '3'
- break
- case '_4' :
- return '3'
- break
- case '_5' :
- return '3'
- break
- case '_18' :
- return '3'
- break
- case '_19' :
- return '3'
- break
- case '_32' :
- return '3'
- break
- case '_33' :
- return '3'
- break
-
- case '周四' + "(" + this.days[3] + ")":
- return '4'
- break
-
- case '周四' + "(" + this.days[10] + ")" :
- return '4'
- break
- case'周四' + "(" + this.days[17] + ")" :
- return '4'
- break
- case '_6' :
- return '4'
- break
-
- case '_7':
- return '4'
- break
- case '_20':
- return '4'
- break
- case '_21':
- return '4'
- break
- case '_34':
- return '4'
- break
- case '_35':
- return '4'
- break
-
- case '周五' + "(" + this.days[4] + ")" :
- return '5'
- break
-
- case '周五' + "(" + this.days[11] + ")":
- return '5'
- break
- case '周五' + "(" + this.days[18] + ")" :
- return '5'
- break
- case '_8':
- return '5'
- break
- case '_9' :
- return '5'
- break
- case '_22' :
- return '5'
- break
- case '_23':
- return '5'
- break
- case '_36':
- return '5'
- break
- case '_37':
- return '5'
- break
- case '周六' + "(" + this.days[5] + ")":
- return '6'
- break
- case '周六' + "(" + this.days[12] + ")":
- return '6'
- break
- case '周六' + "(" + this.days[19] + ")":
- return '6'
- break
- case '_10' :
- return '6'
- break
- case '_11':
- return '6'
- break
- case '_24' :
- return '6'
- break
- case '_25' :
- return '6'
- break
- case '_38' :
- return '6'
- break
- case '_39':
- return '6'
- break
-
- case '周日' + "(" + this.days[6] + ")":
- return '7'
- break
- case '周日' + "(" + this.days[13] + ")":
- return '7'
- break
- case '周日' + "(" + this.days[20] + ")":
- return '7'
- break
- case '_12' :
- return '7'
- break
- case '_13' :
- return '7'
- break
- case '_26':
- return '7'
- break
- case '_27':
- return '7'
- break
- case '_40' :
- return '7'
- break
- case '_41':
- return '7'
- break
- default:
- return '0'
- break
-
- }
-
- },
- getRow(key) {
- switch (key) {
- case '周一' + "(" + this.days[0] + ")" : //本周一
-
- return 'C'
- break
-
- case '': //本周一
- return 'D'
- break
-
- case '_1': //本周一
- return 'E'
- break
-
- case '周一' + "(" + this.days[7] + ")": //下周一
-
- return 'X'
-
- break
-
- case '_14': //下周一
-
- return 'Y'
- break
-
- case '_15': //下周一
- return 'Z'
- break
-
- case '周一' + "(" + this.days[14] + ")" : //下下周一
-
- return 'AS'
- break
-
- case '_28': //下下周一
-
- return 'AT'
- break
-
- case '_29': //下下周一
-
- return 'AU'
- break
-
- case '周二' + "(" + this.days[1] + ")" : //本周二
- return 'F'
- break
-
- case '_2': //本周二
- return 'G'
- break
-
- case '_3': //本周二
- return 'H'
- break
-
- case '周二' + "(" + this.days[8] + ")"://下周二
- return 'AA'
-
- break
-
- case '_16' ://下周二
- return 'AB'
-
- break
-
- case '_17'://下周二
- return 'AC'
-
- break
-
- case '周二' + "(" + this.days[15] + ")"://下下周二
- return 'AV'
-
- break
-
- case '_30' ://下下周二
- return 'AW'
-
- break
-
- case '_31'://下下周二
- return 'AX'
- break
-
- case '周三' + "(" + this.days[2] + ")": //本周三
- return 'I'
-
- break
-
- case '_4': //本周三
- return 'J'
- break
-
- case '_5': //本周三
- return 'K'
- break
-
- case '周三' + "(" + this.days[9] + ")": //下周三
- return 'AD'
-
- break
-
- case '_18' : //下周三
- return 'AE'
-
- break
-
- case '_19': //下周三
- return 'AF'
-
- break
-
- case '周三' + "(" + this.days[16] + ")" : //下下周三
- return 'AY'
-
- break
-
- case '_32' : //下下周三
- return 'AZ'
-
- break
-
- case '_33': //下下周三
- return 'BA'
-
- break
-
- case '周四' + "(" + this.days[3] + ")":
- return 'L'
-
- break
-
- case '_6' :
- return 'M'
-
- break
-
- case '_7':
- return 'N'
-
- break
-
- case '周四' + "(" + this.days[10] + ")":
- return 'AG'
-
- break
-
- case '_20' :
- return 'AH'
-
- break
-
- case '_21':
-
- return 'AI'
-
- break
-
- case '周四' + "(" + this.days[17] + ")":
-
- return 'BB'
-
- break
-
- case '_34':
-
- return 'BC'
-
- break
-
- case '_35':
-
- return 'BD'
-
- break
- case '周五' + "(" + this.days[4] + ")":
- return 'O'
-
- break
-
- case '_8':
- return 'P'
-
- break
-
- case '_9':
- return 'Q'
- break
- case '周五' + "(" + this.days[11] + ")":
- return 'AJ'
- break
-
- case '_22' :
- return 'AK'
-
- break
-
- case '_23':
- return 'AL'
-
- break
- case '周五' + "(" + this.days[18] + ")":
- return 'BE'
-
- break
-
- case '_36':
- return 'BF'
-
- break
-
- case '_37':
- return 'BG'
-
- break
-
- case '周六' + "(" + this.days[5] + ")" :
- return 'R'
-
- break
-
- case '_10' :
- return 'S'
-
- break
-
- case '_11':
- return 'T'
-
- break
- case '周六' + "(" + this.days[12] + ")":
- return 'AM'
-
- break
-
- case '_24' :
- return 'AN'
-
- break
-
- case '_25':
- return 'AO'
-
- break
-
- case '周六' + "(" + this.days[19] + ")":
- return 'BH'
-
- break
-
- case '_38' :
- return 'BI'
-
- break
-
- case '_39':
- return 'BJ'
-
- break
- case '周日' + "(" + this.days[6] + ")" :
- return 'U'
-
- break
-
- case '_12' :
- return 'V'
-
- break
-
- case '_13':
- return 'W'
-
- break
- case '周日' + "(" + this.days[13] + ")":
- return 'AP'
-
- break
-
- case '_26' :
- return 'AQ'
-
- break
-
- case '_27':
- return 'AR'
-
- break
- case '周日' + "(" + this.days[20] + ")":
- return 'BK'
-
- break
-
- case '_40':
- return 'BL'
-
- break
-
- case '_41':
- return 'BM'
- break
- }
-
- },
- getDateByResultsStr(key) {
-
- switch (key) {
- case '周一' + "(" + this.days[0] + ")" : //本周一
-
- return this.days[0]
- break
-
- case '': //本周一
- return this.days[0]
-
- break
-
- case '_1': //本周一
- return this.days[0]
- break
-
- case '周一' + "(" + this.days[7] + ")": //下周一
- return this.days[7]
-
- break
-
- case '_14': //下周一
-
- return this.days[7]
-
- break
-
- case '_15': //下周一
-
- return this.days[7]
-
- break
-
- case '周一' + "(" + this.days[14] + ")": //下下周一
-
- return this.days[14]
-
- break
-
- case '_28': //下下周一
-
- return this.days[14]
-
- break
-
- case '_29': //下下周一
-
- return this.days[14]
-
- break
-
- case '周二' + "(" + this.days[1] + ")": //本周二
- return this.days[1]
-
- break
-
- case '_2': //本周二
- return this.days[1]
-
- break
-
- case '_3': //本周二
- return this.days[1]
-
- break
-
- case '周二' + "(" + this.days[8] + ")"://下周二
- return this.days[8]
-
- break
-
- case '_16' ://下周二
- return this.days[8]
-
- break
-
- case '_17'://下周二
- return this.days[8]
-
- break
-
- case '周二' + "(" + this.days[15] + ")"://下下周二
- return this.days[15]
-
- break
-
- case '_30' ://下下周二
- return this.days[15]
-
- break
-
- case '_31'://下下周二
- return this.days[15]
-
- break
-
- case '周三' + "(" + this.days[2] + ")" : //本周三
- return this.days[2]
-
- break
-
- case '_4': //本周三
- return this.days[2]
-
- break
-
- case '_5': //本周三
- return this.days[2]
-
- break
-
- case '周三' + "(" + this.days[9] + ")": //下周三
- return this.days[9]
-
- break
-
- case '_18' : //下周三
- return this.days[9]
-
- break
-
- case '_19': //下周三
- return this.days[9]
-
- break
-
- case '周三' + "(" + this.days[16] + ")": //下下周三
- return this.days[16]
-
- break
-
- case '_32' : //下下周三
- return this.days[16]
-
- break
-
- case '_33': //下下周三
- return this.days[16]
-
- break
-
- case '周四' + "(" + this.days[3] + ")":
- return this.days[3]
-
- break
-
- case '_6' :
- return this.days[3]
-
- break
-
- case '_7':
- return this.days[3]
-
- break
-
- case '周四' + "(" + this.days[10] + ")":
-
- return this.days[10]
-
- break
-
- case '_20' :
-
- return this.days[10]
-
- break
-
- case '_21':
-
- return this.days[10]
-
- break
-
- case '周四' + "(" + this.days[17] + ")":
-
- return this.days[17]
-
- break
-
- case '_34':
-
- return this.days[17]
-
- break
-
- case '_35':
-
- return this.days[17]
-
- break
- case '周五' + "(" + this.days[4] + ")":
- return this.days[4]
-
- break
-
- case '_8':
- return this.days[4]
-
- break
-
- case '_9':
- return this.days[4]
-
- break
- case '周五' + "(" + this.days[11] + ")" :
- return this.days[11]
-
- break
-
- case '_22' :
- return this.days[11]
-
- break
-
- case '_23':
- return this.days[11]
-
- break
- case '周五' + "(" + this.days[18] + ")":
- return this.days[18]
-
- break
-
- case '_36':
- return this.days[18]
-
- break
-
- case '_37':
- return this.days[18]
-
- break
-
- case '周六' + "(" + this.days[5] + ")":
- return this.days[5]
-
- break
-
- case '_10' :
- return this.days[5]
-
- break
-
- case '_11':
- return this.days[5]
-
- break
- case '周六' + "(" + this.days[12] + ")":
- return this.days[12]
-
- break
-
- case '_24' :
- return this.days[12]
-
- break
-
- case '_25':
- return this.days[12]
-
- break
-
- case '周六' + "(" + this.days[19] + ")":
- return this.days[19]
-
- break
-
- case '_38' :
- return this.days[19]
-
- break
-
- case '_39':
- return this.days[19]
-
- break
- case '周日' + "(" + this.days[6] + ")" :
- return this.days[6]
-
- break
-
- case '_12' :
- return this.days[6]
-
- break
-
- case '_13':
- return this.days[6]
- break
- case '周日' + "(" + this.days[13] + ")":
- return this.days[13]
-
- break
-
- case '_26' :
- return this.days[13]
-
- break
-
- case '_27':
- return this.days[13]
-
- break
- case '周日' + "(" + this.days[20] + ")":
- return this.days[20]
-
- break
-
- case '_40':
- return this.days[20]
-
- break
-
- case '_41':
- return this.days[20]
- break
- default:
- return '0'
- break
-
- }
-
- },
-
- getNextWeek(i) {
- let weekOfDay = parseInt(moment().format('E'));//计算今天是这周第几天
- let next_monday = moment().add((7 - weekOfDay) + 7 * (i - 1) + 1, 'days').format('YYYY-MM-DD');//周一日期
- let next_sunday = moment().add((7 - weekOfDay) + 7 * i, 'days').format('YYYY-MM-DD');//周日日期
- return next_sunday
- },
-
- getNextWeekOne(i) {
- let weekOfDay = parseInt(moment().format('E'));//计算今天是这周第几天
- let next_monday = moment().add((7 - weekOfDay) + 7 * (i - 1) + 1, 'days').format('YYYY-MM-DD');//周一日期
-
- return next_monday
- },
- //
- getThreeWeekList() {
- var params = {
- start_time: this.start_time,
- end_time: this.end_time,
- partition_id: this.partition_id,
- schedule_type: this.schedule_type
- }
- // console.log("params32323232323223", params)
- getThreeWeekList(params).then(response => {
- if (response.data.state == 1) {
- var partitions = response.data.data.partitions
- console.log('yyyyyyy',response.data.data);
- const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
- var list = []
- let i = 0
-
- for (let key in partitions) {
- var tempValue
- var jihaos = partitions[key].jihaos
-
- jihaos.sort(function(a,b) {
- return a.sort-b.sort
- })
- // console.log('rrrrr',jihaos);
- // for(let i=0;i<jihaos1.length;i++){
- // var jihaos=jihaos1[i].sort
- // }
- // for(let i in jihaos1){
- // var jihaos=jihaos1[i].sort
- // jihaos.sort(function(a,b){
- // return a-b
- // })
- // console.log('wwwww',jihaos);
- // }
- if (i == 0) {
- let m = 'A3' + ':' + 'A' + (2 + jihaos.length)
- tempValue = (2 + jihaos.length)
- merges.push(m)
- } else {
- let m = 'A' + (tempValue + 1) + ':' + 'A' + ((tempValue + 1) + jihaos.length - 1)
- tempValue = ((tempValue + 1) + jihaos.length - 1)
- merges.push(m)
- }
- console.log("jihaos", jihaos)
- for (let b = 0; b < jihaos.length; b++) {
- var obj = {}
-
- obj['区号'] = partitions[key].name
- obj['机号'] = jihaos[b].number.toString()
-
- if (this.export_type == 0) {
- obj['shangwu'] = ''
- obj['xiawu'] = ''
- obj['wanshang'] = ''
-
- obj['shangwu1'] = ''
- obj['xiawu1'] = ''
- obj['wanshang1'] = ''
-
- obj['shangwu2'] = ''
- obj['xiawu2'] = ''
- obj['wanshang2'] = ''
-
- obj['shangwu3'] = ''
- obj['xiawu3'] = ''
- obj['wanshang3'] = ''
-
- obj['shangwu4'] = ''
- obj['xiawu4'] = ''
- obj['wanshang4'] = ''
-
- obj['shangwu5'] = ''
- obj['xiawu5'] = ''
- obj['wanshang5'] = ''
-
- obj['shangwu6'] = ''
- obj['xiawu6'] = ''
- obj['wanshang6'] = ''
-
- obj['shangwu7'] = ''
- obj['xiawu7'] = ''
- obj['wanshang7'] = ''
-
- obj['shangwu8'] = ''
- obj['xiawu8'] = ''
- obj['wanshang8'] = ''
-
- obj['shangwu9'] = ''
- obj['xiawu9'] = ''
- obj['wanshang9'] = ''
-
- obj['shangwu10'] = ''
- obj['xiawu10'] = ''
- obj['wanshang10'] = ''
-
- obj['shangwu11'] = ''
- obj['xiawu11'] = ''
- obj['wanshang11'] = ''
-
- obj['shangwu12'] = ''
- obj['xiawu12'] = ''
- obj['wanshang12'] = ''
-
- obj['shangwu13'] = ''
- obj['xiawu13'] = ''
- obj['wanshang13'] = ''
-
- obj['shangwu14'] = ''
- obj['xiawu14'] = ''
- obj['wanshang14'] = ''
-
- obj['shangwu15'] = ''
- obj['xiawu15'] = ''
- obj['wanshang15'] = ''
-
- obj['shangwu16'] = ''
- obj['xiawu16'] = ''
- obj['wanshang16'] = ''
-
- obj['shangwu17'] = ''
- obj['xiawu17'] = ''
- obj['wanshang17'] = ''
-
- obj['shangwu18'] = ''
- obj['xiawu18'] = ''
- obj['wanshang18'] = ''
-
- obj['shangwu19'] = ''
- obj['xiawu19'] = ''
- obj['wanshang19'] = ''
-
- obj['shangwu20'] = ''
- obj['xiawu20'] = ''
- obj['wanshang20'] = ''
- }
-
- if (this.export_type == 1) {
- obj['shangwu'] = ''
- obj['xiawu'] = ''
- obj['wanshang'] = ''
-
- obj['shangwu1'] = ''
- obj['xiawu1'] = ''
- obj['wanshang1'] = ''
-
- obj['shangwu2'] = ''
- obj['xiawu2'] = ''
- obj['wanshang2'] = ''
-
- obj['shangwu3'] = ''
- obj['xiawu3'] = ''
- obj['wanshang3'] = ''
-
- obj['shangwu4'] = ''
- obj['xiawu4'] = ''
- obj['wanshang4'] = ''
-
- obj['shangwu5'] = ''
- obj['xiawu5'] = ''
- obj['wanshang5'] = ''
-
- obj['shangwu6'] = ''
- obj['xiawu6'] = ''
- obj['wanshang6'] = ''
- }
- list.push(obj)
-
- }
- i++
- }
-
- const start_time = moment().weekday(1).format('YYYY-MM-DD'); //本周一
- var start = this.getTimestamp(start_time) - 28800
- console.log("start", start)
- const end_time = moment().weekday(7).format('YYYY-MM-DD');
- var end = this.getTimestamp(end_time) - 28800
- console.log("end", end)
- var scheduleList = response.data.data.list
- // console.log('ttttttttt',scheduleList);
- var week = []
- var nextWeek = []
- var lastWeek = []
- var next_start = this.getNextWeekOne(1)
- var nextstart = this.getTimestamp(next_start) - 28800
-
- var next_end = this.getNextWeek(1)
- var nextend = this.getTimestamp(next_end) - 28800
-
- var last_start = this.getNextWeekOne(2)
- var last_end = this.getNextWeek(2)
- var laststart = this.getTimestamp(last_start) - 28800
-
- var lastend = this.getTimestamp(last_end) - 28800
-
- if (this.export_type == 0) {
- for (let i = 0; i < scheduleList.length; i++) {
- if (scheduleList[i].schedule_date >= start && scheduleList[i].schedule_date <= end) {
- week.push(scheduleList[i])
- }
- if (scheduleList[i].schedule_date >= nextstart && scheduleList[i].schedule_date <= nextend) {
- nextWeek.push(scheduleList[i])
- }
-
- if (scheduleList[i].schedule_date >= laststart && scheduleList[i].schedule_date <= lastend) {
- lastWeek.push(scheduleList[i])
- }
- }
- }
-
- if (this.export_type == 1) {
- week = scheduleList
- }
- console.log("list")
- console.log(list)
- console.log("week")
- console.log(lastWeek)
-
- if (week.length > 0) {
- // console.log('qqqqqqqqq',list);
- // console.log('wwwwwwwww',week);
- for (let i = 0; i < list.length; i++) {
- for (let j = 0; j < week.length; j++) {
- if (list[i].机号 == week[j].number && list[i].区号 == week[j].zon_name) {
- // 周一上午 week[j].number week[j].zon_name
- if (week[j].schedule_week == 1 && week[j].schedule_type == 1) {
- if(this.guanliu_show==false){
- list[i].shangwu = week[j].name
- // console.log('eeeeeee',list[i].shangwu)
- }else{
- list[i].shangwu = week[j].name+" "+week[j].dialysis_machine_name
- // console.log('kkkkkk',list[i].shangwu)
- }
- }
- // 周一下午
- if (week[j].schedule_week == 1 && week[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu = week[j].name
- }else{
- list[i].xiawu = week[j].name+" "+week[j].dialysis_machine_name
- }
- }
- // 周一晚上
- if (week[j].schedule_week == 1 && week[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang = week[j].name
- }else{
- list[i].wanshang = week[j].name+" "+week[j].dialysis_machine_name
- }
- }
-
- //周二上午
- if (week[j].schedule_week == 2 && week[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu1 = week[j].name
- }else{
- list[i].shangwu1 = week[j].name+" "+week[j].dialysis_machine_name
- }
- }
- //周二下午
- if (week[j].schedule_week == 2 && week[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu1 = week[j].name
- }else{
- list[i].xiawu1 = week[j].name+" "+week[j].dialysis_machine_name
- }
- }
- //周二晚上
- if (week[j].schedule_week == 2 && week[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang1 = week[j].name
- }else{
- list[i].wanshang1 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].wanshang1 = week[j].name+" "+week[i].dialysis_machine_name
- }
-
- //周三上午
- if (week[j].schedule_week == 3 && week[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu2 = week[j].name
- }else{
- list[i].shangwu2 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].shangwu2 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周三下午
- if (week[j].schedule_week == 3 && week[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu2 = week[j].name
- }else{
- list[i].xiawu2 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].xiawu2 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周三晚上
- if (week[j].schedule_week == 3 && week[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang2 = week[j].name
- }else{
- list[i].wanshang2 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].wanshang2 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周四上午
- if (week[j].schedule_week == 4 && week[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu3 = week[j].name
- }else{
- list[i].shangwu3 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].shangwu3 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周四下午
- if (week[j].schedule_week == 4 && week[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu3 = week[j].name
- }else{
- list[i].xiawu3 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].xiawu3 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周四晚上
- if (week[j].schedule_week == 4 && week[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang3 = week[j].name
- }else{
- list[i].wanshang3 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].wanshang3 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周五上午
- if (week[j].schedule_week == 5 && week[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu4 = week[j].name
- }else{
- list[i].shangwu4 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].shangwu4 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周五下午
- if (week[j].schedule_week == 5 && week[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu4 = week[j].name
- }else{
- list[i].xiawu4 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].xiawu4 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周五晚上
- if (week[j].schedule_week == 5 && week[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang4 = week[j].name
- }else{
- list[i].wanshang4 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].wanshang4 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周六上午
- if (week[j].schedule_week == 6 && week[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu5 = week[j].name
- }else{
- list[i].shangwu5 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].shangwu5 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周六下午
- if (week[j].schedule_week == 6 && week[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu5 = week[j].name
- }else{
- list[i].xiawu5 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].xiawu5 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周六晚上
- if (week[j].schedule_week == 6 && week[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang5 = week[j].name
- }else{
- list[i].wanshang5 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].wanshang5 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周日上午
- if (week[j].schedule_week == 7 && week[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu6 = week[j].name
- }else{
- list[i].shangwu6 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].shangwu6 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周日下午
- if (week[j].schedule_week == 7 && week[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu6 = week[j].name
- }else{
- list[i].xiawu6 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].xiawu6 = week[j].name+" "+week[j].dialysis_machine_name
- }
- //周日晚上
- if (week[j].schedule_week == 7 && week[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang6 = week[j].name
- }else{
- list[i].wanshang6 = week[j].name+" "+week[j].dialysis_machine_name
- }
- // list[i].wanshang6 = week[j].name+" "+week[j].dialysis_machine_name
- }
- }
-
- }
- }
- }
-
- if (nextWeek.length > 0) {
- for (let i = 0; i < list.length; i++) {
- for (let j = 0; j < nextWeek.length; j++) {
- if (list[i].机号 == nextWeek[j].number && list[i].区号 == nextWeek[j].zon_name) {
- //周一
- if (nextWeek[j].schedule_week == 1 && nextWeek[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu7 = nextWeek[j].name
- }else{
- list[i].shangwu7 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].shangwu7 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周一下午
- if (nextWeek[j].schedule_week == 1 && nextWeek[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu7 = nextWeek[j].name
- }else{
- list[i].xiawu7 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].xiawu7 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周一晚上
- if (nextWeek[j].schedule_week == 1 && nextWeek[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang7 = nextWeek[j].name
- }else{
- list[i].wanshang7 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].wanshang7 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
-
- //周二上午
- if (nextWeek[j].schedule_week == 2 && nextWeek[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu8 = nextWeek[j].name
- }else{
- list[i].shangwu8 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].shangwu8 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周二下午
- if (nextWeek[j].schedule_week == 2 && nextWeek[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu8 = nextWeek[j].name
- }else{
- list[i].xiawu8 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].xiawu8 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周二晚上
- if (nextWeek[j].schedule_week == 2 && nextWeek[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang8 = nextWeek[j].name
- }else{
- list[i].wanshang8 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].wanshang8 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
-
- //周三上午
- if (nextWeek[j].schedule_week == 3 && nextWeek[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu9 = nextWeek[j].name
- }else{
- list[i].shangwu9 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].shangwu9 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周三下午
- if (nextWeek[j].schedule_week == 3 && nextWeek[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu9 = nextWeek[j].name
- }else{
- list[i].xiawu9 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //
- }
- //周三晚上
- if (nextWeek[j].schedule_week == 3 && nextWeek[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang9 = nextWeek[j].name
- }else{
- list[i].wanshang9 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].wanshang9 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
-
- //周四上午
- if (nextWeek[j].schedule_week == 4 && nextWeek[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu10 = nextWeek[j].name
- }else{
- list[i].shangwu10 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].shangwu10 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周四下午
- if (nextWeek[j].schedule_week == 4 && nextWeek[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu10 = nextWeek[j].name
- }else{
- list[i].xiawu10 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].xiawu10 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周四晚上
- if (nextWeek[j].schedule_week == 4 && nextWeek[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang10 = nextWeek[j].name
- }else{
- list[i].wanshang10 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].wanshang10 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
-
- //周五上午
- if (nextWeek[j].schedule_week == 5 && nextWeek[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu11 = nextWeek[j].name
- }else{
- list[i].shangwu11 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].shangwu11 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周五下午
- if (nextWeek[j].schedule_week == 5 && nextWeek[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu11 = nextWeek[j].name
- }else{
- list[i].xiawu11 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].xiawu11 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周五晚上
- if (nextWeek[j].schedule_week == 5 && nextWeek[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang11 = nextWeek[j].name
- }else{
- list[i].wanshang11 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].wanshang11 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
-
- //周六上午
- if (nextWeek[j].schedule_week == 6 && nextWeek[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu12 = nextWeek[j].name
- }else{
- list[i].shangwu12 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].shangwu12 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周六下午
- if (nextWeek[j].schedule_week == 6 && nextWeek[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu12 = nextWeek[j].name
- }else{
- list[i].xiawu12 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].xiawu12 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周六晚上
- if (nextWeek[j].schedule_week == 6 && nextWeek[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang12 = nextWeek[j].name
- }else{
- list[i].wanshang12 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].wanshang12 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
-
- //周日上午
- if (nextWeek[j].schedule_week == 7 && nextWeek[j].schedule_type == 1) {
- if(this.$refs.tableData.value1==false){
- list[i].shangwu13 = nextWeek[j].name
- }else{
- list[i].shangwu13 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].shangwu13 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周日下午
- if (nextWeek[j].schedule_week == 7 && nextWeek[j].schedule_type == 2) {
- if(this.$refs.tableData.value1==false){
- list[i].xiawu13 = nextWeek[j].name
- }else{
- list[i].xiawu13 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].xiawu13 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- //周日晚上
- if (nextWeek[j].schedule_week == 7 && nextWeek[j].schedule_type == 3) {
- if(this.$refs.tableData.value1==false){
- list[i].wanshang13 = nextWeek[j].name
- }else{
- list[i].wanshang13 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- // list[i].wanshang13 = nextWeek[j].name+" "+nextWeek[j].dialysis_machine_name
- }
- }
-
- }
- }
- }
- //
- if (lastWeek.length > 0) {
- console.log('ttttt',lastWeek);
- for (let i = 0; i < list.length; i++) {
- for (let j = 0; j < lastWeek.length; j++) {
- if (list[i].机号 == lastWeek[j].number && list[i].区号 == lastWeek[j].zon_name) {
- //周一
- if (lastWeek[j].schedule_week == 1 && lastWeek[j].schedule_type == 1) {
- if(this.guanliu_show==false){
- list[i].shangwu14 = lastWeek[j].name
- }else{
- list[i].shangwu14 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].shangwu14 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周一下午
- if (lastWeek[j].schedule_week == 1 && lastWeek[j].schedule_type == 2) {
- if(this.guanliu_show==false){
- list[i].xiawu14 = lastWeek[j].name
- }else{
- list[i].xiawu14 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].xiawu14 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周一晚上
- if (lastWeek[j].schedule_week == 1 && lastWeek[j].schedule_type == 3) {
- if(this.guanliu_show==false){
- list[i].wanshang14 = lastWeek[j].name
- }else{
- list[i].wanshang14 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].wanshang14 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
-
- //周二
- if (lastWeek[j].schedule_week == 2 && lastWeek[j].schedule_type == 1) {
- if(this.guanliu_show==false){
- list[i].shangwu15 = lastWeek[j].name
- }else{
- list[i].shangwu15 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].shangwu15 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周二下午
- if (lastWeek[j].schedule_week == 2 && lastWeek[j].schedule_type == 2) {
- if(this.guanliu_show==false){
- list[i].xiawu15 = lastWeek[j].name
- console.log('22222',list[i].xiawu15);
- }else{
- list[i].xiawu15 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].xiawu15 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周二晚上
- if (lastWeek[j].schedule_week == 2 && lastWeek[j].schedule_type == 3) {
- if(this.guanliu_show==false){
- list[i].wanshang15 = lastWeek[j].name
- }else{
- list[i].wanshang15 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].wanshang15 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
-
- //周三
- if (lastWeek[j].schedule_week == 3 && lastWeek[j].schedule_type == 1) {
- if(this.guanliu_show==false){
- list[i].shangwu16 = lastWeek[j].name
- }else{
- list[i].shangwu16 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].shangwu16 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周三下午
- if (lastWeek[j].schedule_week == 3 && lastWeek[j].schedule_type == 2) {
- if(this.guanliu_show==false){
- list[i].xiawu16 = lastWeek[j].name
- }else{
- list[i].xiawu16 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].xiawu16 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周三晚上
- if (lastWeek[j].schedule_week == 3 && lastWeek[j].schedule_type == 3) {
- if(this.guanliu_show==false){
- list[i].wanshang16 = lastWeek[j].name
- }else{
- list[i].wanshang16 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].wanshang16 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
-
- //周四
- if (lastWeek[j].schedule_week == 4 && lastWeek[j].schedule_type == 1) {
- if(this.guanliu_show==false){
- list[i].shangwu17 = lastWeek[j].name
- }else{
- list[i].shangwu17 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].shangwu17 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周四下午
- if (lastWeek[j].schedule_week == 4 && lastWeek[j].schedule_type == 2) {
- if(this.guanliu_show==false){
- list[i].xiawu17 = lastWeek[j].name
- }else{
- list[i].xiawu17 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].xiawu17 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周四晚上
- if (lastWeek[j].schedule_week == 4 && lastWeek[j].schedule_type == 3) {
- if(this.guanliu_show==false){
- list[i].wanshang17 = lastWeek[j].name
- }else{
- list[i].wanshang17 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].wanshang17 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
-
- //周五
- if (lastWeek[j].schedule_week == 5 && lastWeek[j].schedule_type == 1) {
- if(this.guanliu_show==false){
- list[i].shangwu18 = lastWeek[j].name
- }else{
- list[i].shangwu18 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].shangwu18 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周五下午
- if (lastWeek[j].schedule_week == 5 && lastWeek[j].schedule_type == 2) {
- if(this.guanliu_show==false){
- list[i].xiawu18 = lastWeek[j].name
- }else{
- list[i].xiawu18 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].xiawu18 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周五晚上
- if (lastWeek[j].schedule_week == 5 && lastWeek[j].schedule_type == 3) {
- if(this.guanliu_show==false){
- list[i].wanshang18 = lastWeek[j].name
- }else{
- list[i].wanshang18 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].wanshang18 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
-
- //周六
- if (lastWeek[j].schedule_week == 6 && lastWeek[j].schedule_type == 1) {
- if(this.guanliu_show==false){
- list[i].shangwu19 = lastWeek[j].name
- }else{
- list[i].shangwu19 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].shangwu19 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周六下午
- if (lastWeek[j].schedule_week == 6 && lastWeek[j].schedule_type == 2) {
- if(this.guanliu_show==false){
- list[i].xiawu19 = lastWeek[j].name
- }else{
- list[i].xiawu19 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].xiawu19 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周六晚上
- if (lastWeek[j].schedule_week == 6 && lastWeek[j].schedule_type == 3) {
- if(this.guanliu_show==false){
- list[i].wanshang19 = lastWeek[j].name
- }else{
- list[i].wanshang19 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].wanshang19 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
-
- //周日
- if (lastWeek[j].schedule_week == 7 && lastWeek[j].schedule_type == 1) {
- if(this.guanliu_show==false){
- list[i].shangwu20 = lastWeek[j].name
- }else{
- list[i].shangwu20 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].shangwu20 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周日下午
- if (lastWeek[j].schedule_week == 7 && lastWeek[j].schedule_type == 2) {
- if(this.guanliu_show==false){
- list[i].xiawu20 = lastWeek[j].name
- }else{
- list[i].xiawu20 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].xiawu20 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- //周日晚上
- if (lastWeek[j].schedule_week == 7 && lastWeek[j].schedule_type == 3) {
- if(this.guanliu_show==false){
- list[i].wanshang20 = lastWeek[j].name
- }else{
- list[i].wanshang20 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- // list[i].wanshang20 = lastWeek[j].name+" "+lastWeek[j].dialysis_machine_name
- }
- }
-
- }
- }
- }
- this.tableList = list
- this.start_time = ""
- this.end_time = ""
- }
- })
- },
-
- changePartition(val) {
- this.partition_id = val
- // this.getThreeWeekList()
- // this.getWeekPanels()
- },
-
- changeSchedule(val) {
- console.log('3333',val);
- this.schedule_type = val
- this.getThreeWeekList()
- this.getWeekPanels()
- },
-
- changeWeekDay(val){
- console.log("Val2332322323wo",val)
- var str = val.join(",")
- console.log("stor233233223",str)
- this.week_date = str
- },
-
- changeScheduleType(val){
- this.schedule_type = val
- },
-
- changeWeek(val) {
- this.start_time = ""
- this.end_time = ""
- this.newDay = []
- var start = this.getTimestamp(val) - 57600
-
- this.start_time = this.getTime(start)
-
- this.newDay.push(this.start_time)
- var next = start + 86400
- var nest_day = this.getTime(next)
-
- this.newDay.push(nest_day)
- var last_days = start + 172800
-
- var last_day = this.getTime(last_days)
-
- this.newDay.push(last_day)
-
- var tuesdays = start + 259200
-
- var tuesday = this.getTime(tuesdays)
-
- this.newDay.push(tuesday)
- var fivdays = start + 345600
- var fiveday = this.getTime(fivdays)
-
- this.newDay.push(fiveday)
- var sixday = start + 432000
- var sixdays = this.getTime(sixday)
-
- this.newDay.push(sixdays)
- var end = this.getTimestamp(val) + 460800
-
- this.end_time = this.getTime(end)
-
- this.newDay.push(this.end_time)
- this.export_type = 1
- this.getThreeWeekList()
- },
-
- getTime(val) {
- return uParseTime(val, '{y}-{m}-{d}')
- },
- smartsch(){
- this.$nextTick(function() {
- this.$refs.edittableData.showSmartDialog()
- })
- },
- editsch() {
- this.is_edit = true
- this.schedulingTableVisible=true
- this.$nextTick(function() {//, this.days,this.zones
- this.$refs.edittableData.setEditData(this.patientList, this.$store.getters.treatment_mode, this.days,this.zones)
- })
- },
- outisedit(){
- this.is_edit=false
- this.beforeshow=false
- this.schedulingTableVisible=false
- },
- copySchedule() {
- this.newVisible = true
- },
-
- getYearWeek(year, month, date) {
- /*
- dateNow是当前日期
- dateFirst是当年第一天
- dataNumber是当前日期是今年第多少天
- 用dataNumber + 当前年的第一天的周差距的和在除以7就是本年第几周
- */
- let dateNow = new Date(year, parseInt(month) - 1, date);
- let dateFirst = new Date(year, 0, 1);
- let dataNumber = Math.round((dateNow.valueOf() - dateFirst.valueOf()) / 86400000);
- return Math.ceil((dataNumber + ((dateFirst.getDay() + 1) - 1)) / 7) - 1;
- },
- getTimestamp(time) { //把时间日期转成时间戳
- return (new Date(time)).getTime() / 1000
- },
-
- formatDate(date) {
- var year = date.getFullYear() + '.'
- var month = (date.getMonth() + 1) + '.';
- var day = date.getDate();
- return year + month + day
- },
- formatDateTwo(date) {
- var year = date.getFullYear() + '.'
- var month = (date.getMonth() + 1) + '.';
- var day = date.getDate();
- return year + month + day
- },
- addDate(date, n) {
- date.setDate(date.getDate() + n);
- return date;
- },
- //
- setDate(date) {
- var week = date.getDay() - 1;
- date = this.addDate(date, week * -1);
- this.currentFirstDate = new Date(date);
- this.currentDate = new Date(date)
- for (var i = 0; i < this.clen; i++) {
- this.weekDayArr.push(this.formatDate(i == 0 ? date : this.addDate(date, 1)))
- }
- },
- setDate1(date) {
- var week = date.getDay() - 1
- date = this.addDate(date, week * -1)
- this.currentDate = new Date(date)
- let arr1 = []
- for (var i = 0; i < this.clen; i++) {
- arr1.push(this.formatDate(i == 0 ? date : this.addDate(date, 1)))
- }
- this.weekList.push(arr1)
- let num = this.weekNum
- this.currentFirstDate1 = num + 1
- },
- getTimestamp(time) { //把时间日期转成时间戳
- return (new Date(time)).getTime() / 1000
- },
- submitAction(formName) {
- var start_time = ""
- var end_time = ""
- //上周
- if (this.form.lastweek == "1") {
- let weekOfday = parseInt(moment().format('d'))
- start_time = this.getTimestamp(moment().subtract(weekOfday + 6, 'days').format('YYYY-MM-DD')) - 28800
- end_time = this.getTimestamp(moment().subtract(weekOfday, 'days').format('YYYY-MM-DD')) - 28800
-
- }
-
- //本周
- if (this.form.lastweek == "2") {
- start_time = this.getTimestamp(this.weekDayArr[0])
- end_time = this.getTimestamp(this.weekDayArr[6])
-
- }
-
- var label = ""
- for (let i = 0; i < this.timeOptions.length; i++) {
- if (this.form.copyWeek == this.timeOptions[i].value) {
- label = this.timeOptions[i].label
- }
- }
- var start = label.split('~')
- var copy_startime = this.getTimestamp(start[0])
- var copy_endtime = this.getTimestamp(start[1])
-
- const params = {
- start_time: start_time,
- end_time: end_time,
- copy_startime: copy_startime,
- copy_endtime: copy_endtime,
- }
-
- this.$refs[formName].validate(valid => {
- if (valid) {
- if(!this.copySchLoading){
- this.copySchLoading = true
- copyPatientSchedule(params).then(response => {
- if (response.data.state == 1) {
- var msg = response.data.data.msg
- this.$message.success("复制成功")
- this.copySchLoading = false
- this.newVisible = false
- } else {
- this.copySchLoading = false
- this.$message.error("复制失败")
- }
- })
-
- }
-
- }
- })
- },
- getlist() {
- getScheduleTemplate().then(response => {
-
- if (response.data.state == 1) {
- var template = response.data.data.template
- console.log('12243254',response.data.data);
- this.templateObj = template
- }
- })
- },
- getPatientList(){
- patientLists().then(response => {
- if (response.data.state == 1) {
- var patientList = response.data.data.list
- this.patientList = patientList
- console.log("list")
- console.log( this.patientList)
- }
- })
-
- }
- },
- created() {
- this.getlist()
- this.getPatientList()
- var start_time = moment().weekday(1).format('YYYY-MM-DD');
-
- this.start_time = start_time
-
- var end_time = this.getNextWeek(2)
-
- this.end_time = end_time
- this.getWeekPanels()
- this.getInitDate()
-
- //获取三周排班数据
- this.getThreeWeekList()
-
- let year = new Date().getFullYear()
- let month = new Date().getMonth() + 1
- let date = new Date().getDate()
- this.weekNum = this.getYearWeek(year, month, date)
- this.todayDate = this.formatDate(new Date())
- this.setDate(new Date())
-
- for (var i = 0; i <= 9; i++) {
- this.setDate1(this.addDate(this.currentDate, 7))
- }
- let newNum = 0
- for (let i = 0; i < this.weekList.length; i++) {
- if (this.weekNum + i + 2 <= 53) {
- let num = this.weekNum + i + 2
- let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + num + ')'
- this.typeOptions.push({value: i, label: str})
- let stt = this.weekList[i][0] + "~" + this.weekList[i][6]
- this.timeOptions.push({value: i, label: stt})
- } else {
-
- newNum++
- let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + newNum + ')'
- this.typeOptions.push({value: i, label: str})
- let stt = this.weekList[i][0] + "~" + this.weekList[i][6]
- this.timeOptions.push({value: i, label: stt})
- }
-
- }
-
- },
- // updated(){
- // this.getThreeWeekList()
- // }
- }
- </script>
-
- <style rel="stylesheet/css" lang="scss">
- .schedule-table-cell-disable {
- background-color: #F5F5F5 !important;
- }
- </style>
-
|