unprocessDetail.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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. <view class="cu-form-group">
  37. <textarea class="JTxtArea lg" placeholder="备注信息,最多可输入50个字..." :maxlength="50" :data-maxnum="reason.length+'/50'"
  38. auto-height v-model="msg2"></textarea>
  39. </view>
  40. <view class="btn-area">
  41. <button class="bg-orange round missReport margin-top" @click="videoMissSubmit()">误 报 </button>
  42. <button class="bg-blue round missReport margin-top " @click="videoSubmit()">非 误 报 </button>
  43. </view>
  44. </form>
  45. </view>
  46. </view>
  47. <!-- 处理状态end -->
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. export default {
  53. data() {
  54. return {
  55. radio: 'A',
  56. radio: 'B',
  57. modalName: null,
  58. reason: '',
  59. type: '0',
  60. detailMessage: {},
  61. detailMessage2: {},
  62. msg: '',
  63. msg2: '',
  64. flag:false,
  65. companyCode:0
  66. }
  67. },
  68. onLoad: function(option) {
  69. },
  70. methods: {
  71. async powerSubmitRes(params = {}) {
  72. const res = await this.$myRequest({
  73. url: 'IntegratedAlarm/setAlarmHandle',
  74. data: params
  75. })
  76. if(res.data.flag){
  77. uni.showToast({
  78. title: "提交成功",
  79. });
  80. }
  81. setTimeout(() => {
  82. uni.navigateTo({
  83. url: '/pages/processList/processList?companyCode=' + this.companyCode + '&type='+this.type+'',
  84. });
  85. }, 1000);
  86. },
  87. videoSubmit() {
  88. if(!this.msg2){
  89. uni.showToast({
  90. title: "请输入处理内容",
  91. icon:"none"
  92. });
  93. }else{
  94. this.powerSubmitRes({
  95. "alarmStatus": 0,
  96. "type": 2,
  97. "deviceCode": this.detailMessage2.deviceCode,
  98. "companyCode": this.companyCode,
  99. "id": this.detailMessage2.id,
  100. "handlerContent": this.msg2
  101. })
  102. }
  103. },
  104. videoMissSubmit() {
  105. if(!this.msg2){
  106. uni.showToast({
  107. title: "请输入处理内容",
  108. icon:"none"
  109. });
  110. }else{
  111. this.powerSubmitRes({
  112. "alarmStatus": 1,
  113. "type": 2,
  114. "deviceCode": this.detailMessage2.deviceCode,
  115. "companyCode": this.companyCode,
  116. "id": this.detailMessage2.id,
  117. "handlerContent": this.msg2
  118. })
  119. }
  120. },
  121. submit() {
  122. uni.makePhoneCall({
  123. phoneNumber: '15122423833' //仅为示例
  124. });
  125. },
  126. RadioChange(e) {
  127. this.radio = e.detail.value
  128. },
  129. textareaAInput(e) {
  130. this.textareaAValue = e.detail.value
  131. },
  132. // textarea
  133. inputReason(e) {
  134. this.reason = e.detail.value;
  135. }
  136. }
  137. }
  138. </script>
  139. <style lang="scss">
  140. </style>