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

modeTemplate.vue 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. <template>
  2. <div class="main-contain new-main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. <div style="float:right">
  6. <el-button type="primary" @click="add">新增</el-button>
  7. <!-- <el-button type="primary" @click="batchAdd">批量新增</el-button> -->
  8. </div>
  9. </div>
  10. <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
  11. <div class="mainLeft">
  12. <!-- <div class="mainCell" style="margin-bottom:10px;">
  13. <el-input size="small" placeholder="请输入姓名或者透析号"
  14. v-model="search_input" class="filter-item" @input="searchAction"
  15. @keyup.enter.native='searchAction'/>
  16. </div> -->
  17. <div>
  18. <el-table :data="tablelist" :height="tableHeight"
  19. border style="width: 100%;"
  20. :row-style="{ color: '#303133' }"
  21. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  22. highlight-current-row
  23. ref="singleTable"
  24. @current-change="handleCurrentChange"
  25. >
  26. <el-table-column prop="name" label="透析模式" align="center">
  27. <template slot-scope="scope">{{scope.row.name}}</template>
  28. </el-table-column>
  29. </el-table>
  30. </div>
  31. </div>
  32. <div class="mainRight">
  33. <el-table :data="templates" :height="tableHeight"
  34. border style="width: 100%;"
  35. :row-style="{ color: '#303133' }"
  36. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  37. highlight-current-row
  38. >
  39. <el-table-column prop="name" label="模版名称" align="center">
  40. <template slot-scope="scope" >
  41. {{scope.row.name}}
  42. </template>
  43. </el-table-column>
  44. <el-table-column prop="name" label="透析模式" align="center">
  45. <template slot-scope="scope">
  46. {{getModeName(scope.row.mode)}}
  47. </template>
  48. </el-table-column>
  49. <el-table-column prop="name" label="操作" align="center">
  50. <template slot-scope="scope">
  51. <el-button size="mini" type="primary" @click="jumpDetail(scope.row)">编辑</el-button>
  52. <el-button size="mini" type="danger" @click="deleteModeTemplate(scope.row,scope.$index)">删除</el-button>
  53. </template>
  54. </el-table-column>
  55. </el-table>
  56. </div>
  57. </div>
  58. </div>
  59. </template>
  60. <script>
  61. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  62. import { getModeTempaleteName,delHisModePrescriptionTemplate} from '@/api/his/his_config'
  63. import { uParseTime } from '@/utils/tools'
  64. const moment = require('moment')
  65. export default {
  66. components: {
  67. BreadCrumb
  68. },
  69. data() {
  70. return {
  71. crumbs: [
  72. { path: false, name: '门诊医生站' },
  73. { path: false, name: '透析处方模版' }
  74. ],
  75. tablelist:[],
  76. templates:[],
  77. total:0,
  78. id:0,
  79. patient_id:0,
  80. patient_name:"",
  81. modes:"",
  82. mode_id:0,
  83. modeTeplate:{}
  84. }
  85. },
  86. methods: {
  87. searchAction() {
  88. },
  89. handleSizeChange(val) {
  90. this.limit = val
  91. },
  92. getTime(val, temp) {
  93. if (val != 0) {
  94. return uParseTime(val, temp)
  95. } else {
  96. return ''
  97. }
  98. },
  99. add() {
  100. this.$router.push('/hisTool/modeTemplateDetail?id='+this.id+"patient_name="+this.patient_name+"&modes="+this.modes)
  101. },
  102. getList(){
  103. var params = {
  104. mode_id:this.mode_id,
  105. }
  106. getModeTempaleteName(params).then(response=>{
  107. if(response.data.state == 1){
  108. var modeTeplate = response.data.data.modeTeplate
  109. console.log("modeTeplate",modeTeplate)
  110. this.templates = modeTeplate
  111. }
  112. })
  113. },
  114. handleCurrentChange(row){
  115. this.mode_id = row.id
  116. this.getList()
  117. },
  118. getModeName(id){
  119. var mode_name = ""
  120. for(let i=0;i<this.tablelist.length;i++){
  121. if(id == this.tablelist[i].id){
  122. mode_name = this.tablelist[i].name
  123. }
  124. }
  125. return mode_name
  126. },
  127. deleteModeTemplate(row,index) {
  128. this.$confirm('处方模版删除后不可恢复,是否确认删除', '删除', {
  129. confirmButtonText: '确 定',
  130. cancelButtonText: '取 消',
  131. type: 'warning'
  132. }).then(() => {
  133. let params = {
  134. id: row.id
  135. }
  136. delHisModePrescriptionTemplate(params).then(response => {
  137. if (response.data.state == 1) {
  138. this.$message.success("删除成功!")
  139. this.templates.splice(index,1)
  140. }
  141. })
  142. }).catch(() => {
  143. })
  144. },
  145. jumpDetail(row) {
  146. this.$router.push('/hisTool/modeTemplateDetail?id=' + row.id + '&patient_id=' + this.patient_id + '&patient_name=' + this.patient_name +"&modes="+this.mode_str)
  147. },
  148. // batchAdd(){
  149. // this.$router.push("/hisTool/batchTemplate")
  150. // }
  151. },
  152. created() {
  153. this.tablelist = Object.values(this.$store.getters.treatment_mode)
  154. this.mode_id = this.tablelist[0].id
  155. this.getList()
  156. let tableHeight = document.body.clientHeight - 263
  157. this.tableHeight = tableHeight
  158. },
  159. mounted() {
  160. this.$refs.singleTable.setCurrentRow(this.tablelist[0])
  161. const that = this
  162. window.onresize = () => {
  163. return (() => {
  164. window.fullHeight = document.documentElement.clientHeight
  165. that.fullHeight = window.fullHeight
  166. })()
  167. }
  168. },
  169. watch: {
  170. fullHeight(val) {
  171. if (!this.timer) {
  172. this.fullHeight = val
  173. let tableHeight = val - 263
  174. this.tableHeight = tableHeight
  175. this.timer = true
  176. let that = this
  177. setTimeout(function() {
  178. that.timer = false
  179. }, 400)
  180. }
  181. }
  182. }
  183. }
  184. </script>
  185. <style lang="scss" scoped>
  186. .new-main-contain {
  187. height: 100%;
  188. display: flex;
  189. flex-direction: column;
  190. }
  191. .app-container {
  192. height: 100%;
  193. }
  194. .mainCell {
  195. height: 36px;
  196. display: flex;
  197. align-items: center;
  198. }
  199. .mainLeft {
  200. width: 200px;
  201. height: 100%;
  202. display: flex;
  203. flex-direction: column;
  204. .el-radio {
  205. margin-right: 5px;
  206. }
  207. }
  208. .mainRight {
  209. margin-left: 10px;
  210. flex: 1;
  211. height: 100%;
  212. display: flex;
  213. flex-direction: column;
  214. overflow-y: auto;
  215. .cellSpan {
  216. min-width: 80px;
  217. display: inline-block;
  218. margin-right: 10px;
  219. }
  220. }
  221. .mainCenter {
  222. display: flex;
  223. flex: 1;
  224. }
  225. .centerLeft {
  226. flex: 1;
  227. display: flex;
  228. flex-direction: column;
  229. position: relative;
  230. .el-form-item {
  231. width: 32%;
  232. margin-right: 1%;
  233. float: left;
  234. }
  235. .el-form-item__label {
  236. text-align: left;
  237. }
  238. }
  239. .backColor {
  240. background: #f6f8f9;
  241. height: 5px;
  242. margin-bottom: 5px;
  243. }
  244. .tabsBox {
  245. position: relative;
  246. height: 76%;
  247. overflow-y: auto;
  248. margin-bottom: 60px;
  249. .el-tabs__item {
  250. padding: 0 10px;
  251. }
  252. }
  253. .preTabs {
  254. height: 100%;
  255. display: flex;
  256. flex-direction: column;
  257. .el-tabs__content {
  258. flex: 1;
  259. overflow-y: auto;
  260. }
  261. }
  262. .costBox {
  263. width: 100%;
  264. height: 60px;
  265. background: #fff;
  266. position: absolute;
  267. bottom: 0;
  268. display: flex;
  269. align-items: center;
  270. }
  271. .addTab {
  272. position: absolute;
  273. right: 0;
  274. top: 14px;
  275. z-index: 20;
  276. }
  277. .centerRight {
  278. width: 300px;
  279. margin-left: 10px;
  280. display: flex;
  281. flex-direction: column;
  282. position: relative;
  283. }
  284. .rightTab {
  285. height: 40px;
  286. width: 100%;
  287. border: 1px solid #d2d2d2;
  288. box-sizing: border-box;
  289. p {
  290. width: 50%;
  291. height: 40px;
  292. line-height: 40px;
  293. text-align: center;
  294. background: #eee;
  295. float: left;
  296. }
  297. > p:last-child {
  298. border-left: 1px solid #d2d2d2;
  299. float: right;
  300. }
  301. .activeP {
  302. background: #409EFF;
  303. color: #fff;
  304. }
  305. }
  306. .comfirmBox {
  307. width: 100%;
  308. height: 60px;
  309. background: #fff;
  310. position: absolute;
  311. bottom: 0;
  312. display: flex;
  313. align-items: center;
  314. justify-content: space-between;
  315. }
  316. .mainHeader {
  317. width: 100%;
  318. background: #fff;
  319. position: fixed;
  320. z-index: 100;
  321. height: 36px;
  322. }
  323. .titleBox {
  324. position: fixed;
  325. z-index: 99;
  326. background: #fff;
  327. }
  328. .fixedCell {
  329. position: fixed;
  330. z-index: 99;
  331. right: 30px;
  332. background: #fff;
  333. width: 300px;
  334. display: flex;
  335. justify-content: space-between;
  336. }
  337. </style>
  338. <style lang="scss">
  339. .centerLeft {
  340. .el-form-item__label {
  341. text-align: left;
  342. }
  343. }
  344. .tabsBox {
  345. .el-tabs__item {
  346. padding: 0 10px;
  347. }
  348. .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
  349. padding: 0 10px;
  350. }
  351. .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
  352. padding: 0 10px;
  353. }
  354. .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
  355. padding: 0 10px;
  356. }
  357. }
  358. .centerRight {
  359. .el-tabs__nav-scroll {
  360. display: flex;
  361. }
  362. .el-tabs__nav {
  363. margin: 0 auto;
  364. }
  365. .el-table th .cell, .el-table td .cell {
  366. padding: 0 2px;
  367. }
  368. }
  369. .preTabs {
  370. .el-tabs__content {
  371. }
  372. }
  373. .rightTabs {
  374. height: 100%;
  375. .el-tabs__content {
  376. }
  377. }
  378. .centerDialog {
  379. .el-dialog__body {
  380. max-height: calc(100vh - 100px) !important;
  381. padding: 0 20px;
  382. }
  383. }
  384. </style>