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

special_permission.vue 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <el-row>
  8. <el-col :span="24">
  9. <div class="project">
  10. <div class="title">
  11. <span>授予透析记录管理权限</span>
  12. </div>
  13. <div class="subtitle">
  14. 对护士录入的透析记录有修改权限
  15. </div>
  16. <div class="transfer">
  17. <el-transfer :titles="['所有用户', '已授权用户']" :button-texts="['取消授权', '添加授权']" :data="users" v-model="selecting_users">
  18. <span slot-scope="{ option }">{{ option.label }}</span>
  19. </el-transfer>
  20. </div>
  21. <div class="submit">
  22. <el-button type="primary" @click="submitAction">提交</el-button>
  23. </div>
  24. </div>
  25. </el-col>
  26. </el-row>
  27. </div>
  28. </div>
  29. </template>
  30. <script>
  31. import { getSpecialPermissionInitData, submitDialysisRecordPermissionUsers } from '@/api/role/admin'
  32. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  33. export default {
  34. name: "SpecialPermissionManage",
  35. data() {
  36. return {
  37. crumbs:[
  38. {path:false, name:'权限管理'},
  39. {path:false, name:'特殊权限管理'},
  40. ],
  41. origin_users: [],
  42. users: [],
  43. selecting_users: [],
  44. }
  45. },
  46. components:{
  47. BreadCrumb
  48. },
  49. mounted() {
  50. getSpecialPermissionInitData().then(rs => {
  51. var resp = rs.data
  52. if (resp.state == 1) {
  53. this.origin_users = resp.data.users
  54. var head_nurses = resp.data.head_nurses
  55. var user_options = []
  56. for (let index = 0; index < this.origin_users.length; index++) {
  57. const user = this.origin_users[index];
  58. user_options.push({
  59. key: user.id,
  60. label: user.name,
  61. disabled: false,
  62. })
  63. }
  64. this.users = user_options
  65. var head_nurse_ids = []
  66. for (let index = 0; index < head_nurses.length; index++) {
  67. const head_nurse = head_nurses[index];
  68. head_nurse_ids.push(head_nurse.admin_user_id)
  69. }
  70. this.selecting_users = head_nurse_ids
  71. } else {
  72. this.$message.error(resp.msg)
  73. }
  74. }).catch(err => {
  75. this.$message.error(err)
  76. })
  77. },
  78. methods: {
  79. submitAction: function() {
  80. // console.log(this.selecting_users)
  81. var ids_str = this.selecting_users.join(",")
  82. submitDialysisRecordPermissionUsers(ids_str).then(rs => {
  83. var resp = rs.data
  84. if (resp.state == 1) {
  85. this.$message.success("授权成功")
  86. } else {
  87. this.$message.error(resp.msg)
  88. }
  89. }).catch(err => {
  90. this.$message.error(err)
  91. })
  92. }
  93. },
  94. }
  95. </script>
  96. <style rel="stylesheet/scss" lang="scss" scoped>
  97. .project {
  98. padding: 0 10px;
  99. .title {
  100. font-size: 20px;
  101. line-height: 35px;
  102. color: slategrey;
  103. }
  104. .subtitle {
  105. font-size: 15px;
  106. line-height: 25px;
  107. color: lightslategray;
  108. }
  109. .transfer {
  110. padding: 10px 0;
  111. }
  112. .submit {
  113. padding: 10px 0;
  114. }
  115. }
  116. </style>