Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

template_table.vue 153KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747
  1. <template>
  2. <div >
  3. <div id="tem_table_data" v-show="schedulingTableVisible">
  4. <slot></slot>
  5. <div class="table_contain temtable_contain">
  6. <div class="left_contain">
  7. <div
  8. class="cell clearfix"
  9. >
  10. <el-input
  11. size="small"
  12. style="width: 200px"
  13. class="filter-item"
  14. v-model.trim="keywords"
  15. placeholder="病人名称/透析号"
  16. @keyup.enter.native="search_two"
  17. />
  18. <el-button
  19. size="small"
  20. class="filter-item"
  21. type="primary"
  22. icon="el-icon-search"
  23. @click="search_two"
  24. >搜索</el-button
  25. >
  26. </div>
  27. <div style="margin-bottom: 10px; display: flex">
  28. <h3 style="line-height: 45px">
  29. <span
  30. style="margin-right: 15px; font-size: 16px; white-space: nowrap"
  31. >当前选择</span
  32. >
  33. </h3>
  34. <div
  35. style="line-height: 45px;
  36. background: rgb(64, 158, 255);
  37. color: white;
  38. "
  39. >
  40. <div
  41. draggable="true"
  42. @dragstart="curInfoDragStart"
  43. class="item_touz"
  44. style="font-weight: bolder"
  45. >
  46. <span>{{ cur_info.patient_name }}</span>
  47. &nbsp;&nbsp;
  48. <span>{{ cur_info.mode_name }}</span>
  49. </div>
  50. </div>
  51. </div>
  52. <div style="width: 225px">
  53. <el-row :gutter="10">
  54. <el-col :span="15">
  55. <div style="width: 225px; display: flex">
  56. <el-table
  57. :row-style="{ color: '#303133' }"
  58. :header-cell-style="{
  59. backgroundColor: 'rgb(245, 247, 250)',
  60. color: '#606266',
  61. }"
  62. :data="patients"
  63. height="620"
  64. border
  65. @row-click="patientClick"
  66. :row-class-name="patientclass"
  67. ref="patient_table"
  68. style="margin-right: 14px"
  69. >
  70. <el-table-column
  71. prop="name"
  72. label="患者名称"
  73. >
  74. </el-table-column>
  75. </el-table>
  76. <el-table
  77. :row-style="{ color: '#303133' }"
  78. :header-cell-style="{
  79. backgroundColor: 'rgb(245, 247, 250)',
  80. color: '#606266',
  81. }"
  82. :data="modes"
  83. height="620"
  84. ref="mode_table"
  85. @row-click="modeClick"
  86. :row-class-name="modeclass"
  87. border
  88. >
  89. <el-table-column
  90. prop="name"
  91. label="透析模式"
  92. align="center"
  93. ></el-table-column>
  94. </el-table>
  95. </div>
  96. </el-col>
  97. </el-row>
  98. </div>
  99. </div>
  100. <div class="right_contain">
  101. <el-table
  102. :fit="true"
  103. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  104. ref="table"
  105. :data="opera_device_numbers"
  106. :span-method="spanMethod"
  107. show-summary
  108. height="750"
  109. style="width: 100%; cursor: pointer"
  110. :cell-class-name="cellClass"
  111. :row-class-name="rowClass"
  112. :summary-method="getSummaries"
  113. @cell-click="itemClick"
  114. @cell-dblclick="itemdblclick"
  115. sum-text="总数"
  116. >
  117. <el-table-column
  118. label="分区"
  119. min-width="50"
  120. align="center"
  121. fixed
  122. >
  123. <template slot-scope="scope">
  124. {{ scope.row.zone.name }}
  125. </template>
  126. </el-table-column>
  127. <el-table-column label="机号" min-width="40" align="center" fixed style="text-align: center;" >
  128. <template slot-scope="scope">
  129. <div>{{ scope.row.number }}</div>
  130. </template>
  131. </el-table-column>
  132. <el-table-column label="周一" align="center" >
  133. <el-table-column prop="1_1" label="上" min-width="40" align="center" style="padding: 0px 0px !important;">
  134. <template slot-scope="scope">
  135. <div class="del_table_btn">
  136. <el-button
  137. type="danger"
  138. size="mini"
  139. icon="el-icon-close"
  140. circle
  141. @click.stop="
  142. deletePatientMode(scope.row['1_1'], '1_1', scope.row)"
  143. v-show="cur_drag_info.patient_id== 0 ? false : true"
  144. ></el-button>
  145. </div>
  146. <div
  147. @drop="
  148. drop($event, '1_1', scope.row.index, scope.row, scope.row)
  149. "
  150. @dragover="allowDrop"
  151. @dragover.prevent
  152. >
  153. <template-table-item
  154. :info="scope.row['1_1']"
  155. :draggable="true"
  156. @mouseover.native="
  157. drag(
  158. $event,
  159. '1_1',
  160. scope.row.index,
  161. scope.row['1_1'],
  162. scope.row
  163. )
  164. "
  165. ></template-table-item>
  166. </div>
  167. </template>
  168. </el-table-column>
  169. <el-table-column prop="1_2" label="下" min-width="40" align="center">
  170. <template slot-scope="scope">
  171. <div class="del_table_btn">
  172. <el-button
  173. type="danger"
  174. size="mini"
  175. icon="el-icon-close"
  176. circle
  177. @click.stop="
  178. deletePatientMode(scope.row['1_2'], '1_2', scope.row)
  179. "
  180. v-show="cur_drag_info.patient_id== 0 ? false : true"
  181. ></el-button>
  182. </div>
  183. <div
  184. @drop="
  185. drop($event, '1_2', scope.row.index, scope.row, scope.row)
  186. "
  187. @dragover="allowDrop"
  188. @dragover.prevent
  189. >
  190. <template-table-item
  191. :info="scope.row['1_2']"
  192. :draggable="true"
  193. @mouseover.native="
  194. drag(
  195. $event,
  196. '1_2',
  197. scope.row.index,
  198. scope.row['1_2'],
  199. scope.row
  200. )
  201. "
  202. ></template-table-item>
  203. </div>
  204. </template>
  205. </el-table-column>
  206. <el-table-column prop="1_3" label="晚" min-width="40" align="center">
  207. <template slot-scope="scope">
  208. <div class="del_table_btn">
  209. <el-button
  210. type="danger"
  211. size="mini"
  212. icon="el-icon-close"
  213. circle
  214. @click.stop="
  215. deletePatientMode(scope.row['1_3'], '1_3', scope.row)
  216. "
  217. v-show="cur_drag_info.patient_id== 0 ? false : true"
  218. ></el-button>
  219. </div>
  220. <div
  221. @drop="
  222. drop($event, '1_3', scope.row.index, scope.row, scope.row)
  223. "
  224. @dragover="allowDrop"
  225. @dragover.prevent
  226. >
  227. <template-table-item
  228. :info="scope.row['1_3']"
  229. :draggable="true"
  230. @mouseover.native="
  231. drag(
  232. $event,
  233. '1_3',
  234. scope.row.index,
  235. scope.row['1_3'],
  236. scope.row
  237. )
  238. "
  239. ></template-table-item>
  240. </div>
  241. </template>
  242. </el-table-column>
  243. </el-table-column>
  244. <el-table-column label="周二" align="center">
  245. <el-table-column prop="2_1" label="上" min-width="40" align="center">
  246. <template slot-scope="scope">
  247. <div class="del_table_btn">
  248. <el-button
  249. type="danger"
  250. size="mini"
  251. icon="el-icon-close"
  252. circle
  253. @click.stop="
  254. deletePatientMode(scope.row['2_1'], '2_1', scope.row)
  255. "
  256. v-show="cur_drag_info.patient_id== 0 ? false : true"
  257. ></el-button>
  258. </div>
  259. <div
  260. @drop="
  261. drop($event, '2_1', scope.row.index, scope.row, scope.row)
  262. "
  263. @dragover="allowDrop"
  264. @dragover.prevent
  265. >
  266. <template-table-item
  267. :info="scope.row['2_1']"
  268. :draggable="true"
  269. @mouseover.native="
  270. drag(
  271. $event,
  272. '2_1',
  273. scope.row.index,
  274. scope.row['2_1'],
  275. scope.row
  276. )
  277. "
  278. ></template-table-item>
  279. </div>
  280. </template>
  281. </el-table-column>
  282. <el-table-column prop="2_2" label="下" min-width="40" align="center">
  283. <template slot-scope="scope">
  284. <div class="del_table_btn">
  285. <el-button
  286. type="danger"
  287. size="mini"
  288. icon="el-icon-close"
  289. circle
  290. @click.stop="
  291. deletePatientMode(scope.row['2_2'], '2_2', scope.row)
  292. "
  293. v-show="cur_drag_info.patient_id== 0 ? false : true"
  294. ></el-button>
  295. </div>
  296. <div
  297. @drop="
  298. drop($event, '2_2', scope.row.index, scope.row, scope.row)
  299. "
  300. @dragover="allowDrop"
  301. @dragover.prevent
  302. >
  303. <template-table-item
  304. :info="scope.row['2_2']"
  305. :draggable="true"
  306. @mouseover.native="
  307. drag(
  308. $event,
  309. '2_2',
  310. scope.row.index,
  311. scope.row['2_2'],
  312. scope.row
  313. )
  314. "
  315. ></template-table-item>
  316. </div>
  317. </template>
  318. </el-table-column>
  319. <el-table-column prop="2_3" label="晚" min-width="40" align="center">
  320. <template slot-scope="scope">
  321. <div class="del_table_btn">
  322. <el-button
  323. type="danger"
  324. size="mini"
  325. icon="el-icon-close"
  326. circle
  327. @click.stop="
  328. deletePatientMode(scope.row['2_3'], '2_3', scope.row)
  329. "
  330. v-show="cur_drag_info.patient_id== 0 ? false : true"
  331. ></el-button>
  332. </div>
  333. <div
  334. @drop="
  335. drop($event, '2_3', scope.row.index, scope.row, scope.row)
  336. "
  337. @dragover="allowDrop"
  338. @dragover.prevent
  339. >
  340. <template-table-item
  341. :info="scope.row['2_3']"
  342. :draggable="true"
  343. @mouseover.native="
  344. drag(
  345. $event,
  346. '2_3',
  347. scope.row.index,
  348. scope.row['2_3'],
  349. scope.row
  350. )
  351. "
  352. ></template-table-item>
  353. </div>
  354. </template>
  355. </el-table-column>
  356. </el-table-column>
  357. <el-table-column label="周三" align="center">
  358. <el-table-column prop="3_1" label="上" min-width="40" align="center">
  359. <template slot-scope="scope">
  360. <div class="del_table_btn">
  361. <el-button
  362. type="danger"
  363. size="mini"
  364. icon="el-icon-close"
  365. circle
  366. @click.stop="
  367. deletePatientMode(scope.row['3_1'], '3_1', scope.row)
  368. "
  369. v-show="cur_drag_info.patient_id== 0 ? false : true"
  370. ></el-button>
  371. </div>
  372. <div
  373. @drop="
  374. drop($event, '3_1', scope.row.index, scope.row, scope.row)
  375. "
  376. @dragover="allowDrop"
  377. @dragover.prevent
  378. >
  379. <template-table-item
  380. :info="scope.row['3_1']"
  381. :draggable="true"
  382. @mouseover.native="
  383. drag(
  384. $event,
  385. '3_1',
  386. scope.row.index,
  387. scope.row['3_1'],
  388. scope.row
  389. )
  390. "
  391. ></template-table-item>
  392. </div>
  393. </template>
  394. </el-table-column>
  395. <el-table-column prop="3_2" label="下" min-width="40" align="center">
  396. <template slot-scope="scope">
  397. <div class="del_table_btn">
  398. <el-button
  399. type="danger"
  400. size="mini"
  401. icon="el-icon-close"
  402. circle
  403. @click.stop="
  404. deletePatientMode(scope.row['3_2'], '3_2', scope.row)
  405. "
  406. v-show="cur_drag_info.patient_id== 0 ? false : true"
  407. ></el-button>
  408. </div>
  409. <div
  410. @drop="
  411. drop($event, '3_2', scope.row.index, scope.row, scope.row)
  412. "
  413. @dragover="allowDrop"
  414. @dragover.prevent
  415. >
  416. <template-table-item
  417. :info="scope.row['3_2']"
  418. :draggable="true"
  419. @mouseover.native="
  420. drag(
  421. $event,
  422. '3_2',
  423. scope.row.index,
  424. scope.row['3_2'],
  425. scope.row
  426. )
  427. "
  428. ></template-table-item>
  429. </div>
  430. </template>
  431. </el-table-column>
  432. <el-table-column prop="3_3" label="晚" min-width="40" align="center">
  433. <template slot-scope="scope">
  434. <div class="del_table_btn">
  435. <el-button
  436. type="danger"
  437. size="mini"
  438. icon="el-icon-close"
  439. circle
  440. @click.stop="
  441. deletePatientMode(scope.row['3_3'], '3_3', scope.row)
  442. "
  443. v-show="cur_drag_info.patient_id== 0 ? false : true"
  444. ></el-button>
  445. </div>
  446. <div
  447. @drop="
  448. drop($event, '3_3', scope.row.index, scope.row, scope.row)
  449. "
  450. @dragover="allowDrop"
  451. @dragover.prevent
  452. >
  453. <template-table-item
  454. :info="scope.row['3_3']"
  455. :draggable="true"
  456. @mouseover.native="
  457. drag(
  458. $event,
  459. '3_3',
  460. scope.row.index,
  461. scope.row['3_3'],
  462. scope.row
  463. )
  464. "
  465. ></template-table-item>
  466. </div>
  467. </template>
  468. </el-table-column>
  469. </el-table-column>
  470. <el-table-column label="周四" align="center">
  471. <el-table-column prop="4_1" label="上" min-width="40" align="center">
  472. <template slot-scope="scope">
  473. <div class="del_table_btn">
  474. <el-button
  475. type="danger"
  476. size="mini"
  477. icon="el-icon-close"
  478. circle
  479. @click.stop="
  480. deletePatientMode(scope.row['4_1'], '4_1', scope.row)
  481. "
  482. v-show="cur_drag_info.patient_id== 0 ? false : true"
  483. ></el-button>
  484. </div>
  485. <div
  486. @drop="
  487. drop($event, '4_1', scope.row.index, scope.row, scope.row)
  488. "
  489. @dragover="allowDrop"
  490. @dragover.prevent
  491. >
  492. <template-table-item
  493. :info="scope.row['4_1']"
  494. :draggable="true"
  495. @mouseover.native="
  496. drag(
  497. $event,
  498. '4_1',
  499. scope.row.index,
  500. scope.row['4_1'],
  501. scope.row
  502. )
  503. "
  504. ></template-table-item>
  505. </div>
  506. </template>
  507. </el-table-column>
  508. <el-table-column prop="4_2" label="下" min-width="40" align="center">
  509. <template slot-scope="scope">
  510. <div class="del_table_btn">
  511. <el-button
  512. type="danger"
  513. size="mini"
  514. icon="el-icon-close"
  515. circle
  516. @click.stop="
  517. deletePatientMode(scope.row['4_2'], '4_2', scope.row)
  518. "
  519. v-show="cur_drag_info.patient_id== 0 ? false : true"
  520. ></el-button>
  521. </div>
  522. <div
  523. @drop="
  524. drop($event, '4_2', scope.row.index, scope.row, scope.row)
  525. "
  526. @dragover="allowDrop"
  527. @dragover.prevent
  528. >
  529. <template-table-item
  530. :info="scope.row['4_2']"
  531. :draggable="true"
  532. @mouseover.native="
  533. drag(
  534. $event,
  535. '4_2',
  536. scope.row.index,
  537. scope.row['4_2'],
  538. scope.row
  539. )
  540. "
  541. ></template-table-item>
  542. </div>
  543. </template>
  544. </el-table-column>
  545. <el-table-column prop="4_3" label="晚" min-width="40" align="center">
  546. <template slot-scope="scope">
  547. <div class="del_table_btn">
  548. <el-button
  549. type="danger"
  550. size="mini"
  551. icon="el-icon-close"
  552. circle
  553. @click.stop="
  554. deletePatientMode(scope.row['4_3'], '4_3', scope.row)
  555. "
  556. v-show="cur_drag_info.patient_id== 0 ? false : true"
  557. ></el-button>
  558. </div>
  559. <div
  560. @drop="
  561. drop($event, '4_3', scope.row.index, scope.row, scope.row)
  562. "
  563. @dragover="allowDrop"
  564. @dragover.prevent
  565. >
  566. <template-table-item
  567. :info="scope.row['4_3']"
  568. :draggable="true"
  569. @mouseover.native="
  570. drag(
  571. $event,
  572. '4_3',
  573. scope.row.index,
  574. scope.row['4_3'],
  575. scope.row
  576. )
  577. "
  578. ></template-table-item>
  579. </div>
  580. </template>
  581. </el-table-column>
  582. </el-table-column>
  583. <el-table-column label="周五" align="center">
  584. <el-table-column prop="5_1" label="上" min-width="40" align="center">
  585. <template slot-scope="scope">
  586. <div class="del_table_btn">
  587. <el-button
  588. type="danger"
  589. size="mini"
  590. icon="el-icon-close"
  591. circle
  592. @click.stop="
  593. deletePatientMode(scope.row['5_1'], '5_1', scope.row)
  594. "
  595. v-show="cur_drag_info.patient_id== 0 ? false : true"
  596. ></el-button>
  597. </div>
  598. <div
  599. @drop="
  600. drop($event, '5_1', scope.row.index, scope.row, scope.row)
  601. "
  602. @dragover="allowDrop"
  603. @dragover.prevent
  604. >
  605. <template-table-item
  606. :info="scope.row['5_1']"
  607. :draggable="true"
  608. @mouseover.native="
  609. drag(
  610. $event,
  611. '5_1',
  612. scope.row.index,
  613. scope.row['5_1'],
  614. scope.row
  615. )
  616. "
  617. ></template-table-item>
  618. </div>
  619. </template>
  620. </el-table-column>
  621. <el-table-column prop="5_2" label="下" min-width="40" align="center">
  622. <template slot-scope="scope">
  623. <div class="del_table_btn">
  624. <el-button
  625. type="danger"
  626. size="mini"
  627. icon="el-icon-close"
  628. circle
  629. @click.stop="
  630. deletePatientMode(scope.row['5_2'], '5_2', scope.row)
  631. "
  632. v-show="cur_drag_info.patient_id== 0 ? false : true"
  633. ></el-button>
  634. </div>
  635. <div
  636. @drop="
  637. drop($event, '5_2', scope.row.index, scope.row, scope.row)
  638. "
  639. @dragover="allowDrop"
  640. @dragover.prevent
  641. >
  642. <template-table-item
  643. :info="scope.row['5_2']"
  644. :draggable="true"
  645. @mouseover.native="
  646. drag(
  647. $event,
  648. '5_2',
  649. scope.row.index,
  650. scope.row['5_2'],
  651. scope.row
  652. )
  653. "
  654. ></template-table-item>
  655. </div>
  656. </template>
  657. </el-table-column>
  658. <el-table-column prop="5_3" label="晚" min-width="40" align="center">
  659. <template slot-scope="scope">
  660. <div class="del_table_btn">
  661. <el-button
  662. type="danger"
  663. size="mini"
  664. icon="el-icon-close"
  665. circle
  666. @click.stop="
  667. deletePatientMode(scope.row['5_3'], '5_3', scope.row)
  668. "
  669. v-show="cur_drag_info.patient_id== 0 ? false : true"
  670. ></el-button>
  671. </div>
  672. <div
  673. @drop="
  674. drop($event, '5_3', scope.row.index, scope.row, scope.row)
  675. "
  676. @dragover="allowDrop"
  677. @dragover.prevent
  678. >
  679. <template-table-item
  680. :info="scope.row['5_3']"
  681. :draggable="true"
  682. @mouseover.native="
  683. drag(
  684. $event,
  685. '5_3',
  686. scope.row.index,
  687. scope.row['5_3'],
  688. scope.row
  689. )
  690. "
  691. ></template-table-item>
  692. </div>
  693. </template>
  694. </el-table-column>
  695. </el-table-column>
  696. <el-table-column label="周六" align="center">
  697. <el-table-column prop="6_1" label="上" min-width="40" align="center">
  698. <template slot-scope="scope">
  699. <div class="del_table_btn">
  700. <el-button
  701. type="danger"
  702. size="mini"
  703. icon="el-icon-close"
  704. circle
  705. @click.stop="
  706. deletePatientMode(scope.row['6_1'], '6_1', scope.row)
  707. "
  708. v-show="cur_drag_info.patient_id== 0 ? false : true"
  709. ></el-button>
  710. </div>
  711. <div
  712. @drop="
  713. drop($event, '6_1', scope.row.index, scope.row, scope.row)
  714. "
  715. @dragover="allowDrop"
  716. @dragover.prevent
  717. >
  718. <template-table-item
  719. :info="scope.row['6_1']"
  720. :draggable="true"
  721. @mouseover.native="
  722. drag(
  723. $event,
  724. '6_1',
  725. scope.row.index,
  726. scope.row['6_1'],
  727. scope.row
  728. )
  729. "
  730. ></template-table-item>
  731. </div>
  732. </template>
  733. </el-table-column>
  734. <el-table-column prop="6_2" label="下" min-width="40" align="center">
  735. <template slot-scope="scope">
  736. <div class="del_table_btn">
  737. <el-button
  738. type="danger"
  739. size="mini"
  740. icon="el-icon-close"
  741. circle
  742. @click.stop="
  743. deletePatientMode(scope.row['6_2'], '6_2', scope.row)
  744. "
  745. v-show="cur_drag_info.patient_id== 0 ? false : true"
  746. ></el-button>
  747. </div>
  748. <div
  749. @drop="
  750. drop($event, '6_2', scope.row.index, scope.row, scope.row)
  751. "
  752. @dragover="allowDrop"
  753. @dragover.prevent
  754. >
  755. <template-table-item
  756. :info="scope.row['6_2']"
  757. :draggable="true"
  758. @mouseover.native="
  759. drag(
  760. $event,
  761. '6_2',
  762. scope.row.index,
  763. scope.row['6_2'],
  764. scope.row
  765. )
  766. "
  767. ></template-table-item>
  768. </div>
  769. </template>
  770. </el-table-column>
  771. <el-table-column prop="6_3" label="晚" min-width="40" align="center">
  772. <template slot-scope="scope">
  773. <div class="del_table_btn">
  774. <el-button
  775. type="danger"
  776. size="mini"
  777. icon="el-icon-close"
  778. circle
  779. @click.stop="
  780. deletePatientMode(scope.row['6_3'], '6_3', scope.row)
  781. "
  782. v-show="cur_drag_info.patient_id== 0 ? false : true"
  783. ></el-button>
  784. </div>
  785. <div
  786. @drop="
  787. drop($event, '6_3', scope.row.index, scope.row, scope.row)
  788. "
  789. @dragover="allowDrop"
  790. @dragover.prevent
  791. >
  792. <template-table-item
  793. :info="scope.row['6_3']"
  794. :draggable="true"
  795. @mouseover.native="
  796. drag(
  797. $event,
  798. '6_3',
  799. scope.row.index,
  800. scope.row['6_3'],
  801. scope.row
  802. )
  803. "
  804. ></template-table-item>
  805. </div>
  806. </template>
  807. </el-table-column>
  808. </el-table-column>
  809. <el-table-column label="周日" align="center">
  810. <el-table-column
  811. prop="7_1"
  812. label="上"
  813. min-width="40"
  814. align="center"
  815. >
  816. <template slot-scope="scope">
  817. <div class="del_table_btn">
  818. <el-button
  819. type="danger"
  820. size="mini"
  821. icon="el-icon-close"
  822. circle
  823. @click.stop="
  824. deletePatientMode(scope.row['7_1'], '7_1', scope.row) "
  825. v-show="cur_drag_info.patient_id== 0 ? false : true"
  826. ></el-button>
  827. </div>
  828. <div
  829. @drop="
  830. drop($event, '7_1', scope.row.index, scope.row, scope.row)
  831. "
  832. @dragover="allowDrop"
  833. @dragover.prevent
  834. >
  835. <template-table-item
  836. :info="scope.row['7_1']"
  837. :draggable="true"
  838. @mouseover.native="
  839. drag(
  840. $event,
  841. '7_1',
  842. scope.row.index,
  843. scope.row['7_1'],
  844. scope.row
  845. )
  846. "
  847. ></template-table-item>
  848. </div>
  849. </template>
  850. </el-table-column>
  851. <el-table-column
  852. prop="7_2"
  853. label="下"
  854. min-width="40"
  855. align="center"
  856. >
  857. <template slot-scope="scope">
  858. <div class="del_table_btn">
  859. <el-button
  860. type="danger"
  861. size="mini"
  862. icon="el-icon-close"
  863. circle
  864. @click.stop="
  865. deletePatientMode(scope.row['7_2'], '7_2', scope.row) "
  866. v-show="cur_drag_info.patient_id== 0 ? false : true"
  867. ></el-button>
  868. </div>
  869. <div
  870. @drop="
  871. drop($event, '7_2', scope.row.index, scope.row, scope.row)
  872. "
  873. @dragover="allowDrop"
  874. @dragover.prevent
  875. >
  876. <template-table-item
  877. :info="scope.row['7_2']"
  878. :draggable="true"
  879. @mouseover.native="
  880. drag(
  881. $event,
  882. '7_2',
  883. scope.row.index,
  884. scope.row['7_2'],
  885. scope.row
  886. )
  887. "
  888. ></template-table-item>
  889. </div>
  890. </template>
  891. </el-table-column>
  892. <el-table-column
  893. prop="7_3"
  894. label="晚"
  895. min-width="40"
  896. align="center"
  897. >
  898. <template slot-scope="scope">
  899. <div class="del_table_btn">
  900. <el-button
  901. type="danger"
  902. size="mini"
  903. icon="el-icon-close"
  904. circle
  905. @click.stop="
  906. deletePatientMode(scope.row['7_3'], '7_3', scope.row)"
  907. v-show="cur_drag_info.patient_id== 0 ? false : true"
  908. ></el-button>
  909. </div>
  910. <div
  911. @drop="
  912. drop($event, '7_3', scope.row.index, scope.row, scope.row)
  913. "
  914. @dragover="allowDrop"
  915. @dragover.prevent
  916. >
  917. <template-table-item
  918. :info="scope.row['7_3']"
  919. :draggable="true"
  920. @mouseover.native="
  921. drag(
  922. $event,
  923. '7_3',
  924. scope.row.index,
  925. scope.row['7_3'],
  926. scope.row
  927. )
  928. "
  929. ></template-table-item>
  930. </div>
  931. </template>
  932. </el-table-column>
  933. </el-table-column>
  934. </el-table>
  935. </div>
  936. </div>
  937. </div>
  938. <!-- 修改透析模式 -->
  939. <schedule-selector-dialog
  940. ref="selector_dialog"
  941. :patients="patients"
  942. @did_selected="will_add_schedule_action_three"
  943. @did_cancel="cancel_schedule_action"
  944. ></schedule-selector-dialog>
  945. <template-schedule-dialog
  946. ref="selector_dialog_two"
  947. :patients="patients"
  948. @did_selected="will_add_schedule_action_four"
  949. @did_cancel="cancel_schedule_action"
  950. >
  951. </template-schedule-dialog>
  952. <!-- 智能排班 -->
  953. <div class="dialog-wrapper">
  954. <el-dialog
  955. class="smartdialog"
  956. :close-on-click-modal="false"
  957. :close-on-press-escape="false"
  958. append-to-body
  959. width="48%"
  960. :visible.sync="smartVisible"
  961. >
  962. <!-- :style="{ background: '#409EFF', color: 'white' }" -->
  963. <div slot="title" class="header-title">
  964. <div style="padding: 15px 20px">
  965. {{
  966. `智能排班 (姓名:${
  967. this.cur_smart_patient_name ? this.cur_smart_patient_name : ""
  968. } 透析号:${
  969. this.cur_smart_patient_no ? this.cur_smart_patient_no : ""
  970. })`
  971. }}
  972. </div>
  973. </div>
  974. <el-autocomplete
  975. class="checkSearch"
  976. popper-class="my-autocomplete"
  977. v-model.trim="smart_keyword"
  978. :fetch-suggestions="querySearchAsync"
  979. placeholder="病人透析号/姓名"
  980. @select="handleSelect"
  981. >
  982. <i class="el-icon-search el-input__icon" slot="suffix"></i>
  983. <template slot-scope="{ item }">
  984. <div class="name">{{ item.name }}</div>
  985. </template>
  986. </el-autocomplete>
  987. <el-tabs
  988. v-model="editableTabsValue"
  989. type="card"
  990. @tab-click="handleClick"
  991. >
  992. <el-tab-pane
  993. :key="item.name"
  994. v-for="(item, index) in editableTabs"
  995. :label="item.title"
  996. :name="item.name"
  997. >
  998. <el-table
  999. border
  1000. v-loading="handledDataLoading"
  1001. :data="item.tableWeekArrage"
  1002. style="width: 100%"
  1003. >
  1004. <!-- 自定义表结构 -->
  1005. <el-table-column
  1006. label="星期"
  1007. prop="week"
  1008. align="center"
  1009. width="100"
  1010. >
  1011. </el-table-column>
  1012. <el-table-column align="left">
  1013. <template slot="header" slot-scope="scope">
  1014. <el-checkbox-group
  1015. v-model="item.checkedWeek"
  1016. @change="select_week"
  1017. >
  1018. <el-checkbox
  1019. v-for="(i, index) in weeks"
  1020. :label="i"
  1021. :key="index"
  1022. :value="i"
  1023. >
  1024. {{ i.name }}
  1025. </el-checkbox>
  1026. </el-checkbox-group>
  1027. </template>
  1028. <template slot-scope="scope">
  1029. <div>
  1030. <span>模式:</span>
  1031. <el-select
  1032. v-model="scope.row.treat_mode"
  1033. placeholder="请选择"
  1034. size="mini"
  1035. class="select_list_arrage"
  1036. >
  1037. <el-option
  1038. v-for="(item, index) in modes"
  1039. :key="index"
  1040. :label="item.name"
  1041. :value="item.id"
  1042. >
  1043. </el-option>
  1044. </el-select>
  1045. <span>班次:</span>
  1046. <el-select
  1047. v-model="scope.row.time_type"
  1048. placeholder="请选择"
  1049. @change="changeSch(scope.row)"
  1050. size="mini"
  1051. class="select_list_arrage"
  1052. >
  1053. <el-option
  1054. v-for="(item, index) in teem_sel"
  1055. :key="index"
  1056. :label="item.name"
  1057. :value="item.id"
  1058. >
  1059. </el-option>
  1060. </el-select>
  1061. <span>分区:</span>
  1062. <el-select
  1063. v-model="scope.row.zone_id"
  1064. placeholder="请选择"
  1065. @change="changeSch(scope.row)"
  1066. size="mini"
  1067. class="select_list_arrage"
  1068. >
  1069. <el-option
  1070. v-for="(item, index) in all_zones"
  1071. :key="index"
  1072. :label="item.name"
  1073. :value="item.id"
  1074. >
  1075. </el-option>
  1076. </el-select>
  1077. <span>机号:</span>
  1078. <el-select
  1079. v-model="scope.row.device_number_id"
  1080. placeholder="请选择"
  1081. size="mini"
  1082. @click.native="changeSchMachine(scope.row)"
  1083. class="select_list_arrage"
  1084. >
  1085. <el-option
  1086. v-for="(item, index) in scope.row.jihaos"
  1087. :key="index"
  1088. :label="item.number"
  1089. :value="item.id"
  1090. >
  1091. </el-option>
  1092. </el-select>
  1093. </div>
  1094. </template>
  1095. </el-table-column>
  1096. </el-table>
  1097. </el-tab-pane>
  1098. </el-tabs>
  1099. <span slot="footer" class="dialog-footer">
  1100. <el-button @click="smartVisible = false">取 消</el-button>
  1101. <el-button
  1102. type="primary"
  1103. v-loading="smartSaveLoading"
  1104. @click="batchSetSch"
  1105. >保 存</el-button
  1106. >
  1107. </span>
  1108. </el-dialog>
  1109. </div>
  1110. <!-- 替换/交换 -->
  1111. <el-dialog
  1112. title="提示"
  1113. :visible.sync="tipDialogVisible"
  1114. width="300px"
  1115. >
  1116. <div>
  1117. 所选位置已有排班,请选择操作
  1118. </div>
  1119. <span slot="footer" class="dialog-footer">
  1120. <el-button
  1121. type="danger"
  1122. @click="tipDialogVisibleTwo = true"
  1123. >替换</el-button>
  1124. <el-button
  1125. type="primary"
  1126. @click="tipDialogVisibleThree = true"
  1127. >交换</el-button>
  1128. <el-button @click="tipDialogVisible = false">取 消</el-button>
  1129. </span>
  1130. </el-dialog>
  1131. <!-- 替换弹窗 -->
  1132. <el-dialog
  1133. title="提示"
  1134. :visible.sync="tipDialogVisibleTwo"
  1135. width="300px"
  1136. >
  1137. <div>
  1138. 是否将此位置排班替换
  1139. </div>
  1140. <span slot="footer" class="dialog-footer">
  1141. <el-button
  1142. type="primary"
  1143. :loading="changeLoadingOne"
  1144. @click="coverSch()"
  1145. >确定</el-button>
  1146. <el-button @click="tipDialogVisibleTwo = false">取 消</el-button>
  1147. </span>
  1148. </el-dialog>
  1149. <!-- 互换弹窗 -->
  1150. <el-dialog
  1151. title="提示"
  1152. :visible.sync="tipDialogVisibleThree"
  1153. width="300px"
  1154. >
  1155. <div>
  1156. 是否将此位置排班互换
  1157. </div>
  1158. <span slot="footer" class="dialog-footer">
  1159. <el-button
  1160. type="primary"
  1161. :loading="changeLoadingTwo"
  1162. @click="changeSchTemplateTwo()"
  1163. >确定</el-button>
  1164. <el-button @click="tipDialogVisibleThree = false">取 消</el-button>
  1165. </span>
  1166. </el-dialog>
  1167. </div>
  1168. </template>
  1169. <script>
  1170. import {
  1171. cancelScheduleTemplate,
  1172. getPatientSmartSchTemplate,
  1173. getTemplateScheduleSearchResult,
  1174. updateSchedules,
  1175. updateEditSchedules,
  1176. getTemplateSmartDevices,
  1177. getSmartDevices,
  1178. CoverSchTemplate,
  1179. ExchangeSchTemplate,
  1180. DeleteAndAddScheduleTemplateTwo
  1181. } from "@/api/schedule_template/sch_template";
  1182. import TemplateTableItem from "./template_table_item";
  1183. import ScheduleSelectorDialog from "./template_schedule_selector_dialog";
  1184. import { PostSearchSmartSchTemplatePatient } from "../../../api/schedule_template/sch_template";
  1185. import TemplateScheduleDialog from './template_schedule_dialog'
  1186. const weekOptions = [
  1187. {
  1188. name: "周一",
  1189. week_type: 1,
  1190. is_edit: true,
  1191. },
  1192. {
  1193. name: "周二",
  1194. week_type: 2,
  1195. is_edit: true,
  1196. },
  1197. {
  1198. name: "周三",
  1199. week_type: 3,
  1200. is_edit: true,
  1201. },
  1202. {
  1203. name: "周四",
  1204. week_type: 4,
  1205. is_edit: true,
  1206. },
  1207. {
  1208. name: "周五",
  1209. week_type: 5,
  1210. is_edit: true,
  1211. },
  1212. {
  1213. name: "周六",
  1214. week_type: 6,
  1215. is_edit: true,
  1216. },
  1217. {
  1218. name: "周日",
  1219. week_type: 7,
  1220. is_edit: true,
  1221. },
  1222. ];
  1223. var rowspanNoControl = -1;
  1224. export default {
  1225. name: "TemplateTable",
  1226. components: {
  1227. TemplateScheduleDialog,
  1228. TemplateTableItem,
  1229. ScheduleSelectorDialog,
  1230. },
  1231. data() {
  1232. return {
  1233. schedulingTableVisible:true,//全屏
  1234. changeLoadingOne:false,
  1235. changeLoadingTwo:false,
  1236. tipDialogVisibleTwo:false,
  1237. tipDialogVisibleThree:false,
  1238. tipDialogVisible:false,
  1239. teem_sel: [
  1240. { name: "上午", id: 1 },
  1241. { name: "下午", id: 2 },
  1242. { name: "晚上", id: 3 },
  1243. ],
  1244. smartSaveLoading: false,
  1245. checkedWeek: [], //默认选中那些星期,如不需要可去掉
  1246. editableTabsValue: "",
  1247. handledDataLoading: false,
  1248. smartVisible: false,
  1249. current_patient_data:[],
  1250. isDel:false,
  1251. isEdit:false,
  1252. zones: [],
  1253. weeks: weekOptions,
  1254. patient_id_hover:0,
  1255. smart_keyword: "",
  1256. cur_smart_patient_id: 0,
  1257. cur_smart_patient_name: "",
  1258. cur_smart_patient_no: "",
  1259. all_zones: [],
  1260. devices: [],
  1261. current_all_sch: [],
  1262. editableTabs: [],
  1263. current_all_schtemplate: [],
  1264. cur_drag_obj:1, //當前拖拽對象,用來區分病人列表那的當前選擇和表格内的拖拽對象,1.病人列表,2.表格内的
  1265. // 拖拽数据
  1266. cur_drag_info: {
  1267. patient_name: "",
  1268. patient_id: "",
  1269. mode_name: "",
  1270. mode_id: "",
  1271. schedule_date:"",
  1272. schedule_type:"",
  1273. bed_id:"",
  1274. partition_id:"",
  1275. schedule_week:"",
  1276. type_name:"",
  1277. zone_name:"",
  1278. bed_name:"",
  1279. id:"",
  1280. },
  1281. // 左侧患者数据
  1282. cur_info: {
  1283. patient_name: "",
  1284. mode_name: "",
  1285. mode_id: "",
  1286. patient_id: "",
  1287. },
  1288. cur_temp_info:{
  1289. patient_name: "",
  1290. patient_id: "",
  1291. mode_name: "",
  1292. mode_id: "",
  1293. schedule_date:"",
  1294. schedule_type:"",
  1295. bed_id:"",
  1296. partition_id:"",
  1297. schedule_week:"",
  1298. type_name:"",
  1299. zone_name:"",
  1300. bed_name:"",
  1301. id:"",
  1302. },
  1303. all_patients:[],
  1304. patientList: [],
  1305. keywords: "",
  1306. schedulePatients: [],
  1307. searchTableVisible: false,
  1308. saving: false,
  1309. zone_device_counts: {},
  1310. treat_modes: {},
  1311. // is_editing: false,
  1312. opera_device_numbers: [],
  1313. origin_device_numbers: [],
  1314. opera_device_numbers_two: [],
  1315. partition_id: 0,
  1316. tableHeight: document.documentElement.clientHeight,
  1317. template:null,
  1318. all_template:[],
  1319. active_name:"first",
  1320. };
  1321. },
  1322. props: {
  1323. modes: {
  1324. type: Array,
  1325. },
  1326. template_mode: {
  1327. type: Object,
  1328. },
  1329. data: {
  1330. type: Array,
  1331. },
  1332. editable: {
  1333. type: Boolean,
  1334. default: false,
  1335. },
  1336. is_editing: {
  1337. type: Boolean,
  1338. default: false,
  1339. },
  1340. device_numbers: {
  1341. type: Array,
  1342. },
  1343. patients: {
  1344. type: Array,
  1345. },
  1346. },
  1347. created() {
  1348. this.treat_modes = this.$store.getters.treatment_mode;
  1349. // window.addEventListener('scroll', this.handleScroll)
  1350. },
  1351. watch: {
  1352. // device_numbers: function () {
  1353. // if(this.isEdit){
  1354. // this.opera_device_numbers = this.makeDeviceNumbers(this.device_numbers);
  1355. // this.origin_device_numbers = this.makeDeviceNumbers(this.device_numbers);
  1356. //
  1357. // }
  1358. //
  1359. //
  1360. // },
  1361. // "template.items": function () {
  1362. // if(this.isEdit) {
  1363. //
  1364. // this.$nextTick(() => {
  1365. // var weekdays = [1, 2, 3, 4, 5, 6, 7]; // 周一-周日
  1366. // var time_types = [1, 2, 3]; // 上下晚
  1367. // for (let d_n_i = 0; d_n_i < this.opera_device_numbers.length; d_n_i++) {
  1368. // const op_d_n = this.opera_device_numbers[d_n_i];
  1369. // const or_d_n = this.origin_device_numbers[d_n_i];
  1370. //
  1371. // op_d_n.total = 0;
  1372. // or_d_n.total = 0;
  1373. //
  1374. // for (let w_i = 0; w_i < weekdays.length; w_i++) {
  1375. // const weekday = weekdays[w_i];
  1376. // for (let t_i = 0; t_i < time_types.length; t_i++) {
  1377. // const time_type = time_types[t_i];
  1378. //
  1379. // var item_key = weekday + "_" + time_type;
  1380. // var op_item = op_d_n[item_key];
  1381. // var or_item = or_d_n[item_key];
  1382. //
  1383. // op_item.pid = 0;
  1384. // op_item.name = "";
  1385. // op_item.treat_mode_id = 0;
  1386. // op_item.treat_mode = "";
  1387. //
  1388. // or_item.pid = 0;
  1389. // or_item.name = "";
  1390. // or_item.treat_mode_id = 0;
  1391. // or_item.treat_mode = "";
  1392. // }
  1393. // }
  1394. // }
  1395. // console.log("this.template");
  1396. // console.log(this.template);
  1397. // for (let index = 0; index < this.template.items.length; index++) {
  1398. // const template_item = this.template.items[index];
  1399. // if (template_item.patient == null) {
  1400. // continue;
  1401. // }
  1402. //
  1403. // for (let d_i = 0; d_i < this.opera_device_numbers.length; d_i++) {
  1404. // const device_number = this.opera_device_numbers[d_i];
  1405. // if (device_number.id == template_item.device_number_id) {
  1406. // var weekday = template_item.weekday;
  1407. // var time_type = template_item.time_type;
  1408. // var cell_item = device_number[weekday + "_" + time_type];
  1409. // cell_item.pid = template_item.patient_id;
  1410. // cell_item.name = template_item.patient.name;
  1411. // cell_item.treat_mode_id = template_item.treat_mode;
  1412. // cell_item.treat_mode = template_item.treat_mode
  1413. // ? this.treat_modes[template_item.treat_mode].name
  1414. // : "";
  1415. // device_number.total += 1;
  1416. //
  1417. // // origin_device_numbers 初始化时数据应该是和 opera_device_numbers 一样的,这里就不再用一个 for 遍历 origin_device_numbers 重复 opera_device_numbers 的操作了
  1418. // const o_device_number = this.origin_device_numbers[d_i];
  1419. // var o_cell_item = o_device_number[weekday + "_" + time_type];
  1420. // o_cell_item.pid = template_item.patient_id;
  1421. // o_cell_item.name = template_item.patient.name;
  1422. // o_cell_item.treat_mode_id = template_item.treat_mode;
  1423. // o_cell_item.treat_mode = template_item.treat_mode
  1424. // ? this.treat_modes[template_item.treat_mode].name
  1425. // : "";
  1426. // o_device_number.total += 1;
  1427. //
  1428. // break;
  1429. // }
  1430. // }
  1431. // }
  1432. // let obj = {
  1433. // id: this.template.id,
  1434. // data: this.opera_device_numbers,
  1435. // data2: this.origin_device_numbers,
  1436. // };
  1437. // this.data.push(obj);
  1438. //
  1439. // });
  1440. // console.log("~~~~~~2222222");
  1441. // console.log(this.template);
  1442. // // 先清除所有已有 item
  1443. // }
  1444. //
  1445. // },
  1446. tableHeight(val) {
  1447. if (!this.timer) {
  1448. this.tableHeight = val;
  1449. this.timer = true;
  1450. const that = this;
  1451. setTimeout(function () {
  1452. that.timer = false;
  1453. }, 400);
  1454. }
  1455. },
  1456. },
  1457. mounted() {
  1458. this.tableContainHeight =
  1459. window.innerHeight - this.$refs.table.$el.offsetTop - 310;
  1460. const that = this;
  1461. window.onresize = () => {
  1462. return (() => {
  1463. window.fullHeight = document.documentElement.clientHeight;
  1464. if (window.fullHeight < 200) {
  1465. that.tableHeight = 200;
  1466. } else {
  1467. that.tableHeight = window.fullHeight - 200;
  1468. }
  1469. })();
  1470. };
  1471. this.$refs.patient_table.setCurrentRow(this.patients[0]);
  1472. this.$refs.mode_table.setCurrentRow(this.modes[0]);
  1473. },
  1474. methods: {
  1475. // 后两周
  1476. GetTemplateTwo(template){
  1477. this.$nextTick(() => {
  1478. var weekdays = [1, 2, 3, 4, 5, 6, 7]; // 周一-周日
  1479. var time_types = [1, 2, 3]; // 上下晚
  1480. for (let d_n_i = 0; d_n_i < this.opera_device_numbers_two.length; d_n_i++) {
  1481. const op_d_n = this.opera_device_numbers_two[d_n_i];
  1482. const or_d_n = this.origin_device_numbers[d_n_i];
  1483. op_d_n.total = 0;
  1484. or_d_n.total = 0;
  1485. for (let w_i = 0; w_i < weekdays.length; w_i++) {
  1486. const weekday = weekdays[w_i];
  1487. for (let t_i = 0; t_i < time_types.length; t_i++) {
  1488. const time_type = time_types[t_i];
  1489. var item_key = weekday + "_" + time_type;
  1490. var op_item = op_d_n[item_key];
  1491. var or_item = or_d_n[item_key];
  1492. op_item.pid = 0;
  1493. op_item.name = "";
  1494. op_item.treat_mode_id = 0;
  1495. op_item.treat_mode = "";
  1496. or_item.pid = 0;
  1497. or_item.name = "";
  1498. or_item.treat_mode_id = 0;
  1499. or_item.treat_mode = "";
  1500. }
  1501. }
  1502. }
  1503. for (let index = 0; index < template.items.length; index++) {
  1504. const template_item = template.items[index];
  1505. if (template_item.patient == null) {
  1506. continue;
  1507. }
  1508. for (let d_i = 0; d_i < this.opera_device_numbers_two.length; d_i++) {
  1509. const device_number = this.opera_device_numbers_two[d_i];
  1510. if (device_number.id == template_item.device_number_id) {
  1511. var weekday = template_item.weekday;
  1512. var time_type = template_item.time_type;
  1513. var cell_item = device_number[weekday + "_" + time_type];
  1514. cell_item.pid = template_item.patient_id;
  1515. cell_item.name = template_item.patient.name;
  1516. cell_item.treat_mode_id = template_item.treat_mode;
  1517. cell_item.treat_mode = template_item.treat_mode
  1518. ? this.treat_modes[template_item.treat_mode].name
  1519. : "";
  1520. device_number.total += 1;
  1521. // origin_device_numbers 初始化时数据应该是和 opera_device_numbers 一样的,这里就不再用一个 for 遍历 origin_device_numbers 重复 opera_device_numbers 的操作了
  1522. const o_device_number = this.origin_device_numbers[d_i];
  1523. var o_cell_item = o_device_number[weekday + "_" + time_type];
  1524. o_cell_item.pid = template_item.patient_id;
  1525. o_cell_item.name = template_item.patient.name;
  1526. o_cell_item.treat_mode_id = template_item.treat_mode;
  1527. o_cell_item.treat_mode = template_item.treat_mode
  1528. ? this.treat_modes[template_item.treat_mode].name
  1529. : "";
  1530. o_device_number.total += 1;
  1531. break;
  1532. }
  1533. }
  1534. }
  1535. })},
  1536. // 下一周
  1537. GetTemplate(template){
  1538. this.$nextTick(() => {
  1539. var weekdays = [1, 2, 3, 4, 5, 6, 7]; // 周一-周日
  1540. var time_types = [1, 2, 3]; // 上下晚
  1541. for (let d_n_i = 0; d_n_i < this.opera_device_numbers.length; d_n_i++) {
  1542. const op_d_n = this.opera_device_numbers[d_n_i];
  1543. const or_d_n = this.origin_device_numbers[d_n_i];
  1544. op_d_n.total = 0;
  1545. or_d_n.total = 0;
  1546. for (let w_i = 0; w_i < weekdays.length; w_i++) {
  1547. const weekday = weekdays[w_i];
  1548. for (let t_i = 0; t_i < time_types.length; t_i++) {
  1549. const time_type = time_types[t_i];
  1550. var item_key = weekday + "_" + time_type;
  1551. var op_item = op_d_n[item_key];
  1552. var or_item = or_d_n[item_key];
  1553. op_item.pid = 0;
  1554. op_item.name = "";
  1555. op_item.treat_mode_id = 0;
  1556. op_item.treat_mode = "";
  1557. or_item.pid = 0;
  1558. or_item.name = "";
  1559. or_item.treat_mode_id = 0;
  1560. or_item.treat_mode = "";
  1561. }
  1562. }
  1563. }
  1564. console.log("this.template");
  1565. console.log(template);
  1566. for (let index = 0; index < template.items.length; index++) {
  1567. const template_item = template.items[index];
  1568. if (template_item.patient == null) {
  1569. continue;
  1570. }
  1571. for (let d_i = 0; d_i < this.opera_device_numbers.length; d_i++) {
  1572. const device_number = this.opera_device_numbers[d_i];
  1573. if (device_number.id == template_item.device_number_id) {
  1574. var weekday = template_item.weekday;
  1575. var time_type = template_item.time_type;
  1576. var cell_item = device_number[weekday + "_" + time_type];
  1577. cell_item.pid = template_item.patient_id;
  1578. cell_item.name = template_item.patient.name;
  1579. cell_item.treat_mode_id = template_item.treat_mode;
  1580. cell_item.treat_mode = template_item.treat_mode
  1581. ? this.treat_modes[template_item.treat_mode].name
  1582. : "";
  1583. device_number.total += 1;
  1584. // origin_device_numbers 初始化时数据应该是和 opera_device_numbers 一样的,这里就不再用一个 for 遍历 origin_device_numbers 重复 opera_device_numbers 的操作了
  1585. const o_device_number = this.origin_device_numbers[d_i];
  1586. var o_cell_item = o_device_number[weekday + "_" + time_type];
  1587. o_cell_item.pid = template_item.patient_id;
  1588. o_cell_item.name = template_item.patient.name;
  1589. o_cell_item.treat_mode_id = template_item.treat_mode;
  1590. o_cell_item.treat_mode = template_item.treat_mode
  1591. ? this.treat_modes[template_item.treat_mode].name
  1592. : "";
  1593. o_device_number.total += 1;
  1594. break;
  1595. }
  1596. }
  1597. }
  1598. let obj = {
  1599. id: template.id,
  1600. data: this.opera_device_numbers,
  1601. data2: this.origin_device_numbers,
  1602. };
  1603. this.data.push(obj);
  1604. this.$emit("changeLoading")
  1605. })},
  1606. changePartiton(val) {
  1607. this.$emit("event1", val);
  1608. // this.partition_id = val;
  1609. // this.getWeekPanels();
  1610. // this.getSchedules();
  1611. },
  1612. // 这周
  1613. handleData() {
  1614. this.$nextTick(() => {
  1615. var weekdays = [1, 2, 3, 4, 5, 6, 7]; // 周一-周日
  1616. var time_types = [1, 2, 3]; // 上下晚
  1617. for (let d_n_i = 0; d_n_i < this.opera_device_numbers.length; d_n_i++) {
  1618. const op_d_n = this.opera_device_numbers[d_n_i];
  1619. const or_d_n = this.origin_device_numbers[d_n_i];
  1620. op_d_n.total = 0;
  1621. or_d_n.total = 0;
  1622. for (let w_i = 0; w_i < weekdays.length; w_i++) {
  1623. const weekday = weekdays[w_i];
  1624. for (let t_i = 0; t_i < time_types.length; t_i++) {
  1625. const time_type = time_types[t_i];
  1626. var item_key = weekday + "_" + time_type;
  1627. var op_item = op_d_n[item_key];
  1628. var or_item = or_d_n[item_key];
  1629. op_item.pid = 0;
  1630. op_item.name = "";
  1631. op_item.treat_mode_id = 0;
  1632. op_item.treat_mode = "";
  1633. or_item.pid = 0;
  1634. or_item.name = "";
  1635. or_item.treat_mode_id = 0;
  1636. or_item.treat_mode = "";
  1637. }
  1638. }
  1639. }
  1640. console.log("this.template");
  1641. console.log(this.template);
  1642. for (let index = 0; index < this.template.items.length; index++) {
  1643. const template_item = this.template.items[index];
  1644. if (template_item.patient == null) {
  1645. continue;
  1646. }
  1647. for (let d_i = 0; d_i < this.opera_device_numbers.length; d_i++) {
  1648. const device_number = this.opera_device_numbers[d_i];
  1649. if (device_number.id == template_item.device_number_id) {
  1650. var weekday = template_item.weekday;
  1651. var time_type = template_item.time_type;
  1652. var cell_item = device_number[weekday + "_" + time_type];
  1653. cell_item.pid = template_item.patient_id;
  1654. cell_item.name = template_item.patient.name;
  1655. cell_item.treat_mode_id = template_item.treat_mode;
  1656. cell_item.treat_mode = template_item.treat_mode
  1657. ? this.treat_modes[template_item.treat_mode].name
  1658. : "";
  1659. device_number.total += 1;
  1660. // origin_device_numbers 初始化时数据应该是和 opera_device_numbers 一样的,这里就不再用一个 for 遍历 origin_device_numbers 重复 opera_device_numbers 的操作了
  1661. const o_device_number = this.origin_device_numbers[d_i];
  1662. var o_cell_item = o_device_number[weekday + "_" + time_type];
  1663. o_cell_item.pid = template_item.patient_id;
  1664. o_cell_item.name = template_item.patient.name;
  1665. o_cell_item.treat_mode_id = template_item.treat_mode;
  1666. o_cell_item.treat_mode = template_item.treat_mode
  1667. ? this.treat_modes[template_item.treat_mode].name
  1668. : "";
  1669. o_device_number.total += 1;
  1670. break;
  1671. }
  1672. }
  1673. }
  1674. let obj = {
  1675. id: this.template.id,
  1676. data: this.opera_device_numbers,
  1677. data2: this.origin_device_numbers,
  1678. };
  1679. this.data.push(obj);
  1680. console.log(this.data);
  1681. });
  1682. },
  1683. // 便利周一到周日
  1684. getWeekByzhongwen(week_str) {
  1685. switch (week_str) {
  1686. case "周一":
  1687. return 1;
  1688. break;
  1689. case "周二":
  1690. return 2;
  1691. break;
  1692. case "周三":
  1693. return 3;
  1694. break;
  1695. case "周四":
  1696. return 4;
  1697. break;
  1698. case "周五":
  1699. return 5;
  1700. break;
  1701. case "周六":
  1702. return 6;
  1703. break;
  1704. case "周日":
  1705. return 7;
  1706. break;
  1707. }
  1708. },
  1709. // 拖拽
  1710. drop(e, day, index, name, row) {
  1711. e.preventDefault();
  1712. console.log('11111111',row)
  1713. for (var key in row) {
  1714. if (key == day) {
  1715. let info = {};
  1716. for (var key in row) {
  1717. if (key == day) {
  1718. info = row[key];
  1719. }
  1720. }
  1721. console.log(info)
  1722. var weekday_timetype = day.split("_");
  1723. var weekday = weekday_timetype[0];
  1724. var time_type = weekday_timetype[1];
  1725. this.cur_temp_info.schedule_week = weekday
  1726. this.cur_temp_info.schedule_type = time_type
  1727. this.cur_temp_info.patient_id = info.pid
  1728. this.cur_temp_info.id = row.id
  1729. if (info.pid > 0 || info.treat_mode_id > 0 ) {
  1730. if (this.cur_drag_obj == 2){
  1731. if(info.pid != this.cur_drag_info.patient_id){
  1732. console.log('1234132412',info.pid,this.cur_drag_info.patient_id);
  1733. this.tipDialogVisible = true
  1734. }
  1735. // this.tipDialogVisible = false
  1736. }else{
  1737. this.$message.error("当前机号已有排班2");
  1738. return;
  1739. }
  1740. } else {
  1741. //當前類型是表格内的拖拽,如果是同一天内的表格拖拽到空床位則先刪除原先排版,后在將排班弄到空床位
  1742. if(this.cur_drag_obj == 2){
  1743. if (this.cur_drag_info.schedule_week == weekday){
  1744. //删除原来的排班,新增一个新的排班
  1745. let params={
  1746. template_id:this.template.id,
  1747. week_type_one:this.cur_drag_info.schedule_week,
  1748. time_type_one:this.cur_drag_info.schedule_type,
  1749. device_id_one:this.cur_drag_info.id,
  1750. patient_id_one:this.cur_drag_info.patient_id,
  1751. week_type_two:this.cur_temp_info.schedule_week,
  1752. time_type_two:this.cur_temp_info.schedule_type,
  1753. device_id_two:this.cur_temp_info.id,
  1754. patient_id_two:this.cur_drag_info.patient_id,
  1755. mode_id:this.cur_drag_info.mode_id,
  1756. }
  1757. DeleteAndAddScheduleTemplateTwo(params).then((response) => {
  1758. if (response.data.state == 0) {
  1759. this.$message.error(response.data.msg);
  1760. this.tipDialogVisibleThree = false
  1761. } else {
  1762. this.all_template = response.data.data.items
  1763. this.$emit("setTemplate",response.data.data.items)
  1764. if(this.active_name == 'first'){
  1765. this.GetTemplate(response.data.data.items[0])
  1766. }else if(this.active_name == "second"){
  1767. this.GetTemplate(response.data.data.items[1])
  1768. }else if(this.active_name == "third"){
  1769. this.GetTemplate(response.data.data.items[2])
  1770. }else if(this.active_name == "four"){
  1771. this.GetTemplate(response.data.data.items[3])
  1772. }
  1773. }
  1774. });
  1775. }else{
  1776. this.will_add_schedule_action(
  1777. this.cur_drag_info.patient_id,
  1778. this.cur_drag_info.mode_id,
  1779. weekday,
  1780. time_type,
  1781. row.id,
  1782. 0
  1783. );
  1784. this.saveActionTwo();
  1785. }
  1786. }else{
  1787. this.will_add_schedule_action(
  1788. this.cur_info.patient_id,
  1789. this.cur_info.mode_id,
  1790. weekday,
  1791. time_type,
  1792. row.id,
  1793. 0
  1794. );
  1795. this.saveActionTwo();
  1796. }
  1797. }
  1798. }
  1799. }
  1800. },
  1801. unique_two(array) {
  1802. // res用来存储结果
  1803. var res = [];
  1804. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  1805. for (var j = 0, resLen = res.length; j < resLen; j++) {
  1806. if (array[i].id === res[j].id) {
  1807. break;
  1808. }
  1809. }
  1810. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  1811. if (j === resLen) {
  1812. res.push(array[i]);
  1813. }
  1814. }
  1815. return res;
  1816. },
  1817. showSmartDialog() {
  1818. this.smartVisible = true;
  1819. this.smart_keyword = "";
  1820. this.all_zones = this.unique_two(this.all_zones);
  1821. //
  1822. // for (let i = 0; i < this.patientList.length; i++) {
  1823. // if (this.patientList[i].id == this.cur_info.patient_id) {
  1824. // this.cur_smart_patient_name = this.patientList[i].name;
  1825. // this.cur_smart_patient_no = this.patientList[i].dialysis_no;
  1826. // this.cur_smart_patient_id = this.patientList[i].id;
  1827. // }
  1828. // }
  1829. //
  1830. // let params = {
  1831. // patient_id: this.cur_smart_patient_id,
  1832. // };
  1833. //
  1834. // getPatientSmartSchTemplate(params).then((response) => {
  1835. // if (response.data.state == 0) {
  1836. // return false;
  1837. // }
  1838. //
  1839. // if ((response.data.data.status = 1)) {
  1840. // var data = [];
  1841. // var schedules = response.data.data.schedules_template;
  1842. // for (let i = 0; i < this.editableTabs.length; i++) {
  1843. // this.editableTabs[i].checkedWeek = [];
  1844. // this.editableTabs[i].tableWeekArrage = [];
  1845. // }
  1846. // for (let i = 0; i < schedules.length; i++) {
  1847. // if (i == 0) {
  1848. // this.editableTabsValue = schedules[0].id;
  1849. // }
  1850. // let obj = {
  1851. // id: schedules[i].id,
  1852. // checkedWeek: [],
  1853. // title: schedules[i].week,
  1854. // name: schedules[i].id,
  1855. // tableWeekArrage: schedules[i].template,
  1856. // };
  1857. // if (i == 0) {
  1858. // obj.title = "一周模版";
  1859. // } else if (i == 1) {
  1860. // obj.title = "二周模版";
  1861. // } else if (i == 2) {
  1862. // obj.title = "三周模版";
  1863. // } else if (i == 3) {
  1864. // obj.title = "四周模版";
  1865. // }
  1866. // for (let b = 0; b < schedules[i].template.length; b++) {
  1867. // let devices = [];
  1868. // for (let d = 0; d < this.devices.length; d++) {
  1869. // if (
  1870. // this.devices[d].zone.id == schedules[i].template[b].zone_id
  1871. // ) {
  1872. // devices.push(this.devices[d]);
  1873. // }
  1874. // }
  1875. // schedules[i].template[b]["jihaos"] = devices;
  1876. // schedules[i].template[b]["week"] = this.getWeekDay(
  1877. // schedules[i].template[b].weekday
  1878. // );
  1879. // schedules[i].template[b]["week_type"] = this.getWeekByzhongwen(
  1880. // schedules[i].template[b].weekday
  1881. // );
  1882. //
  1883. // for (let c = 0; c < this.weeks.length; c++) {
  1884. // if (
  1885. // schedules[i].template[b].weekday == this.weeks[c].week_type
  1886. // ) {
  1887. // obj.checkedWeek.push(this.weeks[c]);
  1888. // }
  1889. // }
  1890. // }
  1891. // schedules[i].template.sort(function (a, b) {
  1892. // return a.week_type - b.week_type;
  1893. // });
  1894. // data.push(obj);
  1895. // }
  1896. //
  1897. // this.editableTabs = data;
  1898. // this.current_patient_data = this.deepClone(data);
  1899. // this.current_all_schtemplate = data
  1900. // } else {
  1901. // }
  1902. // });
  1903. //
  1904. this.smartVisible = true;
  1905. },
  1906. SetSmartSch(tempData,del_data) {
  1907. this.saveActionThree(tempData,del_data);
  1908. },
  1909. check(tempData) {
  1910. let isJiXu = true;
  1911. //进行校验
  1912. for (let i = 0; i < tempData.length; i++) {
  1913. for (let index = 0; index < this.opera_device_numbers_two.length; index++) {
  1914. const device_number = this.opera_device_numbers_two[index];
  1915. for (let t_y = 1; t_y <= 3; t_y++) {
  1916. if (
  1917. t_y == tempData[i].time_type &&
  1918. tempData[i].jihao_id == device_number.id &&
  1919. device_number[tempData[i].schedule_week + "_" + t_y].pid !=
  1920. tempData[i].patient_id
  1921. ) {
  1922. console.log( device_number[tempData[i].schedule_week + "_" + t_y].pid)
  1923. console.log(tempData[i].patient_id)
  1924. console.log( tempData[i].jihao_id)
  1925. console.log( device_number.id)
  1926. let msg = "";
  1927. let name = "";
  1928. for(let i = 0; i < this.editableTabs.length;i++){
  1929. if(this.editableTabs[i].name == tempData[i].t_id){
  1930. name = this.editableTabs[i].title
  1931. }
  1932. }
  1933. msg = name + "周" + tempData[i].schedule_week;
  1934. if (tempData[i].time_type == 1) {
  1935. msg = msg + "上午";
  1936. } else if (tempData[i].time_type == 2) {
  1937. msg = msg + "下午";
  1938. } else {
  1939. msg = msg + "晚上";
  1940. }
  1941. isJiXu = false;
  1942. this.smartSaveLoading = false;
  1943. msg =
  1944. msg +
  1945. device_number.zone.name +
  1946. device_number.number +
  1947. "已有排班";
  1948. this.$message.error(msg);
  1949. }
  1950. }
  1951. }
  1952. }
  1953. return isJiXu;
  1954. },
  1955. batchSetSch() {
  1956. this.smartSaveLoading = true;
  1957. var tempData = [];
  1958. var delData = [];
  1959. for (let b = 0; b < this.editableTabs.length; b++) {
  1960. for (let c = 0; c < this.editableTabs[b].tableWeekArrage.length; c++) {
  1961. let obj = {
  1962. time_type: this.editableTabs[b].tableWeekArrage[c].time_type,
  1963. jihao_id: this.editableTabs[b].tableWeekArrage[c].device_number_id,
  1964. schedule_week: this.getWeekByzhongwen(
  1965. this.editableTabs[b].tableWeekArrage[c].week
  1966. ),
  1967. mode_id: this.editableTabs[b].tableWeekArrage[c].treat_mode,
  1968. sch_id: this.editableTabs[b].tableWeekArrage[c].id,
  1969. zone_id: this.editableTabs[b].tableWeekArrage[c].zone_id,
  1970. t_id: this.editableTabs[b].name,
  1971. title:this.editableTabs[b].title,
  1972. patient_id: this.cur_smart_patient_id,
  1973. };
  1974. tempData.push(obj);
  1975. }
  1976. }
  1977. for (let b = 0; b < this.current_patient_data.length; b++) {
  1978. for (let c = 0; c < this.current_patient_data[b].tableWeekArrage.length; c++) {
  1979. let obj = {
  1980. time_type: this.current_patient_data[b].tableWeekArrage[c].time_type,
  1981. jihao_id: this.current_patient_data[b].tableWeekArrage[c].device_number_id,
  1982. schedule_week: this.getWeekByzhongwen(
  1983. this.current_patient_data[b].tableWeekArrage[c].week
  1984. ),
  1985. mode_id: this.current_patient_data[b].tableWeekArrage[c].treat_mode,
  1986. sch_id: this.current_patient_data[b].tableWeekArrage[c].id,
  1987. zone_id: this.current_patient_data[b].tableWeekArrage[c].zone_id,
  1988. t_id: this.current_patient_data[b].name,
  1989. title:this.current_patient_data[b].title,
  1990. patient_id: this.cur_smart_patient_id,
  1991. };
  1992. delData.push(obj);
  1993. }
  1994. }
  1995. if(tempData.length > 0) {
  1996. for (let i = 0; i < delData.length; i++) {
  1997. for (let b = 0; b < tempData.length; b++) {
  1998. if (delData[i] && delData[i].sch_id == tempData[b].sch_id) {
  1999. delData.splice(i, 1)
  2000. }
  2001. }
  2002. }
  2003. }
  2004. for (let i = 0; i < tempData.length; i++) {
  2005. if (tempData[i].jihao_id == "" || tempData[i].zone_id == "") {
  2006. this.$message.error("分区或者床位不能空");
  2007. this.smartSaveLoading = false;
  2008. return;
  2009. }
  2010. }
  2011. this.isEdit = true
  2012. console.log("saveData")
  2013. console.log(tempData)
  2014. this.$emit("saveData", tempData,delData);
  2015. },
  2016. changeJihao(){
  2017. this.$forceUpdate()
  2018. },
  2019. changeSchMachine(row) {
  2020. let params = {
  2021. zone_id: row.zone_id,
  2022. sch_type: row.time_type,
  2023. weekday: this.getWeekByzhongwen(row.week),
  2024. patient_id: this.cur_smart_patient_id,
  2025. template_id:this.editableTabsValue,
  2026. };
  2027. //进行网络请求,获取空排班机位
  2028. getTemplateSmartDevices(params).then((response) => {
  2029. if (response.data.state == 0) {
  2030. return false;
  2031. } else {
  2032. var devices = response.data.data.devices;
  2033. row.jihaos = [];
  2034. // row.jihaos = devices;
  2035. for (let i = 0; i < devices.length; i++){
  2036. this.$set(row.jihaos , i, devices[i])
  2037. }
  2038. }
  2039. });
  2040. },
  2041. changeSch(row) {
  2042. console.log(row)
  2043. let params = {
  2044. zone_id: row.zone_id,
  2045. sch_type: row.time_type,
  2046. weekday: this.getWeekByzhongwen(row.week),
  2047. patient_id: this.cur_smart_patient_id,
  2048. template_id:this.editableTabsValue,
  2049. };
  2050. //进行网络请求,获取空排班机位
  2051. getTemplateSmartDevices(params).then((response) => {
  2052. if (response.data.state == 0) {
  2053. return false;
  2054. } else {
  2055. var devices = response.data.data.devices;
  2056. row.jihaos = [];
  2057. // row.jihaos = devices;
  2058. for (let i = 0; i < devices.length; i++){
  2059. this.$set(row.jihaos , i, devices[i])
  2060. }
  2061. row.device_number_id = "";
  2062. }
  2063. });
  2064. },
  2065. changeArea(row) {
  2066. let params = {
  2067. zone_id: row.zone_id,
  2068. sch_type: row.time_type,
  2069. weekday: this.getWeekByzhongwen(row.week),
  2070. patient_id: this.cur_smart_patient_id,
  2071. template_id:this.editableTabsValue,
  2072. };
  2073. //进行网络请求,获取空排班机位
  2074. getTemplateSmartDevices(params).then((response) => {
  2075. if (response.data.state == 0) {
  2076. return false;
  2077. } else {
  2078. var devices = response.data.data.devices;
  2079. row.jihaos = [];
  2080. row.jihaos = devices;
  2081. row.device_number_id = "";
  2082. }
  2083. });
  2084. },
  2085. // changeJihao(row) {
  2086. // // let devices = [];
  2087. // // devices = this.opera_device_numbers_two;
  2088. // // let cur_key =
  2089. // // this.getWeekByzhongwen(row.week).toString() +
  2090. // // "_" +
  2091. // // row.time_type.toString();
  2092. // // row.jihaos = [];
  2093. // // for (let i = 0; i < devices.length; i++) {
  2094. // // if (devices[i].zone_id == row.zone_id) {
  2095. // // let is_sch = false; //是否有排班
  2096. // // for (let key in devices[i]) {
  2097. // // if (key == cur_key) {
  2098. // // if (
  2099. // // devices[i][key].pid > 0 &&
  2100. // // devices[i][key].treat_mode_id > 0 &&
  2101. // // devices[i][key].pid != this.cur_smart_patient_id
  2102. // // ) {
  2103. // // is_sch = true;
  2104. // // }
  2105. // // }
  2106. // // }
  2107. // // if (!is_sch) {
  2108. // // row.jihaos.push(devices[i]);
  2109. // // }
  2110. // // }
  2111. // // }
  2112. // // row.device_number_id = ""
  2113. // // let params = {
  2114. // // zone_id: row.zone_id,
  2115. // // sch_type: row.time_type,
  2116. // // weekday: row.weekday,
  2117. // // patient_id: this.cur_smart_patient_id,
  2118. // // };
  2119. // // //进行网络请求,获取空排班机位
  2120. // // getTemplateSmartDevices(params).then((response) => {
  2121. // // if (response.data.state == 0) {
  2122. // // return false;
  2123. // // } else {
  2124. // // var devices = response.data.data.devices;
  2125. // // row.ihaos = [];
  2126. // // row.jihaos = devices;
  2127. // // if (devices && devices.length > 0) {
  2128. // // row.jihao_id = devices[0].id;
  2129. // // } else {
  2130. // // row.jihao_id = "";
  2131. // // }
  2132. // // }
  2133. // // });
  2134. // },
  2135. select_week(val) {
  2136. this.handledDataLoading = true;
  2137. let params = {
  2138. patient_id: this.cur_smart_patient_id,
  2139. };
  2140. getPatientSmartSchTemplate(params).then((response) => {
  2141. if (response.data.state == 0) {
  2142. return false;
  2143. }
  2144. if(response.data.data.status = 1) {
  2145. this.handledDataLoading = false;
  2146. var data = [];
  2147. var schedules = response.data.data.schedules_template;
  2148. for (let i = 0; i < schedules.length; i++) {
  2149. let obj = {
  2150. id: schedules[i].id,
  2151. checkedWeek: [],
  2152. title: schedules[i].week,
  2153. name: schedules[i].id,
  2154. tableWeekArrage: schedules[i].template,
  2155. };
  2156. if (i == 0) {
  2157. obj.title = "一周模版";
  2158. } else if (i == 1) {
  2159. obj.title = "二周模版";
  2160. } else if (i == 2) {
  2161. obj.title = "三周模版";
  2162. } else if (i == 3) {
  2163. obj.title = "四周模版";
  2164. }
  2165. for (let b = 0; b < schedules[i].template.length; b++) {
  2166. let devices = [];
  2167. for (let d = 0; d < this.devices.length; d++) {
  2168. if (
  2169. this.devices[d].zone.id == schedules[i].template[b].zone_id
  2170. ) {
  2171. devices.push(this.devices[d]);
  2172. }
  2173. }
  2174. schedules[i].template[b]["jihaos"] = devices;
  2175. schedules[i].template[b]["week"] = this.getWeekDay(
  2176. schedules[i].template[b].weekday
  2177. );
  2178. schedules[i].template[b]["week_type"] = this.getWeekByzhongwen(
  2179. schedules[i].template[b].weekday
  2180. );
  2181. for (let c = 0; c < this.weeks.length; c++) {
  2182. if (
  2183. schedules[i].template[b].weekday == this.weeks[c].week_type
  2184. ) {
  2185. obj.checkedWeek.push(this.weeks[c]);
  2186. }
  2187. }
  2188. }
  2189. schedules[i].template.sort(function (a, b) {
  2190. return a.week_type - b.week_type;
  2191. });
  2192. data.push(obj);
  2193. }
  2194. this.current_all_schtemplate = this.editableTabs
  2195. var sch = [];
  2196. for (let i = 0; i < this.current_all_schtemplate.length; i++) {
  2197. if (this.current_all_schtemplate[i].name == this.editableTabsValue) {
  2198. sch = this.current_all_schtemplate[i];
  2199. }
  2200. }
  2201. let data2 = [];
  2202. if (val.length == 0) {
  2203. for (let i = 0; i < this.editableTabs.length; i++) {
  2204. if (this.editableTabsValue == this.editableTabs[i].name) {
  2205. this.editableTabs[i].tableWeekArrage = [];
  2206. this.editableTabs[i].checkedWeek = [];
  2207. }
  2208. }
  2209. }
  2210. for (let i = 0; i < val.length; i++) {
  2211. let is_new = true;
  2212. let week_name = val[i].name;
  2213. let obj = {};
  2214. for (let b = 0; b < sch.tableWeekArrage.length; b++) {
  2215. if (week_name == sch.tableWeekArrage[b].week) {
  2216. is_new = false;
  2217. obj = sch.tableWeekArrage[b];
  2218. }
  2219. }
  2220. if (!is_new) {
  2221. data2.push(obj);
  2222. } else {
  2223. data2.push({
  2224. treat_mode: 1,
  2225. week: val[i].name,
  2226. time_type: 1,
  2227. zone_id: "",
  2228. device_number_id: "",
  2229. jihaos: [],
  2230. id: 0,
  2231. });
  2232. }
  2233. }
  2234. for (let i = 0; i < data2.length; i++) {
  2235. data2[i]["week_type"] = this.getWeekByzhongwen(data2[i].week);
  2236. }
  2237. data2.sort(function (a, b) {
  2238. return a.week_type - b.week_type;
  2239. });
  2240. for (let i = 0; i < this.editableTabs.length; i++) {
  2241. if (this.editableTabs[i].name == this.editableTabsValue) {
  2242. this.editableTabs[i].tableWeekArrage = data2;
  2243. }
  2244. }
  2245. } else {
  2246. }
  2247. });
  2248. },
  2249. handleClick() {
  2250. if(this.editableTabsValue == this.all_template[0].id){
  2251. this.GetTemplateTwo(this.all_template[0])
  2252. }else if(this.editableTabsValue == this.all_template[1].id){
  2253. this.GetTemplateTwo(this.all_template[1])
  2254. }else if(this.editableTabsValue == this.all_template[2].id){
  2255. this.GetTemplateTwo(this.all_template[2])
  2256. }else if(this.editableTabsValue == this.all_template[3].id){
  2257. this.GetTemplateTwo(this.all_template[3])
  2258. }
  2259. },
  2260. deepClone(source) {
  2261. if (!source && typeof source !== 'object') {
  2262. throw new Error('error arguments', 'shallowClone')
  2263. }
  2264. const targetObj = source.constructor === Array ? [] : {}
  2265. Object.keys(source).forEach((keys) => {
  2266. if (source[keys] && typeof source[keys] === 'object') {
  2267. targetObj[keys] = this.deepClone(source[keys])
  2268. } else {
  2269. targetObj[keys] = source[keys]
  2270. }
  2271. })
  2272. return targetObj
  2273. },
  2274. handleSelect(val) {
  2275. for (let i = 0; i < this.editableTabs.length; i++) {
  2276. this.editableTabs[i].tableWeekArrage = [];
  2277. this.editableTabs[i].checkedWeek = [];
  2278. }
  2279. this.smart_keyword = val.name;
  2280. this.cur_smart_patient_id = val.id;
  2281. this.cur_smart_patient_name = val.name;
  2282. this.cur_smart_patient_no = val.dialysis_no;
  2283. let params = {
  2284. patient_id: this.cur_smart_patient_id,
  2285. };
  2286. getPatientSmartSchTemplate(params).then((response) => {
  2287. if (response.data.state == 0) {
  2288. return false;
  2289. }
  2290. if ((response.data.data.status = 1)) {
  2291. var data = [];
  2292. var schedules = response.data.data.schedules_template;
  2293. for (let i = 0; i < this.editableTabs.length; i++) {
  2294. this.editableTabs[i].checkedWeek = [];
  2295. this.editableTabs[i].tableWeekArrage = [];
  2296. }
  2297. for (let i = 0; i < schedules.length; i++) {
  2298. if (i == 0) {
  2299. this.editableTabsValue = schedules[0].id;
  2300. }
  2301. let obj = {
  2302. id: schedules[i].id,
  2303. checkedWeek: [],
  2304. title: schedules[i].week,
  2305. name: schedules[i].id,
  2306. tableWeekArrage: schedules[i].template,
  2307. };
  2308. if (i == 0) {
  2309. obj.title = "一周模版";
  2310. } else if (i == 1) {
  2311. obj.title = "二周模版";
  2312. } else if (i == 2) {
  2313. obj.title = "三周模版";
  2314. } else if (i == 3) {
  2315. obj.title = "四周模版";
  2316. }
  2317. for (let b = 0; b < schedules[i].template.length; b++) {
  2318. let devices = [];
  2319. for (let d = 0; d < this.devices.length; d++) {
  2320. if (
  2321. this.devices[d].zone.id == schedules[i].template[b].zone_id
  2322. ) {
  2323. devices.push(this.devices[d]);
  2324. }
  2325. }
  2326. schedules[i].template[b]["jihaos"] = devices;
  2327. schedules[i].template[b]["week"] = this.getWeekDay(
  2328. schedules[i].template[b].weekday
  2329. );
  2330. schedules[i].template[b]["week_type"] = this.getWeekByzhongwen(
  2331. schedules[i].template[b].weekday
  2332. );
  2333. for (let c = 0; c < this.weeks.length; c++) {
  2334. if (
  2335. schedules[i].template[b].weekday == this.weeks[c].week_type
  2336. ) {
  2337. obj.checkedWeek.push(this.weeks[c]);
  2338. }
  2339. }
  2340. }
  2341. schedules[i].template.sort(function (a, b) {
  2342. return a.week_type - b.week_type;
  2343. });
  2344. data.push(obj);
  2345. }
  2346. this.editableTabs = data;
  2347. this.current_patient_data = this.deepClone(data);
  2348. this.current_all_schtemplate = data
  2349. } else {
  2350. }
  2351. });
  2352. // var schedules = val.XtPatientScheduleTemplateId;
  2353. // var data = [];
  2354. // for (let i = 0; i < schedules.length; i++) {
  2355. // if (i == 0) {
  2356. // this.editableTabsValue = schedules[0].id;
  2357. // }
  2358. // let obj = {
  2359. // id: schedules[i].id,
  2360. // checkedWeek: [],
  2361. // title: schedules[i].week,
  2362. // name: schedules[i].id,
  2363. // tableWeekArrage: schedules[i].template,
  2364. // };
  2365. //
  2366. // if (i == 0) {
  2367. // obj.title = "一周模版";
  2368. // } else if (i == 1) {
  2369. // obj.title = "二周模版";
  2370. // } else if (i == 2) {
  2371. // obj.title = "三周模版";
  2372. // } else if (i == 3) {
  2373. // obj.title = "四周模版";
  2374. // }
  2375. // for (let b = 0; b < schedules[i].template.length; b++) {
  2376. // let devices = [];
  2377. // for (let d = 0; d < this.devices.length; d++) {
  2378. // if (this.devices[d].zone.id == schedules[i].template[b].zone_id) {
  2379. // devices.push(this.devices[d]);
  2380. // }
  2381. // }
  2382. //
  2383. // schedules[i].template[b]["jihaos"] = devices;
  2384. // schedules[i].template[b]["week"] = this.getWeekDay(
  2385. // schedules[i].template[b].weekday
  2386. // );
  2387. // schedules[i].template[b]["week_type"] = this.getWeekByzhongwen(
  2388. // schedules[i].template[b].weekday
  2389. // );
  2390. //
  2391. // for (let c = 0; c < this.weeks.length; c++) {
  2392. // if (schedules[i].template[b].weekday == this.weeks[c].week_type) {
  2393. // obj.checkedWeek.push(this.weeks[c]);
  2394. // }
  2395. // }
  2396. // }
  2397. // data.push(obj);
  2398. // }
  2399. // this.editableTabs = data;
  2400. // // this.current_patient_data = data;
  2401. // this.current_patient_data = data
  2402. // this.current_all_sch =data;
  2403. // this.current_patient_data = data
  2404. },
  2405. querySearchAsync(keyword, cb) {
  2406. let key = "";
  2407. if (keyword != undefined) {
  2408. key = keyword;
  2409. }
  2410. let searchArray = [];
  2411. let obj = {
  2412. keyword: key,
  2413. };
  2414. PostSearchSmartSchTemplatePatient(obj).then((response) => {
  2415. if (response.data.state == 1) {
  2416. searchArray = response.data.data.patient;
  2417. cb(searchArray);
  2418. } else {
  2419. cb([]);
  2420. }
  2421. });
  2422. },
  2423. getData() {
  2424. return this.opera_device_numbers;
  2425. },
  2426. // 左侧模式点击
  2427. modeClick(row) {
  2428. this.cur_info.mode_name = row.name;
  2429. this.cur_info.mode_id = row.id;
  2430. },
  2431. deletePatientMode(row, key, rows) {
  2432. this.isEdit= true
  2433. var weekday_timetype = key.split("_");
  2434. var weekday = weekday_timetype[0];
  2435. var time_type = weekday_timetype[1];
  2436. this.cancel_schedule_action(weekday, time_type, rows.id);
  2437. this.saveActionTwo();
  2438. },
  2439. setEditData(patients, template, device_numbers,all_template,active_name) {
  2440. this.active_name = active_name
  2441. this.all_template = all_template
  2442. this.all_patients = patients
  2443. this.patientList = patients;
  2444. this.template = template;
  2445. this.device_numbers = device_numbers
  2446. this.cur_info.patient_name = this.patientList[0].name;
  2447. this.cur_info.mode_name = this.modes[0].name;
  2448. this.cur_info.patient_id = this.patientList[0].id;
  2449. this.cur_info.mode_id = this.modes[0].id;
  2450. this.$refs.patient_table.setCurrentRow(this.patientList[0]);
  2451. this.$refs.mode_table.setCurrentRow(this.modes[0]);
  2452. let that = this
  2453. if(that.opera_device_numbers.length == 0 &&that.origin_device_numbers.length == 0){
  2454. that.opera_device_numbers = that.makeDeviceNumbers(device_numbers);
  2455. that.origin_device_numbers = that.makeDeviceNumbers(device_numbers);
  2456. that.opera_device_numbers_two = that.makeDeviceNumbers(device_numbers);
  2457. }
  2458. setTimeout(function (){
  2459. that.GetTemplate(template)
  2460. that.GetTemplateTwo(template)
  2461. }, 1000);
  2462. },
  2463. // 左侧拖拽
  2464. curInfoDragStart(){
  2465. this.cur_drag_obj = 1
  2466. this.cur_drag_info.patient_id = this.cur_info.patient_id
  2467. this.cur_drag_info.patient_name = this.cur_info.patient_name
  2468. this.cur_drag_info.mode_id = this.cur_info.mode_id
  2469. this.cur_drag_info.mode_name = this.cur_info.mode_name
  2470. },
  2471. // 左侧患者点击
  2472. patientClick(row) {
  2473. console.log(row);
  2474. this.cur_info.patient_name = row.name;
  2475. this.cur_info.patient_id = row.id;
  2476. this.patient_id_hover = row.id
  2477. console.log('this.patient_id_hover',this.patient_id_hover);
  2478. console.log('patientClick的数据',row);
  2479. },
  2480. dragstartTwo(event) {
  2481. console.log("start的索引");
  2482. },
  2483. dragendTwo(event) {
  2484. console.log("dragend");
  2485. },
  2486. // 鼠标移入
  2487. drag(e, day, index, name,row) {
  2488. e.preventDefault();
  2489. let info = {};
  2490. for (var key in row) {
  2491. if (key == day) {
  2492. info = row[key];
  2493. }
  2494. }
  2495. var weekday_timetype = day.split("_");
  2496. var weekday = weekday_timetype[0];
  2497. var time_type = weekday_timetype[1];
  2498. console.log(info)
  2499. console.log(row)
  2500. if(info.pid > 0 ) {
  2501. this.cur_drag_obj = 2
  2502. this.cur_drag_info.schedule_type =time_type;
  2503. this.cur_drag_info.partition_id = row.zone_id;
  2504. this.cur_drag_info.schedule_week = weekday;
  2505. this.cur_drag_info.mode_id = info.treat_mode_id;
  2506. this.cur_drag_info.mode_name = info.treat_mode;
  2507. this.cur_drag_info.patient_name = info.name;
  2508. this.cur_drag_info.patient_id = info.pid;
  2509. this.cur_drag_info.id = row.id;
  2510. }else{
  2511. this.cur_drag_obj = 2
  2512. this.cur_drag_info.schedule_type ='';
  2513. this.cur_drag_info.partition_id = '';
  2514. this.cur_drag_info.schedule_week = '';
  2515. this.cur_drag_info.mode_id = '';
  2516. this.cur_drag_info.mode_name = '';
  2517. this.cur_drag_info.patient_name = '';
  2518. this.cur_drag_info.patient_id = 0;
  2519. this.cur_drag_info.id = 0;
  2520. }
  2521. console.log('this.cur_drag_info的数据',this.cur_drag_info);
  2522. },
  2523. allowDrop(e) {
  2524. e.preventDefault();
  2525. },
  2526. // ----------------------------------
  2527. // | !在html里面的chedule-item里绑定的|
  2528. // | ":draggable"可控制该表格能否拖 |
  2529. // | 动,根据实际情况进行修改 |
  2530. // | |
  2531. // -----------------------------------
  2532. // drop(e, day, index, name,row) {
  2533. // e.preventDefault();
  2534. // for(var key in row){
  2535. // if(key == day){
  2536. // var week = this.weekDay(day);
  2537. //
  2538. //
  2539. // this.currentData.schedule_date = this.weekDays[week[0] - 1];
  2540. // this.currentData.schedule_type = week[1];
  2541. // this.currentData.bed_id = row.jihao_id;
  2542. // this.currentData.partition_id = row.zone_id;
  2543. // this.currentData.schedule_week = week[0];
  2544. // this.currentData.type_name = this.dayType(week[1]);
  2545. // this.currentData.zone_name = row.area;
  2546. // this.currentData.bed_name = row.cut;
  2547. // this.currentData.partition_type = row.zone_type;
  2548. //
  2549. // // if(this.currentData.schedule_date)
  2550. // //TODO 比较当前拖动到的日期和当天比较,如果小于今天则无法添加
  2551. //
  2552. // if( row[key].patient.length > 0 || row[key].mode_name.length > 0 || row[key].mode_id > 0 || row[key].patient_id > 0){
  2553. // this.$message.error("当前机号已有排班");
  2554. // return
  2555. // }else{ //接口提交排班数据
  2556. //
  2557. //
  2558. //
  2559. // this.currentData.mode_id = this.cur_info.mode_id;
  2560. // this.currentData.id = 0;
  2561. // this.currentData.contagions = [];
  2562. // this.currentData.patient_id = this.cur_info.patient_id;
  2563. // this.currentData.patient = this.cur_info.patient_name;
  2564. // this.setSchedule()
  2565. // }
  2566. // }
  2567. // }
  2568. //
  2569. // },
  2570. // 左边栏选中名字和模式拖动结束后
  2571. taskDraggerEnd(e) {
  2572. console.log(e.to);
  2573. console.log(e.form);
  2574. },
  2575. //move回调方法
  2576. onMove(e, originalEvent) {
  2577. return true;
  2578. },
  2579. compare(p) {
  2580. //这是比较函数
  2581. return function (m, n) {
  2582. var a = m[p];
  2583. var b = n[p];
  2584. return a - b; //升序
  2585. };
  2586. },
  2587. // 周一到周日
  2588. getWeekDay: function (week) {
  2589. let week_name = "";
  2590. switch (week) {
  2591. case 1:
  2592. week_name = "周一";
  2593. break;
  2594. case 2:
  2595. week_name = "周二";
  2596. break;
  2597. case 3:
  2598. week_name = "周三";
  2599. break;
  2600. case 4:
  2601. week_name = "周四";
  2602. break;
  2603. case 5:
  2604. week_name = "周五";
  2605. break;
  2606. case 6:
  2607. week_name = "周六";
  2608. break;
  2609. case 7:
  2610. week_name = "周日";
  2611. break;
  2612. }
  2613. return week_name;
  2614. },
  2615. // 早中晚
  2616. getSchedulesType: function (type) {
  2617. let type_name = "";
  2618. switch (type) {
  2619. case 1:
  2620. type_name = "上午";
  2621. break;
  2622. case 2:
  2623. type_name = "下午";
  2624. break;
  2625. case 3:
  2626. type_name = "晚上";
  2627. break;
  2628. }
  2629. return type_name;
  2630. },
  2631. getModeName: function (mode) {
  2632. if (this.$store.getters.treatment_mode[mode] != undefined) {
  2633. return this.$store.getters.treatment_mode[mode].name;
  2634. }
  2635. return "";
  2636. },
  2637. makeDeviceNumbers: function (device_numbers) {
  2638. this.all_zones = [];
  2639. this.devices = [];
  2640. console.log("device_numbers", device_numbers);
  2641. var arr = [];
  2642. for (let i = 0; i < device_numbers.length; i++) {
  2643. arr.push(device_numbers[i]);
  2644. }
  2645. arr.sort(this.arraySort("sort"));
  2646. console.log("Arr2332232332", arr);
  2647. var maked_device_numbers = [];
  2648. var weekdays = [1, 2, 3, 4, 5, 6, 7]; // 周一-周日
  2649. var time_types = [1, 2, 3]; // 上下晚
  2650. for (let index = 0; index < arr.length; index++) {
  2651. const device_number = arr[index];
  2652. if (device_number.zone != null) {
  2653. var zone = {
  2654. id: device_number.zone.id,
  2655. name: device_number.zone.name,
  2656. type: device_number.zone.type,
  2657. sort: device_number.sort,
  2658. };
  2659. this.all_zones.push(zone);
  2660. var device = {
  2661. id: device_number.id,
  2662. number: device_number.number,
  2663. group_id: device_number.group_id,
  2664. zone_id: device_number.zone_id,
  2665. zone: zone,
  2666. sort: device_number.sort,
  2667. };
  2668. this.devices.push(device);
  2669. }
  2670. // 以 weekday_timetype 为 key,{pid: 0, name: "", treat_mode_id: 0, treat_mode: ""} 为 value,加入到 maked_device_numbers 中
  2671. for (let w_i = 0; w_i < weekdays.length; w_i++) {
  2672. const weekday = weekdays[w_i];
  2673. for (let t_i = 0; t_i < time_types.length; t_i++) {
  2674. const time_type = time_types[t_i];
  2675. var defaultValue = {};
  2676. this.$set(defaultValue, "pid", 0);
  2677. this.$set(defaultValue, "name", "");
  2678. this.$set(defaultValue, "treat_mode_id", 0);
  2679. this.$set(defaultValue, "treat_mode", "");
  2680. this.$set(device, weekday + "_" + time_type, defaultValue);
  2681. }
  2682. }
  2683. this.$set(device, "total", 0); // 每个床位号每周的排班总数
  2684. maked_device_numbers.push(device);
  2685. }
  2686. this.all_zones = this.unique_two(this.all_zones);
  2687. return maked_device_numbers;
  2688. },
  2689. // 替换
  2690. coverSch(){
  2691. let params={
  2692. template_id:this.template.id,
  2693. week_type_one:this.cur_drag_info.schedule_week,
  2694. time_type_one:this.cur_drag_info.schedule_type,
  2695. device_id_one:this.cur_drag_info.id,
  2696. patient_id_one:this.cur_drag_info.patient_id,
  2697. week_type_two:this.cur_temp_info.schedule_week,
  2698. time_type_two:this.cur_temp_info.schedule_type,
  2699. device_id_two:this.cur_temp_info.id,
  2700. patient_id_two:this.cur_temp_info.patient_id,
  2701. }
  2702. this.changeLoadingOne = true
  2703. CoverSchTemplate(params).then((response) => {
  2704. if (response.data.state == 0) {
  2705. this.$message.error(response.data.msg);
  2706. this.tipDialogVisibleTwo = false
  2707. this.changeLoadingOne = false
  2708. } else {
  2709. this.$message.success("替换成功");
  2710. this.tipDialogVisible = false
  2711. this.tipDialogVisibleTwo = false
  2712. this.changeLoadingOne = false
  2713. // this.getSchedules();
  2714. this.all_template = response.data.data.items
  2715. console.log('替换数据',response.data.data);
  2716. this.$emit("setTemplate",response.data.data.items)
  2717. if(this.active_name == 'first'){
  2718. this.GetTemplate(response.data.data.items[0])
  2719. }else if(this.active_name == "second"){
  2720. this.GetTemplate(response.data.data.items[1])
  2721. }else if(this.active_name == "third"){
  2722. this.GetTemplate(response.data.data.items[2])
  2723. }else if(this.active_name == "four"){
  2724. this.GetTemplate(response.data.data.items[3])
  2725. }
  2726. }
  2727. });
  2728. },
  2729. // 交换
  2730. changeSchTemplateTwo(){
  2731. let params={
  2732. template_id:this.template.id,
  2733. week_type_one:this.cur_drag_info.schedule_week,
  2734. time_type_one:this.cur_drag_info.schedule_type,
  2735. device_id_one:this.cur_drag_info.id,
  2736. patient_id_one:this.cur_drag_info.patient_id,
  2737. week_type_two:this.cur_temp_info.schedule_week,
  2738. time_type_two:this.cur_temp_info.schedule_type,
  2739. device_id_two:this.cur_temp_info.id,
  2740. patient_id_two:this.cur_temp_info.patient_id,
  2741. }
  2742. this.changeLoadingTwo = true
  2743. ExchangeSchTemplate(params).then((response) => {
  2744. if (response.data.state == 0) {
  2745. this.$message.error(response.data.msg);
  2746. this.tipDialogVisibleThree = false
  2747. this.changeLoadingTwo = false
  2748. } else {
  2749. this.$message.success("交换成功");
  2750. this.tipDialogVisible = false
  2751. this.tipDialogVisibleThree = false
  2752. this.changeLoadingTwo = false
  2753. // this.getSchedules();
  2754. this.all_template = response.data.data.items
  2755. this.$emit("setTemplate",response.data.data.items)
  2756. if(this.active_name == 'first'){
  2757. this.GetTemplate(response.data.data.items[0])
  2758. }else if(this.active_name == "second"){
  2759. this.GetTemplate(response.data.data.items[1])
  2760. }else if(this.active_name == "third"){
  2761. this.GetTemplate(response.data.data.items[2])
  2762. }else if(this.active_name == "four"){
  2763. this.GetTemplate(response.data.data.items[3])
  2764. }
  2765. }
  2766. });
  2767. },
  2768. // 合并行或列的计算方法
  2769. spanMethod({ row, column, rowIndex, columnIndex }) {
  2770. if (columnIndex == 0) {
  2771. if (rowIndex == 0) {
  2772. rowspanNoControl = -1;
  2773. }
  2774. var spanRowCount = this.zone_device_counts[row.zone_id];
  2775. var isFirstRowInGroup = false;
  2776. if (spanRowCount == undefined) {
  2777. var count = 0;
  2778. for (
  2779. let index = 0;
  2780. index < this.opera_device_numbers.length;
  2781. index++
  2782. ) {
  2783. const number = this.opera_device_numbers[index];
  2784. if (number.zone_id == row.zone_id) {
  2785. count++;
  2786. }
  2787. }
  2788. this.zone_device_counts[row.zone_id] = count;
  2789. spanRowCount = count + 0;
  2790. isFirstRowInGroup = true;
  2791. } else {
  2792. isFirstRowInGroup = rowIndex == rowspanNoControl + 1;
  2793. if (rowspanNoControl + spanRowCount == rowIndex) {
  2794. rowspanNoControl = rowIndex;
  2795. }
  2796. }
  2797. if (isFirstRowInGroup) {
  2798. return {
  2799. rowspan: spanRowCount,
  2800. colspan: 1,
  2801. };
  2802. } else
  2803. {
  2804. return {
  2805. rowspan: 0,
  2806. colspan: 0,
  2807. };
  2808. }
  2809. }
  2810. },
  2811. search_two: function () {
  2812. if (this.keywords.length == 0) {
  2813. this.patients = this.all_patients;
  2814. } else {
  2815. this.patients = [];
  2816. for (let i = 0; i < this.all_patients.length; i++) {
  2817. if (
  2818. this.all_patients[i].name.indexOf(this.keywords) != -1 ||
  2819. this.all_patients[i].dialysis_no.indexOf(this.keywords) != -1
  2820. ) {
  2821. this.patients.push(this.all_patients[i]);
  2822. }
  2823. }
  2824. if (this.patients.length > 0) {
  2825. this.cur_info.patient_name = this.patients[0].name;
  2826. this.cur_info.mode_name = this.modes[0].name;
  2827. this.cur_info.patient_id = this.patients[0].id;
  2828. this.cur_info.mode_id = this.modes[0].id;
  2829. this.$refs.patient_table.setCurrentRow(this.patients[0]);
  2830. this.$refs.mode_table.setCurrentRow(this.modes[0]);
  2831. }
  2832. }
  2833. },
  2834. search: function () {
  2835. const params = {
  2836. keywords: this.keywords,
  2837. template_id: this.template.id,
  2838. };
  2839. getTemplateScheduleSearchResult(params).then((response) => {
  2840. if (response.data.state == 1) {
  2841. this.schedulePatients = response.data.data.schdules;
  2842. console.log(this.schedulePatients);
  2843. this.searchTableVisible = true;
  2844. }
  2845. });
  2846. },
  2847. //单击
  2848. itemClick: function (row, column, cell, event) {
  2849. console.log('itemClick的数据',row[column.property]);
  2850. if(row[column.property].pid >0 ){
  2851. this.cur_info.patient_id=row[column.property].pid
  2852. this.cur_info.mode_id=row[column.property].treat_mode_id
  2853. this.patient_id_hover = this.cur_info.patient_id;
  2854. this.cur_info.patient_name = row[column.property].name
  2855. this.cur_info.mode_name = row[column.property].treat_mode
  2856. console.log('this.patient_id_hover的数据',this.patient_id_hover);
  2857. }else{
  2858. var item = row[column.property]
  2859. var weekday_timetype = column.property.split('_')
  2860. var weekday = weekday_timetype[0]
  2861. var time_type = weekday_timetype[1]
  2862. var device_number_id = row.id
  2863. if (item.pid == 0) {
  2864. this.$refs.selector_dialog_two.show(weekday, time_type, device_number_id,this.patients)
  2865. } else {
  2866. this.$refs.selector_dialog_two.showWith(item.pid, item.treat_mode_id, weekday, time_type, device_number_id,this.patients)
  2867. }
  2868. }
  2869. },
  2870. // 双击
  2871. itemdblclick (row, column, cell, event){
  2872. if (
  2873. column.property == undefined ||
  2874. /^[1-7]_[1-3]$/.test(column.property) == false
  2875. ) {
  2876. return;
  2877. }
  2878. if (row[column.property] == undefined) {
  2879. return;
  2880. }
  2881. var item = row[column.property];
  2882. var weekday_timetype = column.property.split("_");
  2883. var weekday = weekday_timetype[0];
  2884. var time_type = weekday_timetype[1];
  2885. var device_number_id = row.id;
  2886. if (item.pid != 0) {
  2887. // this.$refs.selector_dialog.show(weekday, time_type, device_number_id)
  2888. this.$refs.selector_dialog.showWith(
  2889. item.pid,
  2890. item.treat_mode_id,
  2891. weekday,
  2892. time_type,
  2893. device_number_id
  2894. );
  2895. }
  2896. },
  2897. will_add_schedule_actionTwo: function (
  2898. patient_id,
  2899. treat_mode,
  2900. weekday,
  2901. time_type,
  2902. device_number_id,
  2903. t_id
  2904. ) {
  2905. var patient = null;
  2906. console.log(patient_id);
  2907. for (let index = 0; index < this.patientList.length; index++) {
  2908. const p = this.patientList[index];
  2909. console.log(p);
  2910. if (p.id == patient_id) {
  2911. console.log(patient_id);
  2912. console.log(p);
  2913. patient = p;
  2914. break;
  2915. }
  2916. }
  2917. console.log(patient);
  2918. if (patient == null) {
  2919. this.smartSaveLoading = false;
  2920. this.$message.error("患者不存在");
  2921. return;
  2922. }
  2923. for (let index = 0; index < this.opera_device_numbers.length; index++) {
  2924. const device_number = this.opera_device_numbers[index];
  2925. for (let t_y = 1; t_y <= 3; t_y++) {
  2926. if (device_number[weekday + "_" + t_y].pid == patient_id) {
  2927. // this.$message.error('一天不能存在多个排班')
  2928. // return
  2929. console.log("~~~~~~");
  2930. this.cancel_schedule_action(weekday, t_y, device_number.id);
  2931. }
  2932. }
  2933. }
  2934. for (let index = 0; index < this.opera_device_numbers.length; index++) {
  2935. const device_number = this.opera_device_numbers[index];
  2936. if (device_number.id == device_number_id) {
  2937. var isDiseaseSame = false;
  2938. var havePatientDisease = patient.contagions.length > 0;
  2939. if (patient.contagions.length > 0 || device_number.zone.type != 1) {
  2940. if (device_number.zone.type != 1) {
  2941. for (let c_i = 0; c_i < patient.contagions.length; c_i++) {
  2942. const contagion = patient.contagions[c_i];
  2943. if (contagion.disease_id == device_number.zone.type) {
  2944. isDiseaseSame = true;
  2945. }
  2946. }
  2947. }
  2948. } else {
  2949. isDiseaseSame = true;
  2950. }
  2951. // if (isDiseaseSame == false) {
  2952. // // 此患者没有传染病,与此透析机不匹配,确定在此排班吗?
  2953. // // 此患者有传染病,与此透析机不匹配,确定在此排班吗?
  2954. // var msg = havePatientDisease ? '此患者有传染病,与此透析机不匹配,确定在此排班吗?' : '此患者没有传染病,与此透析机不匹配,确定在此排班吗?'
  2955. // this.$confirm(msg, '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
  2956. // .then(() => {
  2957. // this.add_schedule(patient, device_number, treat_mode, weekday, time_type)
  2958. // })
  2959. // } else {
  2960. // console.log("33333333")
  2961. this.add_scheduleTwo(
  2962. patient,
  2963. device_number,
  2964. treat_mode,
  2965. weekday,
  2966. time_type,
  2967. t_id
  2968. );
  2969. // }
  2970. return;
  2971. }
  2972. }
  2973. this.$message.error("设备不存在");
  2974. },
  2975. will_add_schedule_action_four: function(patient_id, treat_mode, weekday, time_type, device_number_id) {
  2976. var patient = null
  2977. for (let index = 0; index < this.patients.length; index++) {
  2978. const p = this.patients[index]
  2979. if (p.id == patient_id) {
  2980. patient = p
  2981. break
  2982. }
  2983. }
  2984. if (patient == null) {
  2985. this.$message.error('患者不存在')
  2986. return
  2987. }
  2988. for (let index = 0; index < this.opera_device_numbers.length; index++) {
  2989. const device_number = this.opera_device_numbers[index]
  2990. console.log(device_number)
  2991. for (let t_y = 1; t_y <= 3; t_y++) {
  2992. if (t_y == time_type && device_number_id == device_number.id) {
  2993. continue
  2994. }
  2995. if (device_number[weekday + '_' + t_y].pid == patient_id) {
  2996. this.$message.error('同位患者一天内不可有两次排班')
  2997. return
  2998. }
  2999. }
  3000. }
  3001. for (let index = 0; index < this.opera_device_numbers.length; index++) {
  3002. const device_number = this.opera_device_numbers[index]
  3003. if (device_number.id == device_number_id) {
  3004. var isDiseaseSame = false
  3005. var havePatientDisease = patient.contagions.length > 0
  3006. if (patient.contagions.length > 0 || device_number.zone.type != 1) {
  3007. if (device_number.zone.type != 1) {
  3008. for (let c_i = 0; c_i < patient.contagions.length; c_i++) {
  3009. const contagion = patient.contagions[c_i]
  3010. if (contagion.disease_id == device_number.zone.type) {
  3011. isDiseaseSame = true
  3012. }
  3013. }
  3014. }
  3015. } else {
  3016. isDiseaseSame = true
  3017. }
  3018. if (isDiseaseSame == false) {
  3019. // 此患者没有传染病,与此透析机不匹配,确定在此排班吗?
  3020. // 此患者有传染病,与此透析机不匹配,确定在此排班吗?
  3021. var msg = havePatientDisease ? '此患者有传染病,与此透析机不匹配,确定在此排班吗?' : '此患者没有传染病,与此透析机不匹配,确定在此排班吗?'
  3022. this.$confirm(msg, '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
  3023. .then(() => {
  3024. // this.add_scheduleTwo(patient, device_number, treat_mode, weekday, time_type)
  3025. this.will_add_schedule_action(
  3026. patient.id,
  3027. treat_mode,
  3028. weekday,
  3029. time_type,
  3030. device_number.id,
  3031. 0
  3032. );
  3033. this.saveActionTwo();
  3034. })
  3035. } else {
  3036. // this.add_scheduleTwo(patient, device_number, treat_mode, weekday, time_type)
  3037. this.will_add_schedule_action(
  3038. patient.id,
  3039. treat_mode,
  3040. weekday,
  3041. time_type,
  3042. device_number.id,
  3043. 0
  3044. );
  3045. this.saveActionTwo();
  3046. }
  3047. // this.saveActionTwo()
  3048. this.$refs.selector_dialog_two.hide()
  3049. return
  3050. }
  3051. }
  3052. this.$message.error('设备不存在')
  3053. },
  3054. will_add_schedule_action_three: function (
  3055. patient_id,
  3056. treat_mode,
  3057. weekday,
  3058. time_type,
  3059. device_number_id,
  3060. t_id
  3061. ) {
  3062. console.log("111111");
  3063. var patient = null;
  3064. for (let index = 0; index < this.patientList.length; index++) {
  3065. const p = this.patientList[index];
  3066. if (p.id == patient_id) {
  3067. patient = p;
  3068. break;
  3069. }
  3070. }
  3071. if (patient == null) {
  3072. this.$message.error("患者不存在");
  3073. return;
  3074. }
  3075. this.isEdit = true
  3076. for (let index = 0; index < this.opera_device_numbers.length; index++) {
  3077. const device_number = this.opera_device_numbers[index];
  3078. if (device_number.id == device_number_id) {
  3079. var isDiseaseSame = false;
  3080. var havePatientDisease = patient.contagions.length > 0;
  3081. if (patient.contagions.length > 0 || device_number.zone.type != 1) {
  3082. if (device_number.zone.type != 1) {
  3083. for (let c_i = 0; c_i < patient.contagions.length; c_i++) {
  3084. const contagion = patient.contagions[c_i];
  3085. if (contagion.disease_id == device_number.zone.type) {
  3086. isDiseaseSame = true;
  3087. }
  3088. }
  3089. }
  3090. } else {
  3091. isDiseaseSame = true;
  3092. }
  3093. // if (isDiseaseSame == false) {
  3094. // // 此患者没有传染病,与此透析机不匹配,确定在此排班吗?
  3095. // // 此患者有传染病,与此透析机不匹配,确定在此排班吗?
  3096. // var msg = havePatientDisease ? '此患者有传染病,与此透析机不匹配,确定在此排班吗?' : '此患者没有传染病,与此透析机不匹配,确定在此排班吗?'
  3097. // this.$confirm(msg, '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
  3098. // .then(() => {
  3099. // this.add_schedule(patient, device_number, treat_mode, weekday, time_type)
  3100. // })
  3101. // } else {
  3102. // console.log("33333333")
  3103. this.add_scheduleTwo(
  3104. patient,
  3105. device_number,
  3106. treat_mode,
  3107. weekday,
  3108. time_type,
  3109. t_id
  3110. );
  3111. this.saveActionTwo()
  3112. // }
  3113. return;
  3114. }
  3115. }
  3116. this.$message.error("设备不存在");
  3117. },
  3118. will_add_schedule_action: function (
  3119. patient_id,
  3120. treat_mode,
  3121. weekday,
  3122. time_type,
  3123. device_number_id,
  3124. t_id
  3125. ) {
  3126. console.log("111111");
  3127. var patient = null;
  3128. for (let index = 0; index < this.patientList.length; index++) {
  3129. const p = this.patientList[index];
  3130. if (p.id == patient_id) {
  3131. patient = p;
  3132. break;
  3133. }
  3134. }
  3135. if (patient == null) {
  3136. this.$message.error("患者不存在");
  3137. return;
  3138. }
  3139. console.log("22222222");
  3140. for (let index = 0; index < this.opera_device_numbers.length; index++) {
  3141. const device_number = this.opera_device_numbers[index];
  3142. for (let t_y = 1; t_y <= 3; t_y++) {
  3143. if (t_y == time_type && device_number_id == device_number.id) {
  3144. continue;
  3145. }
  3146. if (device_number[weekday + "_" + t_y].pid == patient_id) {
  3147. this.$message.error("同位患者一天内不可有两次排班");
  3148. return;
  3149. }
  3150. }
  3151. }
  3152. for (let index = 0; index < this.opera_device_numbers.length; index++) {
  3153. const device_number = this.opera_device_numbers[index];
  3154. if (device_number.id == device_number_id) {
  3155. var isDiseaseSame = false;
  3156. var havePatientDisease = patient.contagions.length > 0;
  3157. if (patient.contagions.length > 0 || device_number.zone.type != 1) {
  3158. if (device_number.zone.type != 1) {
  3159. for (let c_i = 0; c_i < patient.contagions.length; c_i++) {
  3160. const contagion = patient.contagions[c_i];
  3161. if (contagion.disease_id == device_number.zone.type) {
  3162. isDiseaseSame = true;
  3163. }
  3164. }
  3165. }
  3166. } else {
  3167. isDiseaseSame = true;
  3168. }
  3169. // if (isDiseaseSame == false) {
  3170. // // 此患者没有传染病,与此透析机不匹配,确定在此排班吗?
  3171. // // 此患者有传染病,与此透析机不匹配,确定在此排班吗?
  3172. // var msg = havePatientDisease ? '此患者有传染病,与此透析机不匹配,确定在此排班吗?' : '此患者没有传染病,与此透析机不匹配,确定在此排班吗?'
  3173. // this.$confirm(msg, '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
  3174. // .then(() => {
  3175. // this.add_schedule(patient, device_number, treat_mode, weekday, time_type)
  3176. // })
  3177. // } else {
  3178. // console.log("33333333")
  3179. this.add_schedule(
  3180. patient,
  3181. device_number,
  3182. treat_mode,
  3183. weekday,
  3184. time_type,
  3185. t_id
  3186. );
  3187. // }
  3188. return;
  3189. }
  3190. }
  3191. this.$message.error("设备不存在");
  3192. },
  3193. cancel_schedule_action: function (weekday, time_type, device_number_id) {
  3194. for (let index = 0; index < this.opera_device_numbers.length; index++) {
  3195. const device_number = this.opera_device_numbers[index];
  3196. if (device_number.id == device_number_id) {
  3197. console.log("````````")
  3198. var item = device_number[weekday + "_" + time_type];
  3199. item.pid = 0;
  3200. item.name = "";
  3201. item.treat_mode_id = 0;
  3202. item.treat_mode = "";
  3203. }
  3204. }
  3205. let obj = {
  3206. id: this.template.id,
  3207. data: [],
  3208. data2: [],
  3209. };
  3210. obj.data = this.opera_device_numbers;
  3211. obj.data2 = this.origin_device_numbers;
  3212. this.data.push(obj);
  3213. },
  3214. cancel_schedule_action_two: function (row) {
  3215. let params = {
  3216. id: row.id,
  3217. };
  3218. cancelScheduleTemplate(params).then((response) => {
  3219. if (response.data.state == 1) {
  3220. for (let index = 0; index < this.schedulePatients.length; index++) {
  3221. const sch = this.schedulePatients[index];
  3222. if (sch.id == row.id) {
  3223. this.schedulePatients.splice(index, 1);
  3224. }
  3225. }
  3226. for (
  3227. let index = 0;
  3228. index < this.opera_device_numbers.length;
  3229. index++
  3230. ) {
  3231. const device_number = this.opera_device_numbers[index];
  3232. if (device_number.id == row.device_number_id) {
  3233. var item = device_number[row.weekday + "_" + row.time_type];
  3234. item.pid = 0;
  3235. item.name = "";
  3236. item.treat_mode_id = 0;
  3237. item.treat_mode = "";
  3238. }
  3239. }
  3240. // this.$emit('cancel_sch')
  3241. }
  3242. });
  3243. },
  3244. add_scheduleTwo: function (
  3245. patient,
  3246. device_number,
  3247. treat_mode,
  3248. weekday,
  3249. time_type,
  3250. t_id
  3251. ) {
  3252. var item = device_number[weekday + "_" + time_type];
  3253. var isNew = item.pid == 0;
  3254. item.pid = patient.id;
  3255. item.name = patient.name;
  3256. item.treat_mode_id = treat_mode;
  3257. item.treat_mode = this.treat_modes[treat_mode].name;
  3258. if (isNew) {
  3259. device_number.total += 1;
  3260. }
  3261. if (t_id == 0) {
  3262. let obj = {
  3263. id: this.template.id,
  3264. data: [],
  3265. data2: [],
  3266. };
  3267. obj.data = this.opera_device_numbers;
  3268. obj.data2 = this.origin_device_numbers;
  3269. this.data.push(obj);
  3270. } else {
  3271. let obj = {
  3272. id: t_id,
  3273. data: [],
  3274. data2: [],
  3275. };
  3276. obj.data = this.opera_device_numbers;
  3277. obj.data2 = this.origin_device_numbers;
  3278. this.data.push(obj);
  3279. this.$refs.selector_dialog.hide();
  3280. }
  3281. },
  3282. add_schedule: function (
  3283. patient,
  3284. device_number,
  3285. treat_mode,
  3286. weekday,
  3287. time_type,
  3288. t_id
  3289. ) {
  3290. var item = device_number[weekday + "_" + time_type];
  3291. var isNew = item.pid == 0;
  3292. item.pid = patient.id;
  3293. item.name = patient.name;
  3294. item.treat_mode_id = treat_mode;
  3295. item.treat_mode = this.treat_modes[treat_mode].name;
  3296. if (isNew) {
  3297. device_number.total += 1;
  3298. }
  3299. if (t_id == 0) {
  3300. let obj = {
  3301. id: this.template.id,
  3302. data: [],
  3303. data2: [],
  3304. };
  3305. obj.data = this.opera_device_numbers;
  3306. obj.data2 = this.origin_device_numbers;
  3307. this.data.push(obj);
  3308. } else {
  3309. let obj = {
  3310. id: t_id,
  3311. data: [],
  3312. data2: [],
  3313. };
  3314. obj.data = this.opera_device_numbers;
  3315. obj.data2 = this.origin_device_numbers;
  3316. this.data.push(obj);
  3317. this.$refs.selector_dialog.hide();
  3318. }
  3319. },
  3320. saveActionFour: function () {
  3321. var add_items = [];
  3322. var del_items = [];
  3323. var change_items = [];
  3324. var weekdays = [1, 2, 3, 4, 5, 6, 7]; // 周一-周日
  3325. var time_types = [1, 2, 3]; // 上下晚
  3326. for (let d_n_i = 0; d_n_i < this.opera_device_numbers.length; d_n_i++) {
  3327. const op_d_n = this.opera_device_numbers[d_n_i];
  3328. const or_d_n = this.origin_device_numbers[d_n_i];
  3329. for (let w_i = 0; w_i < weekdays.length; w_i++) {
  3330. const weekday = weekdays[w_i];
  3331. for (let t_i = 0; t_i < time_types.length; t_i++) {
  3332. const time_type = time_types[t_i];
  3333. var item_key = weekday + "_" + time_type;
  3334. var op_item = op_d_n[item_key];
  3335. var or_item = or_d_n[item_key];
  3336. if (op_item.pid == 0 && or_item.pid == 0) {
  3337. continue;
  3338. }
  3339. if (
  3340. op_item.pid == or_item.pid &&
  3341. op_item.treat_mode_id == or_item.treat_mode_id
  3342. ) {
  3343. continue;
  3344. }
  3345. if (op_item.pid == 0) {
  3346. del_items.push({
  3347. device_number_id: op_d_n.id,
  3348. weekday: weekday,
  3349. time_type: time_type,
  3350. });
  3351. } else if (or_item.pid == 0) {
  3352. console.log(op_item.pid);
  3353. add_items.push({
  3354. device_number_id: op_d_n.id,
  3355. patient_id: op_item.pid,
  3356. mode: op_item.treat_mode_id,
  3357. weekday: weekday,
  3358. time_type: time_type,
  3359. });
  3360. } else {
  3361. if (
  3362. op_item.pid != or_item.pid ||
  3363. op_item.treat_mode_id != or_item.treat_mode_id
  3364. ) {
  3365. change_items.push({
  3366. device_number_id: op_d_n.id,
  3367. patient_id: op_item.pid,
  3368. mode: op_item.treat_mode_id,
  3369. weekday: weekday,
  3370. time_type: time_type,
  3371. });
  3372. }
  3373. }
  3374. }
  3375. }
  3376. }
  3377. if (
  3378. add_items.length == 0 &&
  3379. del_items.length == 0 &&
  3380. change_items.length == 0
  3381. ) {
  3382. } else {
  3383. var res = [];
  3384. for (var i = 0, arrayLen = add_items.length; i < arrayLen; i++) {
  3385. for (var j = 0, resLen = res.length; j < resLen; j++) {
  3386. if (
  3387. add_items[i].weekday === res[j].weekday &&
  3388. add_items[i].patient_id === res[j].patient_id
  3389. ) {
  3390. break;
  3391. }
  3392. }
  3393. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  3394. if (j === resLen) {
  3395. res.push(add_items[i]);
  3396. }
  3397. }
  3398. updateSchedules(
  3399. this.template.id,
  3400. JSON.stringify(res),
  3401. JSON.stringify(del_items),
  3402. JSON.stringify(change_items)
  3403. ).then((rs) => {
  3404. var resp = rs.data;
  3405. if (resp.state == 1) {
  3406. // this.opera_device_numbers = this.origin_device_numbers
  3407. this.all_template = resp.data.items
  3408. this.$emit("setTemplate",resp.data.items)
  3409. this.smartSaveLoading = false;
  3410. } else {
  3411. this.$message.error(resp.msg);
  3412. }
  3413. });
  3414. }
  3415. },
  3416. saveActionTwo: function () {
  3417. var add_items = [];
  3418. var del_items = [];
  3419. var change_items = [];
  3420. var weekdays = [1, 2, 3, 4, 5, 6, 7]; // 周一-周日
  3421. var time_types = [1, 2, 3]; // 上下晚
  3422. for (let d_n_i = 0; d_n_i < this.opera_device_numbers.length; d_n_i++) {
  3423. const op_d_n = this.opera_device_numbers[d_n_i];
  3424. const or_d_n = this.origin_device_numbers[d_n_i];
  3425. for (let w_i = 0; w_i < weekdays.length; w_i++) {
  3426. const weekday = weekdays[w_i];
  3427. for (let t_i = 0; t_i < time_types.length; t_i++) {
  3428. const time_type = time_types[t_i];
  3429. var item_key = weekday + "_" + time_type;
  3430. var op_item = op_d_n[item_key];
  3431. var or_item = or_d_n[item_key];
  3432. if (op_item.pid == 0 && or_item.pid == 0) {
  3433. continue;
  3434. }
  3435. if (
  3436. op_item.pid == or_item.pid &&
  3437. op_item.treat_mode_id == or_item.treat_mode_id
  3438. ) {
  3439. continue;
  3440. }
  3441. if (op_item.pid == 0) {
  3442. del_items.push({
  3443. device_number_id: op_d_n.id,
  3444. weekday: weekday,
  3445. time_type: time_type,
  3446. });
  3447. } else if (or_item.pid == 0) {
  3448. console.log(op_item.pid);
  3449. add_items.push({
  3450. device_number_id: op_d_n.id,
  3451. patient_id: op_item.pid,
  3452. mode: op_item.treat_mode_id,
  3453. weekday: weekday,
  3454. time_type: time_type,
  3455. });
  3456. } else {
  3457. if (
  3458. op_item.pid != or_item.pid ||
  3459. op_item.treat_mode_id != or_item.treat_mode_id
  3460. ) {
  3461. change_items.push({
  3462. device_number_id: op_d_n.id,
  3463. patient_id: op_item.pid,
  3464. mode: op_item.treat_mode_id,
  3465. weekday: weekday,
  3466. time_type: time_type,
  3467. });
  3468. }
  3469. }
  3470. }
  3471. }
  3472. }
  3473. if (
  3474. add_items.length == 0 &&
  3475. del_items.length == 0 &&
  3476. change_items.length == 0
  3477. ) {
  3478. } else {
  3479. var res = [];
  3480. for (var i = 0, arrayLen = add_items.length; i < arrayLen; i++) {
  3481. for (var j = 0, resLen = res.length; j < resLen; j++) {
  3482. if (
  3483. add_items[i].weekday === res[j].weekday &&
  3484. add_items[i].patient_id === res[j].patient_id
  3485. ) {
  3486. break;
  3487. }
  3488. }
  3489. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  3490. if (j === resLen) {
  3491. res.push(add_items[i]);
  3492. }
  3493. }
  3494. updateSchedules(
  3495. this.template.id,
  3496. JSON.stringify(res),
  3497. JSON.stringify(del_items),
  3498. JSON.stringify(change_items)
  3499. ).then((rs) => {
  3500. var resp = rs.data;
  3501. if (resp.state == 1) {
  3502. // this.opera_device_numbers = this.origin_device_numbers
  3503. this.all_template = resp.data.items
  3504. this.$emit("setTemplate",resp.data.items)
  3505. this.smartSaveLoading = false;
  3506. } else {
  3507. this.$message.error(resp.msg);
  3508. }
  3509. });
  3510. }
  3511. },
  3512. saveActionThree: function (val,del_data) {
  3513. updateEditSchedules(
  3514. JSON.stringify(val),
  3515. JSON.stringify(del_data),
  3516. ).then((rs) => {
  3517. var resp = rs.data;
  3518. if (resp.state == 1) {
  3519. this.all_template = resp.data.items
  3520. this.$emit("setTemplate",resp.data.items)
  3521. if(this.active_name == 'first'){
  3522. this.GetTemplate(resp.data.items[0])
  3523. }else if(this.active_name == "second"){
  3524. this.GetTemplate(resp.data.items[1])
  3525. }else if(this.active_name == "third"){
  3526. this.GetTemplate(resp.data.items[2])
  3527. }else if(this.active_name == "four"){
  3528. this.GetTemplate(resp.data.items[3])
  3529. }
  3530. this.smartSaveLoading = false;
  3531. this.smartVisible = false;
  3532. } else {
  3533. this.smartSaveLoading = false;
  3534. this.$message.error(resp.msg);
  3535. }
  3536. });
  3537. },
  3538. saveAction: function () {
  3539. var add_items = [];
  3540. var del_items = [];
  3541. var change_items = [];
  3542. var weekdays = [1, 2, 3, 4, 5, 6, 7]; // 周一-周日
  3543. var time_types = [1, 2, 3]; // 上下晚
  3544. for (let d_n_i = 0; d_n_i < this.opera_device_numbers.length; d_n_i++) {
  3545. const op_d_n = this.opera_device_numbers[d_n_i];
  3546. const or_d_n = this.origin_device_numbers[d_n_i];
  3547. for (let w_i = 0; w_i < weekdays.length; w_i++) {
  3548. const weekday = weekdays[w_i];
  3549. for (let t_i = 0; t_i < time_types.length; t_i++) {
  3550. const time_type = time_types[t_i];
  3551. var item_key = weekday + "_" + time_type;
  3552. var op_item = op_d_n[item_key];
  3553. var or_item = or_d_n[item_key];
  3554. if (op_item.pid == 0 && or_item.pid == 0) {
  3555. continue;
  3556. }
  3557. if (
  3558. op_item.pid == or_item.pid &&
  3559. op_item.treat_mode_id == or_item.treat_mode_id
  3560. ) {
  3561. continue;
  3562. }
  3563. if (op_item.pid == 0) {
  3564. del_items.push({
  3565. device_number_id: op_d_n.id,
  3566. weekday: weekday,
  3567. time_type: time_type,
  3568. });
  3569. } else if (or_item.pid == 0) {
  3570. console.log(op_item.pid);
  3571. add_items.push({
  3572. device_number_id: op_d_n.id,
  3573. patient_id: op_item.pid,
  3574. mode: op_item.treat_mode_id,
  3575. weekday: weekday,
  3576. time_type: time_type,
  3577. });
  3578. } else {
  3579. if (
  3580. op_item.pid != or_item.pid ||
  3581. op_item.treat_mode_id != or_item.treat_mode_id
  3582. ) {
  3583. change_items.push({
  3584. device_number_id: op_d_n.id,
  3585. patient_id: op_item.pid,
  3586. mode: op_item.treat_mode_id,
  3587. weekday: weekday,
  3588. time_type: time_type,
  3589. });
  3590. }
  3591. }
  3592. }
  3593. }
  3594. }
  3595. var res = [];
  3596. for (var i = 0, arrayLen = add_items.length; i < arrayLen; i++) {
  3597. for (var j = 0, resLen = res.length; j < resLen; j++) {
  3598. if (
  3599. add_items[i].weekday === res[j].weekday &&
  3600. add_items[i].patient_id === res[j].patient_id
  3601. ) {
  3602. break;
  3603. }
  3604. }
  3605. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  3606. if (j === resLen) {
  3607. res.push(add_items[i]);
  3608. }
  3609. }
  3610. updateSchedules(
  3611. this.template.id,
  3612. JSON.stringify(res),
  3613. JSON.stringify(del_items),
  3614. JSON.stringify(change_items)
  3615. ).then((rs) => {
  3616. var resp = rs.data;
  3617. if (resp.state == 1) {
  3618. // this.$message({
  3619. // message: '保存成功',
  3620. // type: 'success'
  3621. // })
  3622. // this.$emit("saveSuccess")
  3623. } else {
  3624. this.$message.error(resp.msg);
  3625. }
  3626. this.saving = false;
  3627. this.is_editing = false;
  3628. });
  3629. },
  3630. // 计算总数
  3631. getSummaries(param) {
  3632. const { columns, data } = param;
  3633. const sums = [];
  3634. columns.forEach((column, index) => {
  3635. if (index === 0 || index === 25) {
  3636. sums[index] = "总数";
  3637. return;
  3638. }
  3639. if (index === 1 || index === 24) {
  3640. sums[index] = data.length;
  3641. return;
  3642. }
  3643. const values = data.map((item) => item[column.property]);
  3644. if (index === 23) {
  3645. sums[index] = values.reduce((prev, curr) => {
  3646. const value = Number(curr);
  3647. if (!isNaN(value)) {
  3648. return prev + curr;
  3649. } else {
  3650. return prev;
  3651. }
  3652. }, 0);
  3653. sums[index];
  3654. return;
  3655. }
  3656. sums[index] = values.reduce((prev, curr) => {
  3657. if (typeof curr["treat_mode_id"] === "undefined") {
  3658. return prev;
  3659. }
  3660. const value = Number(curr["treat_mode_id"]);
  3661. if (!isNaN(value) && value > 0) {
  3662. return prev + 1;
  3663. } else {
  3664. return prev;
  3665. }
  3666. }, 0);
  3667. sums[index];
  3668. });
  3669. this.$nextTick(() => {
  3670. this.$refs.table.doLayout();
  3671. });
  3672. // if(this.$store.getters.xt_user.template_info.org_id == 9671 || this.$store.getters.xt_user.template_info.org_id == 0 || this.$store.getters.xt_user.template_info.org_id == 3877 || this.$store.getters.xt_user.template_info.org_id == 10340){
  3673. //表格某列全部数据
  3674. var Mon_M = []
  3675. var Mon_A = []
  3676. var Mon_N = []
  3677. var Tue_M =[]
  3678. var Tue_A = []
  3679. var Tue_N = []
  3680. var Wed_M = []
  3681. var Wed_A = []
  3682. var Wed_N = []
  3683. var Thurs_M = []
  3684. var Thurs_A = []
  3685. var Thurs_N = []
  3686. var Fri_M = []
  3687. var Fri_A = []
  3688. var Fri_N = []
  3689. var Sat_M = []
  3690. var Sat_A = []
  3691. var Sat_N = []
  3692. var Sun_M = []
  3693. var Sun_A = []
  3694. var Sun_N = []
  3695. // 操作后数据
  3696. var Mon_M_One= []
  3697. var Mon_A_One = []
  3698. var Mon_N_One = []
  3699. var Tue_M_One =[]
  3700. var Tue_A_One = []
  3701. var Tue_N_One = []
  3702. var Wed_M_One = []
  3703. var Wed_A_One = []
  3704. var Wed_N_One = []
  3705. var Thurs_M_One = []
  3706. var Thurs_A_One = []
  3707. var Thurs_N_One = []
  3708. var Fri_M_One = []
  3709. var Fri_A_One = []
  3710. var Fri_N_One = []
  3711. var Sat_M_One = []
  3712. var Sat_A_One = []
  3713. var Sat_N_One = []
  3714. var Sun_M_One = []
  3715. var Sun_A_One = []
  3716. var Sun_N_One = []
  3717. for(let j in data){
  3718. if(data[j].hasOwnProperty ('1_1') == true){
  3719. Mon_M.push(data[j]['1_1'].treat_mode)
  3720. Mon_M=Mon_M.filter(item=> item && item.trim())//去掉空字符串
  3721. var countNum =Mon_M.reduce((obj,name)=>{
  3722. if(name in obj){
  3723. obj[name]++
  3724. }else{
  3725. obj[name]=1
  3726. }
  3727. return obj
  3728. },{})
  3729. }
  3730. }
  3731. for(let x in countNum){
  3732. Mon_M_One.push(x + ':' + countNum[x]+"\n")
  3733. }
  3734. var result = [];
  3735. for (var i = 0,len = Mon_M_One.length; i < len; i+=29) {
  3736. var strObjcet = Mon_M_One.slice(i, i+29);
  3737. var str = strObjcet.toString();
  3738. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  3739. result.push(str);
  3740. }
  3741. sums[2]="总人数:"+ sums[2] +"\n"+result
  3742. for(let j in data){
  3743. if(data[j].hasOwnProperty ('1_2') == true){
  3744. Mon_A.push(data[j]['1_2'].treat_mode)
  3745. Mon_A=Mon_A.filter(item=> item && item.trim())//去掉空字符串
  3746. var countNum =Mon_A.reduce((obj,name)=>{
  3747. if(name in obj){
  3748. obj[name]++
  3749. }else{
  3750. obj[name]=1
  3751. }
  3752. return obj
  3753. },{})
  3754. }
  3755. }
  3756. for(let x in countNum){
  3757. Mon_A_One.push(x + ':' + countNum[x]+"\n")
  3758. }
  3759. var result = [];
  3760. for (var i = 0,len = Mon_A_One.length; i < len; i+=29) {
  3761. var strObjcet = Mon_A_One.slice(i, i+29);
  3762. var str = strObjcet.toString();
  3763. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  3764. result.push(str);
  3765. }
  3766. sums[3]="总人数:"+ sums[3] +"\n"+result
  3767. for(let j in data){
  3768. if(data[j].hasOwnProperty ('1_3') == true){
  3769. Mon_N.push(data[j]['1_3'].treat_mode)
  3770. Mon_N=Mon_N.filter(item=> item && item.trim())
  3771. var countNum =Mon_N.reduce((obj,name)=>{
  3772. if(name in obj){
  3773. obj[name]++
  3774. }else{
  3775. obj[name]=1
  3776. }
  3777. return obj
  3778. },{})
  3779. }
  3780. }
  3781. for(let x in countNum){
  3782. Mon_N_One.push(x + ':' + countNum[x]+"\n")
  3783. }
  3784. var result = [];
  3785. for (var i = 0,len = Mon_N_One.length; i < len; i+=29) {
  3786. var strObjcet = Mon_N_One.slice(i, i+29);
  3787. var str = strObjcet.toString();
  3788. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  3789. result.push(str);
  3790. }
  3791. sums[4]="总人数:"+ sums[4] +"\n"+result
  3792. // 星期二
  3793. for(let j in data){
  3794. if(data[j].hasOwnProperty ('2_1') == true){
  3795. Tue_M.push(data[j]['2_1'].treat_mode)
  3796. Tue_M=Tue_M.filter(item=> item && item.trim())
  3797. var countNum =Tue_M.reduce((obj,name)=>{
  3798. if(name in obj){
  3799. obj[name]++
  3800. }else{
  3801. obj[name]=1
  3802. }
  3803. return obj
  3804. },{})
  3805. }
  3806. }
  3807. for(let x in countNum){
  3808. Tue_M_One.push(x + ':' + countNum[x]+"\n")
  3809. }
  3810. var result = [];
  3811. for (var i = 0,len = Tue_M_One.length; i < len; i+=29) {
  3812. var strObjcet = Tue_M_One.slice(i, i+29);
  3813. var str = strObjcet.toString();
  3814. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  3815. result.push(str);
  3816. }
  3817. sums[5]="总人数:"+ sums[5] +"\n"+result
  3818. // var newTue_A
  3819. for(let j in data){
  3820. if(data[j].hasOwnProperty ('2_2') == true){
  3821. Tue_A.push(data[j]['2_2'].treat_mode)
  3822. Tue_A=Tue_A.filter(item=> item && item.trim())
  3823. var countNum =Tue_A.reduce((obj,name)=>{
  3824. if(name in obj){
  3825. obj[name]++
  3826. }else{
  3827. obj[name]=1
  3828. }
  3829. return obj
  3830. },{})
  3831. }
  3832. }
  3833. for(let x in countNum){
  3834. Tue_A_One.push(x + ':' + countNum[x]+"\n")
  3835. }
  3836. var result = [];
  3837. for (var i = 0,len = Tue_A_One.length; i < len; i+=29) {
  3838. var strObjcet = Tue_A_One.slice(i, i+29);
  3839. var str = strObjcet.toString();
  3840. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  3841. result.push(str);
  3842. }
  3843. sums[6]="总人数:"+ sums[6] +"\n"+result
  3844. for(let j in data){
  3845. if(data[j].hasOwnProperty ('2_3') == true){
  3846. Tue_N.push(data[j]['2_2'].treat_mode)
  3847. Tue_N=Tue_N.filter(item=> item && item.trim())
  3848. var countNum =Tue_N.reduce((obj,name)=>{
  3849. if(name in obj){
  3850. obj[name]++
  3851. }else{
  3852. obj[name]=1
  3853. }
  3854. return obj
  3855. },{})
  3856. }
  3857. }
  3858. for(let x in countNum){
  3859. Tue_N_One.push(x + ':' + countNum[x]+"\n")
  3860. }
  3861. var result = [];
  3862. for (var i = 0,len = Tue_N_One.length; i < len; i+=29) {
  3863. var strObjcet = Tue_N_One.slice(i, i+29);
  3864. var str = strObjcet.toString();
  3865. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  3866. result.push(str);
  3867. }
  3868. sums[7]="总人数:"+ sums[7] +"\n"+result
  3869. // 星期三
  3870. for(let j in data){
  3871. if(data[j].hasOwnProperty ('3_1') == true){
  3872. Wed_M.push(data[j]['3_1'].treat_mode)
  3873. Wed_M=Wed_M.filter(item=> item && item.trim())
  3874. var countNum =Wed_M.reduce((obj,name)=>{
  3875. if(name in obj){
  3876. obj[name]++
  3877. }else{
  3878. obj[name]=1
  3879. }
  3880. return obj
  3881. },{})
  3882. }
  3883. }
  3884. for(let x in countNum){
  3885. Wed_M_One.push(x + ':' + countNum[x]+"\n")
  3886. }
  3887. var result = [];
  3888. for (var i = 0,len = Wed_M_One.length; i < len; i+=29) {
  3889. var strObjcet = Wed_M_One.slice(i, i+29);
  3890. var str = strObjcet.toString();
  3891. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  3892. result.push(str);
  3893. }
  3894. sums[8]="总人数:"+ sums[8] +"\n"+result
  3895. for(let j in data){
  3896. if(data[j].hasOwnProperty ('3_2') == true){
  3897. Wed_A.push(data[j]['3_2'].treat_mode)
  3898. Wed_A=Wed_A.filter(item=> item && item.trim())
  3899. var countNum =Wed_A.reduce((obj,name)=>{
  3900. if(name in obj){
  3901. obj[name]++
  3902. }else{
  3903. obj[name]=1
  3904. }
  3905. return obj
  3906. },{})
  3907. }
  3908. }
  3909. for(let x in countNum){
  3910. Wed_A_One.push(x + ':' + countNum[x]+"\n")
  3911. }
  3912. var result = [];
  3913. for (var i = 0,len = Wed_A_One.length; i < len; i+=29) {
  3914. var strObjcet = Wed_A_One.slice(i, i+29);
  3915. var str = strObjcet.toString();
  3916. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  3917. result.push(str);
  3918. }
  3919. sums[9]="总人数:"+ sums[9] +"\n"+result
  3920. for(let j in data){
  3921. if(data[j].hasOwnProperty ('3_3') == true){
  3922. Wed_N.push(data[j]['3_3'].treat_mode)
  3923. Wed_N=Wed_N.filter(item=> item && item.trim())
  3924. var countNum =Wed_N.reduce((obj,name)=>{
  3925. if(name in obj){
  3926. obj[name]++
  3927. }else{
  3928. obj[name]=1
  3929. }
  3930. return obj
  3931. },{})
  3932. }
  3933. }
  3934. for(let x in countNum){
  3935. Wed_N_One.push(x + ':' + countNum[x]+"\n")
  3936. }
  3937. var result = [];
  3938. for (var i = 0,len = Wed_N_One.length; i < len; i+=29) {
  3939. var strObjcet = Wed_N_One.slice(i, i+29);
  3940. var str = strObjcet.toString();
  3941. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  3942. result.push(str);
  3943. }
  3944. sums[10]="总人数:"+ sums[10] +"\n"+result
  3945. // 星期四
  3946. for(let j in data){
  3947. if(data[j].hasOwnProperty ('4_1') == true){
  3948. Thurs_M.push(data[j]['4_1'].treat_mode)
  3949. Thurs_M=Thurs_M.filter(item=> item && item.trim())
  3950. var countNum =Thurs_M.reduce((obj,name)=>{
  3951. if(name in obj){
  3952. obj[name]++
  3953. }else{
  3954. obj[name]=1
  3955. }
  3956. return obj
  3957. },{})
  3958. }
  3959. }
  3960. for(let x in countNum){
  3961. Thurs_M_One.push(x + ':' + countNum[x]+"\n")
  3962. }
  3963. var result = [];
  3964. for (var i = 0,len = Thurs_M_One.length; i < len; i+=29) {
  3965. var strObjcet = Thurs_M_One.slice(i, i+29);
  3966. var str = strObjcet.toString();
  3967. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  3968. result.push(str);
  3969. }
  3970. sums[11]="总人数:"+ sums[11] +"\n"+result
  3971. for(let j in data){
  3972. if(data[j].hasOwnProperty ('4_2') == true){
  3973. Thurs_A.push(data[j]['4_2'].treat_mode)
  3974. Thurs_A=Thurs_A.filter(item=> item && item.trim())
  3975. var countNum =Thurs_A.reduce((obj,name)=>{
  3976. if(name in obj){
  3977. obj[name]++
  3978. }else{
  3979. obj[name]=1
  3980. }
  3981. return obj
  3982. },{})
  3983. }
  3984. }
  3985. for(let x in countNum){
  3986. Thurs_A_One.push(x + ':' + countNum[x]+"\n")
  3987. }
  3988. var result = [];
  3989. for (var i = 0,len = Thurs_A_One.length; i < len; i+=29) {
  3990. var strObjcet = Thurs_A_One.slice(i, i+29);
  3991. var str = strObjcet.toString();
  3992. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  3993. result.push(str);
  3994. }
  3995. sums[12]="总人数:"+ sums[12] +"\n"+result
  3996. for(let j in data){
  3997. if(data[j].hasOwnProperty ('4_3') == true){
  3998. Thurs_N.push(data[j]['4_3'].treat_mode)
  3999. Thurs_N=Thurs_N.filter(item=> item && item.trim())
  4000. var countNum =Thurs_N.reduce((obj,name)=>{
  4001. if(name in obj){
  4002. obj[name]++
  4003. }else{
  4004. obj[name]=1
  4005. }
  4006. return obj
  4007. },{})
  4008. }
  4009. }
  4010. for(let x in countNum){
  4011. Thurs_N_One.push(x + ':' + countNum[x]+"\n")
  4012. }
  4013. var result = [];
  4014. for (var i = 0,len = Thurs_N_One.length; i < len; i+=29) {
  4015. var strObjcet = Thurs_N_One.slice(i, i+29);
  4016. var str = strObjcet.toString();
  4017. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  4018. result.push(str);
  4019. }
  4020. sums[13]="总人数:"+ sums[13] +"\n"+result
  4021. // 星期五
  4022. for(let j in data){
  4023. if(data[j].hasOwnProperty ('5_1') == true){
  4024. Fri_M.push(data[j]['5_1'].treat_mode)
  4025. Fri_M=Fri_M.filter(item=> item && item.trim())
  4026. var countNum =Fri_M.reduce((obj,name)=>{
  4027. if(name in obj){
  4028. obj[name]++
  4029. }else{
  4030. obj[name]=1
  4031. }
  4032. return obj
  4033. },{})
  4034. }
  4035. }
  4036. for(let x in countNum){
  4037. Fri_M_One.push(x + ':' + countNum[x]+"\n")
  4038. }
  4039. var result = [];
  4040. for (var i = 0,len = Fri_M_One.length; i < len; i+=29) {
  4041. var strObjcet = Fri_M_One.slice(i, i+29);
  4042. var str = strObjcet.toString();
  4043. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  4044. result.push(str);
  4045. }
  4046. sums[14]="总人数:"+ sums[14] +"\n"+result
  4047. for(let j in data){
  4048. if(data[j].hasOwnProperty ('5_2') == true){
  4049. Fri_A.push(data[j]['5_2'].treat_mode)
  4050. Fri_A=Fri_A.filter(item=> item && item.trim())
  4051. var countNum =Fri_A.reduce((obj,name)=>{
  4052. if(name in obj){
  4053. obj[name]++
  4054. }else{
  4055. obj[name]=1
  4056. }
  4057. return obj
  4058. },{})
  4059. }
  4060. }
  4061. for(let x in countNum){
  4062. Fri_A_One.push(x + ':' + countNum[x]+"\n")
  4063. }
  4064. var result = [];
  4065. for (var i = 0,len = Fri_A_One.length; i < len; i+=29) {
  4066. var strObjcet = Fri_A_One.slice(i, i+29);
  4067. var str = strObjcet.toString();
  4068. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  4069. result.push(str);
  4070. }
  4071. sums[15]="总人数:"+ sums[15] +"\n"+result
  4072. for(let j in data){
  4073. if(data[j].hasOwnProperty ('5_3') == true){
  4074. Fri_N.push(data[j]['5_3'].treat_mode)
  4075. Fri_N=Fri_N.filter(item=> item && item.trim())
  4076. var countNum =Fri_N.reduce((obj,name)=>{
  4077. if(name in obj){
  4078. obj[name]++
  4079. }else{
  4080. obj[name]=1
  4081. }
  4082. return obj
  4083. },{})
  4084. }
  4085. }
  4086. for(let x in countNum){
  4087. Fri_N_One.push(x + ':' + countNum[x]+"\n")
  4088. }
  4089. var result = [];
  4090. for (var i = 0,len = Fri_N_One.length; i < len; i+=29) {
  4091. var strObjcet = Fri_N_One.slice(i, i+29);
  4092. var str = strObjcet.toString();
  4093. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  4094. result.push(str);
  4095. }
  4096. sums[16]="总人数:"+ sums[16] +"\n"+result
  4097. // 星期六
  4098. for(let j in data){
  4099. if(data[j].hasOwnProperty ('6_1') == true){
  4100. Sat_M.push(data[j]['6_1'].treat_mode)
  4101. Sat_M=Sat_M.filter(item=> item && item.trim())
  4102. var countNum =Sat_M.reduce((obj,name)=>{
  4103. if(name in obj){
  4104. obj[name]++
  4105. }else{
  4106. obj[name]=1
  4107. }
  4108. return obj
  4109. },{})
  4110. }
  4111. }
  4112. for(let x in countNum){
  4113. Sat_M_One.push(x + ':' + countNum[x]+"\n")
  4114. }
  4115. var result = [];
  4116. for (var i = 0,len = Sat_M_One.length; i < len; i+=29) {
  4117. var strObjcet = Sat_M_One.slice(i, i+29);
  4118. var str = strObjcet.toString();
  4119. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  4120. result.push(str);
  4121. }
  4122. sums[17]="总人数:"+ sums[17] +"\n"+result
  4123. for(let j in data){
  4124. if(data[j].hasOwnProperty ('6_2') == true){
  4125. Sat_A.push(data[j]['6_2'].treat_mode)
  4126. Sat_A=Sat_A.filter(item=> item && item.trim())
  4127. var countNum =Sat_A.reduce((obj,name)=>{
  4128. if(name in obj){
  4129. obj[name]++
  4130. }else{
  4131. obj[name]=1
  4132. }
  4133. return obj
  4134. },{})
  4135. }
  4136. }
  4137. for(let x in countNum){
  4138. Sat_A_One.push(x + ':' + countNum[x]+"\n")
  4139. }
  4140. var result = [];
  4141. for (var i = 0,len = Sat_A_One.length; i < len; i+=29) {
  4142. var strObjcet = Sat_A_One.slice(i, i+29);
  4143. var str = strObjcet.toString();
  4144. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  4145. result.push(str);
  4146. }
  4147. sums[18]="总人数:"+ sums[18] +"\n"+result
  4148. for(let j in data){
  4149. if(data[j].hasOwnProperty ('6_3') == true){
  4150. Sat_N.push(data[j]['6_3'].treat_mode)
  4151. Sat_N=Sat_N.filter(item=> item && item.trim())
  4152. var countNum =Sat_N.reduce((obj,name)=>{
  4153. if(name in obj){
  4154. obj[name]++
  4155. }else{
  4156. obj[name]=1
  4157. }
  4158. return obj
  4159. },{})
  4160. }
  4161. }
  4162. for(let x in countNum){
  4163. Sat_N_One.push(x + ':' + countNum[x]+"\n")
  4164. }
  4165. var result = [];
  4166. for (var i = 0,len = Sat_N_One.length; i < len; i+=29) {
  4167. var strObjcet = Sat_N_One.slice(i, i+29);
  4168. var str = strObjcet.toString();
  4169. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  4170. result.push(str);
  4171. }
  4172. sums[19]="总人数:"+ sums[19] +"\n"+result
  4173. // 星期天
  4174. for(let j in data){
  4175. if(data[j].hasOwnProperty ('7_1') == true){
  4176. Sun_M.push(data[j]['7_1'].treat_mode)
  4177. Sun_M=Sun_M.filter(item=> item && item.trim())
  4178. var countNum =Sun_M.reduce((obj,name)=>{
  4179. if(name in obj){
  4180. obj[name]++
  4181. }else{
  4182. obj[name]=1
  4183. }
  4184. return obj
  4185. },{})
  4186. }
  4187. }
  4188. for(let x in countNum){
  4189. Sun_M_One.push(x + ':' + countNum[x]+"\n")
  4190. }
  4191. var result = [];
  4192. for (var i = 0,len = Sun_M_One.length; i < len; i+=29) {
  4193. var strObjcet = Sun_M_One.slice(i, i+29);
  4194. var str = strObjcet.toString();
  4195. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  4196. result.push(str);
  4197. }
  4198. sums[20]="总人数:"+ sums[20] +"\n"+result
  4199. for(let j in data){
  4200. if(data[j].hasOwnProperty ('7_2') == true){
  4201. Sun_A.push(data[j]['7_2'].treat_mode)
  4202. Sun_A=Sun_A.filter(item=> item && item.trim())
  4203. var countNum =Sun_A.reduce((obj,name)=>{
  4204. if(name in obj){
  4205. obj[name]++
  4206. }else{
  4207. obj[name]=1
  4208. }
  4209. return obj
  4210. },{})
  4211. }
  4212. }
  4213. for(let x in countNum){
  4214. Sun_A_One.push(x + ':' + countNum[x]+"\n")
  4215. }
  4216. var result = [];
  4217. for (var i = 0,len = Sun_A_One.length; i < len; i+=29) {
  4218. var strObjcet = Sun_A_One.slice(i, i+29);
  4219. var str = strObjcet.toString();
  4220. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  4221. result.push(str);
  4222. }
  4223. sums[21]="总人数:"+ sums[21] +"\n"+result
  4224. for(let j in data){
  4225. if(data[j].hasOwnProperty ('7_3') == true){
  4226. Sun_N.push(data[j]['7_3'].treat_mode)
  4227. Sun_N=Sun_N.filter(item=> item && item.trim())
  4228. var countNum =Sun_N.reduce((obj,name)=>{
  4229. if(name in obj){
  4230. obj[name]++
  4231. }else{
  4232. obj[name]=1
  4233. }
  4234. return obj
  4235. },{})
  4236. }
  4237. }
  4238. for(let x in countNum){
  4239. Sun_N_One.push(x + ':' + countNum[x]+"\n")
  4240. }
  4241. var result = [];
  4242. for (var i = 0,len = Sun_N_One.length; i < len; i+=29) {
  4243. var strObjcet = Sun_N_One.slice(i, i+29);
  4244. var str = strObjcet.toString();
  4245. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  4246. result.push(str);
  4247. }
  4248. sums[22]="总人数:"+ sums[22] +"\n"+result
  4249. // }
  4250. return sums;
  4251. },
  4252. // 右侧表格的列回调
  4253. cellClass({row,column, rowIndex, columnIndex}){
  4254. // console.log('cellClass数据',row);
  4255. if(columnIndex==1&&row.zone.type!=1){
  4256. //
  4257. return "table-row-new-class schedule-table-row Infectious_disease";
  4258. }
  4259. if(columnIndex==0 ||columnIndex==1){
  4260. return ''
  4261. }else{
  4262. if(row[column.property].pid >0 &&
  4263. row[column.property].pid == this.patient_id_hover){
  4264. return 'hover-td'
  4265. }
  4266. }
  4267. },
  4268. // 右侧表格的行回调
  4269. rowClass({row,column, rowIndex, columnIndex}){
  4270. if (row.zone.type == 1) {
  4271. return "table-row-new-class schedule-table-row ";
  4272. } else {
  4273. return "table-row-new-class schedule-table-row infectious";
  4274. };
  4275. },
  4276. // 左侧表格的患者回调
  4277. patientclass({row,column, rowIndex, columnIndex}){
  4278. if(this.cur_info.patient_id == row.id){
  4279. return 'highlight';
  4280. }
  4281. },
  4282. // 左侧表格的透析回调
  4283. modeclass({row,column, rowIndex, columnIndex}){
  4284. if(this.cur_info.mode_id == row.id){
  4285. return 'highlight';
  4286. }
  4287. },
  4288. arraySort(property) {
  4289. return function (a, b) {
  4290. var value1 = a[property];
  4291. var value2 = b[property];
  4292. return value1 - value2;
  4293. };
  4294. },
  4295. unique_id(array) {
  4296. // res用来存储结果
  4297. var res = [];
  4298. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  4299. for (var j = 0, resLen = res.length; j < resLen; j++) {
  4300. if (array[i] === res[j]) {
  4301. break;
  4302. }
  4303. }
  4304. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  4305. if (j === resLen) {
  4306. res.push(array[i]);
  4307. }
  4308. }
  4309. return res;
  4310. },
  4311. },
  4312. };
  4313. </script>
  4314. <style lang="scss">
  4315. .table_contain {
  4316. display: flex;
  4317. .left_contain {
  4318. width: 14%;
  4319. margin-right: 50px;
  4320. .highlight{
  4321. background-color: #ecf5ff !important;
  4322. color: #3a8ee6 !important;
  4323. }
  4324. .item_touz{
  4325. width: 115px;
  4326. padding: 6px 5px;
  4327. margin: 0px 5px ;
  4328. // border: solid 1px #eee;
  4329. text-align: left;
  4330. }
  4331. }
  4332. .right_contain {
  4333. width: 83%;
  4334. .el-table td .cell{
  4335. text-align: center !important;
  4336. white-space: pre-wrap;
  4337. padding: 0 0px !important;
  4338. }
  4339. .Infectious_disease{
  4340. background-color: red !important;
  4341. color: white;
  4342. }
  4343. .el-table--medium td, .el-table--medium th {
  4344. padding: 5px 0 !important;
  4345. }
  4346. .del_table_btn{
  4347. position: absolute;
  4348. right: 0px;
  4349. top: -3px;
  4350. visibility: hidden;
  4351. .el-button {
  4352. width: 15px;
  4353. height: 15px;
  4354. padding: 0px;
  4355. }
  4356. }
  4357. }
  4358. // .el-table th .cell, .el-table td .cell {
  4359. // margin: 0;
  4360. // padding: 0 0px;
  4361. // }
  4362. // .el-table--medium td, .el-table--medium th {
  4363. // padding: 5px 0 !important;
  4364. // }
  4365. }
  4366. .temtable_contain{
  4367. margin-top: 30px !important;
  4368. }
  4369. .infectious{
  4370. color: red !important;
  4371. }
  4372. .schedule-table-row {
  4373. background: #fff !important;
  4374. }
  4375. .schedule-table-row:hover {
  4376. background: #fff !important;
  4377. }
  4378. .schedule-table-row td:hover {
  4379. background: rgb(88, 162, 236) !important;
  4380. }
  4381. .schedule-table-row td .cell {
  4382. font-size: 12px;
  4383. white-space: normal !important;
  4384. }
  4385. #tem_table_data {
  4386. /*min-height: calc(100vh - 350px);*/
  4387. position: fixed;
  4388. top: 0;
  4389. right: 0;
  4390. bottom: 0;
  4391. left: 0;
  4392. overflow: auto;
  4393. margin: 0;
  4394. background: #fff;
  4395. padding: 20px;
  4396. z-index:2000;
  4397. height: 100%;
  4398. }
  4399. #tem_table_data ::-webkit-scrollbar {
  4400. height: 15px;
  4401. }
  4402. #tem_table_data {
  4403. .el-table__body tr.current-row > td {
  4404. background-color: #ecf5ff !important;
  4405. color: #3a8ee6;
  4406. }
  4407. .el-table__body tr > td:hover {
  4408. background-color: #409eff !important;
  4409. color: #fff;
  4410. .del_table_btn {
  4411. visibility: visible;
  4412. }
  4413. }
  4414. .el-table__body tr .hover-td {
  4415. background-color: #409eff !important;
  4416. color: #fff;
  4417. }
  4418. }
  4419. // #table_data {
  4420. // min-height: calc(100vh - 350px);
  4421. // }
  4422. #tem_table_data ::-webkit-scrollbar {
  4423. height: 15px;
  4424. }
  4425. // .del_table_btn {
  4426. // position: absolute;
  4427. // right: 0px;
  4428. // top: -3px;
  4429. // z-index: 999;
  4430. // visibility: hidden;
  4431. // .el-button {
  4432. // width: 15px;
  4433. // height: 15px;
  4434. // padding: 0px;
  4435. // }
  4436. // }
  4437. #tem_table_data {
  4438. min-height: calc(100vh - 350px);
  4439. }
  4440. #tem_table_data ::-webkit-scrollbar {
  4441. height: 15px;
  4442. }
  4443. .el-table td,
  4444. .el-table th.is-leaf,
  4445. .el-table--border,
  4446. .el-table--group {
  4447. border-color: #d0d3da;
  4448. }
  4449. .el-table--border::after,
  4450. .el-table--group::after,
  4451. .el-table::before {
  4452. background-color: #d0d3da;
  4453. }
  4454. .el-table--border th {
  4455. border-color: #d0d3da;
  4456. }
  4457. .el-table--border td {
  4458. border-color: #d0d3da;
  4459. }
  4460. .el-table td {
  4461. border-color: #d0d3da;
  4462. }
  4463. .select_list_arrage {
  4464. width: 105px !important;
  4465. }
  4466. .checkSearch {
  4467. position: absolute;
  4468. top: 25px;
  4469. right: 120px;
  4470. }
  4471. .el-dialog__wrapper {
  4472. .el-dialog {
  4473. /deep/ .el-dialog__header {
  4474. background: #3a8ee6;
  4475. padding: 0px;
  4476. padding: 0 !important;
  4477. }
  4478. }
  4479. }
  4480. // .el-dialog__header {
  4481. // padding: 0 !important;
  4482. // }
  4483. </style>