tableData.vue 105KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478
  1. <template>
  2. <div id="table_data">
  3. <div class="cell clearfix" v-if="weekTime == 'thisWeek' || weekTime == 'nextWeek' || weekTime == 'nextTwoWeek' ">
  4. <div class="select_list">
  5. <!-- <span>班次:</span>-->
  6. <!-- <el-select-->
  7. <!-- v-model="schedule_type"-->
  8. <!-- placeholder="请选择"-->
  9. <!-- multiple-->
  10. <!-- >-->
  11. <!-- <el-option-->
  12. <!-- v-for="item in options"-->
  13. <!-- :key="item.id"-->
  14. <!-- :label="item.name"-->
  15. <!-- :value="item.id"-->
  16. <!-- >-->
  17. <!-- </el-option>-->
  18. <!-- </el-select>-->
  19. <span>日期:</span>
  20. <el-select
  21. v-model="week_type"
  22. placeholder="请选择"
  23. multiple
  24. @change="changeWeekDay"
  25. >
  26. <el-option
  27. v-for="(item,index) in weeks"
  28. :key="index"
  29. :label="item"
  30. :value="item"
  31. >
  32. </el-option>
  33. </el-select>
  34. <span>分区:</span>
  35. <el-select
  36. v-model="partition_id"
  37. multiple
  38. placeholder="请选择"
  39. @change="changePartiton"
  40. >
  41. <el-option
  42. v-for="item in this.zones"
  43. :key="item.id"
  44. :label="item.name"
  45. :value="item.id"
  46. >
  47. </el-option>
  48. </el-select>
  49. </div>
  50. <el-input
  51. size="small"
  52. style="width: 200px;margin-left: 20px"
  53. class="filter-item"
  54. v-model.trim="keywords"
  55. placeholder="病人名称/透析号"
  56. @keyup.enter.native='search'
  57. />
  58. <el-button
  59. size="small"
  60. class="filter-item"
  61. type="primary"
  62. icon="el-icon-search"
  63. @click="search"
  64. >搜索</el-button>
  65. <div class="switch">
  66. <el-switch
  67. v-model="value1"
  68. active-text="显示灌流器"
  69. @change="switchThis(value1)">
  70. </el-switch>
  71. </div>
  72. </div>
  73. <el-dialog :visible.sync="searchTableVisible" width="80%">
  74. <el-table
  75. :data="schedulePatients"
  76. :header-cell-style="{
  77. backgroundColor: 'rgb(245, 247, 250)',
  78. color: '#606266'
  79. }"
  80. :row-style="{ color: '#303133' }"
  81. style="width: 100%"
  82. border
  83. >
  84. <el-table-column label="姓名" width="120">
  85. <template slot-scope="scope">
  86. {{ scope.row.patient }}
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="透析日期" width="200">
  90. <template slot-scope="scope">
  91. {{ getDialysisDate(scope.row) }}
  92. </template>
  93. </el-table-column>
  94. <el-table-column label="分区">
  95. <template slot-scope="scope">
  96. {{ scope.row.zone.name }}
  97. </template>
  98. </el-table-column>
  99. <el-table-column label="班次" width="80">
  100. <template slot-scope="scope">
  101. {{ getSchedulesType(scope.row.schedule_type,scope.row) }}
  102. </template>
  103. </el-table-column>
  104. <el-table-column label="机号" width="80">
  105. <template slot-scope="scope">
  106. {{ scope.row.number.number }}
  107. </template>
  108. </el-table-column>
  109. <el-table-column label="透析模式" width="100">
  110. <template slot-scope="scope">
  111. {{ scope.row.mode.name }}
  112. </template>
  113. </el-table-column>
  114. <el-table-column label="操作" align="center" width="300">
  115. <template slot-scope="scope">
  116. <span v-if="now_time <=scope.row.schedule_date">
  117. <el-button
  118. size="mini"
  119. type="primary"
  120. @click="CancelSchedule(scope.row.id)"
  121. >
  122. 取消排班
  123. </el-button>
  124. <el-button
  125. size="mini"
  126. type="primary"
  127. @click="changeMachineNumber(scope.$index, scope.row)"
  128. >
  129. 调整机号
  130. </el-button>
  131. <el-button
  132. size="mini"
  133. type="primary"
  134. @click="changeMode(scope.$index, scope.row)"
  135. >
  136. 调整模式
  137. </el-button>
  138. </span>
  139. </template>
  140. </el-table-column>
  141. </el-table>
  142. </el-dialog>
  143. <!-- v-fit-columns -->
  144. <div class="center-tab">
  145. <el-table
  146. :row-style="{ color: '#303133' }"
  147. :header-cell-style="{
  148. backgroundColor: 'rgb(245, 247, 250)',
  149. color: '#606266'
  150. }"
  151. :fit="true"
  152. :data="scheduleZone"
  153. :span-method="objectSpanMethod"
  154. @cell-click="clickThis"
  155. @cell-mouse-enter="hoverMouse"
  156. :summary-method="getSummaries"
  157. show-summary
  158. :row-class-name="tableRowClassName"
  159. :cell-class-name="cellClass"
  160. sum-text="总数"
  161. :height="tableContainHeight"
  162. ref="table"
  163. style="table-layout: fixed;"
  164. >
  165. <!-- style="width: 100%;cursor: pointer;" -->
  166. <el-table-column
  167. prop="area"
  168. label="分区"
  169. min-width="50"
  170. align="center"
  171. fixed
  172. ></el-table-column>
  173. <el-table-column
  174. prop="cut"
  175. label="机号"
  176. align="center"
  177. min-width="40"
  178. fixed
  179. ></el-table-column>
  180. <el-table-column
  181. :label="' 周一(' + weekTitle[0] + ')'"
  182. v-if="isShowOne"
  183. align="center"
  184. >
  185. <!-- :width="flexColumnWidth('Mon_M',scheduleZone)" -->
  186. <el-table-column prop="Mon_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  187. <schedule-item
  188. slot-scope="scope"
  189. :schedule-detail="scope.row.Mon_M"
  190. :config="config"
  191. :schedulFlag="value1"
  192. ></schedule-item>
  193. </el-table-column>
  194. <el-table-column prop="Mon_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  195. <schedule-item
  196. slot-scope="scope"
  197. :schedule-detail="scope.row.Mon_A"
  198. :config="config"
  199. :schedulFlag="value1"
  200. ></schedule-item>
  201. </el-table-column>
  202. <el-table-column prop="Mon_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  203. <schedule-item
  204. slot-scope="scope"
  205. :schedule-detail="scope.row.Mon_N"
  206. :config="config"
  207. :schedulFlag="value1"
  208. ></schedule-item>
  209. </el-table-column>
  210. </el-table-column>
  211. <el-table-column
  212. :label="'周二 (' + weekTitle[1] + ')'"
  213. min-width="120"
  214. v-if="isShowTwo"
  215. align="center"
  216. :fit="true"
  217. >
  218. <el-table-column prop="Tue_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  219. <schedule-item
  220. slot-scope="scope"
  221. :schedule-detail="scope.row.Tue_M"
  222. :config="config"
  223. :schedulFlag="value1"
  224. ></schedule-item>
  225. </el-table-column>
  226. <el-table-column prop="Tue_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  227. <schedule-item
  228. slot-scope="scope"
  229. :schedule-detail="scope.row.Tue_A"
  230. :config="config"
  231. :schedulFlag="value1"
  232. ></schedule-item>
  233. </el-table-column>
  234. <el-table-column prop="Tue_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  235. <schedule-item
  236. slot-scope="scope"
  237. :schedule-detail="scope.row.Tue_N"
  238. :config="config"
  239. :schedulFlag="value1"
  240. ></schedule-item>
  241. </el-table-column>
  242. </el-table-column>
  243. <el-table-column
  244. :label="'周三 (' + weekTitle[2] + ')'"
  245. v-if="isShowThree"
  246. align="center"
  247. >
  248. <el-table-column prop="Wed_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  249. <schedule-item
  250. slot-scope="scope"
  251. :schedule-detail="scope.row.Wed_M"
  252. :config="config"
  253. :schedulFlag="value1"
  254. ></schedule-item>
  255. </el-table-column>
  256. <el-table-column prop="Wed_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  257. <schedule-item
  258. slot-scope="scope"
  259. :schedule-detail="scope.row.Wed_A"
  260. :config="config"
  261. :schedulFlag="value1"
  262. ></schedule-item>
  263. </el-table-column>
  264. <el-table-column prop="Wed_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  265. <schedule-item
  266. slot-scope="scope"
  267. :config="config"
  268. :schedulFlag="value1"
  269. :schedule-detail="scope.row.Wed_N"
  270. ></schedule-item>
  271. </el-table-column>
  272. </el-table-column>
  273. <el-table-column
  274. :label="'周四 (' + weekTitle[3] + ')'"
  275. align="center"
  276. v-if="isShowFour"
  277. >
  278. <el-table-column prop="Thurs_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  279. <schedule-item
  280. slot-scope="scope"
  281. :config="config"
  282. :schedule-detail="scope.row.Thurs_M"
  283. :schedulFlag="value1"
  284. ></schedule-item>
  285. </el-table-column>
  286. <el-table-column prop="Thurs_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  287. <schedule-item
  288. slot-scope="scope"
  289. :schedule-detail="scope.row.Thurs_A"
  290. :config="config"
  291. :schedulFlag="value1"
  292. ></schedule-item>
  293. </el-table-column>
  294. <el-table-column prop="Thurs_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  295. <schedule-item
  296. slot-scope="scope"
  297. :schedule-detail="scope.row.Thurs_N"
  298. :config="config"
  299. :schedulFlag="value1"
  300. ></schedule-item>
  301. </el-table-column>
  302. </el-table-column>
  303. <el-table-column
  304. :label="'周五 (' + weekTitle[4] + ')'"
  305. align="center"
  306. v-if="isShowFive"
  307. >
  308. <el-table-column prop="Fri_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  309. <schedule-item
  310. slot-scope="scope"
  311. :schedule-detail="scope.row.Fri_M"
  312. :config="config"
  313. :schedulFlag="value1"
  314. ></schedule-item>
  315. </el-table-column>
  316. <el-table-column prop="Fri_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  317. <schedule-item
  318. slot-scope="scope"
  319. :schedule-detail="scope.row.Fri_A"
  320. :config="config"
  321. :schedulFlag="value1"
  322. ></schedule-item>
  323. </el-table-column>
  324. <el-table-column prop="Fri_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  325. <schedule-item
  326. slot-scope="scope"
  327. :schedule-detail="scope.row.Fri_N"
  328. :config="config"
  329. :schedulFlag="value1"
  330. ></schedule-item>
  331. </el-table-column>
  332. </el-table-column>
  333. <el-table-column
  334. :label="'周六 (' + weekTitle[5] + ')'"
  335. align="center"
  336. v-if="isShowSix"
  337. >
  338. <el-table-column prop="Sat_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  339. <schedule-item
  340. slot-scope="scope"
  341. :schedule-detail="scope.row.Sat_M"
  342. :config="config"
  343. :schedulFlag="value1"
  344. ></schedule-item>
  345. </el-table-column>
  346. <el-table-column prop="Sat_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  347. <schedule-item
  348. slot-scope="scope"
  349. :schedule-detail="scope.row.Sat_A"
  350. :config="config"
  351. :schedulFlag="value1"
  352. ></schedule-item>
  353. </el-table-column>
  354. <el-table-column prop="Sat_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  355. <schedule-item
  356. slot-scope="scope"
  357. :schedule-detail="scope.row.Sat_N"
  358. :config="config"
  359. :schedulFlag="value1"
  360. ></schedule-item>
  361. </el-table-column>
  362. </el-table-column>
  363. <el-table-column
  364. :label="'周日 (' + weekTitle[6] + ')'"
  365. align="center"
  366. v-if="isShowSeven"
  367. >
  368. <el-table-column prop="Sun_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  369. <schedule-item
  370. slot-scope="scope"
  371. :schedule-detail="scope.row.Sun_M"
  372. :config="config"
  373. :schedulFlag="value1"
  374. ></schedule-item>
  375. </el-table-column>
  376. <el-table-column prop="Sun_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  377. <schedule-item
  378. slot-scope="scope"
  379. :schedule-detail="scope.row.Sun_A"
  380. :config="config"
  381. :schedulFlag="value1"
  382. ></schedule-item>
  383. </el-table-column>
  384. <el-table-column prop="Sun_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  385. <schedule-item
  386. slot-scope="scope"
  387. :schedule-detail="scope.row.Sun_N"
  388. :config="config"
  389. :schedulFlag="value1"
  390. >
  391. <!-- -->
  392. </schedule-item>
  393. </el-table-column>
  394. </el-table-column>
  395. </el-table>
  396. </div>
  397. <!-- 调整模式 -->
  398. <el-dialog
  399. title="调整模式"
  400. :visible.sync="msDialogVisible"
  401. width="500px"
  402. v-loading="changing_mode"
  403. :modal-append-to-body='false'
  404. :close-on-click-modal="false"
  405. >
  406. <div>
  407. <el-form
  408. :model="changeSchedule"
  409. ref="changeSchedule"
  410. :rules="changeRules"
  411. >
  412. <el-form-item label="" prop="mode_id">
  413. <el-select
  414. v-model="changeSchedule.mode_id"
  415. placeholder="请选择"
  416. style="width: 100%"
  417. >
  418. <el-option
  419. :disabled="item.id == currentData.mode_id"
  420. v-for="item in modeOptions"
  421. :key="item.id"
  422. :label="item.name"
  423. :value="item.id"
  424. >
  425. </el-option>
  426. </el-select>
  427. </el-form-item>
  428. </el-form>
  429. </div>
  430. <span slot="footer" class="dialog-footer">
  431. <el-button @click="msDialogVisible = false">取 消</el-button>
  432. <el-button
  433. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  434. type="primary"
  435. @click="submitMode('changeSchedule')"
  436. >保 存</el-button
  437. >
  438. </span>
  439. </el-dialog>
  440. <!--调整机号 -->
  441. <el-dialog
  442. title="调整机号"
  443. :visible.sync="jhDialogVisible"
  444. width="500px"
  445. v-loading="changing_bed"
  446. :modal-append-to-body='false'
  447. :close-on-click-modal="false"
  448. >
  449. <div>
  450. <el-form
  451. :model="changeSchedule"
  452. ref="changeSchedule"
  453. :rules="changeRules"
  454. label-width="90px"
  455. >
  456. <el-form-item label="排班日期: ">
  457. <el-input v-model="currentData.schedule_date" disabled></el-input>
  458. </el-form-item>
  459. <el-form-item label="班次: " prop="schedule_type">
  460. <el-select
  461. v-model="changeSchedule.schedule_type"
  462. placeholder="请选择"
  463. style="width: 100%"
  464. @change="changeScheduleType"
  465. >
  466. <el-option
  467. v-for="item in scheduleType"
  468. :key="item.id"
  469. :label="item.name"
  470. :value="item.id"
  471. >
  472. </el-option>
  473. </el-select>
  474. </el-form-item>
  475. <el-form-item label="分区: " prop="partition_id">
  476. <el-select
  477. v-model="zone_name"
  478. placeholder="请选择"
  479. style="width: 100%"
  480. @change="changePartition"
  481. >
  482. <el-option
  483. v-for="(item, index) in zones"
  484. :key="index"
  485. :label="item.name"
  486. :value="item.id"
  487. >
  488. </el-option>
  489. </el-select>
  490. </el-form-item>
  491. <el-form-item label="透析机: " prop="bed_id">
  492. <el-select
  493. v-model="device_id"
  494. placeholder="请选择"
  495. style="width: 100%"
  496. >
  497. <el-option
  498. v-for="item in current_devices"
  499. :key="item.id"
  500. :label="item.number"
  501. :value="item.id"
  502. >
  503. </el-option>
  504. </el-select>
  505. </el-form-item>
  506. </el-form>
  507. </div>
  508. <span slot="footer" class="dialog-footer">
  509. <el-button @click="jhDialogVisible = false">取 消</el-button>
  510. <el-button
  511. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  512. type="primary"
  513. @click="submitTiaoZJH('changeSchedule')"
  514. >保 存</el-button>
  515. <!-- -->
  516. </span>
  517. </el-dialog>
  518. <!-- <el-dialog
  519. title="排班"
  520. :visible.sync="dialogTableVisible"
  521. width="1000px;"
  522. :v-model="dialog"
  523. v-loading="creating_schedule"
  524. >
  525. <div>
  526. <div class="cell clearfix">
  527. <label class="title"><span class="name">当前排班</span> : </label>
  528. <div class="time ">
  529. <ul class="">
  530. <span class="current"
  531. >日期 : {{ currentData.schedule_date }} &nbsp;&nbsp; 班次 :
  532. {{ currentData.type_name }} &nbsp;&nbsp; 病房 :
  533. {{ currentData.zone_name }} &nbsp;&nbsp; 透析机 :
  534. {{ currentData.bed_name }}
  535. </span>
  536. </ul>
  537. </div>
  538. </div>
  539. <div class="cell clearfix">
  540. <label class="title"><span class="name">患者搜索</span> : </label>
  541. <div class="time ">
  542. <ul class="">
  543. <el-input
  544. size="medium"
  545. v-model="searchKey"
  546. placeholder="请输入搜索的内容"
  547. style="width:260px"
  548. @keyup.enter.native='SubmitSearch'
  549. ></el-input>
  550. <el-button
  551. type="primary"
  552. icon="el-icon-search"
  553. @click="SubmitSearch"
  554. >搜索</el-button
  555. >
  556. </ul>
  557. </div>
  558. </div>
  559. <div class="cell clearfix">
  560. <label class="title"><span class="name">排班</span> : </label>
  561. <div class="time ">
  562. <ul class="">
  563. <li
  564. v-for="item in schedulArr"
  565. @click="changeSearchSchedule(item.value)"
  566. :key="item.value"
  567. :class="patientQuery.schedule == item.value ? 'active' : ''"
  568. >
  569. {{ item.label }}
  570. </li>
  571. </ul>
  572. </div>
  573. </div>-->
  574. <!-- <div class="cell clearfix">
  575. <label class="title"><span class="name">标签</span> : </label>
  576. <div class="time ">
  577. <ul class="">
  578. <li v-for="item in tagArr" :key="item.value" >{{item.label}}</li>
  579. </ul>
  580. </div>
  581. </div> -->
  582. </div>
  583. </template>
  584. <script>
  585. import { uParseTime } from "@/utils/tools";
  586. import print from 'print-js'
  587. const moment = require('moment')
  588. import {
  589. CancelSchedule,
  590. ChangeSchedule,
  591. CreateSchedule,
  592. getSchedulePatients,
  593. getSchedulesOne,
  594. getSearchResult,
  595. getUrgentScheduleInitData,
  596. getWeekPanelsOne,
  597. getAllZones,
  598. } from "@/api/schedule";
  599. import {
  600. getSmartDevices
  601. } from "@/api/schedule_template/sch_template";
  602. import ScheduleItem from "./ScheduleItem";
  603. const weekOptions = ['周一','周二','周三','周四','周五','周六','周日'];
  604. let rowNumber = 0;
  605. export default {
  606. name: "tableData",
  607. props: {
  608. is_edit:{
  609. type: Boolean,
  610. default: false,
  611. },
  612. weekTime: {
  613. type: String,
  614. default: "thisWeek"
  615. },
  616. // 机号数
  617. scheduleZoneRowProp: {
  618. type: Array,
  619. dafault: []
  620. },
  621. // scheduleZoneProp: {
  622. // type: Array,
  623. // dafault: []
  624. // },
  625. // 分区
  626. partitionsProp: {
  627. type: Object,
  628. dafault: {}
  629. },
  630. config: {
  631. type: Object,
  632. dafault: {}
  633. },
  634. },
  635. data() {
  636. return {
  637. tableContainHeight:null,
  638. value1:false,
  639. // tableHeight:'window.innerHeight - 0',
  640. // rowClass: "table-row-new-class schedule-table-row",
  641. weeks:weekOptions,
  642. searchKey: "",
  643. tiaoZhengType: 1,
  644. modeOptions: null,
  645. keywords: "",
  646. schedulePatients: [],
  647. searchTableVisible: false,
  648. // dialog: {
  649. // tag: ""
  650. // },
  651. patients: [],
  652. toDay: "",
  653. schedulArr: [
  654. { value: 0, label: "不限" },
  655. { value: 2, label: "未排班" },
  656. { value: 1, label: "已排班" }
  657. ],
  658. tagArr: [
  659. { value: 1, label: "不限" },
  660. { value: 2, label: "透析记录" },
  661. { value: 3, label: "传染病" }
  662. ],
  663. diseasesArr: [{ value: 0, label: "不限" }],
  664. scheduleType: [
  665. { id: 1, name: "上午" },
  666. { id: 2, name: "下午" },
  667. { id: 3, name: "晚上" }
  668. ],
  669. // dialogTableVisible: false,
  670. tzDialogVisible: false,
  671. msDialogVisible: false,
  672. jhDialogVisible: false,
  673. // scheduleZone: this.scheduleZoneProp,
  674. scheduleZoneRow: -1,
  675. partitions: [],
  676. jihaos: [],
  677. weekTitle: ["", "", "", "", "", "", ""],
  678. weekList: ["", "", "", "", "", "", ""],
  679. weekDays: ["", "", "", "", "", "", ""],
  680. currentData: {
  681. id: 0,
  682. schedule_date: "",
  683. schedule_type: 0,
  684. bed_id: 0,
  685. partition_id: 0,
  686. patient_id: 0,
  687. schedule_week: 0,
  688. mode_id: 0,
  689. type_name: "",
  690. bed_name: "",
  691. partition_type: 0,
  692. contagions: [],
  693. patient: ""
  694. },
  695. changeSchedule: {
  696. mode_id: "",
  697. schedule_type: "",
  698. partition_id: "",
  699. bed_id: "",
  700. schedule_week: "",
  701. partition_type: ""
  702. },
  703. patientQuery: {
  704. keywords: "",
  705. schedule: 0,
  706. contagion: 0
  707. },
  708. tiaozhengclass: "tiaozhengclass",
  709. changeRules: {
  710. mode_id: [{ required: true, message: "请选择模式", trigger: "blur" }],
  711. schedule_type: [
  712. { required: true, message: "请选择班次", trigger: "blur" }
  713. ],
  714. partition_id: [
  715. { required: true, message: "请选择病房", trigger: "blur" }
  716. ],
  717. bed_id: [{ required: true, message: "请选择透析机", trigger: "blur" }]
  718. },
  719. weekday: 0,
  720. creating_schedule: false,
  721. changing_mode: false,
  722. changing_bed: false,
  723. tableHeight: document.documentElement.clientHeight,
  724. origin_schedules: [],
  725. origin_device_numbers: [],
  726. zone_device_map: {},
  727. device_id: 0,
  728. zone_name: "",
  729. current_devices: [],
  730. zone_names: [],
  731. zone_namess:[],
  732. zone_device_options: [],
  733. options:[
  734. {id:1,name:"上午"},
  735. {id:2,name:"下午"},
  736. {id:3,name:"晚上"},
  737. ],
  738. partition_id:0,
  739. schedule_type:[],
  740. week_type:[],
  741. zones:[],
  742. theType:"",
  743. scheduleZone:[],
  744. source_scheduleZone:[],
  745. theWeek: {
  746. lastWeek: 0,
  747. thisWeek: 0,
  748. nextWeek: 0,
  749. nextTwoWeek: 0
  750. },
  751. zoneIdList:[],
  752. strArr:"",
  753. patient_id_hover:0,
  754. now_time:"",
  755. isShowOne:true,
  756. isShowTwo:true,
  757. isShowThree:true,
  758. isShowFour:true,
  759. isShowFive:true,
  760. isShowSix:true,
  761. isShowSeven:true,
  762. isShowShangWu:true,
  763. isShowXiaWu:true,
  764. isShowWanShang:true,
  765. schedulesGroup:[]
  766. };
  767. },
  768. watch: {
  769. schedule_type:function (){
  770. this.isShowShangWu = false
  771. this.isShowXiaWu = false
  772. this.isShowWanShang = false
  773. if(this.schedule_type.length > 0) {
  774. for (let i = 0; i < this.schedule_type.length; i++) {
  775. if (this.schedule_type[i] == 1) {
  776. this.isShowShangWu = true
  777. } else if (this.schedule_type[i] == 2) {
  778. this.isShowXiaWu = true
  779. } else if (this.schedule_type[i] == 3) {
  780. this.isShowWanShang = true
  781. }
  782. }
  783. }else{
  784. this.isShowShangWu = true
  785. this.isShowXiaWu = true
  786. this.isShowWanShang = true
  787. }
  788. // console.log(this.source_scheduleZone)
  789. //删除对应数据
  790. // var list = this.source_scheduleZone
  791. // var list1 = this.source_scheduleZone
  792. // var list2 = this.source_scheduleZone
  793. //
  794. // if(this.isShowShangWu){
  795. // for(let i = 0; i < list.length; i++){
  796. // for(var key in list[i]){
  797. // if(key.indexOf("_A") != -1 || key.indexOf("_N") != -1 ){
  798. // delete list[i][key]
  799. // }
  800. // }
  801. // }
  802. // }
  803. //
  804. // if(this.isShowXiaWu){
  805. // for(let i = 0; list1.length; i++){
  806. // for(var key in list1[i]){
  807. // if(key.indexOf("_M") != -1 || key.indexOf("_N") != -1 ){
  808. // delete list1[i][key]
  809. // }
  810. // }
  811. // }
  812. // }
  813. //
  814. // if(this.isShowWanShang){
  815. // for(let i = 0; list2.length; i++){
  816. // for(var key in list2[i]){
  817. // if(key.indexOf("_A") != -1 || key.indexOf("_M") != -1 ){
  818. // delete list2[i][key]
  819. // }
  820. // }
  821. // }
  822. //
  823. // }
  824. // if(this.week_type.length > 0){
  825. // if(this.week_type.indexOf("周一") != -1){
  826. //
  827. // }
  828. // if(this.week_type.indexOf("周二") != -1){
  829. //
  830. //
  831. // }
  832. // if(this.week_type.indexOf("周三") != -1){
  833. //
  834. //
  835. // }
  836. // if(this.week_type.indexOf("周四") != -1){
  837. //
  838. //
  839. // }
  840. // if(this.week_type.indexOf("周五") != -1){
  841. //
  842. //
  843. // }
  844. // if(this.week_type.indexOf("周六") != -1){
  845. //
  846. //
  847. // }
  848. // if(this.week_type.indexOf("周日") != -1){
  849. //
  850. //
  851. // }
  852. //
  853. // }
  854. },
  855. week_type:function () {
  856. // console.log(this.week_type)
  857. // console.log(this.schedule_type)
  858. // console.log(this.scheduleZone)
  859. this.isShowOne = false
  860. this.isShowTwo = false
  861. this.isShowThree = false
  862. this.isShowFour = false
  863. this.isShowFive = false
  864. this.isShowSix = false
  865. this.isShowSeven = false
  866. if(this.week_type.length > 0) {
  867. for (let i = 0; i < this.week_type.length; i++) {
  868. if (this.week_type[i] == "周一") {
  869. this.isShowOne = true
  870. } else if (this.week_type[i] == "周二") {
  871. this.isShowTwo = true
  872. } else if (this.week_type[i] == "周三") {
  873. this.isShowThree = true
  874. } else if (this.week_type[i] == "周四") {
  875. this.isShowFour = true
  876. } else if (this.week_type[i] == "周五") {
  877. this.isShowFive = true
  878. } else if (this.week_type[i] == "周六") {
  879. this.isShowSix = true
  880. } else if (this.week_type[i] == "周日") {
  881. this.isShowSeven = true
  882. }
  883. }
  884. }else{
  885. this.isShowOne = true
  886. this.isShowTwo = true
  887. this.isShowThree = true
  888. this.isShowFour = true
  889. this.isShowFive = true
  890. this.isShowSix = true
  891. this.isShowSeven = true
  892. }
  893. },
  894. weekTime: function() {
  895. var theType = this.weekType(this.weekTime);
  896. // console.log("999999999",theType)
  897. this.theType = theType
  898. this.getSchedules();
  899. },
  900. scheduleZoneRow: function() {
  901. var theType = this.weekType(this.weekTime);
  902. this.theType = theType
  903. this.getSchedules();
  904. },
  905. tableHeight(val) {
  906. if (!this.timer) {
  907. this.tableHeight = val;
  908. this.timer = true;
  909. const that = this;
  910. setTimeout(function() {
  911. that.timer = false;
  912. }, 400);
  913. }
  914. }
  915. },
  916. methods: {
  917. switchThis(flag){
  918. // // if(this.value1==true){
  919. // // this.value1=false
  920. // // }
  921. // this.value1=true
  922. // this.value1 =!flag
  923. flag =! this.value1
  924. },
  925. getData(){
  926. return this.scheduleZone
  927. },
  928. compare(p){ //这是比较函数
  929. return function(m,n){
  930. var a = m[p];
  931. var b = n[p];
  932. return a - b; //升序
  933. }
  934. },
  935. getWeekPanels() {
  936. this.scheduleZone=[]
  937. var partionStr = this.partition_id
  938. var arr = this.zoneIdList.join(',')
  939. var str = ""
  940. if(partionStr == 0){
  941. str = arr
  942. }
  943. if(partionStr != 0){
  944. str = partionStr.join(',')
  945. }
  946. getWeekPanelsOne(1,str).then(response => {
  947. if (response.data.state == 0) {
  948. return false
  949. }
  950. var partitions = response.data.data.partitions
  951. console.log("partitions",partitions)
  952. this.theWeek.thisWeek = response.data.data.theWeek
  953. this.theWeek.lastWeek = this.theWeek.thisWeek - 1
  954. this.theWeek.nextWeek = this.theWeek.thisWeek + 1
  955. this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
  956. var that = this
  957. if (partitions.length > 0) {
  958. partitions.forEach(function(partition) {
  959. if (partition.jihaos.length == 0) {
  960. return false
  961. }
  962. that.scheduleZoneRow.push(partition.jihaos.length)
  963. that.partitions[partition.id] = partition
  964. partition.jihaos.forEach(function(jihao) {
  965. var thisPa = {
  966. area: partition.name,
  967. zone_id: partition.id,
  968. zone_type: partition.type,
  969. cut: jihao.number,
  970. jihao_id: jihao.id,
  971. sort:jihao.sort,
  972. Mon_M: {
  973. schedule_id: 0,
  974. mode_id: 0,
  975. mode_name: '',
  976. patient_id: 0,
  977. patient: '',
  978. dialysis_machine_name:'',
  979. schedule_date:"",
  980. Count:0,
  981. },
  982. Mon_A: {
  983. schedule_id: 0,
  984. mode_id: 0,
  985. mode_name: '',
  986. patient_id: 0,
  987. patient: '',
  988. dialysis_machine_name:'',
  989. schedule_date:"",
  990. Count:0,
  991. },
  992. Mon_N: {
  993. schedule_id: 0,
  994. mode_id: 0,
  995. mode_name: '',
  996. patient_id: 0,
  997. patient: '',
  998. dialysis_machine_name:'',
  999. schedule_date:"",
  1000. Count:0,
  1001. },
  1002. Tue_M: {
  1003. schedule_id: 0,
  1004. mode_id: 0,
  1005. mode_name: '',
  1006. patient_id: 0,
  1007. patient: '',
  1008. dialysis_machine_name:'',
  1009. schedule_date:"",
  1010. Count:0,
  1011. },
  1012. Tue_A: {
  1013. schedule_id: 0,
  1014. mode_id: 0,
  1015. mode_name: '',
  1016. patient_id: 0,
  1017. patient: '',
  1018. dialysis_machine_name:'',
  1019. schedule_date:"",
  1020. Count:0,
  1021. },
  1022. Tue_N: {
  1023. schedule_id: 0,
  1024. mode_id: 0,
  1025. mode_name: '',
  1026. patient_id: 0,
  1027. patient: '',
  1028. dialysis_machine_name:'',
  1029. schedule_date:"",
  1030. Count:0,
  1031. },
  1032. Wed_M: {
  1033. schedule_id: 0,
  1034. mode_id: 0,
  1035. mode_name: '',
  1036. patient_id: 0,
  1037. patient: '',
  1038. dialysis_machine_name:'',
  1039. schedule_date:"",
  1040. Count:0,
  1041. },
  1042. Wed_A: {
  1043. schedule_id: 0,
  1044. mode_id: 0,
  1045. mode_name: '',
  1046. patient_id: 0,
  1047. patient: '',
  1048. dialysis_machine_name:'',
  1049. schedule_date:"",
  1050. Count:0,
  1051. },
  1052. Wed_N: {
  1053. schedule_id: 0,
  1054. mode_id: 0,
  1055. mode_name: '',
  1056. patient_id: 0,
  1057. patient: '',
  1058. dialysis_machine_name:'',
  1059. schedule_date:"",
  1060. Count:0,
  1061. },
  1062. Thurs_M: {
  1063. schedule_id: 0,
  1064. mode_id: 0,
  1065. mode_name: '',
  1066. patient_id: 0,
  1067. patient: '',
  1068. dialysis_machine_name:'',
  1069. schedule_date:"",
  1070. Count:0,
  1071. },
  1072. Thurs_A: {
  1073. schedule_id: 0,
  1074. mode_id: 0,
  1075. mode_name: '',
  1076. patient_id: 0,
  1077. patient: '',
  1078. dialysis_machine_name:'',
  1079. schedule_date:"",
  1080. Count:0,
  1081. },
  1082. Thurs_N: {
  1083. schedule_id: 0,
  1084. mode_id: 0,
  1085. mode_name: '',
  1086. patient_id: 0,
  1087. patient: '',
  1088. dialysis_machine_name:'',
  1089. schedule_date:"",
  1090. Count:0,
  1091. },
  1092. Fri_M: {
  1093. schedule_id: 0,
  1094. mode_id: 0,
  1095. mode_name: '',
  1096. patient_id: 0,
  1097. patient: '',
  1098. dialysis_machine_name:'',
  1099. schedule_date:"",
  1100. Count:0,
  1101. },
  1102. Fri_A: {
  1103. schedule_id: 0,
  1104. mode_id: 0,
  1105. mode_name: '',
  1106. patient_id: 0,
  1107. patient: '',
  1108. dialysis_machine_name:'',
  1109. schedule_date:"",
  1110. Count:0,
  1111. },
  1112. Fri_N: {
  1113. schedule_id: 0,
  1114. mode_id: 0,
  1115. mode_name: '',
  1116. patient_id: 0,
  1117. patient: '',
  1118. dialysis_machine_name:'',
  1119. schedule_date:"",
  1120. Count:0,
  1121. },
  1122. Sat_M: {
  1123. schedule_id: 0,
  1124. mode_id: 0,
  1125. mode_name: '',
  1126. patient_id: 0,
  1127. patient: '',
  1128. dialysis_machine_name:'',
  1129. schedule_date:"",
  1130. Count:0,
  1131. },
  1132. Sat_A: {
  1133. schedule_id: 0,
  1134. mode_id: 0,
  1135. mode_name: '',
  1136. patient_id: 0,
  1137. patient: '',
  1138. dialysis_machine_name:'',
  1139. schedule_date:"",
  1140. Count:0,
  1141. },
  1142. Sat_N: {
  1143. schedule_id: 0,
  1144. mode_id: 0,
  1145. mode_name: '',
  1146. patient_id: 0,
  1147. patient: '',
  1148. dialysis_machine_name:'',
  1149. schedule_date:"",
  1150. Count:0,
  1151. },
  1152. Sun_A: {
  1153. schedule_id: 0,
  1154. mode_id: 0,
  1155. mode_name: '',
  1156. patient_id: 0,
  1157. patient: '',
  1158. dialysis_machine_name:'',
  1159. schedule_date:"",
  1160. Count:0,
  1161. },
  1162. Sun_N: {
  1163. schedule_id: 0,
  1164. mode_id: 0,
  1165. mode_name: '',
  1166. patient_id: 0,
  1167. patient: '',
  1168. dialysis_machine_name:'',
  1169. schedule_date:"",
  1170. Count:0,
  1171. },
  1172. Sun_M: {
  1173. schedule_id: 0,
  1174. mode_id: 0,
  1175. mode_name: '',
  1176. patient_id: 0,
  1177. patient: '',
  1178. dialysis_machine_name:'',
  1179. schedule_date:"",
  1180. Count:0,
  1181. },
  1182. total: 0
  1183. }
  1184. that.scheduleZone.push(thisPa)
  1185. })
  1186. })
  1187. }
  1188. this.scheduleZone.sort(this.compare('sort'))
  1189. this.source_scheduleZone = this.scheduleZone
  1190. console.log("34455555566666",this.source_scheduleZone)
  1191. })
  1192. },
  1193. cellClass({ row, column, rowIndex, columnIndex }) {
  1194. if(columnIndex==1&&row.zone_type==2){
  1195. // console.log(columnIndex,row.zone_type);
  1196. return "table-row-new-class schedule-table-row Infectious_disease";
  1197. }
  1198. if (columnIndex == 0 || columnIndex == 1 || columnIndex == 23) {
  1199. return "";
  1200. } else {
  1201. if (this.weekTime == "lastWeek") {
  1202. if(row[column.property].patient_id > 0 && row[column.property].patient_id == this.patient_id_hover){
  1203. return 'hover-td schedule-table-cell-disable'
  1204. }else {
  1205. return 'schedule-table-cell-disable'
  1206. }
  1207. // return "schedule-table-cell-disable";
  1208. } else if (this.weekTime == "thisWeek") {
  1209. var weekday = Math.floor((columnIndex - 2) / 3 + 1);
  1210. if (weekday < this.weekday) {
  1211. if(row[column.property].patient_id > 0 && row[column.property].patient_id == this.patient_id_hover){
  1212. return 'hover-td schedule-table-cell-disable'
  1213. }else {
  1214. return 'schedule-table-cell-disable'
  1215. }
  1216. // return "schedule-table-cell-disable";
  1217. }else {
  1218. if(row[column.property].patient_id > 0 && row[column.property].patient_id == this.patient_id_hover){
  1219. return 'hover-td'
  1220. }else {
  1221. return ''
  1222. }
  1223. }
  1224. }
  1225. }
  1226. return "";
  1227. },
  1228. // SubmitSearch() {
  1229. // this.patientQuery.keywords = this.searchKey;
  1230. // this.getSchedulePatients();
  1231. // },
  1232. changeSearchContagion(id) {
  1233. this.patientQuery.contagion = id;
  1234. this.getSchedulePatients();
  1235. },
  1236. // changeSearchSchedule(id) {
  1237. // this.patientQuery.schedule = id;
  1238. // this.getSchedulePatients();
  1239. // },
  1240. getSummaries(param) {
  1241. const { columns, data } = param;
  1242. const sums = [];
  1243. columns.forEach((column, index) => {
  1244. if (index === 0 ) {
  1245. sums[index] = "总数";
  1246. return;
  1247. }
  1248. if (index === 1 ) {
  1249. sums[index] = data.length;
  1250. return;
  1251. }
  1252. const values = data.map(item => item[column.property]);
  1253. sums[index] = values.reduce((prev, curr) => {
  1254. if (typeof curr["mode_id"] === "undefined") {
  1255. return prev;
  1256. }
  1257. const value = Number(curr["mode_id"]);
  1258. if (!isNaN(value) && value > 0) {
  1259. return prev + 1;
  1260. } else {
  1261. return prev;
  1262. }
  1263. }, 0);
  1264. sums[index];
  1265. });
  1266. this.$nextTick(() => {
  1267. this.$refs.table.doLayout();
  1268. });
  1269. //表格某列全部数据
  1270. var Mon_M = []
  1271. var Mon_A = []
  1272. var Mon_N = []
  1273. var Tue_M =[]
  1274. var Tue_A = []
  1275. var Tue_N = []
  1276. var Wed_M = []
  1277. var Wed_A = []
  1278. var Wed_N = []
  1279. var Thurs_M = []
  1280. var Thurs_A = []
  1281. var Thurs_N = []
  1282. var Fri_M = []
  1283. var Fri_A = []
  1284. var Fri_N = []
  1285. var Sat_M = []
  1286. var Sat_A = []
  1287. var Sat_N = []
  1288. var Sun_M = []
  1289. var Sun_A = []
  1290. var Sun_N = []
  1291. // 操作后数据
  1292. var Mon_M_One= []
  1293. var Mon_A_One = []
  1294. var Mon_N_One = []
  1295. var Tue_M_One =[]
  1296. var Tue_A_One = []
  1297. var Tue_N_One = []
  1298. var Wed_M_One = []
  1299. var Wed_A_One = []
  1300. var Wed_N_One = []
  1301. var Thurs_M_One = []
  1302. var Thurs_A_One = []
  1303. var Thurs_N_One = []
  1304. var Fri_M_One = []
  1305. var Fri_A_One = []
  1306. var Fri_N_One = []
  1307. var Sat_M_One = []
  1308. var Sat_A_One = []
  1309. var Sat_N_One = []
  1310. var Sun_M_One = []
  1311. var Sun_A_One = []
  1312. var Sun_N_One= []
  1313. for(let j in data){
  1314. if(data[j].hasOwnProperty ('Mon_A') == true){
  1315. Mon_A.push(data[j].Mon_A.mode_name)
  1316. Mon_A=Mon_A.filter(item=> item && item.trim())//去掉空字符串
  1317. var countNum =Mon_A.reduce((obj,name)=>{
  1318. if(name in obj){
  1319. obj[name]++
  1320. }else{
  1321. obj[name]=1
  1322. }
  1323. return obj
  1324. },{})
  1325. }
  1326. }
  1327. for(let x in countNum){
  1328. Mon_A_One.push(x + ':' + countNum[x]+"\n")
  1329. }
  1330. var result = [];
  1331. for (var i = 0,len = Mon_A_One.length; i < len; i+=29) {
  1332. var strObjcet = Mon_A_One.slice(i, i+29);
  1333. var str = strObjcet.toString();
  1334. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1335. result.push(str);
  1336. }
  1337. sums[3]="总人数:"+ sums[3] +"\n"+result
  1338. for(let j in data){
  1339. if(data[j].hasOwnProperty ('Mon_M') == true){
  1340. Mon_M.push(data[j].Mon_M.mode_name)
  1341. Mon_M=Mon_M.filter(item=> item && item.trim())
  1342. var countNum =Mon_M.reduce((obj,name)=>{
  1343. if(name in obj){
  1344. obj[name]++
  1345. }else{
  1346. obj[name]=1
  1347. }
  1348. return obj
  1349. },{})
  1350. }
  1351. }
  1352. for(let x in countNum){
  1353. // console.log(x);
  1354. Mon_M_One.push(x + ':' + countNum[x]+"\n")
  1355. }
  1356. var result = [];
  1357. for (var i = 0,len = Mon_M_One.length; i < len; i+=29) {
  1358. var strObjcet = Mon_M_One.slice(i, i+29);
  1359. var str = strObjcet.toString();
  1360. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1361. result.push(str);
  1362. }
  1363. sums[2]="总人数:"+ sums[2] +"\n"+result
  1364. for(let j in data){
  1365. if(data[j].hasOwnProperty ('Mon_N') == true){
  1366. Mon_N.push(data[j].Mon_N.mode_name)
  1367. Mon_N=Mon_N.filter(item=> item && item.trim())
  1368. var countNum =Mon_N.reduce((obj,name)=>{
  1369. if(name in obj){
  1370. obj[name]++
  1371. }else{
  1372. obj[name]=1
  1373. }
  1374. return obj
  1375. },{})
  1376. }
  1377. }
  1378. for(let x in countNum){
  1379. Mon_N_One.push(x + ':' + countNum[x]+"\n")
  1380. }
  1381. var result = [];
  1382. for (var i = 0,len = Mon_N_One.length; i < len; i+=29) {
  1383. var strObjcet = Mon_N_One.slice(i, i+29);
  1384. var str = strObjcet.toString();
  1385. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1386. result.push(str);
  1387. }
  1388. sums[4]="总人数:"+ sums[4] +"\n"+result
  1389. // 星期二
  1390. for(let j in data){
  1391. if(data[j].hasOwnProperty ('Tue_M') == true){
  1392. Tue_M.push(data[j].Tue_M.mode_name)
  1393. Tue_M=Tue_M.filter(item=> item && item.trim())
  1394. var countNum =Tue_M.reduce((obj,name)=>{
  1395. if(name in obj){
  1396. obj[name]++
  1397. }else{
  1398. obj[name]=1
  1399. }
  1400. return obj
  1401. },{})
  1402. }
  1403. }
  1404. for(let x in countNum){
  1405. Tue_M_One.push(x + ':' + countNum[x]+"\n")
  1406. }
  1407. var result = [];
  1408. for (var i = 0,len = Tue_M_One.length; i < len; i+=29) {
  1409. var strObjcet = Tue_M_One.slice(i, i+29);
  1410. var str = strObjcet.toString();
  1411. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1412. result.push(str);
  1413. }
  1414. sums[5]="总人数:"+ sums[5] +"\n"+result
  1415. // var newTue_A
  1416. for(let j in data){
  1417. if(data[j].hasOwnProperty ('Tue_A') == true){
  1418. Tue_A.push(data[j].Tue_A.mode_name)
  1419. Tue_A=Tue_A.filter(item=> item && item.trim())
  1420. var countNum =Tue_A.reduce((obj,name)=>{
  1421. if(name in obj){
  1422. obj[name]++
  1423. }else{
  1424. obj[name]=1
  1425. }
  1426. return obj
  1427. },{})
  1428. }
  1429. }
  1430. for(let x in countNum){
  1431. Tue_A_One.push(x + ':' + countNum[x]+"\n")
  1432. }
  1433. var result = [];
  1434. for (var i = 0,len = Tue_A_One.length; i < len; i+=29) {
  1435. var strObjcet = Tue_A_One.slice(i, i+29);
  1436. var str = strObjcet.toString();
  1437. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1438. result.push(str);
  1439. }
  1440. sums[6]="总人数:"+ sums[6] +"\n"+result
  1441. for(let j in data){
  1442. if(data[j].hasOwnProperty ('Tue_N') == true){
  1443. Tue_N.push(data[j].Tue_N.mode_name)
  1444. Tue_N=Tue_N.filter(item=> item && item.trim())
  1445. var countNum =Tue_N.reduce((obj,name)=>{
  1446. if(name in obj){
  1447. obj[name]++
  1448. }else{
  1449. obj[name]=1
  1450. }
  1451. return obj
  1452. },{})
  1453. }
  1454. }
  1455. for(let x in countNum){
  1456. Tue_N_One.push(x + ':' + countNum[x]+"\n")
  1457. }
  1458. var result = [];
  1459. for (var i = 0,len = Tue_N_One.length; i < len; i+=29) {
  1460. var strObjcet = Tue_N_One.slice(i, i+29);
  1461. var str = strObjcet.toString();
  1462. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1463. result.push(str);
  1464. }
  1465. sums[7]="总人数:"+ sums[7] +"\n"+result
  1466. // 星期三
  1467. for(let j in data){
  1468. if(data[j].hasOwnProperty ('Wed_M') == true){
  1469. Wed_M.push(data[j].Wed_M.mode_name)
  1470. Wed_M=Wed_M.filter(item=> item && item.trim())
  1471. var countNum =Wed_M.reduce((obj,name)=>{
  1472. if(name in obj){
  1473. obj[name]++
  1474. }else{
  1475. obj[name]=1
  1476. }
  1477. return obj
  1478. },{})
  1479. }
  1480. }
  1481. for(let x in countNum){
  1482. Wed_M_One.push(x + ':' + countNum[x]+"\n")
  1483. }
  1484. var result = [];
  1485. for (var i = 0,len = Wed_M_One.length; i < len; i+=29) {
  1486. var strObjcet = Wed_M_One.slice(i, i+29);
  1487. var str = strObjcet.toString();
  1488. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1489. result.push(str);
  1490. }
  1491. sums[8]="总人数:"+ sums[8] +"\n"+result
  1492. for(let j in data){
  1493. if(data[j].hasOwnProperty ('Wed_A') == true){
  1494. Wed_A.push(data[j].Wed_A.mode_name)
  1495. Wed_A=Wed_A.filter(item=> item && item.trim())
  1496. var countNum =Wed_A.reduce((obj,name)=>{
  1497. if(name in obj){
  1498. obj[name]++
  1499. }else{
  1500. obj[name]=1
  1501. }
  1502. return obj
  1503. },{})
  1504. }
  1505. }
  1506. for(let x in countNum){
  1507. Wed_A_One.push(x + ':' + countNum[x]+"\n")
  1508. }
  1509. var result = [];
  1510. for (var i = 0,len = Wed_A_One.length; i < len; i+=29) {
  1511. var strObjcet = Wed_A_One.slice(i, i+29);
  1512. var str = strObjcet.toString();
  1513. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1514. result.push(str);
  1515. }
  1516. sums[9]="总人数:"+ sums[9] +"\n"+result
  1517. for(let j in data){
  1518. if(data[j].hasOwnProperty ('Wed_N') == true){
  1519. Wed_N.push(data[j].Wed_N.mode_name)
  1520. Wed_N=Wed_N.filter(item=> item && item.trim())
  1521. var countNum =Wed_N.reduce((obj,name)=>{
  1522. if(name in obj){
  1523. obj[name]++
  1524. }else{
  1525. obj[name]=1
  1526. }
  1527. return obj
  1528. },{})
  1529. }
  1530. }
  1531. for(let x in countNum){
  1532. Wed_N_One.push(x + ':' + countNum[x]+"\n")
  1533. }
  1534. var result = [];
  1535. for (var i = 0,len = Wed_N_One.length; i < len; i+=29) {
  1536. var strObjcet = Wed_N_One.slice(i, i+29);
  1537. var str = strObjcet.toString();
  1538. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1539. result.push(str);
  1540. }
  1541. sums[10]="总人数:"+ sums[10] +"\n"+result
  1542. // 星期四
  1543. for(let j in data){
  1544. if(data[j].hasOwnProperty ('Thurs_M') == true){
  1545. Thurs_M.push(data[j].Thurs_M.mode_name)
  1546. Thurs_M=Thurs_M.filter(item=> item && item.trim())
  1547. var countNum =Thurs_M.reduce((obj,name)=>{
  1548. if(name in obj){
  1549. obj[name]++
  1550. }else{
  1551. obj[name]=1
  1552. }
  1553. return obj
  1554. },{})
  1555. }
  1556. }
  1557. for(let x in countNum){
  1558. Thurs_M_One.push(x + ':' + countNum[x]+"\n")
  1559. }
  1560. var result = [];
  1561. for (var i = 0,len = Thurs_M_One.length; i < len; i+=29) {
  1562. var strObjcet = Thurs_M_One.slice(i, i+29);
  1563. var str = strObjcet.toString();
  1564. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1565. result.push(str);
  1566. }
  1567. sums[11]="总人数:"+ sums[11] +"\n"+result
  1568. for(let j in data){
  1569. if(data[j].hasOwnProperty ('Thurs_A') == true){
  1570. Thurs_A.push(data[j].Thurs_A.mode_name)
  1571. Thurs_A=Thurs_A.filter(item=> item && item.trim())
  1572. var countNum =Thurs_A.reduce((obj,name)=>{
  1573. if(name in obj){
  1574. obj[name]++
  1575. }else{
  1576. obj[name]=1
  1577. }
  1578. return obj
  1579. },{})
  1580. }
  1581. }
  1582. for(let x in countNum){
  1583. Thurs_A_One.push(x + ':' + countNum[x]+"\n")
  1584. }
  1585. var result = [];
  1586. for (var i = 0,len = Thurs_A_One.length; i < len; i+=29) {
  1587. var strObjcet = Thurs_A_One.slice(i, i+29);
  1588. var str = strObjcet.toString();
  1589. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1590. result.push(str);
  1591. }
  1592. sums[12]="总人数:"+ sums[12] +"\n"+result
  1593. for(let j in data){
  1594. if(data[j].hasOwnProperty ('Thurs_N') == true){
  1595. Thurs_N.push(data[j].Thurs_N.mode_name)
  1596. Thurs_N=Thurs_N.filter(item=> item && item.trim())
  1597. var countNum =Thurs_N.reduce((obj,name)=>{
  1598. if(name in obj){
  1599. obj[name]++
  1600. }else{
  1601. obj[name]=1
  1602. }
  1603. return obj
  1604. },{})
  1605. }
  1606. }
  1607. for(let x in countNum){
  1608. Thurs_N_One.push(x + ':' + countNum[x]+"\n")
  1609. }
  1610. var result = [];
  1611. for (var i = 0,len = Thurs_N_One.length; i < len; i+=29) {
  1612. var strObjcet = Thurs_N_One.slice(i, i+29);
  1613. var str = strObjcet.toString();
  1614. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1615. result.push(str);
  1616. }
  1617. sums[13]="总人数:"+ sums[13] +"\n"+result
  1618. // 星期五
  1619. for(let j in data){
  1620. if(data[j].hasOwnProperty ('Fri_M') == true){
  1621. Fri_M.push(data[j].Fri_M.mode_name)
  1622. Fri_M=Fri_M.filter(item=> item && item.trim())
  1623. var countNum =Fri_M.reduce((obj,name)=>{
  1624. if(name in obj){
  1625. obj[name]++
  1626. }else{
  1627. obj[name]=1
  1628. }
  1629. return obj
  1630. },{})
  1631. }
  1632. }
  1633. for(let x in countNum){
  1634. Fri_M_One.push(x + ':' + countNum[x]+"\n")
  1635. }
  1636. var result = [];
  1637. for (var i = 0,len = Fri_M_One.length; i < len; i+=29) {
  1638. var strObjcet = Fri_M_One.slice(i, i+29);
  1639. var str = strObjcet.toString();
  1640. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1641. result.push(str);
  1642. }
  1643. sums[14]="总人数:"+ sums[14] +"\n"+result
  1644. for(let j in data){
  1645. if(data[j].hasOwnProperty ('Fri_A') == true){
  1646. Fri_A.push(data[j].Fri_A.mode_name)
  1647. Fri_A=Fri_A.filter(item=> item && item.trim())
  1648. var countNum =Fri_A.reduce((obj,name)=>{
  1649. if(name in obj){
  1650. obj[name]++
  1651. }else{
  1652. obj[name]=1
  1653. }
  1654. return obj
  1655. },{})
  1656. }
  1657. }
  1658. for(let x in countNum){
  1659. Fri_A_One.push(x + ':' + countNum[x]+"\n")
  1660. }
  1661. var result = [];
  1662. for (var i = 0,len = Fri_A_One.length; i < len; i+=29) {
  1663. var strObjcet = Fri_A_One.slice(i, i+29);
  1664. var str = strObjcet.toString();
  1665. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1666. result.push(str);
  1667. }
  1668. sums[15]="总人数:"+ sums[15] +"\n"+result
  1669. for(let j in data){
  1670. if(data[j].hasOwnProperty ('Fri_N') == true){
  1671. Fri_N.push(data[j].Fri_N.mode_name)
  1672. Fri_N=Fri_N.filter(item=> item && item.trim())
  1673. var countNum =Fri_N.reduce((obj,name)=>{
  1674. if(name in obj){
  1675. obj[name]++
  1676. }else{
  1677. obj[name]=1
  1678. }
  1679. return obj
  1680. },{})
  1681. }
  1682. }
  1683. for(let x in countNum){
  1684. Fri_N_One.push(x + ':' + countNum[x]+"\n")
  1685. }
  1686. var result = [];
  1687. for (var i = 0,len = Fri_N_One.length; i < len; i+=29) {
  1688. var strObjcet = Fri_N_One.slice(i, i+29);
  1689. var str = strObjcet.toString();
  1690. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1691. result.push(str);
  1692. }
  1693. sums[16]="总人数:"+ sums[16] +"\n"+result
  1694. // 星期六
  1695. for(let j in data){
  1696. if(data[j].hasOwnProperty ('Sat_M') == true){
  1697. Sat_M.push(data[j].Sat_M.mode_name)
  1698. Sat_M=Sat_M.filter(item=> item && item.trim())
  1699. var countNum =Sat_M.reduce((obj,name)=>{
  1700. if(name in obj){
  1701. obj[name]++
  1702. }else{
  1703. obj[name]=1
  1704. }
  1705. return obj
  1706. },{})
  1707. }
  1708. }
  1709. for(let x in countNum){
  1710. Sat_M_One.push(x + ':' + countNum[x]+"\n")
  1711. }
  1712. var result = [];
  1713. for (var i = 0,len = Sat_M_One.length; i < len; i+=29) {
  1714. var strObjcet = Sat_M_One.slice(i, i+29);
  1715. var str = strObjcet.toString();
  1716. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1717. result.push(str);
  1718. }
  1719. sums[17]="总人数:"+ sums[17] +"\n"+result
  1720. for(let j in data){
  1721. if(data[j].hasOwnProperty ('Sat_A') == true){
  1722. Sat_A.push(data[j].Sat_A.mode_name)
  1723. Sat_A=Sat_A.filter(item=> item && item.trim())
  1724. var countNum =Sat_A.reduce((obj,name)=>{
  1725. if(name in obj){
  1726. obj[name]++
  1727. }else{
  1728. obj[name]=1
  1729. }
  1730. return obj
  1731. },{})
  1732. }
  1733. }
  1734. for(let x in countNum){
  1735. Sat_A_One.push(x + ':' + countNum[x]+"\n")
  1736. }
  1737. var result = [];
  1738. for (var i = 0,len = Sat_A_One.length; i < len; i+=29) {
  1739. var strObjcet = Sat_A_One.slice(i, i+29);
  1740. var str = strObjcet.toString();
  1741. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1742. result.push(str);
  1743. }
  1744. sums[18]="总人数:"+ sums[18] +"\n"+result
  1745. for(let j in data){
  1746. if(data[j].hasOwnProperty ('Sat_N') == true){
  1747. Sat_N.push(data[j].Sat_N.mode_name)
  1748. Sat_N=Sat_N.filter(item=> item && item.trim())
  1749. var countNum =Sat_N.reduce((obj,name)=>{
  1750. if(name in obj){
  1751. obj[name]++
  1752. }else{
  1753. obj[name]=1
  1754. }
  1755. return obj
  1756. },{})
  1757. }
  1758. }
  1759. for(let x in countNum){
  1760. Sat_N_One.push(x + ':' + countNum[x]+"\n")
  1761. }
  1762. var result = [];
  1763. for (var i = 0,len = Sat_N_One.length; i < len; i+=29) {
  1764. var strObjcet = Sat_N_One.slice(i, i+29);
  1765. var str = strObjcet.toString();
  1766. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1767. result.push(str);
  1768. }
  1769. sums[19]="总人数:"+ sums[19] +"\n"+result
  1770. // 星期天
  1771. for(let j in data){
  1772. if(data[j].hasOwnProperty ('Sun_M') == true){
  1773. Sun_M.push(data[j].Sun_M.mode_name)
  1774. Sun_M=Sun_M.filter(item=> item && item.trim())
  1775. var countNum =Sun_M.reduce((obj,name)=>{
  1776. if(name in obj){
  1777. obj[name]++
  1778. }else{
  1779. obj[name]=1
  1780. }
  1781. return obj
  1782. },{})
  1783. }
  1784. }
  1785. for(let x in countNum){
  1786. Sun_M_One.push(x + ':' + countNum[x]+"\n")
  1787. }
  1788. var result = [];
  1789. for (var i = 0,len = Sun_M_One.length; i < len; i+=29) {
  1790. var strObjcet = Sun_M_One.slice(i, i+29);
  1791. var str = strObjcet.toString();
  1792. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1793. result.push(str);
  1794. }
  1795. sums[20]="总人数:"+ sums[20] +"\n"+result
  1796. for(let j in data){
  1797. if(data[j].hasOwnProperty ('Sun_A') == true){
  1798. Sun_A.push(data[j].Sun_A.mode_name)
  1799. Sun_A=Sun_A.filter(item=> item && item.trim())
  1800. var countNum =Sun_A.reduce((obj,name)=>{
  1801. if(name in obj){
  1802. obj[name]++
  1803. }else{
  1804. obj[name]=1
  1805. }
  1806. return obj
  1807. },{})
  1808. }
  1809. }
  1810. for(let x in countNum){
  1811. Sun_A_One.push(x + ':' + countNum[x]+"\n")
  1812. }
  1813. var result = [];
  1814. for (var i = 0,len = Sun_A_One.length; i < len; i+=29) {
  1815. var strObjcet = Sun_A_One.slice(i, i+29);
  1816. var str = strObjcet.toString();
  1817. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1818. result.push(str);
  1819. }
  1820. sums[21]="总人数:"+ sums[21] +"\n"+result
  1821. for(let j in data){
  1822. if(data[j].hasOwnProperty ('Sun_N') == true){
  1823. Sun_N.push(data[j].Sun_N.mode_name)
  1824. Sun_N=Sun_N.filter(item=> item && item.trim())
  1825. var countNum =Sun_N.reduce((obj,name)=>{
  1826. if(name in obj){
  1827. obj[name]++
  1828. }else{
  1829. obj[name]=1
  1830. }
  1831. return obj
  1832. },{})
  1833. }
  1834. }
  1835. for(let x in countNum){
  1836. Sun_N_One.push(x + ':' + countNum[x]+"\n")
  1837. }
  1838. var result = [];
  1839. for (var i = 0,len = Sun_N_One.length; i < len; i+=29) {
  1840. var strObjcet = Sun_N_One.slice(i, i+29);
  1841. var str = strObjcet.toString();
  1842. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1843. result.push(str);
  1844. }
  1845. sums[22]="总人数:"+ sums[22] +"\n"+result
  1846. return sums;
  1847. // 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){
  1848. // return sums;
  1849. // }
  1850. },
  1851. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  1852. var that = this;
  1853. var rowNum = 0;
  1854. rowNumber = 0;
  1855. var rutrnData = {};
  1856. if (columnIndex === 0) {
  1857. var rowLen = this.scheduleZoneRow.length;
  1858. if (rowLen > 0) {
  1859. for (let index = 0; index < rowLen; index++) {
  1860. rowNum = this.scheduleZoneRow[index];
  1861. rowNumber += rowNum;
  1862. var f = rowNumber - rowNum;
  1863. if (f == rowIndex) {
  1864. rutrnData = {
  1865. rowspan: rowNum,
  1866. colspan: 1
  1867. };
  1868. break;
  1869. } else if (rowIndex < rowNumber) {
  1870. rutrnData = {
  1871. rowspan: 0,
  1872. colspan: 0
  1873. };
  1874. break;
  1875. }
  1876. }
  1877. return rutrnData;
  1878. }
  1879. }
  1880. },
  1881. handleCurrentChange(row) {
  1882. if (typeof row === "undefined" || row == null) {
  1883. this.currentData.patient_id = 0;
  1884. this.currentData.contagions = [];
  1885. } else {
  1886. this.currentData.patient_id = row.id;
  1887. this.currentData.contagions = row.contagions;
  1888. }
  1889. },
  1890. closePatientPanel(row) {
  1891. this.dialogTableVisible = false;
  1892. this.$refs.singleTable.setCurrentRow(row);
  1893. this.currentData.patient_id = 0;
  1894. },
  1895. getSchedules() {
  1896. var partionStr = this.partition_id
  1897. var arr = this.zoneIdList.join(',')
  1898. var str = ""
  1899. if(partionStr == 0){
  1900. str = arr
  1901. }
  1902. if(partionStr != 0){
  1903. str = partionStr.join(',')
  1904. }
  1905. const params = {
  1906. weekTime:this.theType,
  1907. patitionid:str,
  1908. schedule_type:this.schedule_type,
  1909. }
  1910. getSchedulesOne(params).then(response => {
  1911. if (response.data.state == 1) {
  1912. this.weekTitle = response.data.data.weekTitle;
  1913. this.weekDays = response.data.data.days;
  1914. this.toDay = response.data.data.today;
  1915. var theSchedules = response.data.data.schdules;
  1916. var schedulesGroup = response.data.data.schedulesGroup
  1917. this.schedulesGroup = schedulesGroup
  1918. var that = this;
  1919. this.scheduleZone.forEach(function(zone, index) {
  1920. that.scheduleZone[index].Mon_M = {
  1921. mode_id: 0,
  1922. mode_name: "",
  1923. patient_id: 0,
  1924. patient: "",
  1925. dialysis_machine_name:"",
  1926. schedule_date:"",
  1927. Count:0,
  1928. };
  1929. that.scheduleZone[index].Mon_A = {
  1930. mode_id: 0,
  1931. mode_name: "",
  1932. patient_id: 0,
  1933. patient: "",
  1934. dialysis_machine_name:"",
  1935. schedule_date:"",
  1936. Count:0,
  1937. };
  1938. that.scheduleZone[index].Mon_N = {
  1939. mode_id: 0,
  1940. mode_name: "",
  1941. patient_id: 0,
  1942. patient: "",
  1943. dialysis_machine_name:"",
  1944. schedule_date:"",
  1945. Count:0,
  1946. };
  1947. that.scheduleZone[index].Tue_M = {
  1948. mode_id: 0,
  1949. mode_name: "",
  1950. patient_id: 0,
  1951. patient: "",
  1952. dialysis_machine_name:"",
  1953. schedule_date:"",
  1954. Count:0,
  1955. };
  1956. that.scheduleZone[index].Tue_A = {
  1957. mode_id: 0,
  1958. mode_name: "",
  1959. patient_id: 0,
  1960. patient: "",
  1961. dialysis_machine_name:"",
  1962. schedule_date:"",
  1963. Count:0,
  1964. };
  1965. that.scheduleZone[index].Tue_N = {
  1966. mode_id: 0,
  1967. mode_name: "",
  1968. patient_id: 0,
  1969. patient: "",
  1970. dialysis_machine_name:"",
  1971. schedule_date:"",
  1972. Count:0,
  1973. };
  1974. that.scheduleZone[index].Wed_M = {
  1975. mode_id: 0,
  1976. mode_name: "",
  1977. patient_id: 0,
  1978. patient: "",
  1979. dialysis_machine_name:"",
  1980. schedule_date:"",
  1981. Count:0,
  1982. };
  1983. that.scheduleZone[index].Wed_A = {
  1984. mode_id: 0,
  1985. mode_name: "",
  1986. patient_id: 0,
  1987. patient: "",
  1988. dialysis_machine_name:"",
  1989. schedule_date:"",
  1990. Count:0,
  1991. };
  1992. that.scheduleZone[index].Wed_N = {
  1993. mode_id: 0,
  1994. mode_name: "",
  1995. patient_id: 0,
  1996. patient: "",
  1997. dialysis_machine_name:"",
  1998. schedule_date:"",
  1999. Count:0,
  2000. };
  2001. that.scheduleZone[index].Thurs_M = {
  2002. mode_id: 0,
  2003. mode_name: "",
  2004. patient_id: 0,
  2005. patient: "",
  2006. dialysis_machine_name:"",
  2007. schedule_date:"",
  2008. Count:0,
  2009. };
  2010. that.scheduleZone[index].Thurs_A = {
  2011. mode_id: 0,
  2012. mode_name: "",
  2013. patient_id: 0,
  2014. patient: "",
  2015. dialysis_machine_name:"",
  2016. schedule_date:"",
  2017. Count:0,
  2018. };
  2019. that.scheduleZone[index].Thurs_N = {
  2020. mode_id: 0,
  2021. mode_name: "",
  2022. patient_id: 0,
  2023. patient: "",
  2024. dialysis_machine_name:"",
  2025. schedule_date:"",
  2026. Count:0,
  2027. };
  2028. that.scheduleZone[index].Fri_M = {
  2029. mode_id: 0,
  2030. mode_name: "",
  2031. patient_id: 0,
  2032. patient: "",
  2033. dialysis_machine_name:"",
  2034. schedule_date:"",
  2035. Count:0,
  2036. };
  2037. that.scheduleZone[index].Fri_A = {
  2038. mode_id: 0,
  2039. mode_name: "",
  2040. patient_id: 0,
  2041. patient: "",
  2042. dialysis_machine_name:"",
  2043. schedule_date:"",
  2044. Count:0,
  2045. };
  2046. that.scheduleZone[index].Fri_N = {
  2047. mode_id: 0,
  2048. mode_name: "",
  2049. patient_id: 0,
  2050. patient: "",
  2051. dialysis_machine_name:"",
  2052. schedule_date:"",
  2053. Count:0,
  2054. };
  2055. that.scheduleZone[index].Sat_M = {
  2056. mode_id: 0,
  2057. mode_name: "",
  2058. patient_id: 0,
  2059. patient: "",
  2060. dialysis_machine_name:"",
  2061. schedule_date:"",
  2062. Count:0,
  2063. };
  2064. that.scheduleZone[index].Sat_A = {
  2065. mode_id: 0,
  2066. mode_name: "",
  2067. patient_id: 0,
  2068. patient: "",
  2069. dialysis_machine_name:"",
  2070. schedule_date:"",
  2071. Count:0,
  2072. };
  2073. that.scheduleZone[index].Sat_N = {
  2074. mode_id: 0,
  2075. mode_name: "",
  2076. patient_id: 0,
  2077. patient: "",
  2078. dialysis_machine_name:"",
  2079. schedule_date:"",
  2080. Count:0,
  2081. };
  2082. that.scheduleZone[index].Sun_A = {
  2083. mode_id: 0,
  2084. mode_name: "",
  2085. patient_id: 0,
  2086. patient: "",
  2087. dialysis_machine_name:"",
  2088. schedule_date:"",
  2089. Count:0,
  2090. };
  2091. that.scheduleZone[index].Sun_N = {
  2092. mode_id: 0,
  2093. mode_name: "",
  2094. patient_id: 0,
  2095. patient: "",
  2096. dialysis_machine_name:"",
  2097. schedule_date:"",
  2098. Count:0,
  2099. };
  2100. that.scheduleZone[index].Sun_M = {
  2101. mode_id: 0,
  2102. mode_name: "",
  2103. patient_id: 0,
  2104. patient: "",
  2105. dialysis_machine_name:"",
  2106. schedule_date:"",
  2107. Count:0,
  2108. };
  2109. that.scheduleZone[index].total = 0;
  2110. if (response.data.data.schdules.length > 0) {
  2111. theSchedules.forEach(function(schedule, sindex) {
  2112. if (zone.jihao_id == schedule.bed_id) {
  2113. var weekPath = that.weekPath(
  2114. schedule.schedule_week,
  2115. schedule.schedule_type
  2116. );
  2117. if (weekPath.length == 2) {
  2118. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2119. that.scheduleZone[index][weekPathKey] = {
  2120. schedule_id: schedule.id,
  2121. mode_id: schedule.mode_id,
  2122. patient_id: schedule.patient_id,
  2123. patient: schedule.patient,
  2124. dialysis_machine_name:schedule.dialysis_machine_name,
  2125. patient_contagions: schedule.patient_contagions,
  2126. schedule_date:schedule.schedule_date,
  2127. mode_name: typeof that.modeOptions[schedule.mode_id] ==="undefined"? "": that.modeOptions[schedule.mode_id].name
  2128. };
  2129. that.scheduleZone[index].total += 1;
  2130. }
  2131. }
  2132. });
  2133. }
  2134. });
  2135. this.source_scheduleZone = this.scheduleZone
  2136. console.log("------------aaaa",this.source_scheduleZone)
  2137. } else {
  2138. this.$message.error("网络错误");
  2139. return false;
  2140. }
  2141. });
  2142. },
  2143. getSchedulePatients() {
  2144. getSchedulePatients(this.patientQuery).then(response => {
  2145. if (response.data.state == 1) {
  2146. this.patients = response.data.data.patients;
  2147. }
  2148. });
  2149. },
  2150. // 搜索弹窗操作取消排班
  2151. CancelSchedule(id) {
  2152. this.$confirm("确定要取消当前排班?", "提示", {
  2153. confirmButtonText: "确定",
  2154. cancelButtonText: "取消",
  2155. type: "warning"
  2156. })
  2157. .then(() => {
  2158. CancelSchedule(id).then(response => {
  2159. if (response.data.state == 0) {
  2160. this.$message.error(response.data.msg);
  2161. } else {
  2162. this.$message({
  2163. type: "success",
  2164. message: "排班已取消!"
  2165. });
  2166. var that = this;
  2167. var schedule = response.data.data.schedule;
  2168. this.scheduleZone.forEach(function(zone, index) {
  2169. if (
  2170. zone.zone_id == schedule.partition_id &&
  2171. zone.jihao_id == schedule.bed_id
  2172. ) {
  2173. var weekPath = that.weekPath(
  2174. schedule.schedule_week,
  2175. schedule.schedule_type
  2176. );
  2177. if (weekPath.length == 2) {
  2178. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2179. that.scheduleZone[index][weekPathKey] = {
  2180. schedule_id: 0,
  2181. mode_id: 0,
  2182. patient_id: 0,
  2183. patient: "",
  2184. mode_name: "",
  2185. dialysis_machine_name:'',
  2186. };
  2187. that.scheduleZone[index].total -= 1;
  2188. }
  2189. }
  2190. });
  2191. this.tzDialogVisible = false;
  2192. this.searchTableVisible = false;
  2193. }
  2194. });
  2195. })
  2196. .catch(() => {});
  2197. },
  2198. // 搜索修改机号成功
  2199. changeScheduleActon(formName) {
  2200. this.changing_bed = true;
  2201. ChangeSchedule(this.currentData.id, this.changeSchedule)
  2202. .then(response => {
  2203. if (response.data.state == 0) {
  2204. this.$message.error(response.data.msg);
  2205. } else {
  2206. this.$message({
  2207. type: "success",
  2208. message: "修改成功!"
  2209. });
  2210. this.getSchedules()
  2211. // var that = this;
  2212. // var schedule = response.data.data.schedule;
  2213. // this.scheduleZone.forEach(function(zone, index) {
  2214. // if (
  2215. // zone.zone_id == schedule.partition_id &&
  2216. // zone.jihao_id == schedule.bed_id
  2217. // ) {
  2218. // var weekPath = that.weekPath(
  2219. // schedule.schedule_week,
  2220. // schedule.schedule_type
  2221. // );
  2222. // if (weekPath.length == 2) {
  2223. // var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2224. // that.scheduleZone[index][weekPathKey] = {
  2225. // schedule_id: schedule.id,
  2226. // mode_id: schedule.mode_id,
  2227. // patient_id: schedule.patient_id,
  2228. // patient: that.currentData.patient,
  2229. //
  2230. //
  2231. // dialysis_machine_name:schedule.dialysis_machine_name,
  2232. //
  2233. // patient_contagions: that.currentData.contagions,
  2234. // mode_name:
  2235. // typeof that.modeOptions[schedule.mode_id] === "undefined"
  2236. // ? ""
  2237. // : that.modeOptions[schedule.mode_id].name
  2238. // };
  2239. //
  2240. // that.scheduleZone[index].total += 1;
  2241. // }
  2242. // }
  2243. // if (
  2244. // zone.zone_id == that.currentData.partition_id &&
  2245. // zone.jihao_id == that.currentData.bed_id
  2246. // ) {
  2247. // var weekPath = that.weekPath(
  2248. // that.currentData.schedule_week,
  2249. // that.currentData.schedule_type
  2250. // );
  2251. // if (weekPath.length == 2) {
  2252. // var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2253. // that.scheduleZone[index][weekPathKey] = {
  2254. // schedule_id: 0,
  2255. // mode_id: 0,
  2256. // patient_id: 0,
  2257. // patient: "",
  2258. // mode_name: "",
  2259. // dialysis_machine_name:"",
  2260. // patient_contagions: []
  2261. // };
  2262. //
  2263. // that.scheduleZone[index].total -= 1;
  2264. // }
  2265. // }
  2266. // });
  2267. this.$refs[formName].resetFields();
  2268. this.jhDialogVisible = false;
  2269. }
  2270. this.changing_bed = false;
  2271. })
  2272. .catch(err => {
  2273. this.$message.error(err);
  2274. this.changing_bed = false;
  2275. });
  2276. },
  2277. CreateSchedule(id, data) {
  2278. this.creating_schedule = true;
  2279. CreateSchedule(id, data)
  2280. .then(response => {
  2281. if (response.data.state == 0) {
  2282. this.$message.error(response.data.msg);
  2283. } else {
  2284. this.$message({
  2285. type: "success",
  2286. message: "排班成功!"
  2287. });
  2288. var that = this;
  2289. var schedule = response.data.data.schedule;
  2290. this.scheduleZone.forEach(function(zone, index) {
  2291. if (
  2292. zone.zone_id == schedule.partition_id &&
  2293. zone.jihao_id == schedule.bed_id
  2294. ) {
  2295. var weekPath = that.weekPath(
  2296. schedule.schedule_week,
  2297. schedule.schedule_type
  2298. );
  2299. if (weekPath.length == 2) {
  2300. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2301. that.scheduleZone[index][weekPathKey] = {
  2302. schedule_id: schedule.id,
  2303. mode_id: schedule.mode_id,
  2304. patient_id: schedule.patient_id,
  2305. patient: schedule.patient,
  2306. dialysis_machine_name:schedule.dialysis_machine_name,
  2307. patient_contagions: that.currentData.contagions,
  2308. mode_name:
  2309. typeof that.modeOptions[schedule.mode_id] === "undefined"
  2310. ? ""
  2311. : that.modeOptions[schedule.mode_id].name
  2312. };
  2313. that.scheduleZone[index].total += 1;
  2314. }
  2315. }
  2316. });
  2317. this.closePatientPanel();
  2318. }
  2319. this.creating_schedule = false;
  2320. })
  2321. .catch(err => {
  2322. this.$message.error(err);
  2323. this.creating_schedule = false;
  2324. });
  2325. },
  2326. hoverMouse(row, column, cell, event){
  2327. if (row[column.property].schedule_id > 0) {
  2328. let patient_id = row[column.property].patient_id
  2329. this.patient_id_hover = patient_id
  2330. } else {
  2331. this.patient_id_hover = -1
  2332. }
  2333. },
  2334. clickThis(row, column, cell, event) {
  2335. if(!this.is_edit){
  2336. this.$message.error("当前页面不可编辑");
  2337. return
  2338. }
  2339. // debugger
  2340. var week = this.weekDay(column.property);
  2341. if (week[0] == -1 || week[1] == -1) {
  2342. return false;
  2343. }
  2344. if (this.toDay > this.weekDays[week[0] - 1]) {
  2345. return false;
  2346. }
  2347. this.currentData.schedule_date = this.weekDays[week[0] - 1];
  2348. this.currentData.schedule_type = week[1];
  2349. this.currentData.bed_id = row.jihao_id;
  2350. this.currentData.partition_id = row.zone_id;
  2351. this.currentData.schedule_week = week[0];
  2352. this.currentData.type_name = this.dayType(week[1]);
  2353. this.currentData.zone_name = row.area;
  2354. this.currentData.bed_name = row.cut;
  2355. this.currentData.partition_type = row.zone_type;
  2356. if (row[column.property].schedule_id > 0) {
  2357. this.currentData.mode_id = row[column.property].mode_id;
  2358. this.currentData.id = row[column.property].schedule_id;
  2359. this.currentData.patient_id = row[column.property].patient_id;
  2360. this.currentData.patient = row[column.property].patient;
  2361. this.currentData.contagions = row[column.property].patient_contagions;
  2362. this.tiaoZhengType = 1;
  2363. this.tzDialogVisible = true;
  2364. } else {
  2365. this.currentData.mode_id = 1;
  2366. this.currentData.id = 0;
  2367. this.currentData.patient_id = 0;
  2368. this.currentData.patient = "";
  2369. this.currentData.contagions = [];
  2370. this.getSchedulePatients();
  2371. this.dialogTableVisible = true;
  2372. }
  2373. },
  2374. // 调整机号的确认按钮
  2375. submitTiaoZJH(formName) {
  2376. this.$refs[formName].validate(valid => {
  2377. if (valid) {
  2378. var weekPath = this.weekPath(
  2379. this.changeSchedule.schedule_week,
  2380. this.changeSchedule.schedule_type
  2381. );
  2382. if (weekPath.length != 2) {
  2383. this.$message.error("数据异常");
  2384. return false;
  2385. }
  2386. this.changeSchedule.bed_id = this.device_id;
  2387. for (let i = 0; i < this.origin_device_numbers.length; i++) {
  2388. if (this.origin_device_numbers[i].id == this.device_id) {
  2389. this.changeSchedule.partition_id = this.origin_device_numbers[i].zone_id;
  2390. console.log("123123123123",this.origin_device_numbers[i].zone_id)
  2391. }
  2392. }
  2393. console.log("23233232232",this.zones)
  2394. var zone_id = 0
  2395. for(let i=0;i<this.zones.length;i++){
  2396. if(this.zone_name == this.zones[i].name){
  2397. zone_id = this.zones[i].id
  2398. }
  2399. }
  2400. this.changeSchedule.partition_id = this.zone_name
  2401. this.changeSchedule.change_action = "change_device";
  2402. this.changeScheduleActon(formName);
  2403. this.changeSchedule.spartition_type = this.scheduleZone[index].zone_type
  2404. var weekPathKey = weekPath[0] + '_' + weekPath[1]
  2405. for (var index in this.scheduleZone) {
  2406. if (this.scheduleZone[index].jihao_id == this.changeSchedule.bed_id) {
  2407. if (this.scheduleZone[index][weekPathKey].mode_id > 0) {
  2408. this.$message.error('选中的区域已经存在排班,不能再排班!')
  2409. return false
  2410. }
  2411. break
  2412. }
  2413. }
  2414. // 可能
  2415. // 患者有传染病,与选择的机器类型(传染病)不匹配
  2416. // 患者没有传染病,但机器是某个传染病的专用透析器
  2417. // 机器的透析模式与患者不匹配
  2418. // if (this.currentData.contagions.length > 0) {
  2419. // var cflag = false
  2420. // for (var index in this.currentData.contagions) {
  2421. // if (this.currentData.contagions[index].disease_id == this.changeSchedule.partition_type) {
  2422. // cflag = true
  2423. // }
  2424. // }
  2425. // if (!cflag) {
  2426. // this.$confirm('此患者有传染病,与此透析机不匹配,确定在此排班吗?', '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
  2427. // .then(() => {
  2428. // this.changeSchedule.change_action = 'change_device'
  2429. // this.changeScheduleActon(formName)
  2430. // }).catch(() => {
  2431. // })
  2432. // } else {
  2433. // this.changeSchedule.change_action = 'change_device'
  2434. // this.changeScheduleActon(formName)
  2435. // }
  2436. // } else if (this.changeSchedule.partition_type > 1) {
  2437. // this.$confirm('此患者没有传染病,与此透析机不匹配,确定在此排班吗?', '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
  2438. // .then(() => {
  2439. // this.changeSchedule.change_action = 'change_device'
  2440. // this.changeScheduleActon(formName)
  2441. // }).catch(() => {
  2442. // })
  2443. // } else {
  2444. // this.changeSchedule.change_action = 'change_device'
  2445. // this.changeScheduleActon(formName)
  2446. // }
  2447. }
  2448. })
  2449. },
  2450. // 搜索弹窗操作调整模式确认按钮
  2451. submitMode(formName) {
  2452. this.changing_mode = true;
  2453. this.changeSchedule.change_action = "change_mode";
  2454. ChangeSchedule(this.currentData.id, this.changeSchedule)
  2455. .then(response => {
  2456. if (response.data.state == 0) {
  2457. this.$message.error(response.data.msg);
  2458. } else {
  2459. this.$message({
  2460. type: "success",
  2461. message: "修改成功!"
  2462. });
  2463. var that = this;
  2464. var schedule = response.data.data.schedule;
  2465. this.scheduleZone.forEach(function(zone, index) {
  2466. if (
  2467. zone.zone_id == schedule.partition_id &&
  2468. zone.jihao_id == schedule.bed_id
  2469. ) {
  2470. var weekPath = that.weekPath(
  2471. schedule.schedule_week,
  2472. schedule.schedule_type
  2473. );
  2474. if (weekPath.length == 2) {
  2475. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2476. that.scheduleZone[index][weekPathKey].mode_id =
  2477. schedule.mode_id;
  2478. that.scheduleZone[index][weekPathKey].mode_name =
  2479. typeof that.modeOptions[schedule.mode_id] === "undefined"
  2480. ? ""
  2481. : that.modeOptions[schedule.mode_id].name;
  2482. }
  2483. }
  2484. });
  2485. this.msDialogVisible = false;
  2486. }
  2487. this.changing_mode = false;
  2488. })
  2489. .catch(err => {
  2490. this.$message.error(err);
  2491. this.changing_mode = false;
  2492. });
  2493. },
  2494. submitTiaoZMS(formName) {
  2495. this.$refs[formName].validate(valid => {
  2496. if (valid) {
  2497. this.changing_mode = true;
  2498. this.changeSchedule.change_action = "change_mode";
  2499. ChangeSchedule(this.currentData.id, this.changeSchedule)
  2500. .then(response => {
  2501. if (response.data.state == 0) {
  2502. this.$message.error(response.data.msg);
  2503. } else {
  2504. this.$message({
  2505. type: "success",
  2506. message: "修改成功!"
  2507. });
  2508. var that = this;
  2509. var schedule = response.data.data.schedule;
  2510. this.scheduleZone.forEach(function(zone, index) {
  2511. if (
  2512. zone.zone_id == schedule.partition_id &&
  2513. zone.jihao_id == schedule.bed_id
  2514. ) {
  2515. var weekPath = that.weekPath(
  2516. schedule.schedule_week,
  2517. schedule.schedule_type
  2518. );
  2519. if (weekPath.length == 2) {
  2520. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2521. that.scheduleZone[index][weekPathKey].mode_id =
  2522. schedule.mode_id;
  2523. that.scheduleZone[index][weekPathKey].mode_name =
  2524. typeof that.modeOptions[schedule.mode_id] ===
  2525. "undefined"
  2526. ? ""
  2527. : that.modeOptions[schedule.mode_id].name;
  2528. }
  2529. }
  2530. });
  2531. this.$refs[formName].resetFields();
  2532. this.msDialogVisible = false;
  2533. }
  2534. this.changing_mode = false;
  2535. })
  2536. .catch(err => {
  2537. this.$message.error(err);
  2538. this.changing_mode = false;
  2539. });
  2540. }
  2541. });
  2542. },
  2543. changePartition(value) {
  2544. // this.current_devices = this.zone_device_map[value];
  2545. // this.device_id = this.current_devices[0].id;
  2546. let params = {
  2547. zone_id: value,
  2548. sch_type: this.currentData.schedule_type,
  2549. schedule_date: this.currentData.schedule_date,
  2550. patient_id: this.currentData.patient_id,
  2551. };
  2552. //进行网络请求,获取空排班机位
  2553. getSmartDevices(params).then((response) => {
  2554. if (response.data.state == 0) {
  2555. return false;
  2556. } else {
  2557. console.log('devices的数据',devices);
  2558. var devices = response.data.data.devices;
  2559. this.current_devices = [];
  2560. this.current_devices = devices;
  2561. this.device_id = devices[0].id
  2562. }
  2563. });
  2564. },
  2565. changeScheduleType(schedule_type) {
  2566. this.currentData.schedule_type = schedule_type
  2567. let params = {
  2568. zone_id: this.currentData.partition_id,
  2569. sch_type: schedule_type,
  2570. schedule_date: this.currentData.schedule_date,
  2571. patient_id: this.currentData.patient_id,
  2572. };
  2573. //进行网络请求,获取空排班机位
  2574. getSmartDevices(params).then((response) => {
  2575. if (response.data.state == 0) {
  2576. return false;
  2577. } else {
  2578. var devices = response.data.data.devices;
  2579. this.current_devices = [];
  2580. this.current_devices = devices;
  2581. this.device_id = ""
  2582. this.zone_name = this.currentData.partition_id
  2583. }
  2584. });
  2585. // const params = {
  2586. // type: schedule_type,
  2587. // date: this.currentData.schedule_date
  2588. // };
  2589. // getUrgentScheduleInitData(params)
  2590. // .then(rs => {
  2591. // if (rs.data.state == 1) {
  2592. // this.origin_schedules = rs.data.data.schedules;
  2593. // this.origin_device_numbers = rs.data.data.device_numbers;
  2594. //
  2595. // var zone_device_map = {};
  2596. // for (
  2597. // let index = 0;
  2598. // index < this.origin_device_numbers.length;
  2599. // index++
  2600. // ) {
  2601. // const device_number = this.origin_device_numbers[index];
  2602. // if (
  2603. // zone_device_map[device_number.zone_name] == null ||
  2604. // zone_device_map[device_number.zone_name] == undefined
  2605. // ) {
  2606. // zone_device_map[device_number.zone_name] = [];
  2607. // }
  2608. // zone_device_map[device_number.zone_name].push(device_number);
  2609. // }
  2610. // this.zone_device_map = zone_device_map;
  2611. //
  2612. // this.zone_names = Object.keys(this.zone_device_map);
  2613. // // console.log('8989898989898989',this.zone_names)
  2614. //
  2615. // // console.log(this.current_devices);
  2616. //
  2617. // if (this.zone_names.length > 0) {
  2618. // this.zone_name = this.zone_names[0];
  2619. // this.current_devices = this.zone_device_map[this.zone_name];
  2620. // this.device_id = this.current_devices[0].id;
  2621. // }
  2622. //
  2623. //
  2624. // this.zone_device_options = [
  2625. // { values: this.zone_names },
  2626. // // { values: this.getDeviceNumberNames(this.current_devices) },
  2627. // { values: this.current_devices }
  2628. // ];
  2629. //
  2630. // } else {
  2631. // }
  2632. // })
  2633. // .catch(err => {
  2634. // this.loading = false;
  2635. // });
  2636. },
  2637. submitTiaoX() {
  2638. if (this.tiaoZhengType==1) {
  2639. this.$confirm('确定要取消当前排班?', '提示', {
  2640. confirmButtonText: '确定',
  2641. cancelButtonText: '取消',
  2642. type: 'warning'
  2643. }).then(() => {
  2644. this.CancelSchedule(this.currentData.id);
  2645. }).catch(() => {});
  2646. }
  2647. switch (this.tiaoZhengType) {
  2648. case 1:
  2649. this.CancelSchedule(this.currentData.id);
  2650. break;
  2651. case 2:
  2652. this.changeSchedule = {
  2653. mode_id: this.currentData.mode_id,
  2654. schedule_type: this.currentData.schedule_type,
  2655. partition_id: this.currentData.partition_id,
  2656. bed_id: this.currentData.bed_id,
  2657. schedule_week: this.currentData.schedule_week,
  2658. partition_type: ""
  2659. };
  2660. if (
  2661. typeof this.partitions[this.currentData.partition_id].jihaos !==
  2662. "undefined"
  2663. ) {
  2664. this.jihaos = this.partitions[this.currentData.partition_id].jihaos;
  2665. } else {
  2666. this.jihaos = [];
  2667. }
  2668. const params = {
  2669. type: this.currentData.schedule_type,
  2670. date: this.currentData.schedule_date
  2671. };
  2672. getUrgentScheduleInitData(params)
  2673. .then(response => {
  2674. if (response.data.state == 0) {
  2675. this.$message.error(response.data.msg);
  2676. } else {
  2677. if (response.data.state == 1) {
  2678. this.origin_schedules = response.data.data.schedules;
  2679. this.origin_device_numbers =
  2680. response.data.data.device_numbers;
  2681. var zone_device_map = {};
  2682. for (
  2683. let index = 0;
  2684. index < this.origin_device_numbers.length;
  2685. index++
  2686. ) {
  2687. const device_number = this.origin_device_numbers[index];
  2688. if (
  2689. zone_device_map[device_number.zone_name] == null ||
  2690. zone_device_map[device_number.zone_name] == undefined
  2691. ) {
  2692. zone_device_map[device_number.zone_name] = [];
  2693. }
  2694. zone_device_map[device_number.zone_name].push(
  2695. device_number
  2696. );
  2697. }
  2698. this.zone_device_map = zone_device_map;
  2699. this.zone_names = Object.keys(this.zone_device_map);
  2700. if (this.zone_names.length > 0) {
  2701. this.zone_name = this.zone_names[0];
  2702. this.current_devices = this.zone_device_map[this.zone_name];
  2703. this.device_id = this.current_devices[0].id;
  2704. }
  2705. this.zone_device_options = [
  2706. { values: this.zone_names },
  2707. // { values: this.getDeviceNumberNames(this.current_devices) },
  2708. { values: this.current_devices }
  2709. ];
  2710. //
  2711. // for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
  2712. // for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
  2713. // if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
  2714. // this.origin_device_numbers.splice(y, 1)
  2715. // }
  2716. // }
  2717. // }
  2718. // // debugger
  2719. // var zone_device_map = {}
  2720. // for (let index = 0; index < this.origin_device_numbers.length; index++) {
  2721. // const device_number = this.origin_device_numbers[index]
  2722. // if (zone_device_map[device_number.zone.name] == null || zone_device_map[device_number.zone.name] == undefined) {
  2723. // zone_device_map[device_number.zone.name] = []
  2724. // }
  2725. // zone_device_map[device_number.zone.name].push(device_number)
  2726. // }
  2727. // this.zone_device_map = zone_device_map
  2728. // this.zone_names = Object.keys(this.zone_device_map)
  2729. // if (this.zone_names.length > 0) {
  2730. // this.zone_name = this.zone_names[0]
  2731. // this.current_devices = this.zone_device_map[this.zone_name]
  2732. // this.device_id = this.current_devices[0].id
  2733. // }
  2734. // this.zone_device_options = [
  2735. // { values: this.zone_names },
  2736. // // { values: this.getDeviceNumberNames(this.current_devices) },
  2737. // { values: this.current_devices }
  2738. // ]
  2739. } else {
  2740. }
  2741. }
  2742. })
  2743. .catch(err => {
  2744. this.$message.error(err);
  2745. });
  2746. this.tzDialogVisible = false;
  2747. this.jhDialogVisible = true;
  2748. break;
  2749. case 3:
  2750. this.changeSchedule = {
  2751. mode_id: "",
  2752. schedule_type: "",
  2753. partition_id: "",
  2754. bed_id: "",
  2755. schedule_week: "",
  2756. partition_type: ""
  2757. };
  2758. this.tzDialogVisible = false;
  2759. this.msDialogVisible = true;
  2760. break;
  2761. default:
  2762. break;
  2763. }
  2764. },
  2765. setSchedule() {
  2766. var that = this;
  2767. var submitFlag = true;
  2768. if (this.currentData.patient_id <= 0) {
  2769. this.$message.error("请先选择患者");
  2770. return false;
  2771. }
  2772. if (
  2773. this.currentData.schedule_date.length == 0 ||
  2774. this.currentData.schedule_type < 1 ||
  2775. this.currentData.schedule_type > 3 ||
  2776. this.currentData.bed_id < 1 ||
  2777. this.currentData.partition_id < 1 ||
  2778. this.currentData.schedule_week < 1 ||
  2779. this.currentData.schedule_week > 7
  2780. ) {
  2781. this.$message.error("请先选择排班时间或机号");
  2782. return false;
  2783. }
  2784. // 可能
  2785. // 患者有传染病,与选择的机器类型(传染病)不匹配
  2786. // 患者没有传染病,但机器是某个传染病的专用透析器
  2787. // 机器的透析模式与患者不匹配
  2788. if (this.currentData.contagions.length > 0) {
  2789. var cflag = false;
  2790. this.currentData.contagions.forEach(function(contagion) {
  2791. if (contagion.disease_id == that.currentData.partition_type) {
  2792. cflag = true;
  2793. }
  2794. });
  2795. if (!cflag) {
  2796. this.$confirm(
  2797. "此患者有传染病,与此透析机不匹配,确定在此排班吗?",
  2798. "提示",
  2799. {
  2800. confirmButtonText: "确 定",
  2801. cancelButtonText: "取 消",
  2802. type: "warning"
  2803. }
  2804. )
  2805. .then(() => {
  2806. this.CreateSchedule(
  2807. this.currentData.patient_id,
  2808. this.currentData
  2809. );
  2810. })
  2811. .catch(() => {});
  2812. } else {
  2813. this.CreateSchedule(this.currentData.patient_id, this.currentData);
  2814. }
  2815. } else if (that.currentData.partition_type > 1) {
  2816. this.$confirm(
  2817. "此患者没有传染病,与此透析机不匹配,确定在此排班吗?",
  2818. "提示",
  2819. {
  2820. confirmButtonText: "确 定",
  2821. cancelButtonText: "取 消",
  2822. type: "warning"
  2823. }
  2824. )
  2825. .then(() => {
  2826. this.CreateSchedule(this.currentData.patient_id, this.currentData);
  2827. })
  2828. .catch(() => {});
  2829. } else {
  2830. this.CreateSchedule(this.currentData.patient_id, this.currentData);
  2831. }
  2832. },
  2833. weekType(weekTime) {
  2834. var theType = 2;
  2835. switch (weekTime) {
  2836. case "lastWeek":
  2837. theType = 1;
  2838. break;
  2839. case "thisWeek":
  2840. theType = 2;
  2841. break;
  2842. case "nextWeek":
  2843. theType = 3;
  2844. break;
  2845. case "nextTwoWeek":
  2846. theType = 4;
  2847. break;
  2848. default:
  2849. theType = 2;
  2850. break;
  2851. }
  2852. return theType;
  2853. },
  2854. dayType(theType) {
  2855. var jType = "";
  2856. switch (theType) {
  2857. case 1:
  2858. jType = "上午";
  2859. break;
  2860. case 2:
  2861. jType = "下午";
  2862. break;
  2863. case 3:
  2864. jType = "晚上";
  2865. break;
  2866. default:
  2867. break;
  2868. }
  2869. return jType;
  2870. },
  2871. weekPath(week, schedule_type) {
  2872. var weekArr = {
  2873. 1: "Mon",
  2874. 2: "Tue",
  2875. 3: "Wed",
  2876. 4: "Thurs",
  2877. 5: "Fri",
  2878. 6: "Sat",
  2879. 7: "Sun"
  2880. };
  2881. var typeArr = { 1: "M", 2: "A", 3: "N" };
  2882. if (
  2883. typeof weekArr[week] === "undefined" ||
  2884. typeof typeArr[schedule_type] === "undefined"
  2885. ) {
  2886. return [];
  2887. }
  2888. return [weekArr[week], typeArr[schedule_type]];
  2889. },
  2890. weekDay(prop) {
  2891. var week = prop.split("_");
  2892. if (week.length != 2) {
  2893. return [-1, -1];
  2894. }
  2895. var w = -1;
  2896. var n = -1;
  2897. switch (week[0]) {
  2898. case "Mon":
  2899. w = 1;
  2900. break;
  2901. case "Tue":
  2902. w = 2;
  2903. break;
  2904. case "Wed":
  2905. w = 3;
  2906. break;
  2907. case "Thurs":
  2908. w = 4;
  2909. break;
  2910. case "Fri":
  2911. w = 5;
  2912. break;
  2913. case "Sat":
  2914. w = 6;
  2915. break;
  2916. case "Sun":
  2917. w = 7;
  2918. break;
  2919. default:
  2920. w = -1;
  2921. break;
  2922. }
  2923. switch (week[1]) {
  2924. case "M":
  2925. n = 1;
  2926. break;
  2927. case "A":
  2928. n = 2;
  2929. break;
  2930. case "N":
  2931. n = 3;
  2932. break;
  2933. default:
  2934. n = -1;
  2935. break;
  2936. }
  2937. if (w == -1 || n == -1) {
  2938. return [-1, -1];
  2939. }
  2940. return [w, n];
  2941. },
  2942. // 搜索
  2943. search: function() {
  2944. let week_type = 0
  2945. var weeklist = moment().format('E');//计算今天是这周第几天
  2946. var first_monday = moment().subtract(weeklist-1, 'days').format('YYYY-MM-DD');//周一日期
  2947. var end_monday = moment().add(7-weeklist, 'days').format('YYYY-MM-DD')
  2948. if (this.weekTime == 'thisWeek'){
  2949. week_type = 1
  2950. }else if(this.weekTime == 'nextWeek'){
  2951. week_type = 2
  2952. }else if(this.weekTime == 'nextTwoWeek'){
  2953. week_type = 3
  2954. }
  2955. const params = {
  2956. keywords: this.keywords,
  2957. week_type: week_type,
  2958. start_sch:first_monday,
  2959. end_sch:end_monday,
  2960. };
  2961. // console.log("params",params)
  2962. getSearchResult(params).then(response => {
  2963. if (response.data.state == 1) {
  2964. this.schedulePatients = response.data.data.schdules;
  2965. this.searchTableVisible = true;
  2966. }
  2967. });
  2968. },
  2969. // 搜索弹窗调整机号按钮
  2970. changeMachineNumber: function(index, row) {
  2971. this.currentData.schedule_type = row.schedule_type;
  2972. this.currentData.bed_id = row.bed_id;
  2973. this.currentData.partition_id = row.partition_id;
  2974. this.currentData.schedule_week = row.schedule_week;
  2975. switch (row.schedule_type) {
  2976. case 1:
  2977. this.currentData.type_name = "上午";
  2978. break;
  2979. case 2:
  2980. this.currentData.type_name = "下午";
  2981. break;
  2982. case 3:
  2983. this.currentData.type_name = "晚上";
  2984. break;
  2985. }
  2986. this.currentData.zone_name = row.zone.name;
  2987. this.currentData.bed_name = row.number.number;
  2988. this.currentData.partition_type = row.zone.type;
  2989. this.currentData.mode_id = row.mode_id;
  2990. this.currentData.patient_id = row.patient_id;
  2991. this.currentData.patient = row.patient;
  2992. this.currentData.contagions = row.patient_contagions;
  2993. this.currentData.id = row.id;
  2994. this.currentData.schedule_date = uParseTime(
  2995. row.schedule_date,
  2996. "{y}-{m}-{d}"
  2997. );
  2998. this.zone_name = row.partition_id;
  2999. this.device_id = row.bed_id;
  3000. // this.current_devices = this.partitions[row.partition_id].jihaos
  3001. let params = {
  3002. zone_id: row.partition_id,
  3003. sch_type: row.schedule_type,
  3004. schedule_date: this.currentData.schedule_date,
  3005. patient_id: this.currentData.patient_id,
  3006. };
  3007. //进行网络请求,获取空排班机位
  3008. getSmartDevices(params).then((response) => {
  3009. if (response.data.state == 0) {
  3010. return false;
  3011. } else {
  3012. var devices = response.data.data.devices;
  3013. console.log('getSmartDevices的数据',devices);
  3014. this.current_devices = [];
  3015. this.current_devices = devices;
  3016. // this.zone_names= [];
  3017. // if(devices!=null){
  3018. // for(let i=0;i<devices.length;i++){
  3019. // this.zone_names.push(devices[0])
  3020. // }
  3021. // }
  3022. // this.zone_names=devices[0];
  3023. this.zone_name = (devices[0].zone_name)
  3024. this.device_id = devices[0].id
  3025. }
  3026. });
  3027. this.changeSchedule = {
  3028. mode_id: row.mode_id,
  3029. schedule_type: row.schedule_type,
  3030. partition_id: row.partition_id,
  3031. bed_id: row.bed_id,
  3032. schedule_week: row.schedule_week,
  3033. partition_type: ""
  3034. };
  3035. if (typeof this.partitions[row.partition_id].jihaos !== "undefined") {
  3036. this.jihaos = this.partitions[row.partition_id].jihaos;
  3037. } else {
  3038. this.jihaos = [];
  3039. }
  3040. this.searchTableVisible = false;
  3041. this.jhDialogVisible = true;
  3042. },
  3043. getDialysisDate: function(row) {
  3044. let week = "";
  3045. switch (row.schedule_week) {
  3046. case 7:
  3047. week = "周日";
  3048. break;
  3049. case 1:
  3050. week = "周一";
  3051. break;
  3052. case 2:
  3053. week = "周二";
  3054. break;
  3055. case 3:
  3056. week = "周三";
  3057. break;
  3058. case 4:
  3059. week = "周四";
  3060. break;
  3061. case 5:
  3062. week = "周五";
  3063. break;
  3064. case 6:
  3065. week = "周六";
  3066. break;
  3067. }
  3068. return week + "(" + uParseTime(row.schedule_date, "{y}-{m}-{d}") + ")";
  3069. },
  3070. getSchedulesType: function(type,row) {
  3071. let type_name = "";
  3072. switch (type) {
  3073. case 1:
  3074. type_name = "上午";
  3075. break;
  3076. case 2:
  3077. type_name = "下午";
  3078. break;
  3079. case 3:
  3080. type_name = "晚上";
  3081. break;
  3082. }
  3083. return type_name;
  3084. },
  3085. // 搜索弹窗调整模式按钮
  3086. changeMode: function(index, row) {
  3087. this.changeSchedule = {
  3088. mode_id: "",
  3089. schedule_type: "",
  3090. partition_id: "",
  3091. bed_id: "",
  3092. schedule_week: "",
  3093. partition_type: ""
  3094. };
  3095. this.currentData.id = row.id;
  3096. this.searchTableVisible = false;
  3097. this.msDialogVisible = true;
  3098. },
  3099. tableRowClassName({row, rowIndex}) {
  3100. if(row.zone_type == 1){
  3101. return 'table-row-new-class schedule-table-row'
  3102. }else {
  3103. return 'table-row-new-class schedule-table-row backPurple'
  3104. }
  3105. },
  3106. getAllZones(){
  3107. getAllZones().then(response=>{
  3108. if(response.data.state == 1){
  3109. var zones = response.data.data.zones
  3110. for(let i=0;i<zones.length;i++){
  3111. this.zoneIdList.push(zones[i].id)
  3112. }
  3113. this.zones.push(...zones)
  3114. var strArr = this.zoneIdList.join(",")
  3115. this.strArr = strArr
  3116. this.getWeekPanels()
  3117. }
  3118. })
  3119. },
  3120. changePartiton(val){
  3121. this.$emit('event1', val)
  3122. this.partition_id = val
  3123. this.getWeekPanels()
  3124. this.getSchedules()
  3125. },
  3126. changeSchedule_type(val){
  3127. this.$emit('event2', val)
  3128. this.schedule_type = val
  3129. this.getSchedules()
  3130. },
  3131. changeWeekDay(val){
  3132. this.$emit('event3', val)
  3133. }
  3134. },
  3135. components: {
  3136. ScheduleItem
  3137. },
  3138. mounted() {
  3139. this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 120;
  3140. // var theType = this.weekType(this.weekTime);
  3141. // this.getSchedules(theType);
  3142. const that = this;
  3143. window.onresize = () => {
  3144. return (() => {
  3145. window.fullHeight = document.documentElement.clientHeight;
  3146. if (window.fullHeight < 200) {
  3147. that.tableHeight = 200;
  3148. } else {
  3149. that.tableHeight = window.fullHeight - 160;
  3150. }
  3151. })();
  3152. };
  3153. },
  3154. // mounted:function(){
  3155. // this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 160
  3156. // },
  3157. created() {
  3158. console.log('this.zone_names的数据',this.zone_names);
  3159. var date = new Date()
  3160. this.time = date
  3161. var year = date.getFullYear()
  3162. var month = date.getMonth() + 1
  3163. if (month < 10) {
  3164. month = "0" + month
  3165. }
  3166. var day = date.getDate()
  3167. if (day < 10) {
  3168. day = "0" + day
  3169. }
  3170. var nowDate = year + "-" + month + "-" + day
  3171. var date = new Date(nowDate + " 00:00:00")
  3172. this.now_time = date.getTime()/1000
  3173. this.getAllZones()
  3174. this.changeScheduleType(1)
  3175. rowNumber = 0;
  3176. this.modeOptions = this.$store.getters.treatment_mode;
  3177. this.partitions = this.partitionsProp;
  3178. var contagions = this.$store.getters.contagions;
  3179. if (contagions.length > 0) {
  3180. var that = this;
  3181. contagions.forEach(function(citem) {
  3182. if (citem.type == 2) {
  3183. that.diseasesArr.push({ value: citem.id, label: citem.name });
  3184. }
  3185. });
  3186. }
  3187. this.scheduleZoneRow = this.scheduleZoneRowProp;
  3188. this.weekday = new Date().getDay();
  3189. if (this.weekday == 0) {
  3190. this.weekday = 7;
  3191. }
  3192. }
  3193. };
  3194. </script>
  3195. <style rel="stylesheet/css" lang="scss">
  3196. .tiaozhengclass {
  3197. display: block;
  3198. margin: 0 auto;
  3199. }
  3200. .center-tab{
  3201. .el-table .cell{
  3202. padding: 0px 0px !important;
  3203. white-space: pre-wrap;
  3204. }
  3205. }
  3206. .el-table--medium td, .el-table--medium th {
  3207. padding: 5px 0 !important;
  3208. }
  3209. .schedule-table-row {
  3210. background: #fff !important;
  3211. }
  3212. .schedule-table-row:hover {
  3213. background: #fff !important;
  3214. }
  3215. .schedule-table-row td:hover {
  3216. background: rgb(88, 162, 236) !important;
  3217. }
  3218. .schedule-table-row td .cell {
  3219. font-size: 12px;
  3220. white-space:normal !important;
  3221. // normal
  3222. }
  3223. .schedule-table-cell-disable {
  3224. background-color: rgb(245, 245, 245) !important;
  3225. }
  3226. #table_data {
  3227. min-height: calc(100vh - 350px);
  3228. .switch{
  3229. margin-left: 10px;
  3230. }
  3231. }
  3232. #table_data ::-webkit-scrollbar {
  3233. height: 15px;
  3234. }
  3235. .el-table td,
  3236. .el-table th.is-leaf,
  3237. .el-table--border,
  3238. .el-table--group {
  3239. border-color: #d0d3da;
  3240. }
  3241. .el-table--border::after,
  3242. .el-table--group::after,
  3243. .el-table::before {
  3244. background-color: #d0d3da;
  3245. }
  3246. .el-table--border th {
  3247. border-color: #d0d3da;
  3248. }
  3249. .el-table--border td {
  3250. border-color: #d0d3da;
  3251. }
  3252. .el-table td {
  3253. border-color: #d0d3da;
  3254. }
  3255. #table_data {
  3256. .el-table__body tr.current-row > td {
  3257. background-color: #ecf5ff !important;
  3258. color: #3a8ee6;
  3259. }
  3260. .el-table__body tr > td:hover {
  3261. background-color: #409eff !important;
  3262. color: #fff;
  3263. }
  3264. .el-table__body tr .hover-td {
  3265. background-color: #409eff !important;
  3266. color: #fff;
  3267. }
  3268. .Infectious_disease{
  3269. background-color: #f78930 !important;
  3270. color: white;
  3271. }
  3272. }
  3273. .backPurple{
  3274. color: #f32424 !important;
  3275. }
  3276. // .el-table td .cell{
  3277. // padding: 0px 0px !important;
  3278. // }
  3279. </style>