safecheck-client 3.0.34-7 → 3.0.34-71

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