processDetailVideo1.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <template>
  2. <view class="dealDetail">
  3. <view class="timeBox flex justify-between align-center padding-lr-sm">
  4. <view class="time">{{detailMessage2.time}}</view>
  5. <button class="cu-btn radius bg-green sm" v-if="handling_status==1">已处理</button>
  6. <button class="cu-btn radius bg-green sm" v-if="handling_status==0">未处理</button>
  7. </view>
  8. <view>
  9. <!-- 基本信息start -->
  10. <view class="basic-info">
  11. <view class="info-tit margin-left-xs">
  12. <text class="cuIcon-titles margin-right-xs"></text>
  13. 基本信息
  14. </view>
  15. <view class="info-content">
  16. <view class="info-one-info ">
  17. <text>设备名称:</text>
  18. <text>{{detailMessage2.deviceName}}</text>
  19. </view>
  20. <view>
  21. <text>设备地址:</text>
  22. <text>{{detailMessage2.deviceAddress}}</text>
  23. </view>
  24. <view>
  25. <text>告警信息:</text>
  26. <text>{{detailMessage2.alarmInformation}}</text>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- 基本信息end -->
  31. <!-- 报警当前情况截图start -->
  32. <view class="basic-info">
  33. <view class="info-tit margin-left-xs">
  34. <text class="cuIcon-titles margin-right-xs"></text>
  35. 报警当前情况截图
  36. </view>
  37. <view class="info-content padding-lr-lg">
  38. <image :src="detailMessage2.alarmPicture" style="width:100%"></image>
  39. </view>
  40. </view>
  41. <!-- 报警当前情况截图end -->
  42. <!-- 处理信息start -->
  43. <view class="processStatus" v-if="handling_status==1">
  44. <view class="info-tit margin-left-xs">
  45. <text class="cuIcon-titles margin-right-xs"></text>
  46. 处理信息
  47. </view>
  48. <view class="info-content">
  49. <view class="info-one-info ">
  50. <text>是否误报:</text>
  51. <text>{{detailMessage2.alarmStatus?'误报':'非误报'}}</text>
  52. </view>
  53. <view>
  54. <text>处理人:</text>
  55. <text>{{detailMessage2.handler}}</text>
  56. </view>
  57. <view>
  58. <text>处理时间:</text>
  59. <text>{{detailMessage2.handlerTime}}</text>
  60. </view>
  61. <view>
  62. <text>处理内容:</text>
  63. <text>{{detailMessage2.handlerContent}}</text>
  64. </view>
  65. </view>
  66. </view>
  67. <!-- 处理状态end -->
  68. <!-- 处理状态start -->
  69. <view class="processStatus" v-else>
  70. <view class="info-tit margin-left-xs">
  71. <text class="cuIcon-titles margin-right-xs"></text>
  72. 处理内容
  73. </view>
  74. <view class="padding-lr padding-bottom-lg">
  75. <form action="">
  76. <view class="cu-form-group">
  77. <textarea class="JTxtArea lg" placeholder="备注信息,最多可输入50个字..." :maxlength="50"
  78. :data-maxnum="reason.length+'/50'" auto-height v-model="msg2"></textarea>
  79. </view>
  80. <view class="btn-area">
  81. <button class="bg-orange round missReport margin-top" @click="videoMissSubmit()">误 报
  82. </button>
  83. <button class="bg-blue round missReport margin-top " @click="videoSubmit()">告警确认 </button>
  84. </view>
  85. </form>
  86. </view>
  87. </view>
  88. <!-- 处理状态end -->
  89. </view>
  90. </view>
  91. </template>
  92. <script>
  93. export default {
  94. data() {
  95. return {
  96. msg2: '',
  97. reason: '',
  98. radio: 'A',
  99. radio: 'B',
  100. modalName: null,
  101. type: '0',
  102. detailMessage2: {},
  103. handling_status: 0
  104. }
  105. },
  106. onLoad: function(option) {
  107. this.type = option.type;
  108. this.companyCode = option.companyCode;
  109. this.alarmId = option.id;
  110. this.getVideoDetail({
  111. "companyCode": option.companyCode,
  112. "alarmId": option.id
  113. })
  114. },
  115. mounted(){
  116. document.querySelector('.uni-page-head-hd').style.display = 'none'
  117. },
  118. methods: {
  119. async getVideoDetail(ming = {}) {
  120. const res = await this.$myRequest({
  121. url: 'IntegratedAlarm/getVideoAlarmDetails',
  122. data: ming
  123. })
  124. console.log(res.data.data[0]);
  125. this.detailMessage2 = res.data.data[0];
  126. this.handling_status = this.detailMessage2.handling_status;
  127. if (this.handling_status != 0) {
  128. uni.setNavigationBarTitle({
  129. title: '已处理'
  130. });
  131. } else {
  132. uni.setNavigationBarTitle({
  133. title: '未处理'
  134. });
  135. }
  136. },
  137. videoSubmit() {
  138. if (!this.msg2) {
  139. uni.showToast({
  140. title: "请输入处理内容",
  141. icon: "none"
  142. });
  143. } else {
  144. this.powerSubmitRes({
  145. "alarmStatus": 0,
  146. "type": 2,
  147. "deviceCode": this.detailMessage2.deviceCode,
  148. "companyCode": this.companyCode,
  149. "id": this.detailMessage2.id,
  150. "handlerContent": this.msg2
  151. })
  152. }
  153. },
  154. videoMissSubmit() {
  155. if (!this.msg2) {
  156. uni.showToast({
  157. title: "请输入处理内容",
  158. icon: "none"
  159. });
  160. } else {
  161. this.powerSubmitRes({
  162. "alarmStatus": 1,
  163. "type": 2,
  164. "deviceCode": this.detailMessage2.deviceCode,
  165. "companyCode": this.companyCode,
  166. "id": this.detailMessage2.id,
  167. "handlerContent": this.msg2
  168. })
  169. }
  170. },
  171. powerSubmit() {
  172. if (!this.msg) {
  173. uni.showToast({
  174. title: "请输入处理内容",
  175. icon: "none"
  176. });
  177. } else {
  178. this.powerSubmitRes({
  179. "type": 1,
  180. "deviceCode": this.detailMessage.deviceCode,
  181. "companyCode": this.companyCode,
  182. "id": this.detailMessage.id,
  183. "handlerContent": this.msg
  184. })
  185. }
  186. },
  187. async powerSubmitRes(params = {}) {
  188. const res = await this.$myRequest({
  189. url: 'IntegratedAlarm/setAlarmHandle',
  190. data: params
  191. })
  192. if (res.data.flag) {
  193. uni.showToast({
  194. title: "提交成功",
  195. });
  196. }
  197. setTimeout(() => {
  198. uni.navigateTo({
  199. url: '/pages/processList/processList?companyCode=' + this.companyCode +
  200. '&type=' + this.type + '',
  201. });
  202. }, 1000);
  203. },
  204. submit() {
  205. uni.makePhoneCall({
  206. phoneNumber: this.detailMessage.phone
  207. });
  208. },
  209. RadioChange(e) {
  210. this.radio = e.detail.value
  211. },
  212. textareaAInput(e) {
  213. this.textareaAValue = e.detail.value
  214. },
  215. // textarea
  216. inputReason(e) {
  217. this.reason = e.detail.value;
  218. }
  219. }
  220. }
  221. </script>
  222. <style lang="scss">
  223. .timeBox {
  224. height: 88rpx;
  225. background: #EFF4FF;
  226. line-height: 88rpx;
  227. .time {
  228. color: #333
  229. }
  230. }
  231. .info-tit {
  232. color: #4074E7;
  233. line-height: 90rpx;
  234. height: 90rpx;
  235. }
  236. // 基本信息
  237. .info-content>view {
  238. margin-left: 24rpx;
  239. border-bottom: 1px solid #EDEDED;
  240. line-height: 92rpx;
  241. color: #666;
  242. }
  243. .info-content view text:first-child {
  244. width: 160rpx;
  245. display: inline-block
  246. }
  247. /* // 处理内容 */
  248. .cu-form-group {
  249. background: #f5f5f5;
  250. }
  251. .processStatus {
  252. textarea {
  253. background: #F5F5F5;
  254. color: #999999;
  255. }
  256. }
  257. // textarea
  258. .JTxtArea {
  259. position: relative;
  260. &.sm {
  261. min-height: 60rpx;
  262. }
  263. &.lg {
  264. min-height: 100rpx;
  265. }
  266. &:after {
  267. content: attr(data-maxnum);
  268. position: absolute;
  269. right: 10rpx;
  270. bottom: 0px;
  271. }
  272. }
  273. </style>