safecheck-client 3.0.39-14 → 3.0.39-15

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 (42) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +31 -26
  3. package/src/components/pc/RoleSelector.vue +172 -172
  4. package/src/components/pc/SafeCheckOrder/SafeCheckOrderList.vue +248 -248
  5. package/src/components/rongcheng/AddPlanItem.vue +344 -344
  6. package/src/components/rongcheng/CheckCurrentCreate.vue +1081 -1081
  7. package/src/components/rongcheng/PaperDefectMain.vue +828 -828
  8. package/src/filiale/BFshiye/pc/checkUserList.vue +772 -772
  9. package/src/filiale/dexin/pc/PaperList.vue +840 -840
  10. package/src/filiale/kelai/android/PaperFeedback.vue +1553 -1553
  11. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1336 -1270
  12. package/src/filiale/qingjian/android/SafecheckOrderV.vue +2918 -2918
  13. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +823 -800
  14. package/src/filiale/qingjian/pc/NewCheckpaper.vue +1919 -1919
  15. package/src/filiale/tongchuan/pc/AMapTrailShowZk.vue +226 -226
  16. package/src/filiale/tongchuan/pc/CheckSearchUser.vue +1091 -1091
  17. package/src/filiale/tongchuan/pc/DefectPaperWeiXiu.vue +664 -664
  18. package/src/filiale/tongchuan/pc/NoCheckplanSafecheck.vue +247 -247
  19. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1094 -1094
  20. package/src/filiale/tongchuan/pc/PaperList.vue +718 -718
  21. package/src/filiale/tongchuan/pc/PersonTrack.vue +269 -269
  22. package/src/filiale/tongchuan/pc/SelectCheckPlan.vue +336 -336
  23. package/src/filiale/tongchuan/pc.js +37 -37
  24. package/src/filiale/wensu/android/SafecheckOrderV.vue +2444 -2444
  25. package/src/filiale/wensu/android/SafecheckUserInfo.vue +712 -712
  26. package/src/filiale/wensu/pc/CheckSearchUser.vue +1251 -1251
  27. package/src/filiale/wuan/android/SafecheckOrderV.vue +2242 -2242
  28. package/src/filiale/wuan/android/SafecheckUserInfo.vue +659 -659
  29. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1191 -1191
  30. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +913 -913
  31. package/src/filiale/yangchunboneng/android.js +21 -21
  32. package/src/filiale/yangchunboneng/pc/CheckBookList.vue +353 -353
  33. package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +677 -677
  34. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1197 -1197
  35. package/src/filiale/yangchunboneng/pc/HiddenSituation.vue +171 -171
  36. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +1112 -1112
  37. package/src/filiale/yangchunboneng/pc/PaperList.vue +757 -757
  38. package/src/filiale/yangchunboneng/pc/SelectCheckPlan.vue +331 -331
  39. package/src/filiale/yangchunboneng/pc.js +29 -29
  40. package/src/main.js +33 -33
  41. package/src/rongcheng.js +319 -319
  42. package/yarn-error.log +0 -140
@@ -1,269 +1,269 @@
1
- <template>
2
- <div class="basic-main" style="height: 100%">
3
- <div class="row">
4
- <div class="col-sm-9 amap-main">
5
- <div class="form-horizontal select-overspread container-fluid auto">
6
- <div class="row">
7
- <div class="col-sm-3 form-input-group" style="width: 20%">
8
- <label class="control-label">公&emsp;&emsp;司</label>
9
- <right-tree-safe @re-res="getRes" >
10
- </right-tree-safe>
11
- </div>
12
- <div class="col-sm-3 form-input-group" style="width: 20%">
13
- <label class="control-label" >轨迹时间</label>
14
- <datepicker placeholder="轨迹时间"
15
- :value.sync="searchCondition.date"
16
- v-model="searchCondition.date"
17
- :format="'yyyy-MM-dd'">
18
- </datepicker>
19
- </div>
20
- <div class="col-sm-3 form-input-group" style="width: 20%">
21
- <label class="control-label">安检员</label>
22
- <v-select :value.sync="searchCondition.userId" v-model='searchCondition.userId'
23
- :value-single="true" clear-button search
24
- :options='searchUserEndOption' placeholder='请选择'
25
- ></v-select>
26
- </div>
27
- <div class="col-sm-3 form-input-group" style="width: 20%">
28
- <label class="control-label">班组</label>
29
- <v-select :value.sync="searchCondition.departmentId" v-model='searchCondition.departmentId'
30
- :value-single="true" clear-button search
31
- :options='searchDepartmentOption' placeholder='请选择'
32
- ></v-select>
33
- </div>
34
- <div class="col-sm-3 form-input-group" style="width: 20%">
35
- <label class="control-label">网格员</label>
36
- <v-select class="select_list select"
37
- placeholder='请选择' style="width: 60%"
38
- :value.sync="f_book_checker" v-model="f_book_checker"
39
- :options='users'
40
- filer-key="name"
41
- close-on-select clear-button
42
- :value-single="true">
43
- </v-select>
44
- </div>
45
- <div class="col-sm-3 form-input-group" style="width: 20%;float:right;">
46
- <button class="btn btn-primary" @click="search">查询</button>
47
- </div>
48
- </div>
49
- </div>
50
- <a-map-trajectory-new :outerlinedata.sync="outerlinedata" :pathnavigatorstyle="pathnavigatorstyle" :dom="dom"></a-map-trajectory-new>
51
- </div>
52
- <div class="col-sm-3">
53
- <div id="zzz" class="basic-main" style="flex:1;margin-left: 0px;overflow: hidden">
54
- <div class="flex">
55
- <div class="panel panel-info" style="flex: 4;margin-top:0px;height: 50%">
56
- <div class="panel-heading" style="height: auto">
57
- <h3 class="panel-title">轨迹记录</h3>
58
- </div>
59
- <div class="panel-body" style="overflow: scroll; height: 700px">
60
- <accordion :one-at-a-time="true" v-if="reponData.length>0">
61
- <template v-for="row in reponData">
62
- <panel is-open="false" type="primary" @click="chengeLocation(row)">
63
- <strong slot="header">人员姓名:{{row.name}}</strong>
64
- <!-- <div v-for="(idx,item) in row.result" @click="chengeLocation(item)" :class="{'alert alert-info':idx%2===0,'alert alert-success':idx%2!==0}">-->
65
- <!-- 轨迹时间段:{{item.f_start_date}} ~ {{item.f_end_date}}-->
66
- <!-- </div>-->
67
- </panel>
68
- </template>
69
- </accordion>
70
- <h4 class="panel-title" v-else>暂无相关数据</h4>
71
- </div>
72
- </div>
73
- </div>
74
- </div>
75
- </div>
76
- </div>
77
-
78
- </div>
79
- </template>
80
-
81
- <script>
82
- import {HttpResetClass} from 'vue-client'
83
- import { douglasPeuckerForAMap } from '../../../components/map/douglasPeuckerForAMap'
84
-
85
- export default {
86
- title: "安检员轨迹展示",
87
- data() {
88
- return {
89
- showTaskPoints: [],
90
- taskModel: {},
91
- // 当前分公司下所有的用户id
92
- toUserIds: '',
93
- // 当前公司的所有安检员
94
- searchUserEndOption: [],
95
- searchDepartmentOption: [],
96
- // 请求到的结果集合
97
- reponData: [],
98
- // 点集
99
- outerlinedata: [],
100
- pathnavigatorstyle: {
101
- // 图标宽度
102
- width: 16,
103
- // 图标高度
104
- height: 32,
105
- // 图标地址(外链地址或者Base64)
106
- iconBase64: 'https://webapi.amap.com/ui/1.1/ui/misc/PathSimplifier/examples/imgs/car.png'
107
- },
108
- // 分公司ids
109
- f_filialeids: '',
110
- path: [],
111
- aMap: null,
112
- map: null,
113
- filialeOptions: [],
114
- userid: null,
115
- dom: 'amapIdLOCUS' + Math.round(Math.random() * 10) + Math.round(Math.random() * 10),
116
- rootSubmenuKeys: ['1', '2'],
117
- users:[{label: '全部', value: ''}],
118
- f_book_checker:'',
119
- openKeys: ['1'],
120
- searchCondition: {
121
- condition: '1 = 1',
122
- orderTime: 'ps.f_realtime asc',
123
- date: '',
124
- userId: undefined,
125
- departmentId: undefined
126
- }
127
- }
128
- },
129
- methods: {
130
- chengeLocation(row) {
131
- const points = douglasPeuckerForAMap(row.points, 2, 'tm')
132
- this.outerlinedata = [{ path: points, speed: Math.ceil(points.length / 2), name: `${this.searchCondition.date}的轨迹` }]
133
- },
134
- search() {
135
- var condition = '1 = 1'
136
- if (!this.f_filialeids) {
137
- return this.$showMessage('请选择需要查询的分公司')
138
- }
139
- if (!this.searchCondition.date) {
140
- return this.$showMessage('请选择需要查看的轨迹时间')
141
- }
142
- // if (!this.searchCondition.userId[0]) {
143
- // return this.$showMessage('请选择需要查看的轨迹所属人员')
144
- // }
145
-
146
- if (typeof this.searchCondition.date !== 'string') {
147
- this.searchCondition.date = this.searchCondition.date.format('YYYY-MM-DD')
148
- }
149
- condition += " and ps.f_realtime >= '" + this.searchCondition.date + " 00:00:00' and ps.f_realtime <= '" + this.searchCondition.date + " 23:59:59'"
150
- let userIds = []
151
- if (this.searchCondition.userId && !userIds.includes(this.searchCondition.userId)) {
152
- userIds.push(this.searchCondition.userId)
153
- }
154
- if (this.f_book_checker && !userIds.includes(this.f_book_checker)) {
155
- userIds.push(this.f_book_checker)
156
- }
157
- if (userIds.length > 0) {
158
- const idsStr = userIds.map(id => `'${id}'`).join(',')
159
- condition += ` and ps.f_user_id in (${idsStr})`
160
- }
161
- let condition2 = '1 = 1'
162
- if(this.searchCondition.departmentId){
163
- condition2 += ` and d.id = '${this.searchCondition.departmentId}'`
164
- }
165
- this.searchCondition.condition = condition
166
- this.$resetpost('rs/logic/getPhoneState', { condition: this.searchCondition.condition, condition2, orderTime: this.searchCondition.orderTime }, {resolveMsg: "轨迹记录查询成功", rejectMsg: "轨迹记录查询失败"}).then((response)=>{
167
- if (response.data.state === 'success') {
168
- this.reponData = response.data.result
169
- // const points = douglasPeuckerForAMap(response.data.result, 2, 'tm')
170
- // this.outerlinedata = [{ path: points, speed: Math.ceil(points.length / 2), name: `${this.searchCondition.date}的轨迹` }]
171
- } else {
172
- this.$showMessage("该用户当日使用app时间较短或行程较少,不足够生成轨迹")
173
- }
174
- })
175
- },
176
- getRes(obj){
177
- // this.model.f_filialeids = this.$login.convertToIn(obj.resids);
178
- if (obj.res != undefined && obj.res.length > 0 && obj.res[0] != undefined) {
179
- this.getNewData(obj.res[0])
180
- }
181
- this.f_filialeids = this.$login.convertToIn(obj.resids);
182
- },
183
- //获取定位人员类表
184
- async getNewData(organization){
185
- // let organization = '公司名称'
186
- // let userRolestr = '需要定位人员'
187
- let userRolestr = '安检员'
188
- let res =await new HttpResetClass().load('POST', '/rs/search', {
189
- // source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($需要定位人员$) != -1))',
190
- source: "this.getParentByName($"+organization+"$).getAllChildrens().where(row.getAttributes().get($resourcetype$)==$user$).where(row.getAttributes().get($rolestr$)!=null).where(row.getAttributes().get($rolestr$).indexOf($"+userRolestr+"$)!=-1)",
191
- userid: this.$login.f.id
192
- }, {resolveMsg: null, rejectMsg: null})
193
- let dataEnd = [{label:'全部',value:''}]
194
- let idsEnd = []
195
- res.data.forEach(res=>{
196
- let h=true
197
- dataEnd.forEach(per=>{
198
- if(res.id==per.value){
199
- h=false
200
- }
201
- })
202
- if(h){
203
- dataEnd.push({label:res.name,value:res.id})
204
- idsEnd.push(res.id)
205
- }
206
- })
207
- this.toUserIds = this.$login.convertToIn(idsEnd); //所有的员工ID
208
- this.searchUserEndOption = dataEnd
209
-
210
- let resp = await new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
211
- data: {
212
- items:'*',
213
- tablename: 't_department',
214
- condition: `parentid = '${this.$login.f.orgid}' and f_dep_type = '部门'`,
215
- orderitem:'id'
216
- }
217
- }, {resolveMsg: null, rejectMsg: null})
218
- //tag)
219
- const departments = [{label: '全部', value: ''}]
220
- for (const item of resp.data) {
221
- departments.push({
222
- label: item.name,
223
- value: item.id
224
- })
225
- }
226
- this.searchDepartmentOption = departments
227
- },
228
- toStandardDateString () {
229
- const dt = new Date()
230
- const month = dt.getMonth() + 1
231
- const date = dt.getDate()
232
- return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
233
- },
234
- initBookChecker(){
235
- new HttpResetClass().load('POST', '/rs/search', {
236
- data: {
237
- source: `root.getResourceById($${this.$login.f.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($网格员$) != -1)`,
238
- userid: this.$login.f.id
239
- }
240
- }, {resolveMsg: null, rejectMsg: null}).then(res=>{
241
- let data = res.data
242
- const addedNames = new Set()
243
- this.users = []
244
- data.forEach(user => {
245
- if (user.state === '在职') {
246
- if (!addedNames.has(user.name)) {
247
- this.users.push({label:user.name,value:user.id})
248
- addedNames.add(user.name)
249
- }
250
- }
251
- })
252
- console.log(this.users)
253
- })
254
- },
255
-
256
- },
257
- ready(){
258
- this.searchCondition.date = this.toStandardDateString()
259
- this.initBookChecker()
260
- }
261
- }
262
- </script>
263
-
264
- <style lang="less" scoped>
265
- .amap-main {
266
- height: 90%;
267
- padding-right:10px;
268
- }
269
- </style>
1
+ <template>
2
+ <div class="basic-main" style="height: 100%">
3
+ <div class="row">
4
+ <div class="col-sm-9 amap-main">
5
+ <div class="form-horizontal select-overspread container-fluid auto">
6
+ <div class="row">
7
+ <div class="col-sm-3 form-input-group" style="width: 20%">
8
+ <label class="control-label">公&emsp;&emsp;司</label>
9
+ <right-tree-safe @re-res="getRes" >
10
+ </right-tree-safe>
11
+ </div>
12
+ <div class="col-sm-3 form-input-group" style="width: 20%">
13
+ <label class="control-label" >轨迹时间</label>
14
+ <datepicker placeholder="轨迹时间"
15
+ :value.sync="searchCondition.date"
16
+ v-model="searchCondition.date"
17
+ :format="'yyyy-MM-dd'">
18
+ </datepicker>
19
+ </div>
20
+ <div class="col-sm-3 form-input-group" style="width: 20%">
21
+ <label class="control-label">安检员</label>
22
+ <v-select :value.sync="searchCondition.userId" v-model='searchCondition.userId'
23
+ :value-single="true" clear-button search
24
+ :options='searchUserEndOption' placeholder='请选择'
25
+ ></v-select>
26
+ </div>
27
+ <div class="col-sm-3 form-input-group" style="width: 20%">
28
+ <label class="control-label">班组</label>
29
+ <v-select :value.sync="searchCondition.departmentId" v-model='searchCondition.departmentId'
30
+ :value-single="true" clear-button search
31
+ :options='searchDepartmentOption' placeholder='请选择'
32
+ ></v-select>
33
+ </div>
34
+ <div class="col-sm-3 form-input-group" style="width: 20%">
35
+ <label class="control-label">网格员</label>
36
+ <v-select class="select_list select"
37
+ placeholder='请选择' style="width: 60%"
38
+ :value.sync="f_book_checker" v-model="f_book_checker"
39
+ :options='users'
40
+ filer-key="name"
41
+ close-on-select clear-button
42
+ :value-single="true">
43
+ </v-select>
44
+ </div>
45
+ <div class="col-sm-3 form-input-group" style="width: 20%;float:right;">
46
+ <button class="btn btn-primary" @click="search">查询</button>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ <a-map-trajectory-new :outerlinedata.sync="outerlinedata" :pathnavigatorstyle="pathnavigatorstyle" :dom="dom"></a-map-trajectory-new>
51
+ </div>
52
+ <div class="col-sm-3">
53
+ <div id="zzz" class="basic-main" style="flex:1;margin-left: 0px;overflow: hidden">
54
+ <div class="flex">
55
+ <div class="panel panel-info" style="flex: 4;margin-top:0px;height: 50%">
56
+ <div class="panel-heading" style="height: auto">
57
+ <h3 class="panel-title">轨迹记录</h3>
58
+ </div>
59
+ <div class="panel-body" style="overflow: scroll; height: 700px">
60
+ <accordion :one-at-a-time="true" v-if="reponData.length>0">
61
+ <template v-for="row in reponData">
62
+ <panel is-open="false" type="primary" @click="chengeLocation(row)">
63
+ <strong slot="header">人员姓名:{{row.name}}</strong>
64
+ <!-- <div v-for="(idx,item) in row.result" @click="chengeLocation(item)" :class="{'alert alert-info':idx%2===0,'alert alert-success':idx%2!==0}">-->
65
+ <!-- 轨迹时间段:{{item.f_start_date}} ~ {{item.f_end_date}}-->
66
+ <!-- </div>-->
67
+ </panel>
68
+ </template>
69
+ </accordion>
70
+ <h4 class="panel-title" v-else>暂无相关数据</h4>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ </div>
77
+
78
+ </div>
79
+ </template>
80
+
81
+ <script>
82
+ import {HttpResetClass} from 'vue-client'
83
+ import { douglasPeuckerForAMap } from '../../../components/map/douglasPeuckerForAMap'
84
+
85
+ export default {
86
+ title: "安检员轨迹展示",
87
+ data() {
88
+ return {
89
+ showTaskPoints: [],
90
+ taskModel: {},
91
+ // 当前分公司下所有的用户id
92
+ toUserIds: '',
93
+ // 当前公司的所有安检员
94
+ searchUserEndOption: [],
95
+ searchDepartmentOption: [],
96
+ // 请求到的结果集合
97
+ reponData: [],
98
+ // 点集
99
+ outerlinedata: [],
100
+ pathnavigatorstyle: {
101
+ // 图标宽度
102
+ width: 16,
103
+ // 图标高度
104
+ height: 32,
105
+ // 图标地址(外链地址或者Base64)
106
+ iconBase64: 'https://webapi.amap.com/ui/1.1/ui/misc/PathSimplifier/examples/imgs/car.png'
107
+ },
108
+ // 分公司ids
109
+ f_filialeids: '',
110
+ path: [],
111
+ aMap: null,
112
+ map: null,
113
+ filialeOptions: [],
114
+ userid: null,
115
+ dom: 'amapIdLOCUS' + Math.round(Math.random() * 10) + Math.round(Math.random() * 10),
116
+ rootSubmenuKeys: ['1', '2'],
117
+ users:[{label: '全部', value: ''}],
118
+ f_book_checker:'',
119
+ openKeys: ['1'],
120
+ searchCondition: {
121
+ condition: '1 = 1',
122
+ orderTime: 'ps.f_realtime asc',
123
+ date: '',
124
+ userId: undefined,
125
+ departmentId: undefined
126
+ }
127
+ }
128
+ },
129
+ methods: {
130
+ chengeLocation(row) {
131
+ const points = douglasPeuckerForAMap(row.points, 2, 'tm')
132
+ this.outerlinedata = [{ path: points, speed: Math.ceil(points.length / 2), name: `${this.searchCondition.date}的轨迹` }]
133
+ },
134
+ search() {
135
+ var condition = '1 = 1'
136
+ if (!this.f_filialeids) {
137
+ return this.$showMessage('请选择需要查询的分公司')
138
+ }
139
+ if (!this.searchCondition.date) {
140
+ return this.$showMessage('请选择需要查看的轨迹时间')
141
+ }
142
+ // if (!this.searchCondition.userId[0]) {
143
+ // return this.$showMessage('请选择需要查看的轨迹所属人员')
144
+ // }
145
+
146
+ if (typeof this.searchCondition.date !== 'string') {
147
+ this.searchCondition.date = this.searchCondition.date.format('YYYY-MM-DD')
148
+ }
149
+ condition += " and ps.f_realtime >= '" + this.searchCondition.date + " 00:00:00' and ps.f_realtime <= '" + this.searchCondition.date + " 23:59:59'"
150
+ let userIds = []
151
+ if (this.searchCondition.userId && !userIds.includes(this.searchCondition.userId)) {
152
+ userIds.push(this.searchCondition.userId)
153
+ }
154
+ if (this.f_book_checker && !userIds.includes(this.f_book_checker)) {
155
+ userIds.push(this.f_book_checker)
156
+ }
157
+ if (userIds.length > 0) {
158
+ const idsStr = userIds.map(id => `'${id}'`).join(',')
159
+ condition += ` and ps.f_user_id in (${idsStr})`
160
+ }
161
+ let condition2 = '1 = 1'
162
+ if(this.searchCondition.departmentId){
163
+ condition2 += ` and d.id = '${this.searchCondition.departmentId}'`
164
+ }
165
+ this.searchCondition.condition = condition
166
+ this.$resetpost('rs/logic/getPhoneState', { condition: this.searchCondition.condition, condition2, orderTime: this.searchCondition.orderTime }, {resolveMsg: "轨迹记录查询成功", rejectMsg: "轨迹记录查询失败"}).then((response)=>{
167
+ if (response.data.state === 'success') {
168
+ this.reponData = response.data.result
169
+ // const points = douglasPeuckerForAMap(response.data.result, 2, 'tm')
170
+ // this.outerlinedata = [{ path: points, speed: Math.ceil(points.length / 2), name: `${this.searchCondition.date}的轨迹` }]
171
+ } else {
172
+ this.$showMessage("该用户当日使用app时间较短或行程较少,不足够生成轨迹")
173
+ }
174
+ })
175
+ },
176
+ getRes(obj){
177
+ // this.model.f_filialeids = this.$login.convertToIn(obj.resids);
178
+ if (obj.res != undefined && obj.res.length > 0 && obj.res[0] != undefined) {
179
+ this.getNewData(obj.res[0])
180
+ }
181
+ this.f_filialeids = this.$login.convertToIn(obj.resids);
182
+ },
183
+ //获取定位人员类表
184
+ async getNewData(organization){
185
+ // let organization = '公司名称'
186
+ // let userRolestr = '需要定位人员'
187
+ let userRolestr = '安检员'
188
+ let res =await new HttpResetClass().load('POST', '/rs/search', {
189
+ // source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($需要定位人员$) != -1))',
190
+ source: "this.getParentByName($"+organization+"$).getAllChildrens().where(row.getAttributes().get($resourcetype$)==$user$).where(row.getAttributes().get($rolestr$)!=null).where(row.getAttributes().get($rolestr$).indexOf($"+userRolestr+"$)!=-1)",
191
+ userid: this.$login.f.id
192
+ }, {resolveMsg: null, rejectMsg: null})
193
+ let dataEnd = [{label:'全部',value:''}]
194
+ let idsEnd = []
195
+ res.data.forEach(res=>{
196
+ let h=true
197
+ dataEnd.forEach(per=>{
198
+ if(res.id==per.value){
199
+ h=false
200
+ }
201
+ })
202
+ if(h){
203
+ dataEnd.push({label:res.name,value:res.id})
204
+ idsEnd.push(res.id)
205
+ }
206
+ })
207
+ this.toUserIds = this.$login.convertToIn(idsEnd); //所有的员工ID
208
+ this.searchUserEndOption = dataEnd
209
+
210
+ let resp = await new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
211
+ data: {
212
+ items:'*',
213
+ tablename: 't_department',
214
+ condition: `parentid = '${this.$login.f.orgid}' and f_dep_type = '部门'`,
215
+ orderitem:'id'
216
+ }
217
+ }, {resolveMsg: null, rejectMsg: null})
218
+ //tag)
219
+ const departments = [{label: '全部', value: ''}]
220
+ for (const item of resp.data) {
221
+ departments.push({
222
+ label: item.name,
223
+ value: item.id
224
+ })
225
+ }
226
+ this.searchDepartmentOption = departments
227
+ },
228
+ toStandardDateString () {
229
+ const dt = new Date()
230
+ const month = dt.getMonth() + 1
231
+ const date = dt.getDate()
232
+ return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
233
+ },
234
+ initBookChecker(){
235
+ new HttpResetClass().load('POST', '/rs/search', {
236
+ data: {
237
+ source: `root.getResourceById($${this.$login.f.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($网格员$) != -1)`,
238
+ userid: this.$login.f.id
239
+ }
240
+ }, {resolveMsg: null, rejectMsg: null}).then(res=>{
241
+ let data = res.data
242
+ const addedNames = new Set()
243
+ this.users = []
244
+ data.forEach(user => {
245
+ if (user.state === '在职') {
246
+ if (!addedNames.has(user.name)) {
247
+ this.users.push({label:user.name,value:user.id})
248
+ addedNames.add(user.name)
249
+ }
250
+ }
251
+ })
252
+ console.log(this.users)
253
+ })
254
+ },
255
+
256
+ },
257
+ ready(){
258
+ this.searchCondition.date = this.toStandardDateString()
259
+ this.initBookChecker()
260
+ }
261
+ }
262
+ </script>
263
+
264
+ <style lang="less" scoped>
265
+ .amap-main {
266
+ height: 90%;
267
+ padding-right:10px;
268
+ }
269
+ </style>