tiaobanPeople.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <view style="background-color: #fff;padding-bottom: 110rpx;" v-if="deptList.length != 0">
  3. <u-radio-group v-model="checkboxValue1" placement="column" iconPlacement="right" @change="checkboxChange">
  4. <u-collapse accordion @open="open">
  5. <u-collapse-item :title='dateChange'>
  6. <view class="checkitem" v-for=" i in deptList" :key="i.NO" >
  7. <u-radio shape="square" :label="i.status+'--'+i.name" :name="i.userId" size="24" @change="change2(i)"> </u-radio >
  8. </view>
  9. </u-collapse-item>
  10. </u-collapse>
  11. </u-radio-group>
  12. <view style="position: fixed;bottom: 0;left: 0;width: 100%;height: 100rpx;background-color: #fff;box-sizing: border-box;padding: 20rpx;">
  13. <u-button type="primary" text="确认" @click="submit"></u-button>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import checkbox from '../../uni_modules/uview-ui/libs/config/props/checkbox'
  19. export default {
  20. data() {
  21. return {
  22. checkboxValue1:[],
  23. userList: [],
  24. deptList: [],
  25. allUserList: [],
  26. nameList:[],
  27. idList:[],
  28. dateChange:null,
  29. userChange:null
  30. }
  31. },
  32. onLoad(options){
  33. this.dateChange=options.dataChange+' '+'值班人员'
  34. // this.getjsPeo(options)
  35. this.gettiaobanPeople(options)
  36. },
  37. onNavigationBarButtonTap(e) {
  38. },
  39. methods: {
  40. gettiaobanPeople(options){
  41. uni.$u.http.post('/duty/duty/getConditionUsers',{
  42. dateStr:options.dataChange
  43. }).then((res)=>{
  44. console.log(res)
  45. this.deptList=res.rows
  46. })
  47. },
  48. change2(val){
  49. console.log('val',val)
  50. this.userChange=val.status+'-'+val.name
  51. },
  52. //获取下一节点接收人信息
  53. // getjsPeo(options) {
  54. // uni.$u.http.get('/jflow/restful/GenerNextStepNodeEmps', {
  55. // params: {
  56. // workid: options.workid,
  57. // token: uni.getStorageSync('jtoken'),
  58. // flowNo: options.flowNo,
  59. // toNodeID: options.id
  60. // }
  61. // }).then(res => {
  62. // console.log(res)
  63. // if(getApp().globalData.peoList.length != 0){
  64. // this.nameList = getApp().globalData.peoList.split(",")
  65. // this.idList = getApp().globalData.peoDeptList.split(",")
  66. // this.checkboxValue1 = getApp().globalData.peoIdList.split(",")
  67. // }
  68. // this.allUserList = res.Emps;
  69. // this.userList = res.Emps;
  70. // this.$forceUpdate()
  71. // if(res.Depts.length>1&&res.Depts[0].Name=="河北省卫计委综合监督执法局"){
  72. // this.deptList = res.Depts.splice(1)
  73. // }else{
  74. // this.deptList = res.Depts
  75. // }
  76. // })
  77. // },
  78. // //选择人员
  79. checkboxChange(e){
  80. console.log('e',e)
  81. },
  82. //折叠面板打开
  83. open(e){
  84. // console.log(e)
  85. },
  86. // change2(e){
  87. // if(this.nameList.indexOf(e.Name)==-1){
  88. // this.nameList.push(e.Name)
  89. // this.idList.push(e.FK_Dept)
  90. // }else{
  91. // this.nameList.splice(this.nameList.indexOf(e.Name),1)
  92. // this.idList.splice(this.nameList.indexOf(e.Name),1)
  93. // }
  94. // },
  95. submit(){
  96. console.log('submit',this.checkboxValue1)
  97. if(this.checkboxValue1.length == 0){
  98. uni.showToast({
  99. title:"请选择人员",
  100. icon:"none"
  101. })
  102. }else{
  103. getApp().globalData.adjustUserId=this.checkboxValue1
  104. getApp().globalData.user=this.userChange
  105. console.log(this.userChange)
  106. // getApp().globalData.peoList = this.nameList.join(",")
  107. // getApp().globalData.peoIdList = this.checkboxValue1.join(",")
  108. // getApp().globalData.peoDeptList = this.idList.join(",")
  109. uni.$emit('query' , {a : 'one'})
  110. uni.navigateBack()
  111. }
  112. }
  113. }
  114. }
  115. </script>
  116. <style lang="scss" scoped>
  117. .checkitem{
  118. // display: flex;
  119. // align-items: center;
  120. // justify-content: space-between;
  121. font-size: 32rpx;
  122. padding: 20rpx 0;
  123. border-bottom: 1px solid #eaeaea;
  124. }
  125. ::v-deep .u-collapse-item__content__text{
  126. background-color: #f7f7f7;
  127. }
  128. ::v-deep .u-cell__title-text{
  129. font-size: 32rpx;
  130. }
  131. </style>