safecheck-client 3.0.39-16 → 3.0.39-17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/android.html +18 -18
  4. package/config/dev.env.js +6 -6
  5. package/config/index.js +38 -38
  6. package/config/prod.env.js +3 -3
  7. package/config/test.env.js +6 -6
  8. package/docs/AppBase.md +22 -22
  9. package/docs/Busy.md +14 -14
  10. package/docs/CriteriaPaged.md +47 -47
  11. package/docs/DataGrid.md +54 -54
  12. package/docs/DataModel.md +22 -22
  13. package/docs/Dynamic.md +42 -42
  14. package/docs/GetParams.md +11 -11
  15. package/docs/HttpBusy.md +13 -13
  16. package/docs/HttpStore.md +29 -29
  17. package/docs/MessageBox.md +28 -28
  18. package/docs/PagedList.md +29 -29
  19. package/docs/Pager.md +21 -21
  20. package/docs/Project.md +23 -23
  21. package/docs/Route.md +105 -105
  22. package/docs/SafetyCheck/AdjustPlan.md +13 -13
  23. package/docs/SafetyCheck/CheckerPlan.md +12 -12
  24. package/docs/Task.md +46 -46
  25. package/docs/TreeList.md +28 -28
  26. package/docs/TreeMixin.md +18 -18
  27. package/docs/all.md +10 -10
  28. package/docs/list.md +42 -42
  29. package/docs/partial.md +75 -75
  30. package/docs/selector.md +82 -82
  31. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/Snippets.md +28 -28
  32. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue-strap/345/217/230/346/233/264/350/256/260/345/275/225.md +7 -7
  33. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue/345/217/230/346/233/264/350/256/260/345/275/225.md +13 -13
  34. package/docs//345/274/200/345/217/221/346/226/207/346/241/243//345/274/200/345/217/221/347/216/257/345/242/203/350/256/276/347/275/256.md +77 -77
  35. package/docs//347/225/214/351/235/242/345/210/266/344/275/234/350/247/204/350/214/203.md +54 -54
  36. package/examples/AddressList/App.vue +13 -13
  37. package/examples/AddressList/index.html +11 -11
  38. package/examples/DispatchList/App.vue +10 -10
  39. package/examples/DispatchList/BaseTree.vue +13 -13
  40. package/examples/DispatchList/Init.vue +22 -22
  41. package/examples/DispatchList/Test.vue +20 -20
  42. package/examples/DispatchList/index.html +11 -11
  43. package/examples/DispatchList/main.js +18 -18
  44. package/home.html +16 -16
  45. package/package.json +1 -1
  46. package/publish.bat +7 -7
  47. package/release.bat +5 -5
  48. package/src/Widget.vue +13 -13
  49. package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  50. package/src/android-bootstrap/less/.csscomb.json +304 -304
  51. package/src/android-bootstrap/less/.csslintrc +19 -19
  52. package/src/android-bootstrap/less/alerts.less +73 -73
  53. package/src/android-bootstrap/less/badges.less +66 -66
  54. package/src/android-bootstrap/less/bootstrap.less +56 -56
  55. package/src/android-bootstrap/less/breadcrumbs.less +26 -26
  56. package/src/android-bootstrap/less/button-groups.less +247 -247
  57. package/src/android-bootstrap/less/buttons.less +173 -173
  58. package/src/android-bootstrap/less/carousel.less +269 -269
  59. package/src/android-bootstrap/less/close.less +34 -34
  60. package/src/android-bootstrap/less/code.less +69 -69
  61. package/src/android-bootstrap/less/component-animations.less +33 -33
  62. package/src/android-bootstrap/less/grid.less +84 -84
  63. package/src/android-bootstrap/less/input-groups.less +167 -167
  64. package/src/android-bootstrap/less/jumbotron.less +52 -52
  65. package/src/android-bootstrap/less/labels.less +64 -64
  66. package/src/android-bootstrap/less/list-group.less +141 -141
  67. package/src/android-bootstrap/less/media.less +66 -66
  68. package/src/android-bootstrap/less/mixins/alerts.less +14 -14
  69. package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
  70. package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
  71. package/src/android-bootstrap/less/mixins/buttons.less +69 -69
  72. package/src/android-bootstrap/less/mixins/center-block.less +7 -7
  73. package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
  74. package/src/android-bootstrap/less/mixins/forms.less +90 -90
  75. package/src/android-bootstrap/less/mixins/gradients.less +59 -59
  76. package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
  77. package/src/android-bootstrap/less/mixins/grid.less +122 -122
  78. package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
  79. package/src/android-bootstrap/less/mixins/image.less +33 -33
  80. package/src/android-bootstrap/less/mixins/labels.less +12 -12
  81. package/src/android-bootstrap/less/mixins/list-group.less +30 -30
  82. package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
  83. package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
  84. package/src/android-bootstrap/less/mixins/opacity.less +8 -8
  85. package/src/android-bootstrap/less/mixins/pagination.less +24 -24
  86. package/src/android-bootstrap/less/mixins/panels.less +24 -24
  87. package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
  88. package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
  89. package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
  90. package/src/android-bootstrap/less/mixins/resize.less +6 -6
  91. package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
  92. package/src/android-bootstrap/less/mixins/size.less +10 -10
  93. package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
  94. package/src/android-bootstrap/less/mixins/table-row.less +44 -44
  95. package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
  96. package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
  97. package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
  98. package/src/android-bootstrap/less/mixins.less +40 -40
  99. package/src/android-bootstrap/less/modals.less +151 -151
  100. package/src/android-bootstrap/less/navbar.less +660 -660
  101. package/src/android-bootstrap/less/navs.less +290 -290
  102. package/src/android-bootstrap/less/normalize.less +424 -424
  103. package/src/android-bootstrap/less/pager.less +76 -76
  104. package/src/android-bootstrap/less/pagination.less +89 -89
  105. package/src/android-bootstrap/less/panels.less +274 -274
  106. package/src/android-bootstrap/less/popovers.less +131 -131
  107. package/src/android-bootstrap/less/print.less +101 -101
  108. package/src/android-bootstrap/less/progress-bars.less +87 -87
  109. package/src/android-bootstrap/less/responsive-embed.less +35 -35
  110. package/src/android-bootstrap/less/responsive-utilities.less +194 -194
  111. package/src/android-bootstrap/less/scaffolding.less +161 -161
  112. package/src/android-bootstrap/less/tables.less +262 -262
  113. package/src/android-bootstrap/less/theme.less +291 -291
  114. package/src/android-bootstrap/less/thumbnails.less +36 -36
  115. package/src/android-bootstrap/less/tooltip.less +102 -102
  116. package/src/android-bootstrap/less/type.less +303 -303
  117. package/src/android-bootstrap/less/utilities.less +55 -55
  118. package/src/android-bootstrap/less/variables.less +896 -896
  119. package/src/android-bootstrap/less/wells.less +29 -29
  120. package/src/bootstrap/less/.csscomb.json +304 -304
  121. package/src/bootstrap/less/.csslintrc +19 -19
  122. package/src/bootstrap/less/alerts.less +73 -73
  123. package/src/bootstrap/less/badges.less +66 -66
  124. package/src/bootstrap/less/breadcrumbs.less +26 -26
  125. package/src/bootstrap/less/button-groups.less +247 -247
  126. package/src/bootstrap/less/buttons.less +172 -172
  127. package/src/bootstrap/less/carousel.less +269 -269
  128. package/src/bootstrap/less/close.less +34 -34
  129. package/src/bootstrap/less/code.less +69 -69
  130. package/src/bootstrap/less/component-animations.less +33 -33
  131. package/src/bootstrap/less/dropdowns.less +216 -216
  132. package/src/bootstrap/less/grid.less +84 -84
  133. package/src/bootstrap/less/input-groups.less +167 -167
  134. package/src/bootstrap/less/jumbotron.less +52 -52
  135. package/src/bootstrap/less/labels.less +64 -64
  136. package/src/bootstrap/less/list-group.less +141 -141
  137. package/src/bootstrap/less/media.less +66 -66
  138. package/src/bootstrap/less/mixins/alerts.less +14 -14
  139. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  140. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  141. package/src/bootstrap/less/mixins/buttons.less +69 -69
  142. package/src/bootstrap/less/mixins/center-block.less +7 -7
  143. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  144. package/src/bootstrap/less/mixins/forms.less +90 -90
  145. package/src/bootstrap/less/mixins/gradients.less +59 -59
  146. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  147. package/src/bootstrap/less/mixins/grid.less +122 -122
  148. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  149. package/src/bootstrap/less/mixins/image.less +33 -33
  150. package/src/bootstrap/less/mixins/labels.less +12 -12
  151. package/src/bootstrap/less/mixins/list-group.less +30 -30
  152. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  153. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  154. package/src/bootstrap/less/mixins/opacity.less +8 -8
  155. package/src/bootstrap/less/mixins/pagination.less +24 -24
  156. package/src/bootstrap/less/mixins/panels.less +24 -24
  157. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  158. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  159. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  160. package/src/bootstrap/less/mixins/resize.less +6 -6
  161. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  162. package/src/bootstrap/less/mixins/size.less +10 -10
  163. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  164. package/src/bootstrap/less/mixins/table-row.less +44 -44
  165. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  166. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  167. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  168. package/src/bootstrap/less/mixins.less +40 -40
  169. package/src/bootstrap/less/modals.less +151 -151
  170. package/src/bootstrap/less/navbar.less +660 -660
  171. package/src/bootstrap/less/normalize.less +424 -424
  172. package/src/bootstrap/less/pagination.less +89 -89
  173. package/src/bootstrap/less/panels.less +275 -275
  174. package/src/bootstrap/less/popovers.less +131 -131
  175. package/src/bootstrap/less/print.less +101 -101
  176. package/src/bootstrap/less/progress-bars.less +87 -87
  177. package/src/bootstrap/less/responsive-embed.less +35 -35
  178. package/src/bootstrap/less/responsive-utilities.less +194 -194
  179. package/src/bootstrap/less/scaffolding.less +161 -161
  180. package/src/bootstrap/less/theme.less +291 -291
  181. package/src/bootstrap/less/thumbnails.less +36 -36
  182. package/src/bootstrap/less/tooltip.less +102 -102
  183. package/src/bootstrap/less/type.less +303 -303
  184. package/src/bootstrap/less/utilities.less +55 -55
  185. package/src/bootstrap/less/wells.less +29 -29
  186. package/src/components/FileUpload.vue +696 -696
  187. package/src/components/Hello.vue +39 -39
  188. package/src/components/LeftTree.vue +27 -27
  189. package/src/components/android/AttendanceTally.vue +116 -116
  190. package/src/components/android/Blank.vue +10 -10
  191. package/src/components/android/CheckUnplanPage.vue +56 -56
  192. package/src/components/android/Checker.vue +12 -12
  193. package/src/components/android/CheckerAnnual.vue +81 -81
  194. package/src/components/android/CheckerAvarta.vue +82 -82
  195. package/src/components/android/EquipmentInspection.vue +348 -348
  196. package/src/components/android/FootprintMap.vue +120 -120
  197. package/src/components/android/HiddentroubleInvestigation.vue +192 -192
  198. package/src/components/android/MasterMain.vue +77 -77
  199. package/src/components/android/Menu.vue +132 -132
  200. package/src/components/android/PaperAlarm.vue +85 -85
  201. package/src/components/android/PaperDeviceNoncivil.vue +214 -214
  202. package/src/components/android/PlumberAnnual.vue +83 -83
  203. package/src/components/android/PlumberAnnualDetail.vue +65 -65
  204. package/src/components/android/PlumberMonthly.vue +84 -84
  205. package/src/components/android/PostMap.vue +83 -83
  206. package/src/components/android/QueryCheckHistory.vue +122 -122
  207. package/src/components/android/QueryCheckHistoryItem.vue +62 -62
  208. package/src/components/android/RepairMain.vue +60 -60
  209. package/src/components/android/Repairman.vue +12 -12
  210. package/src/components/android/StationMaster.vue +12 -12
  211. package/src/components/defects/DefectModal.vue +101 -101
  212. package/src/components/defects/DevicesAndItem.vue +39 -39
  213. package/src/components/issueplan/IssuePlanMain.vue +23 -23
  214. package/src/components/notice/NoticeForm.vue +100 -100
  215. package/src/components/notice/NoticeIssue.vue +20 -20
  216. package/src/components/paper/PicViewer.vue +18 -18
  217. package/src/components/phonestate/MonthlyTraffic.vue +66 -66
  218. package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
  219. package/src/components/phonestate/PostMap.vue +82 -82
  220. package/src/components/querycheckpaper/PaperItem.vue +59 -59
  221. package/src/components/userfile/MeterFile.vue +145 -145
  222. package/src/components/userfile/MeterModify.vue +46 -46
  223. package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
  224. package/src/filiale/hanzhong/pc/CheckHiddenDanger.vue +713 -713
  225. package/src/filiale/hanzhong/pc/CheckNumberStatistics.vue +499 -499
  226. package/src/filiale/hanzhong/pc/CheckSafeDetail.vue +578 -578
  227. package/src/filiale/hanzhong/pc/CheckSafeStatus.vue +508 -508
  228. package/src/filiale/hanzhong/pc/CheckerSafeDetail.vue +595 -595
  229. package/src/filiale/hanzhong/pc/HomeEcharts.vue +153 -153
  230. package/src/filiale/siyang/android/SafecheckDevices.vue +1302 -1302
  231. package/src/plugins/LoadData.js +10 -10
  232. package/src/plugins/LoadParams.js +24 -24
  233. package/src/stores/wxconfig.js +10 -10
  234. package/src/utils/getNowDate.js +33 -33
  235. package/test/e2e/custom-assertions/elementCount.js +26 -26
  236. package/test/e2e/nightwatch.conf.js +40 -40
  237. package/test/e2e/runner.js +30 -30
  238. package/test/e2e/specs/test.js +13 -13
  239. package/test/unit/.eslintrc +5 -5
  240. package/test/unit/TestUtil.js +62 -62
  241. package/test/unit/context.html +20 -20
  242. package/test/unit/index.js +13 -13
@@ -1,713 +1,713 @@
1
- <template lang="html">
2
- <div class="div-4">
3
- <div :style="{height:headheight,background:'#eaeff4'}" style="width:100%">
4
- <div class="div-2">
5
- <div class="form-group">
6
- <label v-show="full_screen" class="control-label">安检类型</label>
7
- <v-select v-show="full_screen" :value.sync="plan_type"
8
- :value-single="true"
9
- :options='plan_types' close-on-select clear-button> </v-select>
10
- <button class="but-1" @click="barrdios" v-show="full_screen"><img src='../../../assets/echarts6.png' class="img-1"/>&nbsp;全屏显示
11
- </button>
12
- <button @click="showall" v-show="show_all" class="but-2">返回</button>
13
- </div>
14
- </div>
15
- </div>
16
- <div v-bind:style="{height: barheight,width:'100%'}">
17
- <div class="flex-row" style="height: 90%;">
18
- <div class="span">
19
- <div class="form-inline" v-if="echartsshow" style="height: auto;margin-bottom: 5%;margin-top: 5%">
20
- <div class="form-group">
21
- <label for="startDate">开始日期:</label>
22
- <datepicker id="startDate" placeholder="开始日期"
23
- v-model="startDate"
24
- :value.sync="startDate"
25
- :disabled-days-of-Week="[]"
26
- :format="'yyyy-MM-dd'"
27
- :show-reset-button="reset">
28
- </datepicker>
29
- </div>
30
- <div class="form-group">
31
- <label for="endDate">截至日期:</label>
32
- <datepicker id="endDate" placeholder="结束日期"
33
- v-model="endDate"
34
- v-show="show_all"
35
- :value.sync="endDate"
36
- :disabled-days-of-Week="[]"
37
- :format="'yyyy-MM-dd'"
38
- :show-reset-button="reset">
39
- </datepicker>
40
- </div>
41
- <div class="form-group">
42
- <label class="control-label">安检类型</label>
43
- <v-select :value.sync="plan_type"
44
- :value-single="true"
45
- :options='plan_types' close-on-select clear-button> </v-select>
46
- </div>
47
- </div>
48
-
49
- <div id="hidden" style="width:45%;float:left;"></div>
50
- <div id="hiddenlevel" style="width: 45%;float:right;margin-left:-5px;"></div>
51
- </div>
52
-
53
- <!--调用子组件绘图查表-->
54
- <div v-show="echartsshow" style="overflow:scroll">
55
- <div class="div-3">
56
- <h4 v-if="plan_type == ''" align="center">隐患及整改率率一览表</h4>
57
- <h4 v-if="plan_type == 'false'" align="center">年度安检隐患及整改率率一览表</h4>
58
- <h4 v-if="plan_type == 'true'" align="center">首次通气隐患及整改率率一览表</h4>
59
- <criteria-paged :model="model1" v-ref:crip2 >
60
- <data-grid :model="model" partial='list' v-ref:grid2 classname="table table-bordered table table-hover">
61
- <template partial='head'>
62
- <tr>
63
- <th><nobr>分公司</nobr></th>
64
- <th><nobr>A</nobr></th>
65
- <th><nobr>B</nobr></th>
66
- <th><nobr>C</nobr></th>
67
- <th><nobr>A整改</nobr></th>
68
- <th><nobr>B整改</nobr></th>
69
- <th><nobr>C整改</nobr></th>
70
- </tr>
71
- </template>
72
- <template partial='body' >
73
- <tr class="tr-1">
74
- <td class="td-1" style="text-align: center;">
75
- {{row.f_subcompany}}
76
- </td>
77
- <td class="td-1" style="text-align: center;">
78
- {{row.a}}
79
- </td>
80
- <td class="td-1" style="text-align: center;">
81
- {{row.b}}
82
- </td>
83
- <td class="td-1" style="text-align: center;">
84
- {{row.c}}
85
- </td>
86
- <td class="td-1" style="text-align: center;">
87
- {{row.ac}}
88
- </td>
89
- <td class="td-1" style="text-align: center;">
90
- {{row.bc}}
91
- </td>
92
- <td class="td-1" style="text-align: center;">
93
- {{row.cc}}
94
- </td>
95
- </tr>
96
- </template>
97
- <template partial='foot'>
98
- <tr>
99
- <td colspan="1" style="text-align: right">合计:</td>
100
- <td style="text-align: center"><nobr>{{model.sums.a}}</nobr></td>
101
- <td style="text-align: center"><nobr>{{model.sums.b}}</nobr></td>
102
- <td style="text-align: center"><nobr>{{model.sums.c}}</nobr></td>
103
- <td style="text-align: center"><nobr>{{model.sums.ac}}</nobr></td>
104
- <td style="text-align: center"><nobr>{{model.sums.bc}}</nobr></td>
105
- <td style="text-align: center"><nobr>{{model.sums.cc}}</nobr></td>
106
- </tr>
107
- </template>
108
- </data-grid>
109
- </criteria-paged>
110
- </div>
111
-
112
- <div class="div-3" style="margin-top: 10%">
113
- <h4 align="center" v-if="plan_type == ''">安检状态一览表</h4>
114
- <h4 align="center" v-if="plan_type == 'false'">年度安检状态一览表</h4>
115
- <h4 align="center" v-if="plan_type == 'true'">首次通气安检状态一览表</h4>
116
- <criteria-paged :model="model" v-ref:crip >
117
- <data-grid :model="model" partial='list' id="datagridstyle1" v-ref:grid1 classname="table table-bordered table table-hover">
118
- <template partial='head'>
119
- <tr>
120
- <th><nobr>分公司</nobr></th>
121
- <th><nobr>入户</nobr></th>
122
- <th><nobr>入户(在用)</nobr></th>
123
- <th><nobr>入户(未用)</nobr></th>
124
- <th><nobr>到访不遇</nobr></th>
125
- <th><nobr>拒检</nobr></th>
126
- <th><nobr>小计</nobr></th>
127
- </tr>
128
- </template>
129
- <template partial='body' >
130
- <tr class="tr-1">
131
- <td class="td-1" style="text-align: center;">
132
- {{row.f_subcompany}}
133
- </td>
134
- <td class="td-1" style="text-align: center;">
135
- {{row.rh+row.wsy}}
136
- </td>
137
- <td class="td-1" style="text-align: center;">
138
- {{row.rh}}
139
- </td>
140
- <td class="td-1" style="text-align: center;">
141
- {{row.wsy}}
142
- </td>
143
- <td class="td-1" style="text-align: center;">
144
- {{row.dfby}}
145
- </td>
146
- <td class="td-1" style="text-align: center;">
147
- {{row.jj}}
148
- </td>
149
- <td class="td-1" style="text-align: center;">
150
- {{row.rh+row.dfby+row.jj+row.wsy}}
151
- </td>
152
- </tr>
153
- </template>
154
- <template partial='foot'>
155
- <tr>
156
- <td colspan="1" style="text-align: right">合计:</td>
157
- <td style="text-align: center"><nobr>{{model.sums.rh + model.sums.wsy}}</nobr></td>
158
- <td style="text-align: center"><nobr>{{model.sums.rh}}</nobr></td>
159
- <td style="text-align: center"><nobr>{{model.sums.wsy}}</nobr></td>
160
- <td style="text-align: center"><nobr>{{model.sums.dfby}}</nobr></td>
161
- <td style="text-align: center"><nobr>{{model.sums.jj}}</nobr></td>
162
- <td style="text-align: center"><nobr>{{model.sums.rh+model.sums.dfby+model.sums.jj+model.sums.wsy}}</nobr></td>
163
- </tr>
164
- </template>
165
- </data-grid>
166
- </criteria-paged>
167
- </div>
168
-
169
- </div>
170
-
171
- </div>
172
- </div>
173
- </div>
174
- </template>
175
-
176
- <script>
177
- import * as Util from '../../Util'
178
- import co from 'co'
179
- import echarts from 'echarts'
180
- import {HttpResetClass} from 'vue-client'
181
- import {PagedList} from 'vue-client'
182
-
183
- //后台查询数据
184
- let getData = function* (self) {
185
- let load = new HttpResetClass()
186
- load.load('POST', 'rs/sql/CheckStatusQuery', {data: {startDate:self.startDate,f_orgstr: self.orgid, endDate: self.endDate,plan_type:self.plan_type,f_safecheck_type:self.f_safecheck_type}},
187
- {resolveMsg: null, rejectMsg: null})
188
- .then((res) => {
189
- let echartData = res.data
190
-
191
- var legendname = []
192
- echartData.forEach(function (items) {
193
- legendname.push(items.name)
194
- })
195
-
196
- self.setSafe(echartData, legendname)
197
- self.setstatustable()
198
- })
199
-
200
- }
201
-
202
-
203
- let getData1 = function* (self) {
204
- let Http = new HttpResetClass()
205
- Http.load('POST','rs/sql/HiddenLevel', {data: {startDate:self.startDate,f_orgstr: self.orgid, endDate: self.endDate,plan_type:self.plan_type,f_safecheck_type:self.f_safecheck_type}},
206
- {resolveMsg: null, rejectMsg: null})
207
- .then((res) => {
208
- let legendname = [] //分类名,横坐标分类,隐患级别
209
- let metaDate = [] //二维数组 2*n 第一行为当前级别隐患总数,第二行为当前级别整改数
210
- let scaledata = [] //整改率
211
-
212
- let d1=[] // 隐患数
213
- let d2=[] //整改数
214
- //数据处理
215
- res.data.forEach(function (s) {
216
- legendname.push(s.name)
217
- d1.push(s.value)
218
- d2.push(s.change)
219
- var h=(s.change/s.value).toFixed(3)
220
- scaledata.push(h)
221
- })
222
- metaDate.push(d1)
223
- metaDate.push(d2)
224
- //掉绘图
225
- self.setBar(legendname,metaDate,scaledata)
226
- self.setleveltable()
227
- })
228
- }
229
-
230
- export default {
231
- name: "hidden-danger",
232
-
233
- data() {
234
- return {
235
- full_screen: true,//控制全屏按键显示状态
236
- show_all: false,//控制返回按键显示状态
237
- //控制图表的显示状态
238
- echartsshow: false,
239
- barshow: true,
240
- detailshows: true,
241
-
242
- //控制图表的style
243
- barheight: '88.37%',
244
- headheight: '11.61%',
245
- styledate: {
246
- echartsheight: '95%',
247
- echartsfloat: 'none',
248
- },
249
- echartswidth: '95%',
250
- barshowid: '1',
251
- model:new PagedList('rs/sql/QueryCheckStatus', 20, {startDate: 'this.startDate',endDate: 'this.endDate', orgid: 'this.orgid',plan_type:'this.plan_type',f_safecheck_type: 'this.f_safecheck_type'},{rh:'',dfby:'',wsy:'',jj:''}),
252
- model1:new PagedList('rs/sql/QueryHiddenLevel', 20, {startDate: 'this.startDate',endDate: 'this.endDate', orgid: 'this.orgid',plan_type:'this.plan_type',f_safecheck_type: 'this.f_safecheck_type'},{a:'',b:'',c:'',ac:'',bc:'',cc:''}),
253
- orgid: `('${this.$login.f.orgid}')`,
254
- f: this.$login.f,
255
- chosenOrg: {
256
- id: 0
257
- },
258
- startDate:(new Date()).getFullYear()+'-01-01',
259
- endDate: Util.toStandardDateString(),
260
- xc: '',
261
- plan_types:[{label:'全部',value:''},{label:'年度安检单',value:'false'},{label:'首次通气单',value:'true'}],
262
- plan_type:'',
263
- f_safecheck_type:''
264
- }
265
- },
266
- props:{
267
- f_filialeids:{
268
- type:String
269
- }
270
- },
271
- methods: {
272
- barrdios() {//全屏按键事件
273
- console.log("全屏显示事件")
274
- this.barshow = true
275
- this.detailshows = false
276
- this.echartsshow = true
277
- this.show_all = true
278
- this.full_screen = false
279
- this.buttonshow = true
280
- this.showdetail = false
281
- this.styledate.echartsfloat = 'left'
282
- this.styledate.echartsheight = '65%'
283
- this.echartswidth = '50%'
284
- this.headheight = '8%'
285
- this.$parent.echarts = '4'
286
- this.$emit('echarts-changed')
287
- this.newecharts = true
288
-
289
- console.log(this.$parent.echarts, '主图状态')
290
- },
291
- showall() {//返回按键事件
292
- //修改显示状态
293
- this.barshow = false
294
- this.detailshows = true
295
- this.echartsshow = false
296
- this.buttonshow = false
297
- this.newecharts = false
298
- this.show_all = false
299
- this.full_screen = true
300
- this.showdetail = false
301
- this.styledate.echartsheight = '95%'
302
- this.echartswidth = '95%'
303
- this.$parent.echarts = -1
304
- this.headheight = '11.61%'
305
- this.$emit('echarts-changed', this.echarts)
306
- },
307
- setstatustable() {
308
- this.model = new PagedList('rs/sql/QueryCheckStatus', 20, {startDate: 'this.startDate',endDate: 'this.endDate', orgid: 'this.orgid',plan_type:'this.plan_type',f_safecheck_type: 'this.f_safecheck_type'},{rh:'',dfby:'',wsy:'',jj:''})
309
- this.model.startDate = this.startDate
310
- this.model.endDate = this.endDate
311
- this.model.orgid = this.orgid
312
- this.model.plan_type = this.plan_type
313
- this.model.f_safecheck_type = this.f_safecheck_type
314
- this.model.search('1=1')
315
- },
316
- setleveltable() {
317
- this.model1 = new PagedList('rs/sql/QueryHiddenLevel', 20, {startDate: 'this.startDate',endDate: 'this.endDate', orgid: 'this.orgid',plan_type:'this.plan_type',f_safecheck_type: 'this.f_safecheck_type'},{a:'',b:'',c:'',ac:'',bc:'',cc:''})
318
- this.model1.startDate = this.startDate
319
- this.model1.endDate = this.endDate
320
- this.model1.orgid = this.orgid
321
- this.model1.plan_type = this.plan_type
322
- this.model1.f_safecheck_type = this.f_safecheck_type
323
- this.model1.search('1=1')
324
- },
325
- //隐患饼状图
326
- setSafe(echartData,legendname) {
327
- this.xc = echarts.init(document.getElementById('hidden'))
328
- var rich = {
329
- yellow: {
330
- color: "#ffc72b",
331
- fontSize: 12 * scale,
332
- padding: [5, 4],
333
- align: 'center'
334
- },
335
- total: {
336
- color: "#8ee6de",
337
- fontSize: 12 * scale,
338
- align: 'center',
339
- confine:true
340
- },
341
- white: {
342
- color: "#fff",
343
- align: 'center',
344
- fontSize: 12 * scale,
345
- padding: [11, 0, 11, 0]
346
- },
347
- blue: {
348
- color: '#6f8ba8',
349
- fontSize: 8 * scale,
350
- align: 'center',
351
- padding: [10, 0]
352
- },
353
- hr: {
354
- borderColor: '#ffffff',
355
- width: '100%',
356
- borderWidth: 0.5,
357
- height: 0,
358
- },
359
- }
360
- var scale = 0.8
361
- var total = 0; //安检总量
362
- echartData.forEach(function (value) {
363
- total = eval(total + '+' + value.value)
364
- });
365
- this.xc.setOption({
366
- title: [
367
- {
368
- text: '安检总量',
369
- x: '40%',
370
- y: '40%',
371
- textStyle: {
372
- color: '#6f8ba8',
373
- fontSize: 12 * scale,
374
- }
375
- },
376
- {
377
- text: total,
378
- x: '38%',
379
- y: '45%',
380
- padding: [15, 20],
381
- textStyle: {
382
- color: '#8ee6de',
383
- fontSize: 12 * scale,
384
- }
385
- }],
386
- legend: {
387
- orient: 'horizontal',
388
- icon: 'circle',
389
- x: 'right',
390
- right: 5,
391
- top: 20,
392
- itemWidth: 20 * scale,
393
- itemHeight: 10 * scale,
394
- textStyle: {
395
- fontSize: 12 * scale,
396
- padding: [0, 0, 0, 4],
397
- color: '#6f8ba8'
398
- },
399
- data: legendname
400
- },
401
- series: [{
402
- name: '安检总量',
403
- type: 'pie',
404
- radius: '40%',
405
- center: ['50%', '50%'],
406
- hoverAnimation: false,
407
- color: ['#8ee6de', '#fbd85f', '#9bb5eb','#38dcad'],
408
- label: {
409
- normal: {
410
- borderWidth: 20 * scale,
411
- borderRadius: 4,
412
- lineHeight:6,
413
- formatter: function (params, ticket, callback) {
414
- var total = 0; //隐患总数
415
- var percent = 0;
416
- echartData.forEach(function (value, index, array) {
417
- total += value.value;
418
- });
419
- percent = ((params.value / total) * 100).toFixed(1);
420
- return '{blue|' + params.name + '}\n{hr|}\n{total|' + params.value + '}{blue|\n\n}{yellow|' + percent + '%' + '}';
421
- },
422
- rich: rich,
423
- }
424
- },
425
- labelLine: {
426
- normal: {
427
- lineStyle: {
428
- formatter: function (params, ticket, callback) {
429
- var total = 0; //隐患总数
430
- var percent = 0; //用户占比
431
- echartData.forEach(function (value, index, array) {
432
- total += value.value;
433
- });
434
- percent = ((params.value / total) * 100).toFixed(1);
435
- return '{white|' + params.name + '}\n{hr|}\n{yellow|' + params.value + '}\n{blue|' + percent + '%}';
436
- },
437
- }
438
- }
439
- },
440
- data: echartData
441
- }]
442
- }, true)
443
- },
444
-
445
- setBar(legendname,metaDate,scaledata) {
446
- this.xc1 = echarts.init(document.getElementById('hiddenlevel'))
447
-
448
- let serieData = [{ //绘图数据
449
- name: '隐患总数',
450
- type: "bar",
451
- barWidth: '20%',
452
- barGap: "0",
453
- itemStyle: {
454
- normal: {
455
- barBorderRadius: 15,
456
- borderColor: '#00c0e9',
457
- color: '#fff',
458
- label: {
459
- show: true,
460
- textStyle: {
461
- color: "#4a7cae"
462
- },
463
- position: "top",
464
- formatter: function (p) {
465
- return p.value > 0 ? (p.value) : '';
466
- }
467
- }
468
- }
469
- },
470
- data: metaDate[0],
471
- },
472
- { //绘图数据
473
- name: '整改数',
474
- type: "bar",
475
- barWidth: '20%',
476
- barGap: "-100%",
477
- itemStyle: {
478
- normal: {
479
- barBorderRadius: 15,
480
- color: '#00c0e9',
481
- label: {
482
- show: true,
483
- textStyle: {
484
- color: "#4a7cae"
485
- },
486
- position: "insideTop",
487
- formatter: function (p) {
488
- return p.value > 0 ? (p.value) : '';
489
- }
490
- }
491
- }
492
- },
493
- data: metaDate[1],
494
- }]
495
-
496
-
497
- this.xc1.setOption({
498
- title: {
499
- text: '',
500
- x: '30%',
501
- textStyle: {color: "#333333", fontSize: "16", fontWeight: "normal"}
502
- },
503
- color: ['#3398DB'],
504
- tooltip: {
505
- trigger: 'axis',
506
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
507
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
508
- },
509
- formatter: function (params) {
510
- if (params[0].axisValue == '') {
511
- return ''
512
- }
513
- var result = ''
514
- params.forEach(function (item) {
515
- result += item.seriesName + " : " + item.value + "</br>";
516
- });
517
- var h=eval(scaledata[params[0].dataIndex]*100).toString()
518
-
519
- return result+"整改率:"+h+'%'
520
- },
521
- extraCssText: 'width: 60%;height: 30%;'
522
- },
523
- grid: {
524
- left: '2%',
525
- right: '20%',
526
- bottom: '8%',
527
- containLabel: true
528
- },
529
- xAxis: [
530
- {
531
- type: 'category',
532
- name: "隐患等级",
533
- nameTextStyle: {color: "#6f8ba8"},
534
- axisTick: {
535
- alignWithLabel: true
536
- },
537
- axisLine: {show: true,lineStyle :{color:'#999999'}},
538
- axisLabel: {show: true, textStyle: {color: "#6f8ba8"}},
539
- data: legendname
540
- }
541
- ],
542
- yAxis: [{
543
- type: "value",
544
- name: "数量",
545
- nameTextStyle: {color: "#6f8ba8"},
546
- splitLine: {show: true,lineStyle:{type:'dashed',color:'#e1e1e1'}},
547
- axisTick: {show: true},
548
- axisLine: {show: true,lineStyle :{color:'#999999'}},
549
- axisLabel: {show: true, textStyle: {color: "#6f8ba8"}}
550
- }],
551
- series: serieData
552
- }, true)
553
- },
554
- searchdata () {
555
- let getGen =getData(this)
556
- co(getGen)
557
- },
558
- searchdata1 () {
559
- let getGen =getData1(this)
560
- co(getGen)
561
- }
562
- },
563
- ready () {
564
- // this.orgid = `('${this.$login.f.orgid}')`
565
- // this.searchdata()
566
- // this.searchdata1()
567
- },
568
- watch: {
569
- 'startDate' (val) {
570
- console.log("我是watch")
571
- this.searchdata()
572
- this.searchdata1()
573
- },
574
- 'endDate' (val) {
575
- console.log("我是watch")
576
- this.searchdata()
577
- this.searchdata1()
578
- },
579
- 'plan_type' (val) {
580
- console.log("我是watch")
581
- this.f_safecheck_type = ''
582
- if (this.plan_type == 'false') {
583
- this.f_safecheck_type = '年度普检'
584
- }
585
- if (this.plan_type == 'true') {
586
- this.f_safecheck_type = '首次通气'
587
- }
588
- this.searchdata()
589
- this.searchdata1()
590
- },
591
- 'f_filialeids'(){
592
- console.log('hidden改变了')
593
- this.orgid = this.f_filialeids
594
- this.searchdata()
595
- this.searchdata1()
596
- }
597
- }
598
- }
599
- </script>
600
- <style scoped>
601
- .div-1 {
602
- height: 85%;
603
- width: 10%;
604
- margin-left: 5%;
605
- float: left;
606
- margin-top: 1%;
607
- }
608
-
609
- .div-2 {
610
- float: right;
611
- width: 80%;
612
- height: 55.56%;
613
- margin-right: 1%;
614
- margin-top: 0.5%;
615
- }
616
-
617
- .div-3 {
618
- float: left;
619
- margin-left: 2%;
620
- padding-top: 2%;
621
- width: 96%;
622
- height: 99%;
623
- }
624
-
625
- .div-4 {
626
- background-color: #fafafa;
627
- }
628
-
629
- table {
630
- height: 100%;
631
- width: 100%;
632
- font-size: 12px
633
- }
634
-
635
- tr {
636
- height: 25%;
637
- width: 100%
638
- }
639
-
640
- td {
641
- width: 11%;
642
- font-size: 12px;
643
- color: #666666;
644
- }
645
-
646
- .td-1 {
647
- width: 16%;
648
- color: #90addf;
649
- font-size: 12px
650
- }
651
-
652
- .td-2 {
653
- width: 15%;
654
- color: #90addf;
655
- font-size: 12px
656
- }
657
-
658
- span {
659
- color: #90addf;
660
- font-size: 12px
661
- }
662
-
663
- .span-1 {
664
- color: #999999;
665
- font-size: 12px
666
- }
667
-
668
- .p-1 {
669
- font-size: 15px;
670
- height: 99%;
671
- width: 99%;
672
- font-weight: bold;
673
- color: #333333;
674
- }
675
-
676
- button {
677
- width: 10%;
678
- margin-top: 0%;
679
- margin-left: 2%;
680
- float: right;
681
- background-color: #73ca73;
682
- border-radius: 4px;
683
- border: 1px solid #73ca73;
684
- color: #ffffff;
685
- font-size: 15px;
686
- height: 120%;
687
- }
688
-
689
- .but-1 {
690
- width: 17%;
691
- float: right;
692
- border-radius: 4px;
693
- font-size: 12px;
694
- height: 130%;
695
- }
696
-
697
- .but-2 {
698
- background-color: #88b5e2;
699
- border: #88b5e2;
700
- width: 6%;
701
- }
702
-
703
- img {
704
- width: 5px;
705
- height: 18px;
706
- }
707
-
708
- .img-1 {
709
- height: 12px;
710
- width: auto;
711
- }
712
-
713
- </style>
1
+ <template lang="html">
2
+ <div class="div-4">
3
+ <div :style="{height:headheight,background:'#eaeff4'}" style="width:100%">
4
+ <div class="div-2">
5
+ <div class="form-group">
6
+ <label v-show="full_screen" class="control-label">安检类型</label>
7
+ <v-select v-show="full_screen" :value.sync="plan_type"
8
+ :value-single="true"
9
+ :options='plan_types' close-on-select clear-button> </v-select>
10
+ <button class="but-1" @click="barrdios" v-show="full_screen"><img src='../../../assets/echarts6.png' class="img-1"/>&nbsp;全屏显示
11
+ </button>
12
+ <button @click="showall" v-show="show_all" class="but-2">返回</button>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ <div v-bind:style="{height: barheight,width:'100%'}">
17
+ <div class="flex-row" style="height: 90%;">
18
+ <div class="span">
19
+ <div class="form-inline" v-if="echartsshow" style="height: auto;margin-bottom: 5%;margin-top: 5%">
20
+ <div class="form-group">
21
+ <label for="startDate">开始日期:</label>
22
+ <datepicker id="startDate" placeholder="开始日期"
23
+ v-model="startDate"
24
+ :value.sync="startDate"
25
+ :disabled-days-of-Week="[]"
26
+ :format="'yyyy-MM-dd'"
27
+ :show-reset-button="reset">
28
+ </datepicker>
29
+ </div>
30
+ <div class="form-group">
31
+ <label for="endDate">截至日期:</label>
32
+ <datepicker id="endDate" placeholder="结束日期"
33
+ v-model="endDate"
34
+ v-show="show_all"
35
+ :value.sync="endDate"
36
+ :disabled-days-of-Week="[]"
37
+ :format="'yyyy-MM-dd'"
38
+ :show-reset-button="reset">
39
+ </datepicker>
40
+ </div>
41
+ <div class="form-group">
42
+ <label class="control-label">安检类型</label>
43
+ <v-select :value.sync="plan_type"
44
+ :value-single="true"
45
+ :options='plan_types' close-on-select clear-button> </v-select>
46
+ </div>
47
+ </div>
48
+
49
+ <div id="hidden" style="width:45%;float:left;"></div>
50
+ <div id="hiddenlevel" style="width: 45%;float:right;margin-left:-5px;"></div>
51
+ </div>
52
+
53
+ <!--调用子组件绘图查表-->
54
+ <div v-show="echartsshow" style="overflow:scroll">
55
+ <div class="div-3">
56
+ <h4 v-if="plan_type == ''" align="center">隐患及整改率率一览表</h4>
57
+ <h4 v-if="plan_type == 'false'" align="center">年度安检隐患及整改率率一览表</h4>
58
+ <h4 v-if="plan_type == 'true'" align="center">首次通气隐患及整改率率一览表</h4>
59
+ <criteria-paged :model="model1" v-ref:crip2 >
60
+ <data-grid :model="model" partial='list' v-ref:grid2 classname="table table-bordered table table-hover">
61
+ <template partial='head'>
62
+ <tr>
63
+ <th><nobr>分公司</nobr></th>
64
+ <th><nobr>A</nobr></th>
65
+ <th><nobr>B</nobr></th>
66
+ <th><nobr>C</nobr></th>
67
+ <th><nobr>A整改</nobr></th>
68
+ <th><nobr>B整改</nobr></th>
69
+ <th><nobr>C整改</nobr></th>
70
+ </tr>
71
+ </template>
72
+ <template partial='body' >
73
+ <tr class="tr-1">
74
+ <td class="td-1" style="text-align: center;">
75
+ {{row.f_subcompany}}
76
+ </td>
77
+ <td class="td-1" style="text-align: center;">
78
+ {{row.a}}
79
+ </td>
80
+ <td class="td-1" style="text-align: center;">
81
+ {{row.b}}
82
+ </td>
83
+ <td class="td-1" style="text-align: center;">
84
+ {{row.c}}
85
+ </td>
86
+ <td class="td-1" style="text-align: center;">
87
+ {{row.ac}}
88
+ </td>
89
+ <td class="td-1" style="text-align: center;">
90
+ {{row.bc}}
91
+ </td>
92
+ <td class="td-1" style="text-align: center;">
93
+ {{row.cc}}
94
+ </td>
95
+ </tr>
96
+ </template>
97
+ <template partial='foot'>
98
+ <tr>
99
+ <td colspan="1" style="text-align: right">合计:</td>
100
+ <td style="text-align: center"><nobr>{{model.sums.a}}</nobr></td>
101
+ <td style="text-align: center"><nobr>{{model.sums.b}}</nobr></td>
102
+ <td style="text-align: center"><nobr>{{model.sums.c}}</nobr></td>
103
+ <td style="text-align: center"><nobr>{{model.sums.ac}}</nobr></td>
104
+ <td style="text-align: center"><nobr>{{model.sums.bc}}</nobr></td>
105
+ <td style="text-align: center"><nobr>{{model.sums.cc}}</nobr></td>
106
+ </tr>
107
+ </template>
108
+ </data-grid>
109
+ </criteria-paged>
110
+ </div>
111
+
112
+ <div class="div-3" style="margin-top: 10%">
113
+ <h4 align="center" v-if="plan_type == ''">安检状态一览表</h4>
114
+ <h4 align="center" v-if="plan_type == 'false'">年度安检状态一览表</h4>
115
+ <h4 align="center" v-if="plan_type == 'true'">首次通气安检状态一览表</h4>
116
+ <criteria-paged :model="model" v-ref:crip >
117
+ <data-grid :model="model" partial='list' id="datagridstyle1" v-ref:grid1 classname="table table-bordered table table-hover">
118
+ <template partial='head'>
119
+ <tr>
120
+ <th><nobr>分公司</nobr></th>
121
+ <th><nobr>入户</nobr></th>
122
+ <th><nobr>入户(在用)</nobr></th>
123
+ <th><nobr>入户(未用)</nobr></th>
124
+ <th><nobr>到访不遇</nobr></th>
125
+ <th><nobr>拒检</nobr></th>
126
+ <th><nobr>小计</nobr></th>
127
+ </tr>
128
+ </template>
129
+ <template partial='body' >
130
+ <tr class="tr-1">
131
+ <td class="td-1" style="text-align: center;">
132
+ {{row.f_subcompany}}
133
+ </td>
134
+ <td class="td-1" style="text-align: center;">
135
+ {{row.rh+row.wsy}}
136
+ </td>
137
+ <td class="td-1" style="text-align: center;">
138
+ {{row.rh}}
139
+ </td>
140
+ <td class="td-1" style="text-align: center;">
141
+ {{row.wsy}}
142
+ </td>
143
+ <td class="td-1" style="text-align: center;">
144
+ {{row.dfby}}
145
+ </td>
146
+ <td class="td-1" style="text-align: center;">
147
+ {{row.jj}}
148
+ </td>
149
+ <td class="td-1" style="text-align: center;">
150
+ {{row.rh+row.dfby+row.jj+row.wsy}}
151
+ </td>
152
+ </tr>
153
+ </template>
154
+ <template partial='foot'>
155
+ <tr>
156
+ <td colspan="1" style="text-align: right">合计:</td>
157
+ <td style="text-align: center"><nobr>{{model.sums.rh + model.sums.wsy}}</nobr></td>
158
+ <td style="text-align: center"><nobr>{{model.sums.rh}}</nobr></td>
159
+ <td style="text-align: center"><nobr>{{model.sums.wsy}}</nobr></td>
160
+ <td style="text-align: center"><nobr>{{model.sums.dfby}}</nobr></td>
161
+ <td style="text-align: center"><nobr>{{model.sums.jj}}</nobr></td>
162
+ <td style="text-align: center"><nobr>{{model.sums.rh+model.sums.dfby+model.sums.jj+model.sums.wsy}}</nobr></td>
163
+ </tr>
164
+ </template>
165
+ </data-grid>
166
+ </criteria-paged>
167
+ </div>
168
+
169
+ </div>
170
+
171
+ </div>
172
+ </div>
173
+ </div>
174
+ </template>
175
+
176
+ <script>
177
+ import * as Util from '../../Util'
178
+ import co from 'co'
179
+ import echarts from 'echarts'
180
+ import {HttpResetClass} from 'vue-client'
181
+ import {PagedList} from 'vue-client'
182
+
183
+ //后台查询数据
184
+ let getData = function* (self) {
185
+ let load = new HttpResetClass()
186
+ load.load('POST', 'rs/sql/CheckStatusQuery', {data: {startDate:self.startDate,f_orgstr: self.orgid, endDate: self.endDate,plan_type:self.plan_type,f_safecheck_type:self.f_safecheck_type}},
187
+ {resolveMsg: null, rejectMsg: null})
188
+ .then((res) => {
189
+ let echartData = res.data
190
+
191
+ var legendname = []
192
+ echartData.forEach(function (items) {
193
+ legendname.push(items.name)
194
+ })
195
+
196
+ self.setSafe(echartData, legendname)
197
+ self.setstatustable()
198
+ })
199
+
200
+ }
201
+
202
+
203
+ let getData1 = function* (self) {
204
+ let Http = new HttpResetClass()
205
+ Http.load('POST','rs/sql/HiddenLevel', {data: {startDate:self.startDate,f_orgstr: self.orgid, endDate: self.endDate,plan_type:self.plan_type,f_safecheck_type:self.f_safecheck_type}},
206
+ {resolveMsg: null, rejectMsg: null})
207
+ .then((res) => {
208
+ let legendname = [] //分类名,横坐标分类,隐患级别
209
+ let metaDate = [] //二维数组 2*n 第一行为当前级别隐患总数,第二行为当前级别整改数
210
+ let scaledata = [] //整改率
211
+
212
+ let d1=[] // 隐患数
213
+ let d2=[] //整改数
214
+ //数据处理
215
+ res.data.forEach(function (s) {
216
+ legendname.push(s.name)
217
+ d1.push(s.value)
218
+ d2.push(s.change)
219
+ var h=(s.change/s.value).toFixed(3)
220
+ scaledata.push(h)
221
+ })
222
+ metaDate.push(d1)
223
+ metaDate.push(d2)
224
+ //掉绘图
225
+ self.setBar(legendname,metaDate,scaledata)
226
+ self.setleveltable()
227
+ })
228
+ }
229
+
230
+ export default {
231
+ name: "hidden-danger",
232
+
233
+ data() {
234
+ return {
235
+ full_screen: true,//控制全屏按键显示状态
236
+ show_all: false,//控制返回按键显示状态
237
+ //控制图表的显示状态
238
+ echartsshow: false,
239
+ barshow: true,
240
+ detailshows: true,
241
+
242
+ //控制图表的style
243
+ barheight: '88.37%',
244
+ headheight: '11.61%',
245
+ styledate: {
246
+ echartsheight: '95%',
247
+ echartsfloat: 'none',
248
+ },
249
+ echartswidth: '95%',
250
+ barshowid: '1',
251
+ model:new PagedList('rs/sql/QueryCheckStatus', 20, {startDate: 'this.startDate',endDate: 'this.endDate', orgid: 'this.orgid',plan_type:'this.plan_type',f_safecheck_type: 'this.f_safecheck_type'},{rh:'',dfby:'',wsy:'',jj:''}),
252
+ model1:new PagedList('rs/sql/QueryHiddenLevel', 20, {startDate: 'this.startDate',endDate: 'this.endDate', orgid: 'this.orgid',plan_type:'this.plan_type',f_safecheck_type: 'this.f_safecheck_type'},{a:'',b:'',c:'',ac:'',bc:'',cc:''}),
253
+ orgid: `('${this.$login.f.orgid}')`,
254
+ f: this.$login.f,
255
+ chosenOrg: {
256
+ id: 0
257
+ },
258
+ startDate:(new Date()).getFullYear()+'-01-01',
259
+ endDate: Util.toStandardDateString(),
260
+ xc: '',
261
+ plan_types:[{label:'全部',value:''},{label:'年度安检单',value:'false'},{label:'首次通气单',value:'true'}],
262
+ plan_type:'',
263
+ f_safecheck_type:''
264
+ }
265
+ },
266
+ props:{
267
+ f_filialeids:{
268
+ type:String
269
+ }
270
+ },
271
+ methods: {
272
+ barrdios() {//全屏按键事件
273
+ console.log("全屏显示事件")
274
+ this.barshow = true
275
+ this.detailshows = false
276
+ this.echartsshow = true
277
+ this.show_all = true
278
+ this.full_screen = false
279
+ this.buttonshow = true
280
+ this.showdetail = false
281
+ this.styledate.echartsfloat = 'left'
282
+ this.styledate.echartsheight = '65%'
283
+ this.echartswidth = '50%'
284
+ this.headheight = '8%'
285
+ this.$parent.echarts = '4'
286
+ this.$emit('echarts-changed')
287
+ this.newecharts = true
288
+
289
+ console.log(this.$parent.echarts, '主图状态')
290
+ },
291
+ showall() {//返回按键事件
292
+ //修改显示状态
293
+ this.barshow = false
294
+ this.detailshows = true
295
+ this.echartsshow = false
296
+ this.buttonshow = false
297
+ this.newecharts = false
298
+ this.show_all = false
299
+ this.full_screen = true
300
+ this.showdetail = false
301
+ this.styledate.echartsheight = '95%'
302
+ this.echartswidth = '95%'
303
+ this.$parent.echarts = -1
304
+ this.headheight = '11.61%'
305
+ this.$emit('echarts-changed', this.echarts)
306
+ },
307
+ setstatustable() {
308
+ this.model = new PagedList('rs/sql/QueryCheckStatus', 20, {startDate: 'this.startDate',endDate: 'this.endDate', orgid: 'this.orgid',plan_type:'this.plan_type',f_safecheck_type: 'this.f_safecheck_type'},{rh:'',dfby:'',wsy:'',jj:''})
309
+ this.model.startDate = this.startDate
310
+ this.model.endDate = this.endDate
311
+ this.model.orgid = this.orgid
312
+ this.model.plan_type = this.plan_type
313
+ this.model.f_safecheck_type = this.f_safecheck_type
314
+ this.model.search('1=1')
315
+ },
316
+ setleveltable() {
317
+ this.model1 = new PagedList('rs/sql/QueryHiddenLevel', 20, {startDate: 'this.startDate',endDate: 'this.endDate', orgid: 'this.orgid',plan_type:'this.plan_type',f_safecheck_type: 'this.f_safecheck_type'},{a:'',b:'',c:'',ac:'',bc:'',cc:''})
318
+ this.model1.startDate = this.startDate
319
+ this.model1.endDate = this.endDate
320
+ this.model1.orgid = this.orgid
321
+ this.model1.plan_type = this.plan_type
322
+ this.model1.f_safecheck_type = this.f_safecheck_type
323
+ this.model1.search('1=1')
324
+ },
325
+ //隐患饼状图
326
+ setSafe(echartData,legendname) {
327
+ this.xc = echarts.init(document.getElementById('hidden'))
328
+ var rich = {
329
+ yellow: {
330
+ color: "#ffc72b",
331
+ fontSize: 12 * scale,
332
+ padding: [5, 4],
333
+ align: 'center'
334
+ },
335
+ total: {
336
+ color: "#8ee6de",
337
+ fontSize: 12 * scale,
338
+ align: 'center',
339
+ confine:true
340
+ },
341
+ white: {
342
+ color: "#fff",
343
+ align: 'center',
344
+ fontSize: 12 * scale,
345
+ padding: [11, 0, 11, 0]
346
+ },
347
+ blue: {
348
+ color: '#6f8ba8',
349
+ fontSize: 8 * scale,
350
+ align: 'center',
351
+ padding: [10, 0]
352
+ },
353
+ hr: {
354
+ borderColor: '#ffffff',
355
+ width: '100%',
356
+ borderWidth: 0.5,
357
+ height: 0,
358
+ },
359
+ }
360
+ var scale = 0.8
361
+ var total = 0; //安检总量
362
+ echartData.forEach(function (value) {
363
+ total = eval(total + '+' + value.value)
364
+ });
365
+ this.xc.setOption({
366
+ title: [
367
+ {
368
+ text: '安检总量',
369
+ x: '40%',
370
+ y: '40%',
371
+ textStyle: {
372
+ color: '#6f8ba8',
373
+ fontSize: 12 * scale,
374
+ }
375
+ },
376
+ {
377
+ text: total,
378
+ x: '38%',
379
+ y: '45%',
380
+ padding: [15, 20],
381
+ textStyle: {
382
+ color: '#8ee6de',
383
+ fontSize: 12 * scale,
384
+ }
385
+ }],
386
+ legend: {
387
+ orient: 'horizontal',
388
+ icon: 'circle',
389
+ x: 'right',
390
+ right: 5,
391
+ top: 20,
392
+ itemWidth: 20 * scale,
393
+ itemHeight: 10 * scale,
394
+ textStyle: {
395
+ fontSize: 12 * scale,
396
+ padding: [0, 0, 0, 4],
397
+ color: '#6f8ba8'
398
+ },
399
+ data: legendname
400
+ },
401
+ series: [{
402
+ name: '安检总量',
403
+ type: 'pie',
404
+ radius: '40%',
405
+ center: ['50%', '50%'],
406
+ hoverAnimation: false,
407
+ color: ['#8ee6de', '#fbd85f', '#9bb5eb','#38dcad'],
408
+ label: {
409
+ normal: {
410
+ borderWidth: 20 * scale,
411
+ borderRadius: 4,
412
+ lineHeight:6,
413
+ formatter: function (params, ticket, callback) {
414
+ var total = 0; //隐患总数
415
+ var percent = 0;
416
+ echartData.forEach(function (value, index, array) {
417
+ total += value.value;
418
+ });
419
+ percent = ((params.value / total) * 100).toFixed(1);
420
+ return '{blue|' + params.name + '}\n{hr|}\n{total|' + params.value + '}{blue|\n\n}{yellow|' + percent + '%' + '}';
421
+ },
422
+ rich: rich,
423
+ }
424
+ },
425
+ labelLine: {
426
+ normal: {
427
+ lineStyle: {
428
+ formatter: function (params, ticket, callback) {
429
+ var total = 0; //隐患总数
430
+ var percent = 0; //用户占比
431
+ echartData.forEach(function (value, index, array) {
432
+ total += value.value;
433
+ });
434
+ percent = ((params.value / total) * 100).toFixed(1);
435
+ return '{white|' + params.name + '}\n{hr|}\n{yellow|' + params.value + '}\n{blue|' + percent + '%}';
436
+ },
437
+ }
438
+ }
439
+ },
440
+ data: echartData
441
+ }]
442
+ }, true)
443
+ },
444
+
445
+ setBar(legendname,metaDate,scaledata) {
446
+ this.xc1 = echarts.init(document.getElementById('hiddenlevel'))
447
+
448
+ let serieData = [{ //绘图数据
449
+ name: '隐患总数',
450
+ type: "bar",
451
+ barWidth: '20%',
452
+ barGap: "0",
453
+ itemStyle: {
454
+ normal: {
455
+ barBorderRadius: 15,
456
+ borderColor: '#00c0e9',
457
+ color: '#fff',
458
+ label: {
459
+ show: true,
460
+ textStyle: {
461
+ color: "#4a7cae"
462
+ },
463
+ position: "top",
464
+ formatter: function (p) {
465
+ return p.value > 0 ? (p.value) : '';
466
+ }
467
+ }
468
+ }
469
+ },
470
+ data: metaDate[0],
471
+ },
472
+ { //绘图数据
473
+ name: '整改数',
474
+ type: "bar",
475
+ barWidth: '20%',
476
+ barGap: "-100%",
477
+ itemStyle: {
478
+ normal: {
479
+ barBorderRadius: 15,
480
+ color: '#00c0e9',
481
+ label: {
482
+ show: true,
483
+ textStyle: {
484
+ color: "#4a7cae"
485
+ },
486
+ position: "insideTop",
487
+ formatter: function (p) {
488
+ return p.value > 0 ? (p.value) : '';
489
+ }
490
+ }
491
+ }
492
+ },
493
+ data: metaDate[1],
494
+ }]
495
+
496
+
497
+ this.xc1.setOption({
498
+ title: {
499
+ text: '',
500
+ x: '30%',
501
+ textStyle: {color: "#333333", fontSize: "16", fontWeight: "normal"}
502
+ },
503
+ color: ['#3398DB'],
504
+ tooltip: {
505
+ trigger: 'axis',
506
+ axisPointer: { // 坐标轴指示器,坐标轴触发有效
507
+ type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
508
+ },
509
+ formatter: function (params) {
510
+ if (params[0].axisValue == '') {
511
+ return ''
512
+ }
513
+ var result = ''
514
+ params.forEach(function (item) {
515
+ result += item.seriesName + " : " + item.value + "</br>";
516
+ });
517
+ var h=eval(scaledata[params[0].dataIndex]*100).toString()
518
+
519
+ return result+"整改率:"+h+'%'
520
+ },
521
+ extraCssText: 'width: 60%;height: 30%;'
522
+ },
523
+ grid: {
524
+ left: '2%',
525
+ right: '20%',
526
+ bottom: '8%',
527
+ containLabel: true
528
+ },
529
+ xAxis: [
530
+ {
531
+ type: 'category',
532
+ name: "隐患等级",
533
+ nameTextStyle: {color: "#6f8ba8"},
534
+ axisTick: {
535
+ alignWithLabel: true
536
+ },
537
+ axisLine: {show: true,lineStyle :{color:'#999999'}},
538
+ axisLabel: {show: true, textStyle: {color: "#6f8ba8"}},
539
+ data: legendname
540
+ }
541
+ ],
542
+ yAxis: [{
543
+ type: "value",
544
+ name: "数量",
545
+ nameTextStyle: {color: "#6f8ba8"},
546
+ splitLine: {show: true,lineStyle:{type:'dashed',color:'#e1e1e1'}},
547
+ axisTick: {show: true},
548
+ axisLine: {show: true,lineStyle :{color:'#999999'}},
549
+ axisLabel: {show: true, textStyle: {color: "#6f8ba8"}}
550
+ }],
551
+ series: serieData
552
+ }, true)
553
+ },
554
+ searchdata () {
555
+ let getGen =getData(this)
556
+ co(getGen)
557
+ },
558
+ searchdata1 () {
559
+ let getGen =getData1(this)
560
+ co(getGen)
561
+ }
562
+ },
563
+ ready () {
564
+ // this.orgid = `('${this.$login.f.orgid}')`
565
+ // this.searchdata()
566
+ // this.searchdata1()
567
+ },
568
+ watch: {
569
+ 'startDate' (val) {
570
+ console.log("我是watch")
571
+ this.searchdata()
572
+ this.searchdata1()
573
+ },
574
+ 'endDate' (val) {
575
+ console.log("我是watch")
576
+ this.searchdata()
577
+ this.searchdata1()
578
+ },
579
+ 'plan_type' (val) {
580
+ console.log("我是watch")
581
+ this.f_safecheck_type = ''
582
+ if (this.plan_type == 'false') {
583
+ this.f_safecheck_type = '年度普检'
584
+ }
585
+ if (this.plan_type == 'true') {
586
+ this.f_safecheck_type = '首次通气'
587
+ }
588
+ this.searchdata()
589
+ this.searchdata1()
590
+ },
591
+ 'f_filialeids'(){
592
+ console.log('hidden改变了')
593
+ this.orgid = this.f_filialeids
594
+ this.searchdata()
595
+ this.searchdata1()
596
+ }
597
+ }
598
+ }
599
+ </script>
600
+ <style scoped>
601
+ .div-1 {
602
+ height: 85%;
603
+ width: 10%;
604
+ margin-left: 5%;
605
+ float: left;
606
+ margin-top: 1%;
607
+ }
608
+
609
+ .div-2 {
610
+ float: right;
611
+ width: 80%;
612
+ height: 55.56%;
613
+ margin-right: 1%;
614
+ margin-top: 0.5%;
615
+ }
616
+
617
+ .div-3 {
618
+ float: left;
619
+ margin-left: 2%;
620
+ padding-top: 2%;
621
+ width: 96%;
622
+ height: 99%;
623
+ }
624
+
625
+ .div-4 {
626
+ background-color: #fafafa;
627
+ }
628
+
629
+ table {
630
+ height: 100%;
631
+ width: 100%;
632
+ font-size: 12px
633
+ }
634
+
635
+ tr {
636
+ height: 25%;
637
+ width: 100%
638
+ }
639
+
640
+ td {
641
+ width: 11%;
642
+ font-size: 12px;
643
+ color: #666666;
644
+ }
645
+
646
+ .td-1 {
647
+ width: 16%;
648
+ color: #90addf;
649
+ font-size: 12px
650
+ }
651
+
652
+ .td-2 {
653
+ width: 15%;
654
+ color: #90addf;
655
+ font-size: 12px
656
+ }
657
+
658
+ span {
659
+ color: #90addf;
660
+ font-size: 12px
661
+ }
662
+
663
+ .span-1 {
664
+ color: #999999;
665
+ font-size: 12px
666
+ }
667
+
668
+ .p-1 {
669
+ font-size: 15px;
670
+ height: 99%;
671
+ width: 99%;
672
+ font-weight: bold;
673
+ color: #333333;
674
+ }
675
+
676
+ button {
677
+ width: 10%;
678
+ margin-top: 0%;
679
+ margin-left: 2%;
680
+ float: right;
681
+ background-color: #73ca73;
682
+ border-radius: 4px;
683
+ border: 1px solid #73ca73;
684
+ color: #ffffff;
685
+ font-size: 15px;
686
+ height: 120%;
687
+ }
688
+
689
+ .but-1 {
690
+ width: 17%;
691
+ float: right;
692
+ border-radius: 4px;
693
+ font-size: 12px;
694
+ height: 130%;
695
+ }
696
+
697
+ .but-2 {
698
+ background-color: #88b5e2;
699
+ border: #88b5e2;
700
+ width: 6%;
701
+ }
702
+
703
+ img {
704
+ width: 5px;
705
+ height: 18px;
706
+ }
707
+
708
+ .img-1 {
709
+ height: 12px;
710
+ width: auto;
711
+ }
712
+
713
+ </style>