safecheck-client 3.0.34-1 → 3.0.34-100

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 (183) 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 +1 -0
  9. package/src/components/android/AndroidDefectDealBeforeSafe.vue +502 -0
  10. package/src/components/android/AreaPlan.vue +1 -7
  11. package/src/components/android/AreaSelect.vue +198 -0
  12. package/src/components/android/BuildingSelect.vue +192 -0
  13. package/src/components/android/CheckPlanSelect.vue +229 -0
  14. package/src/components/android/CurrentCreateYy.vue +1051 -0
  15. package/src/components/android/ImgSelfAndroid.vue +181 -181
  16. package/src/components/android/PaperFeedback.vue +34 -1
  17. package/src/components/android/PaperFeedbackTemp.vue +1 -1
  18. package/src/components/android/QRCode/QRCodeBinding.vue +300 -0
  19. package/src/components/android/QRCode/QRCodePage.vue +212 -0
  20. package/src/components/android/SafecheckDevices.vue +4 -4
  21. package/src/components/android/SafecheckDevicesTemp.vue +1 -1
  22. package/src/components/android/SafecheckOrderV.vue +8 -12
  23. package/src/components/android/UserinfoSelect.vue +714 -0
  24. package/src/components/android/examples/410.png +0 -0
  25. package/src/components/android/examples/SafeListExamples.vue +296 -0
  26. package/src/components/android/examples/UserExamples.vue +137 -0
  27. package/src/components/android/examples/ViewDetailsExamples.vue +1235 -0
  28. package/src/components/android/examples/touxiang.png +0 -0
  29. package/src/components/android/userinfo/SafecheckUserInfo.vue +1 -1
  30. package/src/components/pc/SafeVisitInfo.vue +261 -0
  31. package/src/components/rongcheng/AddPlanItem.vue +8 -0
  32. package/src/components/rongcheng/AspiratedAreaPlan.vue +574 -464
  33. package/src/components/rongcheng/AspiratedUserInfo.vue +1 -1
  34. package/src/components/rongcheng/CheckSearchUser.vue +46 -16
  35. package/src/components/rongcheng/PaperStatem.vue +6 -1
  36. package/src/components/rongcheng/PhoneDevicesInfo.vue +16 -1
  37. package/src/components/rongcheng/PhoneUpUserinfo.vue +1236 -1328
  38. package/src/components/rongcheng/SafecheckOrderV.vue +12 -3
  39. package/src/components/rongcheng/SafecheckOrderVCli.vue +9 -0
  40. package/src/filiale/baiyin/android/AndroidDefectDeal.vue +633 -633
  41. package/src/filiale/baiyin/android/SafecheckOrderV.vue +2785 -0
  42. package/src/filiale/baiyin/android.js +11 -10
  43. package/src/filiale/baiyin/pc/CheckPlanAreaList.vue +485 -485
  44. package/src/filiale/baiyin/pc/CheckSearchUser.vue +1067 -1067
  45. package/src/filiale/baiyin/pc/DefectListNew.vue +597 -597
  46. package/src/filiale/baiyin/pc/DefectMainNew.vue +63 -63
  47. package/src/filiale/baiyin/pc/DefectPaperNew.vue +1052 -1052
  48. package/src/filiale/baiyin/pc/PaperList.vue +790 -790
  49. package/src/filiale/baiyin/pc/PlanChooser.vue +167 -167
  50. package/src/filiale/baiyin/pc/PlanManage.vue +834 -834
  51. package/src/filiale/baiyin/pc/RightTreeSafe.vue +348 -348
  52. package/src/filiale/baiyin/pc/RoleSelector.vue +160 -160
  53. package/src/filiale/bayan/android/AddPlanItem.vue +8 -0
  54. package/src/filiale/bayan/android/PaperFeedback.vue +68 -50
  55. package/src/filiale/bayan/android/PhoneUpUserinfo.vue +40 -40
  56. package/src/filiale/bayan/android/SafecheckDevices.vue +1 -1
  57. package/src/filiale/bayan/android/SafecheckOrderV.vue +58 -58
  58. package/src/filiale/bayan/android/SafecheckUserInfo.vue +6 -1
  59. package/src/filiale/bayan/pc/NewCheckpaper.vue +50 -46
  60. package/src/filiale/bayan/pc/PaperList.vue +1 -0
  61. package/src/filiale/dexin/android/SafecheckDevices.vue +1 -1
  62. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +35 -15
  63. package/src/filiale/hanzhong/android/PaperFeedback.vue +1 -1
  64. package/src/filiale/hanzhong/android/SafecheckDevices.vue +1 -1
  65. package/src/filiale/hanzhong/android/SafecheckUserInfo.vue +1 -1
  66. package/src/filiale/huaran/android/SafecheckOrderV.vue +2803 -0
  67. package/src/filiale/huaran/android.js +12 -0
  68. package/src/filiale/huaran/pc/CheckBook.vue +313 -0
  69. package/src/filiale/huaran/pc/CheckBookAll.vue +69 -0
  70. package/src/filiale/huaran/pc/CheckBookArea.vue +170 -0
  71. package/src/filiale/huaran/pc/CheckBookCompany.vue +166 -0
  72. package/src/filiale/huaran/pc/CheckBookDetails.vue +196 -0
  73. package/src/filiale/huaran/pc/CheckBookEntry.vue +61 -0
  74. package/src/filiale/huaran/pc/CheckBookList.vue +386 -0
  75. package/src/filiale/huaran/pc/CheckBookSearchArea.vue +564 -0
  76. package/src/filiale/huaran/pc/CheckBookSearchUnit.vue +229 -0
  77. package/src/filiale/huaran/pc/CheckBookSearchUser.vue +604 -0
  78. package/src/filiale/huaran/pc/CheckBookUser.vue +112 -0
  79. package/src/filiale/huaran/pc/PaperList.vue +822 -0
  80. package/src/filiale/huaran/pc/PlanManage.vue +887 -0
  81. package/src/filiale/huaran/pc/checkPlanList.vue +419 -0
  82. package/src/filiale/huaran/pc/checkUserList.vue +867 -0
  83. package/src/filiale/huaran/pc.js +27 -0
  84. package/src/filiale/jiaxian/android/AddPlanItem.vue +447 -0
  85. package/src/filiale/jiaxian/android/PhoneUpUserinfo.vue +1229 -0
  86. package/src/filiale/jiaxian/android/SafecheckDevices.vue +1298 -1298
  87. package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2807 -0
  88. package/src/filiale/jiaxian/android/SafecheckUserInfo.vue +784 -0
  89. package/src/filiale/jiaxian/android.js +14 -10
  90. package/src/filiale/jiaxian/pc.js +12 -12
  91. package/src/filiale/jingyang/android/PaperFeedback.vue +1 -1
  92. package/src/filiale/jingyang/android/SafecheckUserInfo.vue +1 -1
  93. package/src/filiale/kelai/pc/CheckPlanAreaList.vue +15 -7
  94. package/src/filiale/pingxiang/android/PaperFeedback.vue +1 -1
  95. package/src/filiale/qianneng/android/SafecheckOrderV.vue +1 -1
  96. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1270 -1270
  97. package/src/filiale/qingjian/android/SafecheckDevices.vue +1 -1
  98. package/src/filiale/qingjian/android/SafecheckOrderV.vue +2844 -2844
  99. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +1 -1
  100. package/src/filiale/qingtongxia/android/AddPlanItem.vue +450 -0
  101. package/src/filiale/qingtongxia/android/CurrentCreate.vue +1053 -0
  102. package/src/filiale/qingtongxia/android/PhoneUpUserinfo.vue +1230 -0
  103. package/src/filiale/qingtongxia/android/SafecheckUserInfo.vue +782 -0
  104. package/src/filiale/qingtongxia/android.js +4 -0
  105. package/src/filiale/ruihua/android/SafecheckOrderV.vue +2747 -0
  106. package/src/filiale/ruihua/android/SafecheckUserInfo.vue +804 -0
  107. package/src/filiale/ruihua/android.js +11 -0
  108. package/src/filiale/shanxian/android/AddPlanItem.vue +447 -0
  109. package/src/filiale/shanxian/android/SafecheckOrderV.vue +1 -1
  110. package/src/filiale/shanxian/android.js +1 -0
  111. package/src/filiale/shanxian/pc/PaperList.vue +785 -0
  112. package/src/filiale/shanxian/pc/checkUserList.vue +4 -4
  113. package/src/filiale/shanxian/pc.js +2 -2
  114. package/src/filiale/shiquan/android/SafecheckDevices.vue +1 -1
  115. package/src/filiale/siyang/android/AddPlanItem.vue +450 -0
  116. package/src/filiale/siyang/android/AppCheckPlan.vue +246 -0
  117. package/src/filiale/siyang/android/CurrentCreate.vue +1051 -0
  118. package/src/filiale/siyang/android/SafecheckUserInfo.vue +1 -1
  119. package/src/filiale/siyang/android.js +4 -0
  120. package/src/filiale/siyang/pc/CheckBookList.vue +396 -0
  121. package/src/filiale/siyang/pc/CheckBookSearchArea.vue +667 -0
  122. package/src/filiale/siyang/pc/CheckPlanAreaList.vue +512 -0
  123. package/src/filiale/siyang/pc/CheckSearchUser.vue +1035 -0
  124. package/src/filiale/siyang/pc/HiddenSituation.vue +167 -0
  125. package/src/filiale/siyang/pc/checkPlanList.vue +367 -0
  126. package/src/filiale/siyang/pc/checkUserList.vue +22 -18
  127. package/src/filiale/siyang/pc.js +6 -0
  128. package/src/filiale/tongchuan/android/SafecheckDevices.vue +2 -2
  129. package/src/filiale/tongchuan/android/Select.vue +421 -0
  130. package/src/filiale/tongchuan/android.js +1 -0
  131. package/src/filiale/tongchuan/pc/CheckPlanCountChartArea.vue +3 -1
  132. package/src/filiale/tongchuan/pc/DefectPaperWeiXiu.vue +6 -2
  133. package/src/filiale/tongchuan/pc/HiddenSituation.vue +3 -1
  134. package/src/filiale/tongchuan/pc/NewCheckpaper.vue +13 -22
  135. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1 -1
  136. package/src/filiale/tongchuan/pc/SelectCheckPlan.vue +5 -2
  137. package/src/filiale/tongchuan/pc/checkUserList.vue +30 -0
  138. package/src/filiale/tongchuan/utils/EventListener.js +29 -0
  139. package/src/filiale/tongchuan/utils/coerceBoolean.js +7 -0
  140. package/src/filiale/weinan/android/SafecheckDevices.vue +1 -1
  141. package/src/filiale/weinan/android/SafecheckOrderV.vue +6 -2
  142. package/src/filiale/weinan/pc/CheckBookSearchUserList.vue +75 -62
  143. package/src/filiale/weinan/pc/CheckDetail.vue +11 -11
  144. package/src/filiale/weinan/pc/DefectPaperNew.vue +31 -0
  145. package/src/filiale/weinan/pc/DeviceChange.vue +1088 -0
  146. package/src/filiale/weinan/pc/checkUserList.vue +49 -113
  147. package/src/filiale/weinan/pc.js +1 -0
  148. package/src/filiale/wuan/android/SafecheckOrderV.vue +5 -1
  149. package/src/filiale/wuan/android/SafecheckUserInfo.vue +10 -5
  150. package/src/filiale/xilan/android/AddPlanItem.vue +457 -0
  151. package/src/filiale/xilan/android/CurrentCreate.vue +1063 -0
  152. package/src/filiale/xilan/android.js +11 -0
  153. package/src/filiale/xilan/pc/checkUserList.vue +772 -0
  154. package/src/filiale/xilan/pc.js +12 -0
  155. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +8 -11
  156. package/src/filiale/yangchunboneng/android/DailyworkloadQuery.vue +8 -13
  157. package/src/filiale/yangchunboneng/android/NewCheckpaperAndroid.vue +1362 -1362
  158. package/src/filiale/yangchunboneng/android/PaperFeedback.vue +1731 -1731
  159. package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1235 -1235
  160. package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +1336 -1332
  161. package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2865 -2845
  162. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +887 -887
  163. package/src/filiale/yangchunboneng/android/safeHistoryLook.vue +8 -13
  164. package/src/filiale/yangchunboneng/pc/CheckBookSearchUser.vue +23 -11
  165. package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +9 -9
  166. package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +96 -30
  167. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1192 -1192
  168. package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +54 -3
  169. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +1046 -944
  170. package/src/filiale/yangchunboneng/pc/PaperList.vue +29 -0
  171. package/src/filiale/yongzhou/android/PaperFeedback.vue +1 -1
  172. package/src/filiale/yongzhou/android/SafecheckDevices.vue +1 -1
  173. package/src/filiale/yongzhou/android/SafecheckUserInfo.vue +1 -1
  174. package/src/filiale/yuansheng/android/SafecheckDevices.vue +11 -1
  175. package/src/filiale/yuansheng/pc/NewCheckpaper.vue +10 -2
  176. package/src/filiale/yunchengminsheng/android/PaperFeedback.vue +1 -1
  177. package/src/filiale/yunchengminsheng/android/SafecheckDevices.vue +1 -1
  178. package/src/filiale/yunchengminsheng/android/SafecheckUserInfo.vue +1 -1
  179. package/src/main-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.js +24 -0
  180. package/src/main.js +33 -33
  181. package/src/safecheck-android.js +307 -296
  182. package/src/safecheck-page.js +12 -0
  183. package/src/safecheck.js +3 -0
@@ -0,0 +1,667 @@
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="basic-main">
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+
9
+ <div class="col-sm-3 form-group" style="margin-bottom: 0px">
10
+ <label class="font_normal_body">公&emsp;&emsp;司</label>
11
+ <right-tree-safe @re-res="$parent.$parent.getResm" v-model="model.f_orgid" condition="ta.f_orgid in {}"></right-tree-safe>
12
+ </div>
13
+ <div class="form-group col-sm-3">
14
+ <label class="font_normal_body">小区名称</label>
15
+ <v-select :value.sync="model.f_residential_area" v-model='model.f_residential_area'
16
+ :value-single="true" style="width: 60%"
17
+ class="select_list select"
18
+ :options='$parent.$parent.residential_areas' placeholder='街道'
19
+ close-on-select
20
+ condition="f_residential_area = '{}''"></v-select>
21
+ </div>
22
+ <div class="form-group col-sm-3">
23
+ <label class="font_normal_body">街&emsp;&emsp;道</label>
24
+ <v-select :value.sync="model.f_street" v-model='model.f_street'
25
+ :value-single="true" style="width: 60%"
26
+ class="select_list select"
27
+ :options='$parent.$parent.streetList' placeholder='街道'
28
+ close-on-select
29
+ condition="f_street = '{}''"></v-select>
30
+ </div>
31
+ <div class="form-group col-sm-3">
32
+ <label class="font_normal_body">站&emsp;&emsp;点</label>
33
+ <v-select :value.sync="model.f_slice_area" v-model='model.f_slice_area'
34
+ :value-single="true" style="width: 60%"
35
+ class="select_list select"
36
+ :options='$parent.$parent.sliceAreaList' placeholder='站点'
37
+ close-on-select
38
+ condition="f_slice_area = '{}''"></v-select>
39
+ </div>
40
+ <div class="form-group col-sm-3">
41
+ <label class="font_normal_body">地&emsp;&emsp;址</label>
42
+ <v-select :value.sync="model.f_area_address" v-model='model.f_area_address'
43
+ :value-single="true" style="width: 60%"
44
+ class="select_list select"
45
+ :options='$parent.$parent.areaAddressList' placeholder='地址'
46
+ close-on-select
47
+ condition="f_area_address = '{}''"></v-select>
48
+ </div>
49
+ <div class="form-group col-sm-3">
50
+ <label class="font_normal_body">是否在册</label>
51
+ <v-select :value.sync="model.f_is_checkbook" v-model='model.f_is_checkbook'
52
+ :value-single="true" style="width: 60%"
53
+ class="select_list select"
54
+ @change="$parent.$parent.changeState"
55
+ :options='$parent.$parent.isCheckBook' placeholder='有无所属片区'
56
+ close-on-select
57
+ condition="{}"></v-select>
58
+ </div>
59
+ <div class="form-group col-sm-3">
60
+ <button class="button_spacing button_search" @click="search()">查询</button>
61
+ <!-- <div style="float: right" class="button_spacing"
62
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
63
+ @click="$parent.$parent.hidden()"></div>-->
64
+ </div>
65
+
66
+
67
+
68
+
69
+ </div>
70
+ </div>
71
+ </criteria>
72
+ <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
73
+ <template partial='head'>
74
+ <tr @dblclick.stop="">
75
+ <th>
76
+ <nobr><input type="checkbox" v-model="$parent.$parent.$parent.bookAll"></input>全选</nobr>
77
+ </th>
78
+ <th>
79
+ <nobr>省/市/区</nobr>
80
+ </th>
81
+ <th>
82
+ <nobr>街道</nobr>
83
+ </th>
84
+ <th>
85
+ <nobr>片区/管理站</nobr>
86
+ </th>
87
+ <th>
88
+ <nobr>小区(单位)名称</nobr>
89
+ </th>
90
+ <th>
91
+ <nobr>小区(单位)地址</nobr>
92
+ </th>
93
+ <th>
94
+ <nobr>所属片区</nobr>
95
+ </th>
96
+ </tr>
97
+ </template>
98
+ <template partial='body'>
99
+ <td style="text-align: center">
100
+ <nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
101
+ @change="$parent.$parent.$parent.checkChange(row, $event)"></input>
102
+ </nobr>
103
+ </td>
104
+ <td style="text-align: center">{{ row.f_pcd }}</td>
105
+ <td style="text-align: center">{{ row.f_street }}</td>
106
+ <td style="text-align: center">{{ row.f_slice_area }}</td>
107
+ <td style="text-align: center">{{ row.f_residential_area }}</td>
108
+ <td style="text-align: center">{{ row.f_area_address }}</td>
109
+ <td style="text-align: center">{{ row.f_check_book_name }}</td>
110
+ </template>
111
+ </data-grid>
112
+ </criteria-paged>
113
+ </div>
114
+ <modal :show.sync="showModal" :backdrop="false">
115
+ <div slot="modal-header" class="modal-header">
116
+ <h4 class="modal-title">
117
+ 创建片区
118
+ </h4>
119
+ </div>
120
+ <div slot="modal-body" class="modal-body">
121
+ <div v-if="true">
122
+ <div class="row" style="margin-top: 10px">
123
+
124
+ <div class="col-sm-12 form-group" style="margin: 0">
125
+ <role-selector-safe
126
+ @re-res="getRes"
127
+ role-name="安检员"
128
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
129
+ :value.sync="checkBook.f_checker_name"
130
+ v-model="checkBook.f_checker_name">
131
+ </role-selector-safe>
132
+ </div>
133
+ <div class="form-group col-sm-6" style="margin-top: 20px">
134
+ <label class="font_normal_body">片区名</label>
135
+ <input type="text" class="input_search" v-model="checkBook.f_check_book_name"
136
+ style="width: 60%" >
137
+ </div>
138
+ <div class="form-group col-sm-6" style="margin-top: 20px">
139
+ <label class="font_normal_body">执行日期</label>
140
+ <datepicker
141
+ :value.sync="checkBook.f_run_date"
142
+ style="width: 60%"
143
+ :format="'yyyy-MM-dd'"
144
+ v-model="checkBook.f_run_date"
145
+ >
146
+ </datepicker>
147
+ </div>
148
+ <div class="form-group col-sm-6" style="margin-top: 20px">
149
+ <label class="font_normal_body">执行周期</label>
150
+ <input type="number" class="input_search" v-model="checkBook.f_around_time"
151
+ style="width: 60%" >
152
+ </div>
153
+ <div class="form-group col-sm-6" style="margin-top: 20px">
154
+ <label class="font_normal_body">周期单位</label>
155
+ <v-select :value.sync="checkBook.f_around_unit" v-model='checkBook.f_around_unit'
156
+ :value-single="true" style="width: 60%"
157
+ class="select_list select"
158
+ :options='aroundUnit' placeholder=''
159
+ close-on-select></v-select>
160
+ </div>
161
+ </div>
162
+ </div>
163
+ </div>
164
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
165
+ <button class="button_search" style="margin-right: 20px" @click="ok">确认</button>
166
+ <button class="button_search" @click="cancel">取消</button>
167
+ </div>
168
+ </modal>
169
+ <modal :show.sync="showModal2" :backdrop="false">
170
+ <div slot="modal-header" class="modal-header">
171
+ <h4 class="modal-title">
172
+ 添加用户
173
+ </h4>
174
+ </div>
175
+ <div slot="modal-body" class="modal-body">
176
+ <div v-if="true">
177
+ <div class="row" style="margin-top: 10px">
178
+ <div class="form-group col-sm-12" style="margin-top: 20px">
179
+ <label class="font_normal_body">安&ensp;检&ensp;册</label>
180
+ <v-select :value.sync="selectBook" v-model='selectBook'
181
+ :value-single="true" style="width: 80%"
182
+ class="select_list select"
183
+ :options='checkBooks' placeholder=''
184
+ close-on-select></v-select>
185
+ </div>
186
+ </div>
187
+ </div>
188
+ </div>
189
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
190
+ <button class="button_search" style="margin-right: 20px" @click="ok2">确认</button>
191
+ <button class="button_search" @click="cancel2">取消</button>
192
+ </div>
193
+ </modal>
194
+ <modal :show.sync="showModal3" :backdrop="false">
195
+ <div slot="modal-header" class="modal-header">
196
+ <h4 class="modal-title">
197
+ 调整用户
198
+ </h4>
199
+ </div>
200
+ <div slot="modal-body" class="modal-body">
201
+ <div v-if="true">
202
+ <div class="row" style="margin-top: 10px;text-align: center">
203
+ <div class="form-group col-sm-12" style="margin-top: 20px">
204
+ <label class="font_normal_body">安&ensp;检&ensp;册</label>
205
+ <v-select :value.sync="selectBook" v-model='selectBook'
206
+ :value-single="true" style="width: 80%"
207
+ class="select_list select"
208
+ :options='checkBooks' placeholder=''
209
+ close-on-select></v-select>
210
+ </div>
211
+ </div>
212
+ </div>
213
+ </div>
214
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
215
+ <button class="button_search" style="margin-right: 20px" @click="ok3">确认</button>
216
+ <button class="button_search" @click="cancel3">取消</button>
217
+ </div>
218
+ </modal>
219
+
220
+ </div>
221
+ </template>
222
+
223
+ <script>
224
+ import {PagedList, HttpResetClass} from 'vue-client'
225
+ import * as Util from '../../../components/Util'
226
+ import bus from "../../../bus";
227
+
228
+ export default {
229
+ title: '片区管理',
230
+ data () {
231
+ let model = new PagedList('rs/sql/safe_singleTable_OrderBy', 20,{
232
+ items: "'ta.*,tcb.f_check_book_name'",
233
+ tablename: "'t_area ta left join t_check_book tcb on ta.f_check_book_id=tcb.id'",
234
+ orderitem: "'ta.id desc'"
235
+ })
236
+ return {
237
+ streetList:[{label: '全部', value: ''}],
238
+ residential_areas:[{label: '全部', value: ''}],
239
+ sliceAreaList:[{label: '全部', value: ''}],
240
+ areaAddressList:[{label: '全部', value: ''}],
241
+ model: model,
242
+ criteriaShow: false,
243
+ excelHeaders: {},
244
+ checkBooks: [],
245
+ f_orgid: '',
246
+ bookAll: false,
247
+ bookList: [],
248
+ selectBook:'',
249
+ // init:false,
250
+ aroundUnit: [{label: '年', value: '年'}, {label: '月', value: '月'}, {label: '日', value: '月'}],
251
+ isCheckBook: [{label: '全部', value: ''}, {label: '是', value: 'ta.f_check_book_id is not null'}, {label: '否', value: 'ta.f_check_book_id is null'}],
252
+ isSearch: false,
253
+ checkBook: {
254
+ f_check_book_name: '',
255
+ f_run_date: '',
256
+ f_around_time: '',
257
+ f_around_unit: '',
258
+ f_create_date: Util.toStandardDateString(),
259
+ f_create_person: this.$login.f.name,
260
+ f_orgid: '',
261
+ f_checker_name: ''
262
+ },
263
+ showModal: false,
264
+ showModal2: false,
265
+ showModal3: false
266
+ }
267
+ },
268
+ beforeDestroy() {
269
+ //tag
270
+ bus.$off('fresh-area')
271
+ },
272
+ computed: {
273
+ searchData () {
274
+ return {condition: this.model.condition}
275
+ },
276
+ bookCondition () {
277
+ return this.model.condition
278
+ },
279
+ isCreateBook () {
280
+ return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is null'
281
+ },
282
+ isChangeBook () {
283
+ return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is not null'
284
+ }
285
+ },
286
+ watch:{
287
+ 'bookList'(){
288
+ this.$emit('book-list',this.bookList)
289
+ },
290
+ 'bookAll'(val){
291
+ if(!val){
292
+ this.bookList=[]
293
+ }
294
+ this.$emit('book-all',this.bookAll)
295
+ }
296
+ },
297
+ methods: {
298
+ async initAreaAddressList(){
299
+ let res = await new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_GroupBy`, {
300
+ data: {
301
+ items: 'f_area_address',
302
+ tablename: 't_area',
303
+ condition: `1=1`,
304
+ groupitem: 'f_area_address'
305
+ }
306
+ }, {resolveMsg: null, rejectMsg: null})
307
+ res.data.forEach(item => {
308
+ this.areaAddressList.push({
309
+ label: item.f_area_address,
310
+ value: item.f_area_address
311
+ })
312
+ })
313
+ },
314
+ async initStreetList(){
315
+ let res = await new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_GroupBy`, {
316
+ data: {
317
+ items: 'f_street',
318
+ tablename: 't_area',
319
+ condition: `1=1`,
320
+ groupitem: 'f_street'
321
+ }
322
+ }, {resolveMsg: null, rejectMsg: null})
323
+ res.data.forEach(item => {
324
+ this.streetList.push({
325
+ label: item.f_street,
326
+ value: item.f_street
327
+ })
328
+ })
329
+ },
330
+ async initResidentialAreas(){
331
+ let res = await new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_GroupBy`, {
332
+ data: {
333
+ items: 'f_residential_area',
334
+ tablename: 't_area',
335
+ condition: `1=1`,
336
+ groupitem: 'f_residential_area'
337
+ }
338
+ }, {resolveMsg: null, rejectMsg: null})
339
+ res.data.forEach(item => {
340
+ this.residential_areas.push({
341
+ label: item.f_residential_area,
342
+ value: item.f_residential_area
343
+ })
344
+ })
345
+ },
346
+ async initSliceAreaList(){
347
+ let res = await new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_GroupBy`, {
348
+ data: {
349
+ items: 'f_slice_area',
350
+ tablename: 't_area',
351
+ condition: `1=1`,
352
+ groupitem: 'f_slice_area'
353
+ }
354
+ }, {resolveMsg: null, rejectMsg: null})
355
+ res.data.forEach(item => {
356
+ this.sliceAreaList.push({
357
+ label: item.f_slice_area,
358
+ value: item.f_slice_area
359
+ })
360
+ })
361
+ },
362
+ async ok2() {
363
+ if (!this.selectBook) {
364
+ this.$showMessage('请选择片区')
365
+ return
366
+ }
367
+ if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
368
+ let userCondition = ''
369
+ if (this.bookList.length < 1) {
370
+ //tag
371
+ userCondition = this.bookCondition
372
+ } else {
373
+ //tag)
374
+
375
+ userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
376
+ userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
377
+ //tag
378
+ }
379
+ let addUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
380
+ FROM
381
+ t_userinfo tui
382
+ LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
383
+ LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
384
+ LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
385
+ WHERE
386
+ tui.f_user_state = '正常'
387
+ AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
388
+ AND ${userCondition}`
389
+ await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: addUser}},
390
+ {resolveMsg: null, rejectMsg: '添加用户失败'})
391
+ this.$showMessage('添加用户成功')
392
+ this.selectBook = ''
393
+ this.bookAll = false
394
+ this.bookList = []
395
+ this.showModal2 = false
396
+ this.$refs.paged.$refs.criteria.search()
397
+ }
398
+ },
399
+ async ok3() {
400
+ if (!this.selectBook) {
401
+ this.$showMessage('请选择片区')
402
+ return
403
+ }
404
+ if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
405
+ let userCondition = ''
406
+ if (this.bookList.length < 1) {
407
+ //tag
408
+ userCondition = this.bookCondition
409
+ } else {
410
+ //tag)
411
+
412
+ userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
413
+ userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
414
+ //tag
415
+ }
416
+ let upUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
417
+ FROM
418
+ t_userinfo tui
419
+ LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
420
+ LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
421
+ LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
422
+ WHERE
423
+ tui.f_user_state = '正常'
424
+ AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
425
+ AND ${userCondition}`
426
+ await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: upUser}},
427
+ {resolveMsg: null, rejectMsg: '调整用户失败'})
428
+ this.$showMessage('调整用户成功')
429
+ this.selectBook = ''
430
+ this.bookAll = false
431
+ this.bookList = []
432
+ this.showModal3 = false
433
+ this.$refs.paged.$refs.criteria.search()
434
+ }
435
+ },
436
+ cancel2(){
437
+ this.selectBook = ''
438
+ this.bookAll = false
439
+ this.bookList = []
440
+ this.showModal2 = false
441
+ this.$refs.paged.$refs.criteria.search()
442
+ },
443
+ cancel3(){
444
+ this.selectBook = ''
445
+ this.bookAll = false
446
+ this.bookList = []
447
+ this.showModal3 = false
448
+ this.$refs.paged.$refs.criteria.search()
449
+ },
450
+ addUser () {
451
+ if (!this.isCreateBook) {
452
+ this.$showMessage('请选择查询未划分片区的用户')
453
+ return
454
+ }
455
+ if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
456
+ this.showModal2 = true
457
+ this.freshCheckBook()
458
+ return
459
+ }
460
+ this.$showMessage('请选择用户')
461
+ },
462
+ upUser () {
463
+ if (!this.isChangeBook) {
464
+ this.$showMessage('请选择查询已划分片区的用户')
465
+ return
466
+ }
467
+ if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
468
+ this.showModal3 = true
469
+ this.freshCheckBook()
470
+ return
471
+ }
472
+ this.$showMessage('请选择用户')
473
+ },
474
+ async delUser () {
475
+ if (!this.isChangeBook) {
476
+ this.$showMessage('请选择查询已划分片区的用户')
477
+ return
478
+ }
479
+ if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
480
+ let userCondition= ''
481
+ if (this.bookList.length < 1) {
482
+ //tag
483
+ userCondition = this.bookCondition
484
+ } else {
485
+ //tag)
486
+
487
+ userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
488
+ userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
489
+ //tag
490
+ }
491
+ let delUser= `update t_user_address set f_check_book_id =null
492
+ FROM
493
+ t_userinfo tui
494
+ LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
495
+ LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
496
+ LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
497
+ WHERE
498
+ tui.f_user_state = '正常'
499
+ AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
500
+ AND ${userCondition}`
501
+ await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: delUser}},
502
+ {resolveMsg: null, rejectMsg: '删除片区失败'})
503
+ this.$showMessage('从片区删除所选用户成功')
504
+ this.selectBook = ''
505
+ this.bookAll = false
506
+ this.bookList = []
507
+ this.showModal3 = false
508
+ this.$refs.paged.$refs.criteria.search()
509
+ return
510
+ }
511
+ this.$showMessage('请选择用户')
512
+ },
513
+ beforeCreateBook () {
514
+ if (!this.isCreateBook) {
515
+ this.$showMessage('请选择查询未划分片区的用户')
516
+ return
517
+ }
518
+ if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
519
+ this.showModal = true
520
+ return
521
+ }
522
+ this.$showMessage('请选择用户')
523
+ },
524
+ ok () {
525
+ //tag)
526
+ let condition = ''
527
+ if (!this.checkBook.f_check_book_name) {
528
+ return this.$showMessage('请填写册名')
529
+ }
530
+ if (!this.checkBook.f_checker_name) {
531
+ return this.$showMessage('请选择安检员')
532
+ }
533
+ if (!this.checkBook.f_around_time || !this.checkBook.f_around_unit) {
534
+ return this.$showMessage('请选填写周期信息')
535
+ }
536
+ if (!this.checkBook.f_run_date) {
537
+ return this.$showMessage('执行日期')
538
+ }
539
+ if (this.bookList.length < 1) {
540
+ //tag
541
+ condition = this.bookCondition
542
+ } else {
543
+ //tag)
544
+
545
+ condition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
546
+ condition = 'tui.f_userinfo_id in (' + condition + ')'
547
+ //tag
548
+ }
549
+ let data = {
550
+ checkBook: this.checkBook,
551
+ sqlStr: condition
552
+ }
553
+ new HttpResetClass().load('post', 'rs/logic/AddCheckBook', {data}).then(res => {
554
+ //tag)
555
+ if (res.data.id) {
556
+ this.$showMessage('创建成功')
557
+ this.showModal = false
558
+ this.isSearch = false
559
+ this.bookList = []
560
+ this.bookAll = false
561
+ this.freshCheckBook()
562
+ this.$refs.paged.$refs.criteria.search()
563
+ }
564
+ })
565
+ },
566
+ changeState (val) {
567
+ //tag
568
+ //tag
569
+ this.bookAll = false
570
+ this.bookList = []
571
+ if (this.$refs.paged.$refs.criteria.model.f_orgid){
572
+ this.$refs.paged.$refs.criteria.search()
573
+ }
574
+ },
575
+ cancel () {
576
+ this.bookAll = false
577
+ this.bookList = []
578
+ this.showModal = false
579
+ this.$refs.paged.$refs.criteria.search()
580
+ },
581
+ checkModel (row) {
582
+ if (this.bookAll) {
583
+ //tag)
584
+ return true
585
+ } else {
586
+ if (this.bookList.findIndex(res => res === row.id) !== -1) {
587
+ return true
588
+ } else {
589
+ return false
590
+ }
591
+ }
592
+ },
593
+ checkChange (row, e) {
594
+ //tag
595
+ if (e.target.checked) {
596
+ this.bookList.push(row.id)
597
+ } else {
598
+ this.bookList.splice(this.bookList.findIndex(res => res === row.id), 1)
599
+ }
600
+ // //tag)
601
+ },
602
+ getRes (obj) {
603
+ this.checkBook.f_orgid = obj.resids[0]
604
+ },
605
+ getResm (obj) {
606
+ this.$refs.paged.$refs.criteria.model.f_orgid = this.$login.convertToIn(obj.resids)
607
+ },
608
+ hidden () {
609
+ this.criteriaShow = !this.criteriaShow
610
+ },
611
+ selfSearch (args) {
612
+ this.isSearch = true
613
+ this.bookAll = false
614
+ this.bookList = []
615
+
616
+ console.log("查询66666666666666666")
617
+ this.$emit('book-condition',args.condition)
618
+ // if (this.$refs.paged.$refs.criteria.model.f_orgid){
619
+ // args.condition += `f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`
620
+ // }
621
+ this.model.search(args.condition, args.model)
622
+ },
623
+ freshCheckBook () {
624
+ this.checkBooks = []
625
+ new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
626
+ data: {
627
+ items: 'id,f_check_book_name',
628
+ tablename: 't_check_book',
629
+ condition: this.$refs.paged.$refs.criteria.model.f_orgid?`f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`:'1=1',
630
+ orderitem: 'id desc'
631
+ }
632
+ }, {resolveMsg: null, rejectMsg: null}).then(res => {
633
+ this.checkBooks.push({label: '全部', value: ''})
634
+ res.data.forEach(ress => {
635
+ this.checkBooks.push({
636
+ label: ress.f_check_book_name,
637
+ value: ress.id
638
+ })
639
+ })
640
+ })
641
+ }
642
+ },
643
+
644
+ async ready () {
645
+ await this.initStreetList()
646
+ await this.initSliceAreaList()
647
+ await this.initAreaAddressList()
648
+ await this.initResidentialAreas()
649
+ bus.$on('fresh-area',()=>{
650
+ console.log("进入方法",this.bookAll,this.bookList)
651
+ this.bookAll = false
652
+ this.bookList = []
653
+ this.$refs.paged.$refs.criteria.search()
654
+ })
655
+ this.$refs.paged.$refs.criteria.model.f_is_checkbook = 'ta.f_check_book_id is null'
656
+ //tag
657
+ // this.init=true
658
+ this.freshCheckBook()
659
+ }
660
+ }
661
+ </script>
662
+ <style scoped>
663
+ /*.btn-group > .btn:first-child {*/
664
+ /* margin-left: 0;*/
665
+ /* width: 100%;*/
666
+ /*}*/
667
+ </style>