safecheck-client 3.0.30-8 → 3.0.30-80

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 (87) hide show
  1. package/examples/SafePlan-liaoyuan/App.vue +3 -1
  2. package/package.json +4 -3
  3. package/src/components/Util.js +15 -0
  4. package/src/components/android/AddPlanItem.vue +5 -2
  5. package/src/components/android/AreaPlan.vue +2 -2
  6. package/src/components/android/CurrentCreate.vue +1050 -1049
  7. package/src/components/android/CurrentCreate_new.vue +563 -559
  8. package/src/components/android/PaperFeedback.vue +1481 -1479
  9. package/src/components/android/SafecheckOrderV.vue +2 -2
  10. package/src/components/android/UploadPage.vue +13 -123
  11. package/src/components/paper/PaperList.vue +9 -2
  12. package/src/components/paper/PlanChooser.vue +8 -6
  13. package/src/components/pc/Edit.vue +126 -0
  14. package/src/components/pc/LodopFuncs.js +159 -0
  15. package/src/components/pc/NewCheckpaper.vue +9 -5
  16. package/src/components/pc/PaperEdit.vue +151 -0
  17. package/src/components/pc/PrintData.vue +243 -0
  18. package/src/components/pc/PrintTable.vue +241 -0
  19. package/src/components/pc/SelectCheckPlanAndNoPLan.vue +3 -0
  20. package/src/components/report/NoCheckplanSafecheck.vue +0 -2
  21. package/src/components/rongcheng/CheckCurrentCreate.vue +1070 -1062
  22. package/src/components/rongcheng/PaperStatem.vue +414 -373
  23. package/src/components/rongcheng/PhoneUpUserinfo.vue +1191 -1241
  24. package/src/components/rongcheng/SafecheckOrderV.vue +8 -0
  25. package/src/components/rongcheng/SafecheckUserInfo.vue +988 -569
  26. package/src/components/rongcheng/report/CheckPlanAreaList.vue +21 -3
  27. package/src/filiale/fugou/android/AddPlanItem.vue +413 -0
  28. package/src/filiale/fugou/android.js +10 -0
  29. package/src/filiale/hanzhong/android/SafecheckDevices.vue +1313 -1313
  30. package/src/filiale/hanzhong/android/SafecheckOrderV.vue +2 -2
  31. package/src/filiale/hanzhong/pc/NewCheckpaper.vue +1923 -0
  32. package/src/filiale/hanzhong/pc.js +4 -1
  33. package/src/filiale/huatong/android/CurrentCreate.vue +564 -564
  34. package/src/filiale/huatong/android/SafecheckOrderV.vue +8 -0
  35. package/src/filiale/jingyang/android/PhoneUpUserinfo.vue +34 -34
  36. package/src/filiale/jingyang/pc/PaperList.vue +793 -793
  37. package/src/filiale/kelai/android/AddPlanItem.vue +488 -0
  38. package/src/filiale/kelai/android.js +1 -0
  39. package/src/filiale/liaoyuan/android/CurrentCreate.vue +1066 -0
  40. package/src/filiale/liaoyuan/android.js +1 -0
  41. package/src/filiale/pingxiang/pc/DefectPaperNew.vue +1 -1
  42. package/src/filiale/qianneng/android/PaperFeedback.vue +40 -0
  43. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +6 -0
  44. package/src/filiale/tianke/pc/checkScreen.vue +4 -4
  45. package/src/filiale/tianke/pc/cq.jpg +0 -0
  46. package/src/filiale/tianke/pc/qy.jpg +0 -0
  47. package/src/filiale/tongchuan/android/SafecheckDevices.vue +1 -0
  48. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1060 -1090
  49. package/src/filiale/wensu/android/AndroidDefectDeal.vue +321 -366
  50. package/src/filiale/wensu/android/AndroidDefectDealItems.vue +480 -0
  51. package/src/filiale/wensu/android.js +1 -0
  52. package/src/filiale/wensu/pc/CheckSearchUser.vue +64 -0
  53. package/src/filiale/wensu/pc/DefectPaperNew.vue +16 -10
  54. package/src/filiale/wensu/pc/NewCheckpaper.vue +1936 -0
  55. package/src/filiale/wensu/pc/RoleSelector.vue +4 -1
  56. package/src/filiale/wensu/pc/checkUserList.vue +50 -0
  57. package/src/filiale/wensu/pc.js +2 -1
  58. package/src/filiale/wenxi/pc/DefectPaper.vue +1 -1
  59. package/src/filiale/wuhai/android/SafecheckOrderV.vue +2069 -2041
  60. package/src/filiale/wuhai/pc/NewCheckpaper.vue +1281 -1279
  61. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1150 -1150
  62. package/src/filiale/yangchunboneng/android/PaperFeedback.vue +20 -0
  63. package/src/filiale/yangchunboneng/pc/CheckBookDetails.vue +19 -0
  64. package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +1077 -1077
  65. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +849 -849
  66. package/src/filiale/yangchunboneng/pc/PaperList.vue +727 -727
  67. package/src/filiale/yongzhou/pc/CheckSearchUser.vue +1092 -0
  68. package/src/filiale/yongzhou/pc/LodopFuncs.js +159 -0
  69. package/src/filiale/yongzhou/pc/NoCheckplanSafecheck.vue +252 -0
  70. package/src/filiale/yongzhou/pc/PaperList.vue +798 -0
  71. package/src/filiale/yongzhou/pc/PrintData.vue +243 -0
  72. package/src/filiale/yongzhou/pc/PrintTable.vue +241 -0
  73. package/src/filiale/yongzhou/pc/communityDetail.vue +35 -12
  74. package/src/filiale/yongzhou/pc/communityTypeDetailG.vue +28 -14
  75. package/src/filiale/yongzhou/pc/communityTypeDetailM.vue +28 -14
  76. package/src/filiale/yongzhou/pc/safeDetail.vue +43 -15
  77. package/src/filiale/yongzhou/pc/safeStatistics.vue +16 -6
  78. package/src/filiale/yongzhou/pc/safeStatisticsDay.vue +88 -29
  79. package/src/filiale/yongzhou/pc/safeStatisticsMonth.vue +63 -27
  80. package/src/filiale/yongzhou/pc/safeStatisticsYear.vue +16 -6
  81. package/src/filiale/yongzhou/pc/safeTable.vue +10 -2
  82. package/src/filiale/yongzhou/pc.js +17 -12
  83. package/src/filiale/zhongsheng/android/CurrentCreate.vue +540 -536
  84. package/src/filiale/zhongsheng/android/SafecheckUserInfo.vue +151 -53
  85. package/src/filiale/zhongsheng/pc/NewCheckpaper.vue +14 -0
  86. package/src/main.js +1 -1
  87. package/src/safecheck.js +12 -0
@@ -0,0 +1,241 @@
1
+ <template>
2
+ <button class="btn btn-default" @click='PrintAsFile()' :id="'vc-printtable-'+attach">打印表格</button>
3
+ </template>
4
+
5
+ <script>
6
+ import co from 'co'
7
+ import getLodop from './LodopFuncs'
8
+
9
+ let printGen = function * (self, pageNo) {
10
+
11
+ console.log('开始打印', self.isSelected, self.model, self.tfoot)
12
+ //是否分页打印
13
+ if(pageNo){
14
+ self.PrintSinglePage()
15
+ return
16
+ }
17
+ if (self.isSelected) {
18
+ // 判断是否选择行数据进行打印
19
+ self.PrintSelectedPage()
20
+ return
21
+ }
22
+
23
+ let lodop = getLodop()
24
+ lodop.PRINT_INIT(self.printName+'打印')
25
+ var style
26
+ if (!self.style) {
27
+ style = '<style>table{font-size:15px;border-width: 2px;border-collapse: collapse;border:solid 2px ; border-color:black;}' +
28
+ 'table th {border-width: 1px;padding: 2px;border-style: solid;}table td {border-width: 1px;padding: 2px;border-style: solid;}</style>'
29
+ } else {
30
+ style = self.style
31
+ }
32
+ let tHtml = style + '<table class="table table-hover"><thead>' + self.thead + '</thead><tbody>'
33
+
34
+ for (var i = 1; i <= self.model.totalPage; i++) {
35
+ console.log('pageIndex = ' + i)
36
+ yield self.model.loadPage(i)
37
+ for (let row of self.model.rows) {
38
+ tHtml += '<tr>'
39
+ for (let field of self.fields) {
40
+ if (field && (row[field] || row[field] === 0) ) {
41
+ tHtml += '<td>' + row[field] + '</td>'
42
+ } else {
43
+ tHtml += '<td></td>'
44
+ }
45
+ // console.log(row[field])
46
+ }
47
+ tHtml += '</tr>'
48
+ }
49
+ }
50
+ // 加入合计数据 (最后一页显示)
51
+ if (self.sumhtml) {
52
+ tHtml += self.sumhtml
53
+ }
54
+ // 如果有表尾,则添加表尾,如果内容翻页的话,表尾每一页都要打印
55
+ if (self.tfoot) {
56
+ self.tfoot += `<tr><td width="100%" colspan=${self.fields.length} style="text-align: center;border-width: 0;">第<font tdata="PageNO" format="#" color="blue">#</font>页</span>/共<font tdata="PageCount" format="#" color="blue">##</font></span>页</td></tr>`
57
+ tHtml += `</tbody><tfoot>${self.tfoot}</tfoot></table>`
58
+ } else {
59
+ tHtml += '</tbody></table>'
60
+ }
61
+
62
+ lodop.ADD_PRINT_TABLE(self.top, self.left, 'RightMargin:' + self.right, 'BottomMargin:' + self.bottom, tHtml)
63
+ lodop.SET_PRINT_STYLEA(0, 'HOrient', 3)
64
+ lodop.SET_PRINT_STYLEA(0, 'VOrient', 3)
65
+ // 指定打印方向 0--可通过打印机选择纵向或横向,1--锁定为纵向打印,2---锁定为横向打印
66
+ LODOP.SET_PRINT_PAGESIZE(self.xyprint, 0, 0, "A4");
67
+
68
+ if(self.printview==null){
69
+ // 打印维护
70
+ lodop.PRINT_SETUP()
71
+ }else if(self.printview){
72
+ // 使用打印预览是为了方便调整打印格式。例如:横向打印
73
+ lodop.PREVIEW()
74
+ }else if(!self.printview){
75
+ // 直接打印
76
+ lodop.PRINT()
77
+ }
78
+
79
+ }
80
+
81
+ export default {
82
+ // props: ['model', 'thead', 'fields', 'top', 'left', 'right', 'bottom', 'tfoot'],
83
+ props: {
84
+ model: Object,
85
+ thead: String,
86
+ tfoot: String,
87
+ sumhtml: String,
88
+ fields: Array,
89
+ //null 打印维护, true 打印预览 false 直接打印
90
+ printview:{},
91
+ // 指定打印方向 0--可通过打印机选择纵向或横向,1--锁定为纵向打印,2---锁定为横向打印
92
+ xyprint:{
93
+ default : 0
94
+ },
95
+ top: {},
96
+ left: {},
97
+ right: {},
98
+ bottom: {},
99
+ attach: {
100
+ type: String,
101
+ default: 'name'
102
+ },
103
+ style: {
104
+ type: String
105
+ },
106
+ isSelected: {
107
+ type:Boolean,
108
+ default:false
109
+ },
110
+ //是否分页打印
111
+ printpage:{
112
+ type:Boolean,
113
+ default:false
114
+ },
115
+ // 打印名称,在同一个名称下的打印可以统一风格(打印维护界面点击应用即可)
116
+ printName: {
117
+ type: String
118
+ }
119
+ },
120
+ data(){
121
+ return{
122
+ //打印任务的JOB代码,用于获得打印状态信息及最终结果。
123
+ P_ID:"",
124
+ //第几次任务
125
+ loop:0,
126
+ }
127
+ },
128
+ methods: {
129
+ PrintAsFile () {
130
+ console.log(this.model)
131
+ let gen = printGen(this,this.printpage)
132
+ co(gen)
133
+ },
134
+ async PrintSinglePage(){
135
+ let lodop = getLodop()
136
+ lodop.PRINT_INIT('打印表格'+(this.loop+1))
137
+ var style
138
+ if (!this.style) {
139
+ style = '<style>table{font-size:15px;border-width: 2px;border-collapse: collapse;border:solid 2px ; border-color:black;}' +
140
+ 'table th {border-width: 1px;padding: 2px;border-style: solid;}table td {border-width: 1px;padding: 2px;border-style: solid;}</style>'
141
+ } else {
142
+ style = this.style
143
+ }
144
+ let tHtml = style + '<table class="table table-hover"><thead>' + this.thead + '</thead><tbody>'
145
+
146
+ //所有数据全部打印,打印任务结束
147
+ if(this.loop+1>this.model.totalPage){
148
+ this.printinit()
149
+ console.log('打印结束')
150
+ return
151
+ }
152
+ console.log('获取数据pageIndex = ' + (this.loop+1))
153
+ await this.model.loadPage(this.loop+1)
154
+ for (let row of this.model.rows) {
155
+ tHtml += '<tr>'
156
+ for (let field of this.fields) {
157
+ if (field && (row[field] || row[field] === 0) ) {
158
+ tHtml += '<td>' + row[field] + '</td>'
159
+ } else {
160
+ tHtml += '<td></td>'
161
+ }
162
+ }
163
+ tHtml += '</tr>'
164
+ }
165
+ //插入页码
166
+ let page = `<tr><th width="100%" colspan=${this.fields.length} style="border-width: 0;">当前是第<font format="ChineseNum" color="blue">${this.loop+1}</font>页/共<font format="ChineseNum" color="blue">${this.model.totalPage}</font>页`
167
+ // 如果有表尾,则添加表尾,如果内容翻页的话,表尾每一页都要打印
168
+ if (this.tfoot) {
169
+ tHtml += `</tbody><tfoot>${this.tfoot}${page}</tfoot></table>`
170
+ } else {
171
+ tHtml += '</tbody></table>'
172
+ }
173
+
174
+ lodop.ADD_PRINT_TABLE(this.left, this.top, 'RightMargin:' + this.right, 'BottomMargin:' + this.bottom, tHtml)
175
+ lodop.SET_PRINT_STYLEA(0, 'HOrient', 3)
176
+ lodop.SET_PRINT_STYLEA(0, 'VOrient', 3)
177
+ //设置打印机为默认打印机
178
+ lodop.SET_PRINTER_INDEX(-1)
179
+
180
+ this.P_ID=lodop.PRINT()
181
+ if(this.P_ID){
182
+ this.loop+=1
183
+ console.log("正打印第"+this.loop+"个任务(JOB代码"+this.P_ID)
184
+ }
185
+ //延迟循环缓解压力
186
+ await this.timeout(1500)
187
+ this.PrintSinglePage()
188
+ },
189
+
190
+ async PrintSelectedPage () {
191
+ console.log('选择列打印开始', this.model)
192
+
193
+ if (this.model.rows.length > 100) {
194
+ this.$showAlert('您选择的数据过大,请选择少于100条数据进行打印', 'warning', 3000)
195
+ return
196
+ }
197
+
198
+ let lodop = getLodop()
199
+ lodop.PRINT_INIT('打印表格'+(this.loop+1))
200
+ var style
201
+ if (!this.style) {
202
+ style = '<style>table{font-size:15px;border-width: 2px;border-collapse: collapse;border:solid 2px ; border-color:black;}' +
203
+ 'table th {border-width: 1px;padding: 2px;border-style: solid;}table td {border-width: 1px;padding: 2px;border-style: solid;}</style>'
204
+ } else {
205
+ style = this.style
206
+ }
207
+ let tHtml = style + '<table class="table table-hover"><thead>' + this.thead + '</thead><tbody>'
208
+ for (let row of this.model.rows) {
209
+ tHtml += '<tr>'
210
+ for (let field of this.fields) {
211
+ tHtml += '<td style="text-align: center;">' + row[field] + '</td>'
212
+ }
213
+ tHtml += '</tr>'
214
+ }
215
+ // // 如果有表尾,则添加表尾,如果内容翻页的话,表尾每一页都要打印
216
+ if (this.tfoot) {
217
+ tHtml += `</tbody><tfoot>${this.tfoot}</tfoot></table>`
218
+ } else {
219
+ tHtml += '</tbody></table>'
220
+ }
221
+ console.log('选择列打印的html', tHtml)
222
+ lodop.ADD_PRINT_TABLE(this.left, this.top, 'RightMargin:' + this.right, 'BottomMargin:' + this.bottom, tHtml)
223
+ lodop.SET_PRINT_STYLEA(0, 'HOrient', 3)
224
+ lodop.SET_PRINT_STYLEA(0, 'VOrient', 3)
225
+ //设置打印机为默认打印机
226
+ lodop.SET_PRINTER_INDEX(-1)
227
+ console.log('开始调用打印。。')
228
+ this.P_ID=lodop.PRINT()
229
+ },
230
+ printinit(){
231
+ this.P_ID="",
232
+ this.loop=0
233
+ },
234
+ async timeout(ms){
235
+ return new Promise((resolve, reject) => {
236
+ setTimeout(resolve, ms)
237
+ })
238
+ }
239
+ }
240
+ }
241
+ </script>
@@ -106,6 +106,7 @@
106
106
  <th>入户</th>
107
107
  <th>到访不遇</th>
108
108
  <th>拒检</th>
109
+ <th>完成率</th>
109
110
  </tr>
110
111
  </template>
111
112
  <template partial='body'>
@@ -117,6 +118,7 @@
117
118
  <td style="text-align: center">{{row.ruhu}}</td>
118
119
  <td style="text-align: center">{{row.daofang}}</td>
119
120
  <td style="text-align: center">{{row.jujian}}</td>
121
+ <td style="text-align: center">{{row.wclv}}%</td>
120
122
 
121
123
  </template>
122
124
  <template partial="foot">
@@ -128,6 +130,7 @@
128
130
  <td style="text-align: center">{{model.sums.ruhu}}</td>
129
131
  <td style="text-align: center">{{model.sums.daofang}}</td>
130
132
  <td style="text-align: center">{{model.sums.jujian}}</td>
133
+ <td style="text-align: center">{{((model.sums.ruhu +model.sums.daofang+model.sums.jujian)/(model.sums.plannum+model.sums.no_plan_num)*100).toFixed(2)}}%</td>
131
134
  </template>
132
135
  </data-grid>
133
136
  </criteria-paged>
@@ -194,8 +194,6 @@ export default {
194
194
  },
195
195
  ready () {
196
196
  this.orgname = this.$login.f.orgs
197
- //tag)
198
- //tag
199
197
  this.$refs.paged.$refs.cri.model.startDate=Util.toStartDateString() +' 00:00:00'
200
198
  this.$refs.paged.$refs.cri.model.endDate=Util.toEndDateString() +' 23:59:59'
201
199