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

dialysisAfter.vue 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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_after_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 align="center" label="是否必填">
  32. <template slot-scope="scope">
  33. <span v-if="scope.row.is_write!=undefined &&scope.row.is_write == 1">是</span>
  34. <span v-if="scope.row.is_write!=undefined &&scope.row.is_write == 0">否</span>
  35. </template>
  36. </el-table-column>
  37. <el-table-column label="操作" align="center">
  38. <template slot-scope="scope">
  39. <el-button
  40. v-if="scope.row.is_show == 1"
  41. size="small"
  42. type="danger"
  43. icon="el-icon-remove-outline"
  44. @click="handleHide(scope.$index, scope.row)"
  45. >
  46. </el-button>
  47. <el-button
  48. v-if="scope.row.is_show == 2"
  49. size="small"
  50. type="primary"
  51. icon="el-icon-view"
  52. @click="handleShow(scope.$index, scope.row)"
  53. >
  54. </el-button>
  55. <el-button
  56. v-if="scope.row.is_write!=undefined&&scope.row.is_write == 1"
  57. size="small"
  58. type="danger"
  59. icon="el-icon-remove-outline"
  60. @click="handleHideOne(scope.$index, scope.row)"
  61. >
  62. </el-button>
  63. <el-button
  64. v-if="scope.row.is_write!=undefined&&scope.row.is_write == 0"
  65. size="small"
  66. type="primary"
  67. icon="el-icon-view"
  68. @click="handleShowOne(scope.$index, scope.row)"
  69. >
  70. </el-button>
  71. </template>
  72. </el-table-column>
  73. </el-table>
  74. </div>
  75. </template>
  76. <script>
  77. import { updateFieldIsShow } from "@/api/data";
  78. import store from "@/store";
  79. export default {
  80. name: "dialysisAfter",
  81. props: {
  82. dialysis_after_data: {
  83. type: Array
  84. }
  85. },
  86. methods: {
  87. handleHide: function(index, row) {
  88. this.$confirm("是否将该字段设为不可见?", "提示", {
  89. confirmButtonText: "确 定",
  90. cancelButtonText: "取 消",
  91. type: "warning"
  92. })
  93. .then(() => {
  94. updateFieldIsShow(row.id, 2,row.is_write).then(response => {
  95. if (response.data.state == 1) {
  96. let params = {
  97. id: response.data.data.id,
  98. is_show: response.data.data.is_show
  99. };
  100. store.dispatch("updateFiledConfigList", params).then(() => {});
  101. this.$emit("change", params);
  102. }
  103. });
  104. this.$message({
  105. type: "success",
  106. message: "设置成功!"
  107. });
  108. })
  109. .catch(() => {});
  110. },
  111. handleShow: function(index, row) {
  112. this.$confirm("是否将该字段设为可见?", "提示", {
  113. confirmButtonText: "确 定",
  114. cancelButtonText: "取 消",
  115. type: "warning"
  116. })
  117. .then(() => {
  118. updateFieldIsShow(row.id, 1,row.is_write).then(response => {
  119. if (response.data.state == 1) {
  120. let params = {
  121. id: response.data.data.id,
  122. is_show: response.data.data.is_show
  123. };
  124. store.dispatch("updateFiledConfigList", params).then(() => {});
  125. this.$emit("change", params);
  126. }
  127. });
  128. this.$message({
  129. type: "success",
  130. message: "设置成功!"
  131. });
  132. })
  133. .catch(() => {});
  134. },
  135. handleHideOne: function(index, row) {
  136. this.$confirm("是否将该字段设为不必填?", "提示", {
  137. confirmButtonText: "确 定",
  138. cancelButtonText: "取 消",
  139. type: "warning"
  140. }).then(() => {
  141. updateFieldIsShow(row.id,row.is_show,0).then(response => {
  142. if (response.data.state == 1) {
  143. this.is_write = response.data.data.is_write
  144. let params = {
  145. id: response.data.data.id,
  146. is_show: response.data.data.is_show,
  147. is_write:response.data.data.is_write,
  148. };
  149. store.dispatch("updateFiledConfigList", params).then(() => {});
  150. this.$emit("change", params);
  151. }
  152. });
  153. this.$message({
  154. type: "success",
  155. message: "设置成功!"
  156. });
  157. }).catch(() => {});
  158. },
  159. handleShowOne: function(index, row) {
  160. this.$confirm("是否将该字段设为必填?", "提示", {
  161. confirmButtonText: "确 定",
  162. cancelButtonText: "取 消",
  163. type: "warning"
  164. }).then(() => {
  165. updateFieldIsShow(row.id,row.is_show,1).then(response => {
  166. if (response.data.state == 1) {
  167. this.is_write = response.data.data.is_write
  168. let params = {
  169. id: response.data.data.id,
  170. is_show: response.data.data.is_show,
  171. is_write:response.data.data.is_write,
  172. };
  173. store.dispatch("updateFiledConfigList", params).then(() => {});
  174. this.$emit("change", params);
  175. }
  176. });
  177. this.$message({
  178. type: "success",
  179. message: "设置成功!"
  180. });
  181. }).catch(() => {});
  182. }
  183. }
  184. };
  185. </script>
  186. <style scoped></style>
  187. <style>
  188. .el-table td,
  189. .el-table th.is-leaf,
  190. .el-table--border,
  191. .el-table--group {
  192. border-color: #d0d3da;
  193. }
  194. .el-table--border::after,
  195. .el-table--group::after,
  196. .el-table::before {
  197. background-color: #d0d3da;
  198. }
  199. </style>