personnel.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view class="personnel-page">
  3. <scroll-view class="scroll-y" scroll-y="true">
  4. <tm-radio-group
  5. type="select"
  6. :list="list"
  7. :defaultValue='defaultValue'
  8. @change="changeSelect"
  9. :openkeys="[0]"
  10. :setting="{
  11. pName: 'pName',
  12. child: 'childList',
  13. value: 'value',
  14. name: 'label'
  15. }"
  16. />
  17. </scroll-view>
  18. <view class="fixed-buttom-btn">
  19. <text class="btn-text">确定</text>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. // 人员架构
  25. export default {
  26. data(){
  27. return {
  28. defaultValue: 1,
  29. list: [
  30. {
  31. pValue: 1,
  32. pName: '门诊',
  33. childList: [
  34. {value: 1, label: 'PDCA1'},
  35. {value: 2, label: 'PDCA2'},
  36. {value: 3, label: 'PDCA3'},
  37. {value: 4, label: 'PDCA4'}
  38. ]
  39. },
  40. {
  41. pValue: 2,
  42. pName: '分诊',
  43. childList: [
  44. {value: 11, label: '许玮琛1'},
  45. {value: 22, label: '许玮琛2'},
  46. {value: 33, label: '许玮琛3'},
  47. {value: 44, label: '许玮琛4'}
  48. ]
  49. },
  50. ]
  51. }
  52. },
  53. created() {
  54. uni.setNavigationBarTitle({
  55. title: '人员架构'
  56. });
  57. },
  58. methods: {
  59. changeSelect(selectVal) {
  60. this.defaultValue = selectVal
  61. }
  62. },
  63. }
  64. </script>
  65. <style lang="less">
  66. .personnel-page {
  67. height: 100%;
  68. .scroll-y {
  69. height: calc(100% - 87.5rpx);
  70. padding-top: 15rpx;
  71. }
  72. }
  73. </style>