index.vue 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <template>
  2. <div class="page_addStaff">
  3. <div class="editStaffTitle">
  4. <i class="iconfont icon-zuojiantou jiantou"></i>
  5. <span class="titleName">新增员工</span>
  6. <p>保存</p>
  7. </div>
  8. <div class="editStaffTip">必填</div>
  9. <div class="staffBox">
  10. <van-field v-model="text" label="姓名" clearable placeholder="请填写姓名" />
  11. <van-field v-model="tel" type="tel" label="手机号" placeholder="请填写手机号" clearable />
  12. <van-cell class="newCell">
  13. <!-- 使用 title 插槽来自定义标题 -->
  14. <template slot="title">
  15. <span class="custom-title">角色</span>
  16. <div style="width:76%;margin-left:3.3rem">
  17. <van-checkbox-group v-model="result">
  18. <van-checkbox style="width: 30%;" name="a" shape="square">医生</van-checkbox>
  19. <van-checkbox style="width: 30%;" name="b" shape="square">护士</van-checkbox>
  20. <van-checkbox style="width: 30%;" name="c" shape="square">运营</van-checkbox>
  21. <van-checkbox style="width: 30%;" name="d" shape="square">库存</van-checkbox>
  22. <van-checkbox style="width: 30%;" name="e" shape="square">院长</van-checkbox>
  23. <van-checkbox style="width: 40%;" name="f" shape="square">子管理员</van-checkbox>
  24. </van-checkbox-group>
  25. </div>
  26. </template>
  27. </van-cell>
  28. </div>
  29. <div class="editStaffTip">选填</div>
  30. <div class="staffBox">
  31. <van-field v-model="text" label="职位" placeholder="请填写" />
  32. </div>
  33. <div class="addnewStaff">
  34. <van-icon class="addIcon" name="add" />
  35. <p>继续新增员工</p>
  36. </div>
  37. </div>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. result: [],
  44. value1: ""
  45. };
  46. }
  47. };
  48. </script>
  49. <style lang="scss" scoped>
  50. .page_addStaff {
  51. height: 100%;
  52. overflow: hidden;
  53. background: #fafafa;
  54. .editStaffTitle {
  55. height: 3.125rem;
  56. display: flex;
  57. align-items: center;
  58. justify-content: space-between;
  59. width: 100%;
  60. padding: 0 1.125rem;
  61. background: #fff;
  62. }
  63. .jiantou {
  64. font-size: 1.5rem;
  65. font-weight: 600;
  66. margin-right: 1.25rem;
  67. }
  68. .titleName {
  69. font-size: 1.125rem;
  70. font-weight: 600;
  71. }
  72. .editStaffTip {
  73. height: 1.875rem;
  74. line-height: 1.875rem;
  75. font-size: 0.75rem;
  76. padding-left: 0.875rem;
  77. color: #989898;
  78. }
  79. .staffBox {
  80. .van-cell {
  81. font-size: 1rem;
  82. }
  83. .newCell {
  84. padding-right: 0;
  85. }
  86. }
  87. .van-cell__title {
  88. display: flex;
  89. }
  90. .van-checkbox-group {
  91. display: flex;
  92. flex-wrap: wrap;
  93. }
  94. .van-checkbox {
  95. margin-bottom: 0.625rem;
  96. }
  97. .addnewStaff {
  98. height: 2.8125rem;
  99. line-height: 2.8125rem;
  100. background: #fff;
  101. width: 100%;
  102. margin-top: 0.875rem;
  103. display: flex;
  104. align-items: center;
  105. padding-left: 1rem;
  106. .addIcon {
  107. color: #338afb;
  108. font-size: 1.5rem;
  109. margin-right: 0.625rem;
  110. }
  111. }
  112. }
  113. </style>
  114. <style lang="scss">
  115. .page_editStaff {
  116. .van-cell__value {
  117. display: flex;
  118. align-items: center;
  119. }
  120. }
  121. </style>