monthDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. <template>
  2. <view class="reportD-wrapper">
  3. <view class="text-center flex flex-wrap justify-center title-wrapper">
  4. <view class=" margin title" style="width:68%">{{company_name}}消防报警系统监测数据 {{event_time}}月报表</view>
  5. </view>
  6. <view class="basic-info bg-white margin-bottom-sm">
  7. <view class="info-tit margin-left-xs">
  8. <text class="cuIcon-titles margin-right-xs"></text>
  9. 项目情况
  10. </view>
  11. <view class="info-content">
  12. <view class="info-one-info ">
  13. <text>单位名称:</text>
  14. <text>{{project_info.company_name}}</text>
  15. </view>
  16. <view class="info-one-info ">
  17. <text>进场日期:</text>
  18. <text>{{project_info.approach_time}}</text>
  19. </view>
  20. <view class="info-one-info ">
  21. <text>完工日期:</text>
  22. <text>{{project_info.complete_time}}</text>
  23. </view>
  24. <view class="info-one-info ">
  25. <text>验收日期:</text>
  26. <text>{{project_info.check_time}}</text>
  27. </view>
  28. </view>
  29. </view>
  30. <view class=" bg-white margin-bottom-sm">
  31. <view class="info-tit margin-left-xs">
  32. <text class="cuIcon-titles margin-right-xs"></text>
  33. 安装设备情况
  34. </view>
  35. <view class="padding-lr padding-bottom-lg">
  36. <table style="border:1px solid #ccc" cellspacing="0" cellpadding="0" align="center">
  37. <tr>
  38. <th style="width:13%">序号</th>
  39. <th style="width:40%">设备名称</th>
  40. <th>规格型号</th>
  41. <th style="width:50px">数量</th>
  42. </tr>
  43. <tr v-for="(item,index) in instal_device_info" :key="index">
  44. <td>{{item.xh}}</td>
  45. <td>{{item.device_name}}</td>
  46. <td>{{item.specifications}}</td>
  47. <td>{{item.device_num}}</td>
  48. </tr>
  49. <tr>
  50. <td colspan="3">合计</td>
  51. <td>{{getData.device_cout}}</td>
  52. </tr>
  53. </table>
  54. </view>
  55. </view>
  56. <view class="bg-white margin-bottom-sm">
  57. <view class="info-tit margin-left-xs">
  58. <text class="cuIcon-titles margin-right-xs"></text>
  59. 监测点情况
  60. </view>
  61. <view class="padding-lr padding-bottom-lg">
  62. <table style="border:1px solid #ccc" cellspacing="0" cellpadding="0" align="center">
  63. <tr>
  64. <th style="width:13%">序号</th>
  65. <th style="width:40%">监控子系统</th>
  66. <th >检测点类型</th>
  67. <th style="width:50px">数量</th>
  68. </tr>
  69. <tr v-for="(item,index) in monitor_point_info">
  70. <td>{{item.xh}}</td>
  71. <td>{{item.monitor_son}}</td>
  72. <td>{{item.monitor_type}}</td>
  73. <td>{{item.monitor_sum}}</td>
  74. </tr>
  75. <tr>
  76. <td colspan="3">合计</td>
  77. <td>{{getData.point_count=='null'?'0':getData.point_count}}</td>
  78. </tr>
  79. </table>
  80. </view>
  81. </view>
  82. <view class="bg-white margin-bottom-sm">
  83. <view class="info-tit margin-left-xs">
  84. <text class="cuIcon-titles margin-right-xs"></text>
  85. 统计时段
  86. </view>
  87. <view class="info-content" style="font-size:30rpx">
  88. <view class="info-one-info ">
  89. <text style="width:125px!important">统计起始日期:</text>
  90. <text>{{count_time.startData}}</text>
  91. </view>
  92. <view class="info-one-info ">
  93. <text style="width:125px!important">统计截至日期:</text>
  94. <text>{{count_time.endData}}</text>
  95. </view>
  96. <view class="info-one-info ">
  97. <text style="width:125px!important">统计时段时长:</text>
  98. <text>{{count_time.days}}</text>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="bg-white margin-bottom-sm">
  103. <view class="info-tit margin-left-xs">
  104. <text class="cuIcon-titles margin-right-xs"></text>
  105. 统计报表
  106. </view>
  107. <view class="margin-lr padding-bottom-lg" style="overflow:auto">
  108. <table style="border:1px solid #ccc;width:150%;" cellspacing="0" cellpadding="0" align="center">
  109. <tr>
  110. <th>序号</th>
  111. <th>报告分类</th>
  112. <th>报告属性</th>
  113. <th>报告总数</th>
  114. <th>已处理</th>
  115. <th>未处理</th>
  116. <th>处置率</th>
  117. </tr>
  118. <block v-for="(item,index) in count_report">
  119. <template v-if="item.alarm_type=='火灾监测'">
  120. <tr>
  121. <td rowspan="2">{{item.xh}}</td>
  122. <td rowspan="2">{{item.alarm_type}}</td>
  123. <td>设备离线</td>
  124. <td>{{item.offline.hjlxtotal}}</td>
  125. <td>{{item.offline.hjlxcltotal}}</td>
  126. <td>{{item.offline.hjlxwcltotal}}</td>
  127. <td>{{item.offline.hjlxbaifenbi}}%</td>
  128. </tr>
  129. <tr>
  130. <td>报警</td>
  131. <td>{{item.alarm.hjtotal}}</td>
  132. <td>{{item.alarm.hjcltotal}}</td>
  133. <td>{{item.alarm.hjwcltotal}}</td>
  134. <td>{{item.alarm.hjbaifenbi}}%</td>
  135. </tr>
  136. </template>
  137. <template v-if="item.alarm_type=='电气火灾监测'">
  138. <tr>
  139. <td rowspan="2">{{item.xh}}</td>
  140. <td rowspan="2">{{item.alarm_type}}</td>
  141. <td>设备离线</td>
  142. <td>{{item.offline.eflxtotal}}</td>
  143. <td>{{item.offline.eflxcltotal}}</td>
  144. <td>{{item.offline.eflxwcltotal}}</td>
  145. <td>{{item.offline.eflxbaifenbi}}%</td>
  146. </tr>
  147. <tr>
  148. <td>报警</td>
  149. <td>{{item.alarm.efwcltotal}}</td>
  150. <td>{{item.alarm.efcltotal}}</td>
  151. <td>{{item.alarm.efwcltotal}}</td>
  152. <td>{{item.alarm.efbaifenbi}}%</td>
  153. </tr>
  154. </template>
  155. <template v-if="item.alarm_type=='消防水系统监测'">
  156. <tr>
  157. <td rowspan="2">{{item.xh}}</td>
  158. <td rowspan="2">{{item.alarm_type}}</td>
  159. <td>设备离线</td>
  160. <td>{{item.offline.sjlxtotal}}</td>
  161. <td>{{item.offline.sjlxcltotal}}</td>
  162. <td>{{item.offline.sjlxwcltotal}}</td>
  163. <td>{{item.offline.sjlxbaifenbi}}%</td>
  164. </tr>
  165. <tr>
  166. <td>报警</td>
  167. <td>{{item.alarm.sjtotal}}</td>
  168. <td>{{item.alarm.sjcltotal}}</td>
  169. <td>{{item.alarm.sjwcltotal}}</td>
  170. <td>{{item.alarm.sjbaifenbi}}%</td>
  171. </tr>
  172. </template>
  173. <template v-if="item.alarm_type=='RTU监测'">
  174. <tr>
  175. <td rowspan="2">{{item.xh}}</td>
  176. <td rowspan="2">{{item.alarm_type}}</td>
  177. <td>设备离线</td>
  178. <td>{{item.offline.rtulxtotal}}</td>
  179. <td>{{item.offline.rtulxcltotal}}</td>
  180. <td>{{item.offline.rtulxwcltotal}}</td>
  181. <td>{{item.offline.rtulxbaifenbi}}%</td>
  182. </tr>
  183. <tr>
  184. <td>报警</td>
  185. <td>{{item.alarm.rtutotal}}</td>
  186. <td>{{item.alarm.rtucltotal}}</td>
  187. <td>{{item.alarm.rtuwcltotal}}</td>
  188. <td>{{item.alarm.rtubaifenbi}}%</td>
  189. </tr>
  190. </template>
  191. </block>
  192. </table>
  193. </view>
  194. </view>
  195. <view class="bg-white margin-bottom-sm">
  196. <view class="info-tit margin-left-xs">
  197. <text class="cuIcon-titles margin-right-xs"></text>
  198. 项目情况
  199. </view>
  200. <view class="padding text-center">
  201. <view class="chart-tit">
  202. 各类告警总数饼状图
  203. </view>
  204. <chart :bindData="alarm_total" v-if="Object.keys(alarm_total).length!==0" ></chart>
  205. </view>
  206. <view class="padding text-center">
  207. <view class="chart-tit">火灾告警处理情况饼图</view>
  208. <chart2 :bindData="fire_data" v-if="Object.keys(fire_data).length!==0" ></chart2>
  209. </view>
  210. <view class="padding text-df">
  211. <view v-html="fire_data.data"></view>
  212. </view>
  213. <view class="padding text-center">
  214. <view class="chart-tit">水系统告警处理情况饼图</view>
  215. <chart3 :bindData="water_data" v-if="Object.keys(water_data).length!==0"></chart3>
  216. </view>
  217. <view class="padding text-df">
  218. <view v-html="water_data.data"></view>
  219. </view>
  220. <view class="padding text-center">
  221. <view class="chart-tit">
  222. RTU系统告警处理情况饼图
  223. </view>
  224. <br>
  225. <chart4 :bindData="rtu_data" v-if="Object.keys(rtu_data).length!==0"></chart4>
  226. </view>
  227. <view class="padding text-df">
  228. <view v-html="rtu_data.data"></view>
  229. </view>
  230. </view>
  231. <view class="bg-white margin-bottom-sm">
  232. <view class="info-tit margin-left-xs">
  233. <text class="cuIcon-titles margin-right-xs"></text>
  234. 存在问题或需要改进事项
  235. </view>
  236. <view class="padding-lr padding-bottom">
  237. <view v-for="(item,index) in propose" :key="index" >
  238. {{index+1}}、{{item.data1}}
  239. </view>
  240. </view>
  241. </view>
  242. <view class="bg-white margin-bottom-sm">
  243. <view class="info-tit margin-left-xs">
  244. <text class="cuIcon-titles margin-right-xs"></text>
  245. 其他事宜
  246. </view>
  247. <view class="padding-lr padding-bottom other">
  248. <view v-for="(item,index) in other" :key="index" >
  249. {{index}}、{{item.data2}}
  250. </view>
  251. </view>
  252. </view>
  253. </view>
  254. </template>
  255. <script>
  256. import chart from './components/chart.vue';
  257. import chart2 from './components/chart2.vue';
  258. import chart3 from './components/chart3.vue';
  259. import chart4 from './components/chart4.vue';
  260. export default {
  261. components: {
  262. chart,
  263. chart2,
  264. chart3,
  265. chart4
  266. },
  267. data() {
  268. return {
  269. staticData: {
  270. wubao: 9,
  271. unSolve: 6,
  272. truely: 20
  273. },
  274. staticData2: {
  275. wubao: 9,
  276. unSolve: 6,
  277. truely: 20
  278. },
  279. getData: {},
  280. company_name:'',
  281. event_time:'',
  282. project_info: {},
  283. instal_device_info: {},
  284. monitor_point_info: {},
  285. count_time: {},
  286. count_report: {},
  287. alarm_total:{},
  288. fire_data:{},
  289. water_data:{},
  290. rtu_data:{},
  291. propose:{},
  292. other:{},
  293. }
  294. },
  295. onLoad: function(option) {
  296. // this.companyName=uni.getStorageSync('selectedName')
  297. this.getDataDetail({
  298. 'company_code': uni.getStorageSync('selectedCode'),
  299. 'id': option.id
  300. })
  301. },
  302. methods: {
  303. // 详情数据请求
  304. async getDataDetail(params = {}) {
  305. const res = await this.$myRequest({
  306. url: 'MonthlyReport/getMonthlyReportDetails',
  307. data: params,
  308. showLoading: true
  309. })
  310. this.getData = res.data.data;
  311. // console.log(this.getData)
  312. this.project_info = this.getData.project_info; //基本情况
  313. this.instal_device_info = this.getData.instal_device_info; //安装设备情况
  314. console.log(this.instal_device_info)
  315. this.monitor_point_info = this.getData.monitor_point_info; //监控点情况
  316. this.count_time = this.getData.count_time; //统计时段
  317. this.count_report = this.getData.count_report; //统计报表
  318. this.alarm_total = this.getData.alarm_total; //各类告警
  319. this.fire_data = this.getData.fire_data; //火灾告警
  320. this.water_data = this.getData.water_data; //水系统告警
  321. this.rtu_data = this.getData.rtu_data; //水系统告警
  322. this.propose = this.getData.propose; //存在问题
  323. this.other = this.getData.other; //其他事宜
  324. this.event_time=res.data.event_time;
  325. this.company_name=res.data.company_name;
  326. },
  327. }
  328. }
  329. </script>
  330. <style lang="scss">
  331. page {
  332. background: #EDEDED;
  333. }
  334. </style>