unprocessDetail.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <view>
  3. <view class="timeBox flex justify-between align-center padding-lr-sm">
  4. <view class="time">2021-01-18 15:16:45</view>
  5. <button class="cu-btn radius bg-red sm">未处理</button>
  6. </view>
  7. <view>
  8. <view class="basic-info">
  9. <view class="info-tit margin-left-xs">
  10. <text class="cuIcon-titles margin-right-xs"></text>
  11. 基本信息
  12. </view>
  13. <view class="info-content">
  14. <view class="info-one-info ">
  15. <text>设备名称:</text>
  16. <text>三楼赛特威尔测试烟感二</text>
  17. </view>
  18. <view>
  19. <text>设备地址:</text>
  20. <text>上海市青浦区徐泾镇徐乐路208号</text>
  21. </view>
  22. <view>
  23. <text>告警信息:</text>
  24. <text>烟雾拆卸报警</text>
  25. </view>
  26. </view>
  27. </view>
  28. <!-- 处理状态start -->
  29. <view class="processStatus">
  30. <view class="info-tit margin-left-xs">
  31. <text class="cuIcon-titles margin-right-xs"></text>
  32. 处理内容
  33. </view>
  34. <view class="padding-lr padding-bottom-lg">
  35. <form action="">
  36. <radio-group name="gender" class="">
  37. <label class="margin-right">
  38. <radio value="单个处理" checked /><text>单个处理</text>
  39. </label>
  40. <label>
  41. <radio value="批量处理" /><text>批量处理</text>
  42. </label>
  43. </radio-group>
  44. <view class="cu-form-group">
  45. <textarea class="JTxtArea lg"
  46. :maxlength="50"
  47. :data-maxnum="reason.length+'/50'" placeholder="备注信息,最多可输入50个字..."
  48. auto-height
  49. @input="inputReason"
  50. :value="reason"></textarea>
  51. </view>
  52. <view class="btn-area">
  53. <button class="bg-orange round missReport margin-top" @click="videoMissSubmit()">误 报 </button>
  54. <button class="bg-blue round missReport margin-top " @click="videoSubmit()">非 误 报 </button>
  55. </view>
  56. </form>
  57. </view>
  58. </view>
  59. <!-- 处理状态end -->
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. export default {
  65. data() {
  66. return {
  67. radio: 'A',
  68. radio: 'B',
  69. modalName: null,
  70. reason: '',
  71. type: '0',
  72. detailMessage: {},
  73. detailMessage2: {},
  74. msg: '',
  75. msg2: '',
  76. flag:false,
  77. companyCode:0
  78. }
  79. },
  80. onLoad: function(option) {
  81. },
  82. methods: {
  83. async powerSubmitRes(params = {}) {
  84. const res = await this.$myRequest({
  85. url: 'IntegratedAlarm/setAlarmHandle',
  86. data: params
  87. })
  88. if(res.data.flag){
  89. uni.showToast({
  90. title: "提交成功",
  91. });
  92. }
  93. setTimeout(() => {
  94. uni.navigateTo({
  95. url: '/pages/processList/processList?companyCode=' + this.companyCode + '&type='+this.type+'',
  96. });
  97. }, 1000);
  98. },
  99. videoSubmit() {
  100. if(!this.msg2){
  101. uni.showToast({
  102. title: "请输入处理内容",
  103. icon:"none"
  104. });
  105. }else{
  106. this.powerSubmitRes({
  107. "alarmStatus": 0,
  108. "type": 2,
  109. "deviceCode": this.detailMessage2.deviceCode,
  110. "companyCode": this.companyCode,
  111. "id": this.detailMessage2.id,
  112. "handlerContent": this.msg2
  113. })
  114. }
  115. },
  116. videoMissSubmit() {
  117. if(!this.msg2){
  118. uni.showToast({
  119. title: "请输入处理内容",
  120. icon:"none"
  121. });
  122. }else{
  123. this.powerSubmitRes({
  124. "alarmStatus": 1,
  125. "type": 2,
  126. "deviceCode": this.detailMessage2.deviceCode,
  127. "companyCode": this.companyCode,
  128. "id": this.detailMessage2.id,
  129. "handlerContent": this.msg2
  130. })
  131. }
  132. },
  133. submit() {
  134. uni.makePhoneCall({
  135. phoneNumber: '15122423833' //仅为示例
  136. });
  137. },
  138. RadioChange(e) {
  139. this.radio = e.detail.value
  140. },
  141. textareaAInput(e) {
  142. this.textareaAValue = e.detail.value
  143. },
  144. // textarea
  145. inputReason(e) {
  146. this.reason = e.detail.value;
  147. }
  148. }
  149. }
  150. </script>
  151. <style lang="scss">
  152. </style>