safecheck-client 3.0.33-11 → 3.0.33-110

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