troble_treatment.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view class="container uni-container">
  3. <u--form :model="queryParams" ref="queryForm" size="small" :inline="true" labelPosition="left"
  4. label-width="68px">
  5. <u-form-item label="处理结果" prop="handleResult">
  6. <u--input v-model="queryParams.handleResult" placeholder="请输入处理结果" clearable
  7. @keyup.enter.native="handleQuery" />
  8. </u-form-item>
  9. <u-form-item label="处理时间" prop="handleTime" @click="showtimeStart=true; hideKeyboard()">
  10. <u--input v-model="queryParams.handleTime" placeholder="处理时间" clearable
  11. @keyup.enter.native="showtimeStart=true" />
  12. <u-datetime-picker :show="showtimeStart" :value="queryParams.handleTime" mode="date" closeOnClickOverlay
  13. @confirm="confirmStarttime" @cancel="showtimeStart = false" @change="changetime"
  14. @close="showtimeStart = false">
  15. </u-datetime-picker>
  16. </u-form-item>
  17. <u-form-item label="复核人员" prop="peo" @click="checkpeoplebox=true; hideKeyboard()">
  18. <u--input v-model="queryParams.peo" placeholder="请选择复核人员" clearable
  19. @keyup.enter.native="checkpeoplebox=true" />
  20. </u-form-item>
  21. <u-form-item label="处理方式" prop="handleMethod">
  22. <u-radio-group v-model="queryParams.handleMethod">
  23. <u-radio :customStyle="{marginRight: '16px'}" v-for="dict in dengerHandle" :key="dict.value"
  24. :label="dict.label" :name="dict.value">
  25. </u-radio>
  26. </u-radio-group>
  27. </u-form-item>
  28. <u-form-item>
  29. <u-button @click="cancel">取消</u-button>
  30. <u-button type="primary" color="rgb(25, 146, 148)" @click="handleQuery">提交</u-button>
  31. </u-form-item>
  32. </u--form>
  33. <!-- 单位进来转发任务显示人员 -->
  34. <u-popup :show="checkpeoplebox" :round="10" @close="checkpeoplebox=false" style="position: relative;"
  35. mode="center">
  36. <view style="width: 90vw;padding: 10px;">
  37. <text class="text-xl">检查人员</text>
  38. <view class="" style="padding-top: 20upx;">
  39. <u-checkbox-group v-model="queryParams.peoIds"
  40. placement="column" @change="checkboxChange" activeColor="rgb(25, 146, 148)">
  41. <u-checkbox :customStyle="{marginBottom: '8px'}" v-for="(item, index) in personInfo" :key="index" :label="item.nickname" :name="item.id" >
  42. </u-checkbox>
  43. </u-checkbox-group>
  44. </view>
  45. <view class="flex flex-direction-row ">
  46. <u-button shape="circle" type="primary" color="#4CB2B6" text="确定" @click="checkboxConfirm2"
  47. customStyle="margin-right:20px;padding:0 30px">
  48. </u-button>
  49. <u-button type="primary" plain color="#4CB2B6" text="取消" shape="circle"
  50. @click="checkpeoplebox=false" customStyle="padding:0 30px">
  51. </u-button>
  52. </view>
  53. </view>
  54. </u-popup>
  55. </view>
  56. </template>
  57. <script>
  58. import {
  59. getOneDenger, // 获得单个隐患详情
  60. getUserPage,
  61. } from "@/api/hiddenTrouble";
  62. import {
  63. DICT_TYPE,
  64. getDictDatas
  65. } from "@/utils/dict";
  66. let that = null;
  67. export default {
  68. data() {
  69. return {
  70. // 搜索框显示控制
  71. showtimeStart: false,
  72. // 查询参数
  73. queryParams: {
  74. pageNo: 1,
  75. pageSize: 10,
  76. handleResult: null,
  77. handleTime: '',
  78. status: 0,
  79. handleMethod: null,
  80. orgId: null,
  81. userId: null,
  82. peoIds:[]
  83. },
  84. dengerHandle: getDictDatas(DICT_TYPE.DENGER_HANDLE),
  85. checkpeoplebox: false, //待完成转发弹窗
  86. personInfo: [], //转发任务的人员信息
  87. peoIds:[],
  88. }
  89. },
  90. onShow() {
  91. this.getPeopleData()
  92. },
  93. methods: {
  94. getPeopleData() {
  95. getUserPage({
  96. pageNo: 1,
  97. pageSize: 10
  98. }).then(response => {
  99. this.personInfo = response.data.list
  100. })
  101. },
  102. // 隐藏键盘
  103. hideKeyboard() {
  104. uni.hideKeyboard()
  105. },
  106. // 开始日期
  107. confirmStarttime(e) {
  108. this.showtimeStart = false
  109. console.log(e.value, e.mode);
  110. let value = new Date(e.value)
  111. this.queryParams.handleTime = uni.$u.timeFormat(e.value, 'yyyy/mm/dd');
  112. // this.$forceUpdate()
  113. },
  114. changetime(e) {
  115. console.log('change', e)
  116. },
  117. checkboxChange(e){
  118. this.peoIds=e
  119. },
  120. checkboxConfirm2(){
  121. this.checkpeoplebox=false
  122. this.queryParams.peoIds=this.peoIds
  123. this.queryParams.peo=''
  124. this.personInfo.map(i=>{
  125. this.peoIds.map(k=>{
  126. console.log("i.id==k,i.id,k: ",i.id==k,i.id,k);
  127. if(i.id==k) {
  128. this.queryParams.peo=this.queryParams.peo+i.nickname+' '
  129. }
  130. })
  131. })
  132. console.log("this.queryParams.peo: ",this.queryParams.peo);
  133. },
  134. /** 搜索按钮操作 */
  135. handleQuery() {
  136. this.queryParams.pageNo = 1
  137. this.getData(this.queryParams.pageNo)
  138. },
  139. cancel() {
  140. uni.navigateTo({
  141. // url: '/pagesA/fire/hidden_trouble/trouble_solve/trouble_solve?id=' + this.formData.id,
  142. url: '/pagesA/fire/hidden_trouble/trouble_details/trouble_details'
  143. })
  144. },
  145. }
  146. }
  147. </script>
  148. <style lang="scss" scoped>
  149. .searchpopup {
  150. height: 60vh;
  151. display: flex;
  152. justify-content: center;
  153. padding: 20rpx
  154. }
  155. </style>