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

dialysisOff.vue 6.9KB

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