safecheck-client 3.0.34-9 → 3.0.34-91

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. package/package.json +1 -1
  2. package/src/App-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.vue +55 -0
  3. package/src/assets/123.png +0 -0
  4. package/src/assets/f8632d3c8c4c1cb68e99da754cab1a7.png +0 -0
  5. package/src/components/LoadData.vue +62 -0
  6. package/src/components/NewDefectList/DefectListNew.vue +1 -0
  7. package/src/components/android/AddPlanItemYy.vue +451 -0
  8. package/src/components/android/AndroidDefectDeal.vue +634 -634
  9. package/src/components/android/AndroidDefectDealBeforeSafe.vue +502 -0
  10. package/src/components/android/AreaSelect.vue +198 -0
  11. package/src/components/android/BuildingSelect.vue +192 -0
  12. package/src/components/android/CheckPlanSelect.vue +229 -0
  13. package/src/components/android/CurrentCreateYy.vue +1051 -0
  14. package/src/components/android/PaperFeedback.vue +33 -0
  15. package/src/components/android/QRCode/QRCodeBinding.vue +300 -0
  16. package/src/components/android/QRCode/QRCodePage.vue +212 -0
  17. package/src/components/android/SafecheckDevices.vue +2 -2
  18. package/src/components/android/SafecheckOrderV.vue +8 -12
  19. package/src/components/android/UserinfoSelect.vue +714 -0
  20. package/src/components/android/examples/410.png +0 -0
  21. package/src/components/android/examples/SafeListExamples.vue +283 -0
  22. package/src/components/android/examples/UserExamples.vue +137 -0
  23. package/src/components/android/examples/ViewDetailsExamples.vue +1235 -0
  24. package/src/components/android/examples/touxiang.png +0 -0
  25. package/src/components/pc/SafeVisitInfo.vue +261 -0
  26. package/src/components/rongcheng/AddPlanItem.vue +8 -0
  27. package/src/components/rongcheng/AspiratedUserInfo.vue +1 -1
  28. package/src/components/rongcheng/CheckSearchUser.vue +46 -16
  29. package/src/components/rongcheng/PaperStatem.vue +6 -1
  30. package/src/components/rongcheng/PhoneDevicesInfo.vue +16 -1
  31. package/src/components/rongcheng/PhoneUpUserinfo.vue +0 -92
  32. package/src/components/rongcheng/SafecheckOrderV.vue +12 -3
  33. package/src/components/rongcheng/SafecheckOrderVCli.vue +9 -0
  34. package/src/filiale/baiyin/android/AndroidDefectDeal.vue +4 -4
  35. package/src/filiale/baiyin/android/SafecheckOrderV.vue +2785 -0
  36. package/src/filiale/baiyin/android.js +1 -0
  37. package/src/filiale/baiyin/pc/CheckSearchUser.vue +2 -2
  38. package/src/filiale/baiyin/pc/DefectListNew.vue +3 -3
  39. package/src/filiale/baiyin/pc/PaperList.vue +7 -7
  40. package/src/filiale/bayan/android/AddPlanItem.vue +8 -0
  41. package/src/filiale/bayan/android/PaperFeedback.vue +63 -49
  42. package/src/filiale/bayan/android/PhoneUpUserinfo.vue +40 -40
  43. package/src/filiale/bayan/android/SafecheckOrderV.vue +58 -58
  44. package/src/filiale/bayan/android/SafecheckUserInfo.vue +5 -0
  45. package/src/filiale/bayan/pc/PaperList.vue +1 -0
  46. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +35 -15
  47. package/src/filiale/huaran/android/SafecheckOrderV.vue +2803 -0
  48. package/src/filiale/huaran/android.js +12 -0
  49. package/src/filiale/huaran/pc/CheckBook.vue +313 -0
  50. package/src/filiale/huaran/pc/CheckBookAll.vue +69 -0
  51. package/src/filiale/huaran/pc/CheckBookArea.vue +170 -0
  52. package/src/filiale/huaran/pc/CheckBookCompany.vue +166 -0
  53. package/src/filiale/huaran/pc/CheckBookDetails.vue +196 -0
  54. package/src/filiale/huaran/pc/CheckBookEntry.vue +61 -0
  55. package/src/filiale/huaran/pc/CheckBookList.vue +386 -0
  56. package/src/filiale/huaran/pc/CheckBookSearchArea.vue +564 -0
  57. package/src/filiale/huaran/pc/CheckBookSearchUnit.vue +229 -0
  58. package/src/filiale/huaran/pc/CheckBookSearchUser.vue +604 -0
  59. package/src/filiale/huaran/pc/CheckBookUser.vue +112 -0
  60. package/src/filiale/huaran/pc/PaperList.vue +822 -0
  61. package/src/filiale/huaran/pc/PlanManage.vue +887 -0
  62. package/src/filiale/huaran/pc/checkPlanList.vue +419 -0
  63. package/src/filiale/huaran/pc/checkUserList.vue +867 -0
  64. package/src/filiale/huaran/pc.js +27 -0
  65. package/src/filiale/jiaxian/android/AddPlanItem.vue +447 -0
  66. package/src/filiale/jiaxian/android/PhoneUpUserinfo.vue +1229 -0
  67. package/src/filiale/jiaxian/android/SafecheckDevices.vue +6 -6
  68. package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2807 -0
  69. package/src/filiale/jiaxian/android/SafecheckUserInfo.vue +784 -0
  70. package/src/filiale/jiaxian/android.js +4 -0
  71. package/src/filiale/kelai/pc/CheckPlanAreaList.vue +15 -7
  72. package/src/filiale/qianneng/android/SafecheckOrderV.vue +1 -1
  73. package/src/filiale/qingtongxia/android/AddPlanItem.vue +450 -0
  74. package/src/filiale/qingtongxia/android/CurrentCreate.vue +1053 -0
  75. package/src/filiale/qingtongxia/android/PhoneUpUserinfo.vue +1230 -0
  76. package/src/filiale/qingtongxia/android/SafecheckUserInfo.vue +782 -0
  77. package/src/filiale/qingtongxia/android.js +4 -0
  78. package/src/filiale/ruihua/android/SafecheckOrderV.vue +2747 -0
  79. package/src/filiale/ruihua/android/SafecheckUserInfo.vue +804 -0
  80. package/src/filiale/ruihua/android.js +11 -0
  81. package/src/filiale/shanxian/android/SafecheckOrderV.vue +1 -1
  82. package/src/filiale/shanxian/pc/checkUserList.vue +4 -4
  83. package/src/filiale/siyang/android/AddPlanItem.vue +450 -0
  84. package/src/filiale/siyang/android/AppCheckPlan.vue +246 -0
  85. package/src/filiale/siyang/android/CurrentCreate.vue +1051 -0
  86. package/src/filiale/siyang/android.js +4 -0
  87. package/src/filiale/siyang/pc/CheckBookList.vue +396 -0
  88. package/src/filiale/siyang/pc/CheckBookSearchArea.vue +667 -0
  89. package/src/filiale/siyang/pc/CheckPlanAreaList.vue +512 -0
  90. package/src/filiale/siyang/pc/CheckSearchUser.vue +1035 -0
  91. package/src/filiale/siyang/pc/HiddenSituation.vue +167 -0
  92. package/src/filiale/siyang/pc/checkPlanList.vue +367 -0
  93. package/src/filiale/siyang/pc/checkUserList.vue +22 -18
  94. package/src/filiale/siyang/pc.js +6 -0
  95. package/src/filiale/tongchuan/android/Select.vue +421 -0
  96. package/src/filiale/tongchuan/android.js +1 -0
  97. package/src/filiale/tongchuan/pc/CheckPlanCountChartArea.vue +3 -1
  98. package/src/filiale/tongchuan/pc/DefectPaperWeiXiu.vue +6 -2
  99. package/src/filiale/tongchuan/pc/HiddenSituation.vue +3 -1
  100. package/src/filiale/tongchuan/pc/NewCheckpaper.vue +13 -22
  101. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1 -1
  102. package/src/filiale/tongchuan/pc/SelectCheckPlan.vue +5 -2
  103. package/src/filiale/tongchuan/utils/EventListener.js +29 -0
  104. package/src/filiale/tongchuan/utils/coerceBoolean.js +7 -0
  105. package/src/filiale/weinan/android/SafecheckDevices.vue +1 -1
  106. package/src/filiale/weinan/android/SafecheckOrderV.vue +6 -2
  107. package/src/filiale/weinan/pc/CheckBookSearchUserList.vue +75 -62
  108. package/src/filiale/weinan/pc/CheckDetail.vue +11 -11
  109. package/src/filiale/weinan/pc/DefectPaperNew.vue +31 -0
  110. package/src/filiale/weinan/pc/DeviceChange.vue +1088 -0
  111. package/src/filiale/weinan/pc/checkUserList.vue +49 -113
  112. package/src/filiale/weinan/pc.js +1 -0
  113. package/src/filiale/wuan/android/SafecheckOrderV.vue +1 -0
  114. package/src/filiale/wuan/android/SafecheckUserInfo.vue +4 -0
  115. package/src/filiale/xilan/android/AddPlanItem.vue +457 -0
  116. package/src/filiale/xilan/android/CurrentCreate.vue +1060 -0
  117. package/src/filiale/xilan/android.js +11 -0
  118. package/src/filiale/xilan/pc/checkUserList.vue +772 -0
  119. package/src/filiale/xilan/pc.js +12 -0
  120. package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +10 -6
  121. package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +21 -1
  122. package/src/filiale/yangchunboneng/pc/CheckBookSearchUser.vue +23 -11
  123. package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +6 -6
  124. package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +96 -30
  125. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +10 -10
  126. package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +10 -10
  127. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +84 -10
  128. package/src/filiale/yangchunboneng/pc/PaperList.vue +6 -6
  129. package/src/filiale/yuansheng/android/SafecheckDevices.vue +11 -1
  130. package/src/filiale/yuansheng/pc/NewCheckpaper.vue +10 -2
  131. package/src/main-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.js +24 -0
  132. package/src/safecheck-android.js +307 -296
  133. package/src/safecheck-page.js +12 -0
  134. package/src/safecheck.js +3 -0
@@ -0,0 +1,1035 @@
1
+ <template>
2
+ <div class="flex">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
7
+ <div :class="$parent.$parent.style">
8
+ <label class="font_normal_body">用户编号</label>
9
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
10
+ id="f_userinfo_code" placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
11
+ </div>
12
+ <div :class="$parent.$parent.style">
13
+ <label class="font_normal_body">用户姓名</label>
14
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name" id="f_user_name"
15
+ placeholder="用户姓名" condition="f_user_name like '%{}%'">
16
+ </div>
17
+ <div :class="$parent.$parent.style">
18
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
19
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
20
+ id="f_residential_area" placeholder="小区" condition="f_residential_area like '%{}%'">
21
+ </div>
22
+ <div :class="$parent.$parent.style">
23
+ <label class="font_normal_body">地&emsp;&emsp;址</label>
24
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_address" id="f_address"
25
+ placeholder="地址" condition="f_address like '%{}%'">
26
+ </div>
27
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
28
+ <export-excel-safe :data="$parent.$parent.searchData" :field="$parent.$parent.excelHeaders"
29
+ :choose-col="true" sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案"
30
+ template-name='用户安检情况'></export-excel-safe>
31
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
32
+ <div style="float: right" class="button_spacing"
33
+ :class="{ 'button_shrink_left': $parent.$parent.$parent.showItem, 'button_shrink_right': !$parent.$parent.$parent.showItem }"
34
+ @click="$parent.$parent.hiddenr()"></div>
35
+ <div style="float: right" class="button_spacing"
36
+ :class="{ 'button_shrink_top': $parent.$parent.criteriaShow, 'button_shrink_bottom': !$parent.$parent.criteriaShow }"
37
+ @click="$parent.$parent.hidden()">
38
+
39
+ </div>
40
+ </div>
41
+
42
+
43
+ </div>
44
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
45
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
46
+ <label class="font_normal_body">用户类型</label>
47
+ <v-select id="f_usertype" placeholder='用户类型' class="select select_list" :value.sync="model.f_usertype"
48
+ :value-single="true" :options='$parent.$parent.usertypes' v-model="model.f_usertype"
49
+ condition="f_user_type = '{}'" close-on-select clear-button></v-select>
50
+ </div>
51
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
52
+
53
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
54
+ <label class="font_normal_body" style="color: red;">安检筛选</label>
55
+ <v-select placeholder='安检筛选' :value-single="true" class="select select_list"
56
+ :value.sync="$parent.$parent.SafeCheckXZ" :options='$parent.$parent.SafeCheckXZs'
57
+ v-model="$parent.$parent.SafeCheckXZ" close-on-select clear-button></v-select>
58
+ </div>
59
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
60
+ <label class="font_normal_body">安检起始</label>
61
+ <datepicker :value.sync="model.f_check_start" placeholder='最后安检时间起始' style="width: 60%"
62
+ :format="'yyyy-MM-dd 00:00:00'" :show-rest-button="reset" v-model="model.f_check_start">
63
+ </datepicker>
64
+ </div>
65
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
66
+ <label class="font_normal_body">安检结束</label>
67
+ <datepicker :value.sync="model.f_check_end" placeholder='最后安检时间结束' style="width: 60%"
68
+ :format="'yyyy-MM-dd 23:59:59'" :show-rest-button="reset" v-model="model.f_check_end">
69
+ </datepicker>
70
+ </div>
71
+
72
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
73
+ <label class="font_normal_body">安检状态</label>
74
+ <v-select id="f_entry" placeholder='安检状态' :multiple="true" class="select select_list"
75
+ :value.sync="$parent.$parent.checkStates" :options='$parent.$parent.checkstatus'></v-select>
76
+ </div>
77
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
78
+ <label class="font_normal_body">隐患情况</label>
79
+ <v-select placeholder='隐患情况' class="select select_list" :value-single="true"
80
+ v-model='model.f_check_result' :value.sync="model.f_check_result"
81
+ :options='$parent.$parent.f_check_results' condition="f_defect_content like '%{}%'" close-on-select
82
+ clear-button></v-select>
83
+ </div>
84
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
85
+ </div>
86
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
87
+
88
+ <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
89
+ <role-selector-safe role-name="安检员" role-lable="安&nbsp;检&nbsp;员&nbsp;" @re-res="$parent.$parent.getRes"
90
+ :value.sync="model.f_checker_id" v-model="model.f_checker_id" :value-multiple="true"
91
+ condition=" f_checker_name in {}">
92
+ </role-selector-safe>
93
+ </div>
94
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
95
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
96
+ <v-select class="select_list select" placeholder='片区/管理站' style="width: 60%"
97
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area" :options='$parent.$parent.sliceArea'
98
+ filer-key="name" close-on-select clear-button condition="f_slice_area='{}'"
99
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)" :value-single="true">
100
+ </v-select>
101
+ </div>
102
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
103
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
104
+ <v-select class="select_list select" placeholder='抄表册' style="width: 60%"
105
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num" :options='$parent.$parent.cbc'
106
+ filer-key="name" close-on-select clear-button condition="f_meter_book_num={}" :value-single="true">
107
+ </v-select>
108
+ </div>
109
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
110
+ <label class="font_normal_body">省&ensp;市&ensp;区</label>
111
+ <v-select class="select_list select" placeholder='请选择' style="width: 60%" :value.sync="model.f_pcd"
112
+ v-model="model.f_pcd" :options='$parent.$parent.pcds' filer-key="name" close-on-select clear-button
113
+ condition="f_pcd='{}'" :value-single="true">
114
+ </v-select>
115
+ </div>
116
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
117
+ <label class="font_normal_body">用户状态</label>
118
+ <v-select class="select_list select" placeholder='用户状态' style="width: 60%"
119
+ :value.sync="model.f_user_state" v-model="model.f_user_state" :options='$parent.$parent.userstates'
120
+ close-on-select clear-button condition="f_user_state = '{}'" :value-single="true">
121
+ </v-select>
122
+ </div>
123
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
124
+ <label class="font_normal_body">距上次安检天数</label>
125
+ <input type="number" class="input_search" v-model="model.f_check_date" style="width: 60%"
126
+ placeholder="距上次安检天数">
127
+ </div>
128
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
129
+ <label class="font_normal_body">到访不遇次数</label>
130
+ <input type="number" class="input_search" v-model="model.f_check_version" style="width: 60%"
131
+ placeholder="到访不遇次数">
132
+ </div>
133
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
134
+ <label class="font_normal_body">安检次数</label>
135
+ <input style="width: 60%" type="text" class="input_search" v-model="model.anjiancishu" placeholder="安检次数"
136
+ condition="anjiancishu = '{}'">
137
+ </div>
138
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
139
+ <label class="font_normal_body">连续安检</label>
140
+ <datepicker
141
+ :value.sync="model.f_check_start_continuity"
142
+ placeholder='连续安检时间起始'
143
+ style="width: 60%"
144
+ :format="'yyyy-MM-dd 00:00:00'"
145
+ :show-rest-button="reset"
146
+ v-model="model.f_check_start_continuity">
147
+ </datepicker>
148
+ </div>
149
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
150
+ <label class="font_normal_body">连续安检</label>
151
+ <datepicker
152
+ :value.sync="model.f_check_end_continuity"
153
+ placeholder='连续安检时间结束'
154
+ style="width: 60%"
155
+ :format="'yyyy-MM-dd 23:59:59'"
156
+ :show-rest-button="reset"
157
+ v-model="model.f_check_end_continuity">
158
+ </datepicker>
159
+ </div>
160
+
161
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
162
+ <label class="font_normal_body">连续安检状态</label>
163
+ <v-select placeholder='安检状态'
164
+ :value.sync="model.f_entry_status_continuity"
165
+ v-model="model.f_entry_status_continuity"
166
+ class="select select_list"
167
+ :value-single="true"
168
+ close-on-select
169
+ :options='$parent.$parent.entry_status'
170
+ ></v-select>
171
+ </div>
172
+ </div>
173
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
174
+ <div :class="$parent.$parent.style">
175
+ <label class="font_normal_body">用户编号</label>
176
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_userinfo_code"
177
+ placeholder="用户编号" condition="f_userinfo_code like '%{}%'">
178
+ </div>
179
+ <div :class="$parent.$parent.style">
180
+ <label class="font_normal_body">用户姓名</label>
181
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_user_name" placeholder="用户姓名"
182
+ condition="f_user_name like '%{}%'">
183
+ </div>
184
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
185
+ <export-excel-safe :data="$parent.$parent.searchData" :field="$parent.$parent.excelHeaders"
186
+ sqlurl="rs/logic/SafeExportExcel" sql-name="根据安检员查询用户档案" template-name='用户安检情况'></export-excel-safe>
187
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
188
+ <div style="float: right" class="button_spacing"
189
+ :class="{ 'button_shrink_left': $parent.$parent.$parent.showItem, 'button_shrink_right': !$parent.$parent.$parent.showItem }"
190
+ @click="$parent.$parent.hiddenr()"></div>
191
+ <div style="float: right" class="button_spacing"
192
+ :class="{ 'button_shrink_top': $parent.$parent.criteriaShow, 'button_shrink_bottom': !$parent.$parent.criteriaShow }"
193
+ @click="$parent.$parent.hidden()">
194
+
195
+ </div>
196
+ </div>
197
+
198
+ </div>
199
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
200
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
201
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
202
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_residential_area"
203
+ placeholder="小区" condition="f_residential_area like '%{}%'">
204
+ </div>
205
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
206
+ <label class="font_normal_body">地&emsp;&emsp;址</label>
207
+ <input style="width: 60%" type="text" class="input_search" v-model="model.f_address" placeholder="地址"
208
+ condition="f_address like '%{}%'">
209
+ </div>
210
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
211
+ <label class="font_normal_body">用户类型</label>
212
+ <v-select placeholder='用户类型' class="select select_list" :value.sync="model.f_usertype"
213
+ :value-single="true" :options='$parent.$parent.usertypes' v-model="model.f_usertype"
214
+ condition="f_user_type = '{}'" close-on-select clear-button></v-select>
215
+ </div>
216
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow && !$parent.$parent.$parent.showItem"></div>-->
217
+
218
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
219
+ <label class="font_normal_body" style="color: red;">安检筛选</label>
220
+ <v-select placeholder='安检筛选' :value-single="true" class="select select_list"
221
+ :value.sync="$parent.$parent.SafeCheckXZ" :options='$parent.$parent.SafeCheckXZs'
222
+ v-model="$parent.$parent.SafeCheckXZ" close-on-select clear-button></v-select>
223
+ </div>
224
+
225
+ </div>
226
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
227
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
228
+ <label class="font_normal_body">安检起始</label>
229
+ <datepicker :value.sync="model.f_check_start" placeholder='最后安检时间起始' :disabled-days-of-week="[]"
230
+ style="width: 60%" :format="'yyyy-MM-dd'" :show-rest-button="reset" v-model="model.f_check_start">
231
+ </datepicker>
232
+ </div>
233
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
234
+ <label class="font_normal_body">安检结束</label>
235
+ <datepicker :value.sync="model.f_check_end" placeholder='最后安检时间结束' style="width: 60%"
236
+ :disabled-days-of-week="[]" :format="'yyyy-MM-dd'" :show-rest-button="reset"
237
+ v-model="model.f_check_end">
238
+ </datepicker>
239
+ </div>
240
+
241
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
242
+ <label class="font_normal_body">安检状态</label>
243
+ <v-select placeholder='安检状态' class="select select_list" :value.sync="$parent.$parent.checkStates"
244
+ :options='$parent.$parent.checkstatus' :multiple="true" close-on-select clear-button></v-select>
245
+ </div>
246
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
247
+ <label class="font_normal_body">隐患情况</label>
248
+ <v-select placeholder='隐患情况' class="select select_list" :value-single="true"
249
+ v-model='model.f_check_result' :value.sync="model.f_check_result"
250
+ :options='$parent.$parent.f_check_results' condition="f_defect_content like '%{}%'" close-on-select
251
+ clear-button></v-select>
252
+ </div>
253
+
254
+ </div>
255
+ <!--<div class="row" v-show="$parent.$parent.$parent.showItem">
256
+ <div :class="$parent.$parent.style" v-show="$parent.$parent.criteriaShow">
257
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
258
+ <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">
259
+ </right-tree>
260
+ </div>
261
+
262
+ </div>-->
263
+ </div>
264
+ </criteria>
265
+ <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
266
+ <template partial='head'>
267
+ <tr>
268
+ <th>
269
+ <nobr>用户编号</nobr>
270
+ </th>
271
+ <th>
272
+ <nobr>用户名称</nobr>
273
+ </th>
274
+ <th>
275
+ <nobr>已安检天数</nobr>
276
+ </th>
277
+ <th>
278
+ <nobr>用户电话</nobr>
279
+ </th>
280
+ <th>
281
+ <nobr>用户表号</nobr>
282
+ </th>
283
+ <!-- <th>-->
284
+ <!-- <nobr>气表品牌</nobr>-->
285
+ <!-- </th>-->
286
+ <th>
287
+ <nobr>用户类型</nobr>
288
+ </th>
289
+ <!-- <th>-->
290
+ <!-- <nobr>壁挂炉</nobr>-->
291
+ <!-- </th>-->
292
+ <!-- <th>-->
293
+ <!-- <nobr>灶具</nobr>-->
294
+ <!-- </th>-->
295
+ <th>
296
+ <nobr>小区名称</nobr>
297
+ </th>
298
+ <th style="padding: 0 40px">
299
+ <nobr>地址</nobr>
300
+ </th>
301
+ <th>
302
+ <nobr>安检员</nobr>
303
+ </th>
304
+ <!-- <th>-->
305
+ <!-- <nobr>安检员备注</nobr>-->
306
+ <!-- </th>-->
307
+ <th>
308
+ <nobr>安检日期</nobr>
309
+ </th>
310
+ <th>
311
+ <nobr>安检状态</nobr>
312
+ </th>
313
+ <th>
314
+ <nobr>安检结果</nobr>
315
+ </th>
316
+ <th>
317
+ <nobr>建档日期</nobr>
318
+ </th>
319
+ <th>
320
+ <nobr>通气日期</nobr>
321
+ </th>
322
+ <th v-show="$parent.$parent.$parent.showcode">
323
+ <nobr>二维码</nobr>
324
+ </th>
325
+ </tr>
326
+ </template>
327
+ <template partial='body'>
328
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center;">{{ row.f_userinfo_code }}</td>
329
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center;">{{ row.f_user_name }}</td>
330
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center;">
331
+ {{ $parent.$parent.$parent.dateDiff(row.f_last_check_date) }}</td>
332
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center;">{{ row.f_user_phone }}</td>
333
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center;">{{ row.f_meternumber }}</td>
334
+ <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center;">{{row.f_meter_brand}}</td>-->
335
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center">{{ row.f_user_type }}</td>
336
+ <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_hasfurnace }}</td>-->
337
+ <!-- <td v-bind:class="{newcolor:row.code==1}" style="text-align: center">{{ row.f_safe_haskitchen }}</td>-->
338
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center">{{ row.f_residential_area }}</td>
339
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center">{{ row.f_address }}</td>
340
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center">{{ row.f_checker_name }}</td>
341
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center">{{ row.f_last_check_date }}</td>
342
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center">{{ row.f_last_check_state }}</td>
343
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center">
344
+ {{ row.f_last_check_state != '入户' ? '' : (row.f_last_check_result == '无隐患' ? '无问题' : row.f_last_check_result) }}
345
+ </td>
346
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center">{{ row.f_createfile_date }}</td>
347
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center">{{ row.f_gas_date }}</td>
348
+ <td v-bind:class="{ newcolor: row.code == 1 }" style="text-align: center"
349
+ v-show="$parent.$parent.$parent.showcode">
350
+ <button class="button_spacing button_search-1"
351
+ @click.stop='$parent.$parent.$parent.searchInfo(row.f_userinfo_code)'>点击</button>
352
+ </td>
353
+ </template>
354
+ </data-grid>
355
+ </criteria-paged>
356
+ <modal :show.sync="dialogVisible" style="text-align: center" destroyOnClose={true} v-ref:modal v-if="dialogVisible">
357
+ <div slot="modal-header" class="modal-header">
358
+ <h4 class="modal-title">
359
+ 二维码
360
+ </h4>
361
+ </div>
362
+ <div slot="modal-body" class="modal-body">
363
+ <div id="dd"></div>
364
+ </div>
365
+ <div slot="modal-footer" class="modal-footer">
366
+ <print-element class="btn btn-success width-80" id="dd" styleid='style1' top='40' left='60' width='100%'
367
+ height='100%' v-ref:printelement>打印</print-element>
368
+ <button type="button" class="btn btn-success width-80" @click="dialogVisible = false">确认</button>
369
+ <button type="button" class="btn btn-success width-80" @click="dialogVisible = false">取消</button>
370
+ </div>
371
+ </modal>
372
+ </div>
373
+
374
+ </template>
375
+
376
+ <script>
377
+ import { PagedList } from 'vue-client'
378
+ import { HttpResetClass } from 'vue-client'
379
+ import co from 'co'
380
+ import * as Util from './../../Util'
381
+ import Vue from 'vue'
382
+
383
+ // let select = function * (self,userid) {
384
+ // let http = new HttpResetClass()
385
+ // let getGasman = yield http.load('POST','/rs/search', {
386
+ // source: 'this.getChildByName($安检员$).getUsers()',
387
+ // userid: userid
388
+ // }, {resolveMsg: null, rejectMsg: null})
389
+ // //tag
390
+ // getGasman.data.forEach((checker)=>{
391
+ // self.checkersid.push({label:checker.name,value:checker.id})
392
+ // })
393
+ // self.checkersid.push({label:'全部',value:''})
394
+ // }
395
+
396
+
397
+ export default {
398
+ title: '用户安检情况',
399
+ data() {
400
+ let options = []
401
+ let year = (new Date()).getFullYear()
402
+ for (let i = year; i <= year + 3; i++)
403
+ options.push({ label: i + '', value: i + '' })
404
+ let moptions = []
405
+ for (let i = 1; i <= 12; i++)
406
+ moptions.push({ label: i + '', value: i + '' })
407
+
408
+ return {
409
+ dialogVisible: false,
410
+ searchData: {
411
+ condition: '1=1',
412
+ orderitem: "f_last_check_date",
413
+ timetype: "dd",
414
+ f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', tp.f_defect_content ) > 0 THEN '正常' ELSE replace(replace(replace( replace( RIGHT ( tp.f_defect_content, len( tp.f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
415
+ },
416
+ excelHeaders: {
417
+ //用户编号 用户名称 用户电话 安检次数 用户类型 小区名称 地址 安检日期 安检状态 安检结果
418
+
419
+ 'f_userinfo_code': '用户编号',
420
+ 'f_user_name': '用户名称',
421
+ 'f_user_phone': '用户电话',
422
+ 'f_meternumber': '用户表号',
423
+ 'f_user_type': '用户类型',
424
+ 'f_checker_name': '安检员',
425
+ 'f_residential_area': '小区名称',
426
+ 'f_address': '地址',
427
+ 'f_last_check_date': '安检日期',
428
+ 'f_last_check_state': '安检状态',
429
+ 'f_last_check_result': '安检结果',
430
+ 'f_createfile_date': '建档日期',
431
+ 'f_gas_date': '通气日期'
432
+ },
433
+ model: new PagedList('rs/sql/根据安检员查询用户档案', 20, {
434
+ orderitem: "'f_last_check_date'",
435
+ timetype: "'dd'",
436
+ f_defect_content: 'this.f_defect_content'
437
+ }),
438
+ f_defect_content: "CASE WHEN CHARINDEX( '\"result\":\"正常\"', tp.f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( tp.f_defect_content, len( tp.f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END",
439
+ orgstrs: [{ label: '全部', value: '' }],
440
+ checkersid: [],
441
+ checkStates: [],
442
+ SafeCheckXZ: '',
443
+ civil: '', //民用安检周期
444
+ civilian: '', //非民用安检周期
445
+ entry_status:[{label: '入户', value: '入户'}, {label: '拒检', value: '拒检'}, {label: '到访不遇', value: '到访不遇'}],
446
+ SafeCheckXZs: [{ label: '全部', value: '' }, { label: '未安检', value: '未安检' }, { label: '已安检', value: '已安检' }], // 安检筛选选项
447
+ SafeCheckSXs: [{ label: '是', value: '是' }, { label: '否', value: '否' }, { label: '全部', value: '' }],
448
+ // user_states:[{label: '全部', value: ''}, ...this.$appdata.getParam('用户状态')],
449
+ IsShares: [{ label: '是', value: '是' }, { label: '否', value: '否' }],
450
+ IsShare: '否',
451
+ checker: {},
452
+ NoBuys: [{ label: '是', value: '是' }, { label: '否', value: '否' }],
453
+ criteriaShow: false,
454
+ checkers: [],
455
+ showcode: false,
456
+ chosenOrg: { id: 0 },
457
+ showModal: false,
458
+ checkedAll: false,
459
+ checkrows: [],
460
+ adjustables: [],
461
+ f_plan_year: year + '',
462
+ f_plan_month: moptions[new Date().getMonth()].value,
463
+ f_effective_start_time: '', //计划有效起始时间
464
+ f_effective_end_time: '', //计划有效结束时间
465
+ checkboxModel: {},
466
+ c_year_list: options,
467
+ c_month_list: moptions,
468
+ // areas: this.areas(),
469
+ checkstatus: this.checkstatus(),
470
+ usertypes: this.usertypes(),
471
+ userstates: this.userstates(),
472
+ sqlname: '',
473
+ f_check_results: [{ label: '全部', value: '' }, { label: '正常', value: '正常' }, { label: '有隐患', value: '有隐患' }],
474
+ creatPlanWay: '',
475
+ sliceArea: [],
476
+ cbcs: [],
477
+ cbc: [],
478
+ pcds: []
479
+ }
480
+ },
481
+ props: {
482
+ style: {
483
+ type: String,
484
+ default: 'col-sm-2 form-group'
485
+ },
486
+ style2: {
487
+ type: String,
488
+ default: 'col-sm-4 form-group'
489
+ },
490
+ checkplan: { // 传入一条安检计划信息
491
+ type: Object
492
+ },
493
+ additemshow: {
494
+ type: Boolean,
495
+ default: false
496
+ }
497
+ },
498
+ ready() {
499
+ // 获取分公司信息
500
+ this.model.f_defect_content = this.f_defect_content
501
+ this.showcode = this.$appdata.getSingleValue('用户安检情况二维码')
502
+ //this.getfengongsi()
503
+ this.model.chosenOrg = { id: 0 }
504
+ this.model.f_filialeids = this.$login.f.f_orgids
505
+ this.model.f_filiale = this.$login.f.f_fengongsi
506
+ this.model.f_OrgStr = this.$login.f.orgpathstr
507
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
508
+ this.getAllMeterBook(`('${this.$login.f.orgid}')`)
509
+ },
510
+ methods: {
511
+
512
+ dateDiff(date1Str) {
513
+ // 确保传入的date1Str是有效的字符串格式
514
+ if (typeof date1Str !== 'string' || !/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(date1Str)) {
515
+ throw new Error('Invalid date format. Expected format: yyyy-mm-dd hh:mm:ss');
516
+ }
517
+ // 将date1Str格式化为Date对象,并提取日期部分
518
+ const date1 = new Date(date1Str);
519
+ const year = date1.getFullYear();
520
+ const month = String(date1.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以需要加1
521
+ const day = String(date1.getDate()).padStart(2, '0');
522
+ const formattedDate1 = `${year}-${month}-${day}`;
523
+ // 获取当前日期,并同样格式化为yyyy-mm-dd
524
+ const date2 = new Date();
525
+ const currentYear = date2.getFullYear();
526
+ const currentMonth = String(date2.getMonth() + 1).padStart(2, '0');
527
+ const currentDay = String(date2.getDate()).padStart(2, '0');
528
+ const formattedDate2 = `${currentYear}-${currentMonth}-${currentDay}`;
529
+ // 将格式化后的日期字符串转换为Date对象,以便比较
530
+ const formattedDate1Obj = new Date(`${formattedDate1}T00:00:00`); // 添加时间部分以确保比较准确
531
+ const formattedDate2Obj = new Date(`${formattedDate2}T00:00:00`);
532
+ // 计算两个日期之间的差值(以毫秒为单位),然后转换为天数
533
+ const diffInMilliseconds = Math.abs(formattedDate2Obj - formattedDate1Obj);
534
+ const diffInDays = Math.ceil(diffInMilliseconds / (1000 * 60 * 60 * 24));
535
+ // 返回天数差
536
+ return diffInDays;
537
+ },
538
+ //查询二维码
539
+ searchInfo(val) {
540
+ this.dialogVisible = true
541
+ //tag
542
+ new HttpResetClass().load('POST', 'rs/logic/QrcodeUtil', {
543
+ data: {
544
+ id: val
545
+ }
546
+ }, { resolveMsg: null, rejectMsg: null }).then(res => {
547
+ //tag
548
+ //tag
549
+ let imageer = new Image()
550
+ imageer.src = "data:image/jpg;base64," + res.data.result
551
+ document.getElementById("dd").appendChild(imageer);
552
+ //tag
553
+ })
554
+
555
+ },
556
+ //获取省市区列表
557
+ getPcd(val) {
558
+ this.pcds = [{ label: '全部', value: '' }]
559
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
560
+ { data: { items: "*", tablename: "t_pcd", orderitem: "id", condition: `f_orgid in ${val}` } },
561
+ { resolveMsg: null, rejectMsg: null }).then((pcdlist) => {
562
+ pcdlist.data.forEach((result) => {
563
+ this.pcds.push({ label: result.f_pcd, value: result.f_pcd })
564
+ })
565
+ })
566
+ },
567
+ getmeterbook(val) {
568
+
569
+ //tag
570
+ this.cbc = []
571
+ this.cbc.push({
572
+ label: '全部',
573
+ value: ''
574
+ })
575
+ if (val == '') {
576
+
577
+ this.cbcs.forEach(res => {
578
+ this.cbc.push({
579
+ label: res.f_book_name,
580
+ value: res.id
581
+ })
582
+ })
583
+ } else {
584
+ this.cbcs.forEach(res => {
585
+ if (res.f_book_slice_area == val) {
586
+ this.cbc.push({
587
+ label: res.f_book_name,
588
+ value: res.id
589
+ })
590
+ }
591
+ })
592
+ }
593
+ },
594
+ Mreadibook(val) {
595
+ ////tag
596
+ ////tag
597
+ if (val) {
598
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
599
+ data: {
600
+ items: 'name',
601
+ tablename: 't_zone',
602
+ condition: `parentid in ${val}`,
603
+ orderitem: 'id'
604
+ }
605
+ }, { resolveMsg: null, rejectMsg: null }).then((res) => {
606
+ this.sliceArea = []
607
+ this.sliceArea.push({
608
+ label: '全部',
609
+ value: ''
610
+ })
611
+ res.data.forEach(ress => {
612
+ this.sliceArea.push({
613
+ label: ress.name,
614
+ value: ress.name
615
+ })
616
+ })
617
+
618
+ })
619
+ }
620
+ },
621
+ // 获取县域分公司内容
622
+ getfengongsi() {
623
+ let val = {
624
+ source: 'this.getParentByType($organization$).getSpecialResByType($organization$)',
625
+ userid: `${this.$login.f.id}`
626
+ }
627
+ let http = new HttpResetClass()
628
+ http.load('POST', '/rs/search', { data: val }, { resolveMsg: null, rejectMsg: null }).then((res) => {
629
+ res.data.forEach((item) => {
630
+ this.orgstrs.push({ label: item.name, value: item.id })
631
+ })
632
+ //tag
633
+ })
634
+ },
635
+ // 县域分公司发生改变
636
+ // orgstrchange(val){
637
+ // if(val == undefined || val == ''){
638
+ // return
639
+ // }else {
640
+ // this.checkersid = []
641
+ // let gen = select(this,val)
642
+ // return co(gen)
643
+ // }
644
+ // },
645
+ getDefect(val) {
646
+ if (val) {
647
+ try {
648
+ var defect = JSON.parse(val)
649
+ return defect.result
650
+ } catch (e) {
651
+ //tag
652
+ return '正常'
653
+ }
654
+ }
655
+ return '正常'
656
+ },
657
+ checkerchange(val) {
658
+ this.checkboxModel.f_checker = val.name
659
+ this.checkboxModel.f_checker_id = val.id
660
+ },
661
+ search(args) {
662
+ if (this.SafeCheckXZ && (args.model.f_check_start == '' || args.model.f_check_end == '')) {
663
+ this.$showMessage('如果选择 已安检/未安检 选项,需要选择 安检起始时间!')
664
+ return
665
+ }
666
+ if ((args.model.f_check_start || args.model.f_check_end) && !this.SafeCheckXZ) {
667
+ this.$showMessage('如果录入 安检起始时间,需要选择 安检筛选条件!')
668
+ return
669
+ }
670
+ /*if (this.SafeCheckXZ == '未安检') {
671
+ args.condition += " and ( f_last_check_date >= '" + args.model.f_check_start + "' or f_last_check_date <= '" + args.model.f_check_end + "' or f_last_check_date is null)"
672
+ } else {
673
+ if (args.model.f_check_start) {
674
+ args.condition += " and f_last_check_date >= '" + args.model.f_check_start + "'"
675
+ }
676
+ if (args.model.f_check_end) {
677
+ args.condition += " and f_last_check_date <= '" + args.model.f_check_end + "'"
678
+ }
679
+ }*/
680
+ args.condition += " and f_filialeid in " + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
681
+ let con = ' f_filialeid in ' + (this.model.f_filialeids ? this.model.f_filialeids : `(${this.$login.f.orgid})`)
682
+ con += args.model.f_userinfo_code ? ` and f_userinfo_code like '%${args.model.f_userinfo_code}%'` : ''
683
+ /*con += args.model.f_user_name ? ` and f_user_name like '%${args.model.f_user_name}%'` : ''
684
+ con += args.model.f_residential_area ? ` and f_residential_area like '%${args.model.f_residential_area}%'` : ''
685
+ con += args.model.f_address ? ` and f_address like '%${args.model.f_address}%'` : ''
686
+ con += args.model.f_usertype ? ` and f_check_type = '${args.model.f_usertype}'` : ''*/
687
+ if (this.SafeCheckXZ) {
688
+ con += ` and f_offsite_time >= '${args.model.f_check_start}' and f_offsite_time <= '${args.model.f_check_end}' `
689
+ if (this.SafeCheckXZ == '未安检') {
690
+ args.condition += ' and ruhuid is null'
691
+ } else {
692
+ args.condition += ' and ruhuid is not null'
693
+ }
694
+ }
695
+ let states = ` (`
696
+ if (this.checkStates.length > 0) {
697
+ for (let i = 0; i < this.checkStates.length; i++) {
698
+ if (this.checkStates[i]) {
699
+ states += `'${this.checkStates[i]}',`
700
+ } else {
701
+ states = ''
702
+ break
703
+ }
704
+ }
705
+ if (states) {
706
+ states = states.substring(0, states.length - 1)
707
+ states += `) `
708
+ args.condition += ` and f_last_check_state in ${states}`
709
+ }
710
+ } else {
711
+ states = ''
712
+ }
713
+ if (args.model.f_check_date) {
714
+ const daysBefore = Number(args.model.f_check_date);
715
+ if (daysBefore > 0) {
716
+ // 获取当前日期
717
+ const now = new Date();
718
+ // 计算三天前的日期
719
+ const threeDaysBefore = new Date(now.getTime() - (daysBefore * 24 * 60 * 60 * 1000));
720
+ // 如果需要格式化日期,可以使用Date对象的方法
721
+ var formattedDate = threeDaysBefore.toISOString().split('T')[0];
722
+ args.condition += ` and f_last_check_date<='${formattedDate} 23:59:59'`;
723
+ } else {
724
+ console.error('f_check_date不是一个有效的正整数');
725
+ }
726
+ }
727
+ if (args.model.f_check_version) {
728
+ con += ` and f_check_version = '${args.model.f_check_version}'`
729
+ }
730
+ con += args.model.f_checker_id ? ` and f_checker_name in ${args.model.f_checker_id}` : ' and 1=1'
731
+
732
+ let cn = ' 1=1 '
733
+ if (args.model.f_check_start_continuity || args.model.f_check_end_continuity || args.model.f_entry_status_continuity){
734
+ if (args.model.f_check_start_continuity && args.model.f_check_end_continuity && args.model.f_entry_status_continuity){
735
+ cn += ` and f_offsite_time >= '${args.model.f_check_start_continuity}' and f_offsite_time <= '${args.model.f_check_end_continuity}'`
736
+ switch (args.model.f_entry_status_continuity) {
737
+ case '到访不遇' : args.condition += ` and f_ruhu = 0 and f_jujian = 0 and f_buyu > 0`
738
+ break
739
+ case '入户' : args.condition += ` and f_ruhu > 0 and f_jujian = 0 and f_buyu = 0`
740
+ break
741
+ case '拒检' : args.condition += ` and f_ruhu = 0 and f_jujian > 0 and f_buyu = 0`
742
+ break
743
+ }
744
+ }else {
745
+ this.$showMessage('请选择连续安检时间起始、连续安检时间结束以及连续安检状态条件!')
746
+ }
747
+ }
748
+ let condition = {
749
+ condition1: args.condition,
750
+ condition2: con,
751
+ condition3: cn
752
+ }
753
+ this.searchData.condition = condition
754
+ return this.model.search(condition, args.model)
755
+ },
756
+ checkstatus() {
757
+ return this.$appdata.getParam('安检状态') ? [{
758
+ label: '全部',
759
+ value: ''
760
+ }, ...this.$appdata.getParam('安检状态')] : [{ label: '全部', value: '' }]
761
+ },
762
+ usertypes() {
763
+ return this.$appdata.getParam('用户类型') ? [{
764
+ label: '全部',
765
+ value: ''
766
+ }, ...this.$appdata.getParam('用户类型')] : [{ label: '全部', value: '' }]
767
+ },
768
+ userstates() {
769
+ return this.$appdata.getParam('用户状态') ? [{
770
+ label: '全部',
771
+ value: ''
772
+ }, ...this.$appdata.getParam('用户状态')] : [{ label: '全部', value: '' }]
773
+ },
774
+ hiddenr() {
775
+ this.$parent.showItem = !this.$parent.showItem
776
+ },
777
+ hidden() {
778
+ this.criteriaShow = !this.criteriaShow
779
+ },
780
+ confirm() {
781
+ if (!this.checkboxModel.f_plan_name) {
782
+ this.$showMessage('请填写安检计划名称!')
783
+ return
784
+ }
785
+ // if(this.f_effective_start_time == ''){
786
+ // this.$showMessage('请选择有效起始日期!')
787
+ // return
788
+ // }
789
+ // if(this.f_effective_end_time == ''){
790
+ // this.$showMessage('请选择有效结束日期!')
791
+ // return
792
+ // }
793
+ if (this.IsShare == '否') {
794
+ if (!this.checkboxModel.f_checker_id) {
795
+ this.$showMessage('请选择安检员!')
796
+ return
797
+ }
798
+ }
799
+ let gen = saveGen(this)
800
+ return co(gen)
801
+ },
802
+ changeStates() {
803
+ if (this.checkedAll) {//实现反选/
804
+ this.checkrows = [];
805
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
806
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
807
+ }
808
+ } else {//实现全选
809
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
810
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
811
+ }
812
+ let _this = this
813
+ let condition = this.$refs.paged.$refs.criteria.condition
814
+ let url = this.model.url
815
+ this.$resetpost(`${url}?pageSize=9999999`, {
816
+ data: {
817
+ condition: condition,
818
+ groupitem: '',
819
+ orderitem: 'f_residential_area',
820
+ f_usertype: this.model.f_usertype,
821
+ f_filialeids: this.model.f_filialeids,
822
+ month: this.model.month,
823
+ safeCycle: this.model.safeCycle,
824
+ f_checktime_start: this.model.f_checktime_start,
825
+ f_checktime_end: this.model.f_checktime_end,
826
+ SafeCheckSX: this.model.SafeCheckSX,
827
+ f_last_check_state: this.model.f_last_check_state
828
+ },
829
+ }, { resolveMsg: null, rejectMsg: null }, -1).then(
830
+ (respanse) => {
831
+ if (respanse.data.length >= 5000) {
832
+ this.$showMessage("数据量太大,请重新选择")
833
+ } else {
834
+ _this.checkrows = []
835
+ for (let j = 0; j < respanse.data.length; j++) {
836
+ _this.checkrows.push(respanse.data[j])
837
+ }
838
+ //tag;
839
+ }
840
+ })
841
+ }
842
+ },
843
+ addChecked(item) {
844
+ //tag;
845
+ if (!item.checked) {
846
+ this.checkrows.push(item);
847
+ //tag;
848
+ } else {
849
+ for (let i = 0; i < this.checkrows.length; i++) {
850
+ if (item.f_userinfo_id == this.checkrows[i].f_userinfo_id) {
851
+ this.checkrows.splice(i, 1)
852
+ }
853
+ }
854
+ }
855
+ },
856
+ ToshowModal() {
857
+ this.creatPlanWay = 'single'
858
+ if (this.checkrows.length > 0) {
859
+ this.showModal = true
860
+ } else {
861
+ this.$showMessage("请选择需要安检的用户!")
862
+ }
863
+ },
864
+ FiltrationPlan() {
865
+ if (this.model.rows.length == 0) {
866
+ this.$showMessage("暂无可生成的计划!")
867
+ return
868
+ }
869
+ this.creatPlanWay = 'filtration'
870
+ this.showModal = true
871
+ },
872
+ AllPlan() {
873
+ if (this.model.rows.length == 0) {
874
+ this.$showMessage("暂无可生成的计划!")
875
+ return
876
+ }
877
+ this.creatPlanWay = 'all'
878
+ this.showModal = true
879
+ },
880
+ cancel() {
881
+ this.showModal = false
882
+ },
883
+ /*areas() {
884
+ let rs = []
885
+ for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
886
+ let temp = {
887
+ label: this.$login.f.f_allArea[i].label,
888
+ value: this.$login.f.f_allArea[i].label
889
+ }
890
+ rs.push(temp)
891
+ }
892
+ return [{label: '全部', value: ''}, ...rs]
893
+ },*/
894
+ initAdjustables() {
895
+ //tag
896
+ let arr = []
897
+ let filter = this.$login.f.f_orgids
898
+ this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
899
+ let temp = {}
900
+ temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
901
+ temp.value = `${item.value.id}`
902
+ arr.push(temp)
903
+ })
904
+ this.adjustables = [{ label: '全部', value: '' }, ...arr]
905
+ },
906
+ getAllMeterBook(val) {
907
+ ////tag
908
+ ////tag
909
+ this.cbcs = []
910
+ if (val) {
911
+ new HttpResetClass().load('POST', `/rs/sql/tel_singleTable_OrderBy`, {
912
+ data: {
913
+ items: 'f_book_name,f_book_slice_area,id',
914
+ tablename: 't_meter_book',
915
+ condition: `f_filiale_id in ${val}`,
916
+ orderitem: 'id'
917
+ }
918
+ }, { resolveMsg: null, rejectMsg: null }).then((res) => {
919
+ res.data.forEach(ress => {
920
+ this.cbcs.push({
921
+ id: ress.id,
922
+ f_book_name: ress.f_book_name,
923
+ f_book_slice_area: ress.f_book_slice_area
924
+ })
925
+ })
926
+ this.cbc = []
927
+ this.cbc.push({
928
+ label: '全部',
929
+ value: ''
930
+ })
931
+ this.cbcs.forEach(res => {
932
+ this.cbc.push({
933
+ label: res.f_book_name,
934
+ value: res.id
935
+ })
936
+ })
937
+ })
938
+ }
939
+ },
940
+ getRes(obj) {
941
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids);
942
+ this.Mreadibook(this.model.f_filialeids)
943
+ this.getAllMeterBook(this.model.f_filialeids)
944
+ this.getPcd(this.model.f_filialeids)
945
+ }
946
+ },
947
+
948
+ watch: {
949
+ 'model.f_usertype'(val) {
950
+ if (val == '民用') {
951
+ this.model.safeCycle = this.civil
952
+ } else if (val == '非民用') {
953
+ this.model.safeCycle = this.civilian
954
+ }
955
+ },
956
+ 'model.SafeCheckXZ'(val) {
957
+ this.model.SafeCheckSC = ''
958
+ if (val == '已安检') {
959
+ this.model.SafeCheckCQ = ''
960
+ this.model.SafeCheckSX = {
961
+ f_check_end: '', // 安检时间 查询起始条件
962
+ f_check_start: ''// 安检时间 查询终止条件
963
+ }
964
+ } else {
965
+ // 当使用筛选条件时,清空不需要的条件选项
966
+ this.model.f_issue_start = ''
967
+ this.model.f_issue_end = ''
968
+ this.$refs.paged.$refs.criteria.model.f_check_start = ''
969
+ this.$refs.paged.$refs.criteria.model.f_check_end = ''
970
+ this.$refs.paged.$refs.criteria.model.f_last_check_state = ''
971
+ this.model.month = ''
972
+ if (val == '应安检') {
973
+ this.model.SafeCheckSC = '否'
974
+
975
+ this.model.f_issue_start = Util.toStartDateString()
976
+ this.model.f_issue_end = Util.toStandardDateString()
977
+ }
978
+ // this.model.f_checktime_start = ''
979
+ // this.model.f_checktime_end = ''
980
+ }
981
+ },
982
+ 'model.SafeCheckSC'(val) {
983
+ if (val == '') {
984
+ this.model.f_issue_start = ''
985
+ this.model.f_issue_end = ''
986
+ }
987
+ },
988
+ // 'checker'(val){
989
+ // //tag
990
+ // if(val){
991
+ // this.checkboxModel.f_checker = this.checker[0].name
992
+ // this.checkboxModel.f_checker_id = this.checker[0].id
993
+ // }
994
+ // },
995
+ 'model.rows'() {
996
+ // if (!this.checkedAll) {//实现反选/
997
+ // this.checkrows = [];
998
+ for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
999
+ var k = false
1000
+ for (let j = 0; j < this.checkrows.length; j++) {
1001
+ if (this.$refs.paged.model.rows[i].f_userinfo_id == this.checkrows[j].f_userinfo_id) {
1002
+ this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1003
+ k = true
1004
+ continue
1005
+ }
1006
+ }
1007
+ if (!k) {
1008
+ this.$set('$refs.paged.model.rows[' + i + '].checked', false)
1009
+ }
1010
+ }
1011
+ // } else {//实现全选
1012
+ // // this.checkboxModel = {};
1013
+ // for (let i = 0; i < this.$refs.paged.model.rows.length; i++) {
1014
+ // this.$set('$refs.paged.model.rows[' + i + '].checked', true)
1015
+ // }
1016
+ // }
1017
+ }
1018
+ },
1019
+ computed: {
1020
+ selected() {
1021
+ return this.$refs.paged.$refs.grid.selected
1022
+ }
1023
+ }
1024
+ }
1025
+ </script>
1026
+ <style scoped>
1027
+ .newcolor {
1028
+ color: red;
1029
+ }
1030
+
1031
+ .table th {
1032
+ background-color: #f2f6fa;
1033
+ color: black;
1034
+ }
1035
+ </style>