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

dialysisBefore.vue 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <div class="">
  3. <el-table
  4. :row-style="{ color: '#303133' }"
  5. :header-cell-style="{
  6. backgroundColor: 'rgb(245, 247, 250)',
  7. color: '#606266'
  8. }"
  9. :data="dialysis_before_data"
  10. border
  11. fit
  12. highlight-current-row
  13. style="width: 100%;min-height:500px;"
  14. >
  15. <el-table-column align="center" label="字段名">
  16. <template slot-scope="scope">
  17. <span >{{scope.row.filed_name_cn}}</span>
  18. </template>
  19. </el-table-column>
  20. <el-table-column align="center" label="字段">
  21. <template slot-scope="scope">
  22. <span>{{scope.row.filed_name}}</span>
  23. </template>
  24. </el-table-column>
  25. <el-table-column align="center" label="是否显示">
  26. <template slot-scope="scope">
  27. <span v-if="scope.row.is_show == 1">是</span>
  28. <span v-if="scope.row.is_show == 2">否</span>
  29. </template>
  30. </el-table-column>
  31. <el-table-column label="操作" align="center">
  32. <template slot-scope="scope">
  33. <el-tooltip class="item" effect="dark" content="不展示" placement="top" v-if="scope.row.is_show == 1">
  34. <el-button
  35. size="small"
  36. type="danger"
  37. icon="el-icon-remove-outline"
  38. @click="handleHide(scope.$index, scope.row)">
  39. </el-button>
  40. </el-tooltip>
  41. <el-tooltip class="item" effect="dark" content="展示" placement="top" v-if="scope.row.is_show == 2">
  42. <el-button
  43. size="small"
  44. type="primary"
  45. icon="el-icon-view"
  46. @click="handleShow(scope.$index, scope.row)">
  47. </el-button>
  48. </el-tooltip>
  49. </template>
  50. </el-table-column>
  51. </el-table>
  52. </div>
  53. </template>
  54. <script>
  55. import { updateFieldIsShow } from '@/api/data'
  56. import store from '@/store'
  57. export default {
  58. name: 'dialysisBefore',
  59. props: {
  60. dialysis_before_data: {
  61. type: Array
  62. }
  63. }, methods: {
  64. handleHide: function(index, row) {
  65. this.$confirm('是否将该字段设为不可见?', '提示', {
  66. confirmButtonText: '确 定',
  67. cancelButtonText: '取 消',
  68. type: 'warning'
  69. }).then(() => {
  70. updateFieldIsShow(row.id, 2).then(response => {
  71. if (response.data.state == 1) {
  72. const params = {
  73. id: response.data.data.id,
  74. is_show: response.data.data.is_show
  75. }
  76. store.dispatch('updateFiledConfigList', params).then(() => {
  77. })
  78. this.$emit('change', params)
  79. }
  80. })
  81. this.$message({
  82. type: 'success',
  83. message: '设置成功!'
  84. })
  85. }).catch(() => {
  86. })
  87. },
  88. handleShow: function(index, row) {
  89. this.$confirm('是否将该字段设为可见?', '提示', {
  90. confirmButtonText: '确 定',
  91. cancelButtonText: '取 消',
  92. type: 'warning'
  93. }).then(() => {
  94. updateFieldIsShow(row.id, 1).then(response => {
  95. if (response.data.state == 1) {
  96. const params = {
  97. id: response.data.data.id,
  98. is_show: response.data.data.is_show
  99. }
  100. store.dispatch('updateFiledConfigList', params).then(() => {
  101. })
  102. this.$emit('change', params)
  103. }
  104. })
  105. this.$message({
  106. type: 'success',
  107. message: '设置成功!'
  108. })
  109. }).catch(() => {
  110. })
  111. }
  112. },
  113. created() {
  114. }
  115. }
  116. </script>
  117. <style scoped></style>
  118. <style>
  119. .el-table td,
  120. .el-table th.is-leaf,
  121. .el-table--border,
  122. .el-table--group {
  123. border-color: #d0d3da;
  124. }
  125. .el-table--border::after,
  126. .el-table--group::after,
  127. .el-table::before {
  128. background-color: #d0d3da;
  129. }
  130. </style>