processDetailVideo.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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" :data-maxnum="reason.length+'/50'"
  78. auto-height v-model="msg2"></textarea>
  79. </view>
  80. <view class="btn-area">
  81. <button class="bg-orange round missReport margin-top" @click="videoMissSubmit()">误 报 </button>
  82. <button class="bg-blue round missReport margin-top " @click="videoSubmit()">告警确认 </button>
  83. </view>
  84. </form>
  85. </view>
  86. </view>
  87. <!-- 处理状态end -->
  88. </view>
  89. </view>
  90. </template>
  91. <script>
  92. export default {
  93. data() {
  94. return {
  95. msg2: '',
  96. reason: '',
  97. radio: 'A',
  98. radio: 'B',
  99. modalName: null,
  100. type: '0',
  101. detailMessage2:{},
  102. handling_status:0
  103. }
  104. },
  105. onLoad: function(option) {
  106. this.handling_status=option.handling_status;
  107. this.type = option.type;
  108. this.companyCode = option.companyCode;
  109. this.processingStatus=option.handling_status;
  110. this.alarmId = option.id;
  111. if (option.handling_status!=0) {
  112. uni.setNavigationBarTitle({
  113. title: '已处理'
  114. });
  115. } else {
  116. uni.setNavigationBarTitle({
  117. title: '未处理'
  118. });
  119. }
  120. this.getVideoDetail({"companyCode":option.companyCode,"processingStatus":option.processingStatus,"alarmId":option.id})
  121. },
  122. methods: {
  123. async getVideoDetail(ming={}) {
  124. const res= await this.$myRequest({
  125. url:'IntegratedAlarm/getVideoAlarmDetails',
  126. data:ming
  127. })
  128. console.log(res.data.data[0]);
  129. this.detailMessage2=res.data.data[0]
  130. },
  131. videoSubmit() {
  132. if(!this.msg2){
  133. uni.showToast({
  134. title: "请输入处理内容",
  135. icon:"none"
  136. });
  137. }else{
  138. this.powerSubmitRes({
  139. "alarmStatus": 0,
  140. "type": 2,
  141. "deviceCode": this.detailMessage2.deviceCode,
  142. "companyCode": this.companyCode,
  143. "id": this.detailMessage2.id,
  144. "handlerContent": this.msg2
  145. })
  146. }
  147. },
  148. videoMissSubmit() {
  149. if(!this.msg2){
  150. uni.showToast({
  151. title: "请输入处理内容",
  152. icon:"none"
  153. });
  154. }else{
  155. this.powerSubmitRes({
  156. "alarmStatus": 1,
  157. "type": 2,
  158. "deviceCode": this.detailMessage2.deviceCode,
  159. "companyCode": this.companyCode,
  160. "id": this.detailMessage2.id,
  161. "handlerContent": this.msg2
  162. })
  163. }
  164. },
  165. powerSubmit() {
  166. if(!this.msg){
  167. uni.showToast({
  168. title: "请输入处理内容",
  169. icon:"none"
  170. });
  171. }else{
  172. this.powerSubmitRes({
  173. "type": 1,
  174. "deviceCode": this.detailMessage.deviceCode,
  175. "companyCode": this.companyCode,
  176. "id": this.detailMessage.id,
  177. "handlerContent": this.msg
  178. })
  179. }
  180. },
  181. async powerSubmitRes(params = {}) {
  182. const res = await this.$myRequest({
  183. url: 'IntegratedAlarm/setAlarmHandle',
  184. data: params
  185. })
  186. if(res.data.flag){
  187. uni.showToast({
  188. title: "提交成功",
  189. });
  190. }
  191. setTimeout(() => {
  192. uni.navigateTo({
  193. url: '/pages/processList/processList?companyCode=' + this.companyCode + '&type='+this.type+'',
  194. });
  195. }, 1000);
  196. },
  197. submit() {
  198. uni.makePhoneCall({
  199. phoneNumber: this.detailMessage.phone
  200. });
  201. },
  202. RadioChange(e) {
  203. this.radio = e.detail.value
  204. },
  205. textareaAInput(e) {
  206. this.textareaAValue = e.detail.value
  207. },
  208. // textarea
  209. inputReason(e) {
  210. this.reason = e.detail.value;
  211. }
  212. }
  213. }
  214. </script>
  215. <style lang="scss">
  216. .timeBox {
  217. height: 88rpx;
  218. background: #EFF4FF;
  219. line-height: 88rpx;
  220. .time {
  221. color: #333
  222. }
  223. }
  224. .info-tit {
  225. color: #4074E7;
  226. line-height: 90rpx;
  227. height: 90rpx;
  228. }
  229. // 基本信息
  230. .info-content>view {
  231. margin-left: 24rpx;
  232. border-bottom: 1px solid #EDEDED;
  233. line-height: 92rpx;
  234. color: #666;
  235. }
  236. .info-content view text:first-child {
  237. width: 160rpx;
  238. display: inline-block
  239. }
  240. /* // 处理内容 */
  241. .cu-form-group {
  242. background: #f5f5f5;
  243. }
  244. .processStatus {
  245. textarea {
  246. background: #F5F5F5;
  247. color: #999999;
  248. }
  249. }
  250. // textarea
  251. .JTxtArea {
  252. position: relative;
  253. &.sm {
  254. min-height: 60rpx;
  255. }
  256. &.lg {
  257. min-height: 100rpx;
  258. }
  259. &:after {
  260. content: attr(data-maxnum);
  261. position: absolute;
  262. right: 10rpx;
  263. bottom: 0px;
  264. }
  265. }
  266. </style>