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.
- package/package.json +1 -1
- package/src/App.vue +31 -26
- package/src/components/pc/RoleSelector.vue +172 -172
- package/src/components/pc/SafeCheckOrder/SafeCheckOrderList.vue +248 -248
- package/src/components/rongcheng/AddPlanItem.vue +344 -344
- package/src/components/rongcheng/CheckCurrentCreate.vue +1081 -1081
- package/src/components/rongcheng/PaperDefectMain.vue +828 -828
- package/src/filiale/BFshiye/pc/checkUserList.vue +772 -772
- package/src/filiale/dexin/pc/PaperList.vue +840 -840
- package/src/filiale/kelai/android/PaperFeedback.vue +1553 -1553
- package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1336 -1270
- package/src/filiale/qingjian/android/SafecheckOrderV.vue +2918 -2918
- package/src/filiale/qingjian/android/SafecheckUserInfo.vue +823 -800
- package/src/filiale/qingjian/pc/NewCheckpaper.vue +1919 -1919
- package/src/filiale/tongchuan/pc/AMapTrailShowZk.vue +226 -226
- package/src/filiale/tongchuan/pc/CheckSearchUser.vue +1091 -1091
- package/src/filiale/tongchuan/pc/DefectPaperWeiXiu.vue +664 -664
- package/src/filiale/tongchuan/pc/NoCheckplanSafecheck.vue +247 -247
- package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1094 -1094
- package/src/filiale/tongchuan/pc/PaperList.vue +718 -718
- package/src/filiale/tongchuan/pc/PersonTrack.vue +269 -269
- package/src/filiale/tongchuan/pc/SelectCheckPlan.vue +336 -336
- package/src/filiale/tongchuan/pc.js +37 -37
- package/src/filiale/wensu/android/SafecheckOrderV.vue +2444 -2444
- package/src/filiale/wensu/android/SafecheckUserInfo.vue +712 -712
- package/src/filiale/wensu/pc/CheckSearchUser.vue +1251 -1251
- package/src/filiale/wuan/android/SafecheckOrderV.vue +2242 -2242
- package/src/filiale/wuan/android/SafecheckUserInfo.vue +659 -659
- package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1191 -1191
- package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +913 -913
- package/src/filiale/yangchunboneng/android.js +21 -21
- package/src/filiale/yangchunboneng/pc/CheckBookList.vue +353 -353
- package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +677 -677
- package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1197 -1197
- package/src/filiale/yangchunboneng/pc/HiddenSituation.vue +171 -171
- package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +1112 -1112
- package/src/filiale/yangchunboneng/pc/PaperList.vue +757 -757
- package/src/filiale/yangchunboneng/pc/SelectCheckPlan.vue +331 -331
- package/src/filiale/yangchunboneng/pc.js +29 -29
- package/src/main.js +33 -33
- package/src/rongcheng.js +319 -319
- package/yarn-error.log +0 -140
|
@@ -1,226 +1,226 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="basic-main" style="height: 100%">
|
|
3
|
-
<div>
|
|
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">公  司</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="requestData.chengeDate"
|
|
16
|
-
v-model="requestData.chengeDate"
|
|
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="selUserIds" v-model='selUserIds'
|
|
23
|
-
:value-single="false" clear-button search multiple
|
|
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 class="select_list select"
|
|
30
|
-
placeholder='请选择' style="width: 60%"
|
|
31
|
-
:value.sync="requestData.f_book_checker" v-model="requestData.f_book_checker"
|
|
32
|
-
:options='users'
|
|
33
|
-
filer-key="name"
|
|
34
|
-
close-on-select clear-button
|
|
35
|
-
:value-single="true">
|
|
36
|
-
</v-select>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="col-sm-3 form-input-group" style="width: 20%;float:right;">
|
|
39
|
-
<button class="btn btn-primary" @click="search">查询</button>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
<amap-trajectory :outerlinedata.sync="outerlinedata" :pathnavigatorstyle="pathnavigatorstyle" ></amap-trajectory>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="col-sm-3">
|
|
46
|
-
<div id="zzz" class="basic-main" style="flex:1;margin-left: 0px;overflow: hidden">
|
|
47
|
-
<div class="flex">
|
|
48
|
-
<div class="panel panel-info" style="flex: 4;margin-top:0px;height: 50%">
|
|
49
|
-
<div class="panel-heading" style="height: auto">
|
|
50
|
-
<h3 class="panel-title">轨迹记录</h3>
|
|
51
|
-
</div>
|
|
52
|
-
<div class="panel-body" style="overflow: scroll">
|
|
53
|
-
<accordion :one-at-a-time="true" v-if="reponData.length>0">
|
|
54
|
-
<template v-for="row in reponData">
|
|
55
|
-
<panel is-open="false" type="primary">
|
|
56
|
-
<strong slot="header">用户编号:{{row.f_user_id}} 用户姓名:{{row.f_user_name}}</strong>
|
|
57
|
-
<div v-for="(idx,item) in row.result" @click="chengeLocation(item)" :class="{'alert alert-info':idx%2===0,'alert alert-success':idx%2!==0}">
|
|
58
|
-
轨迹时间段:{{item.f_start_date}} ~ {{item.f_end_date}}
|
|
59
|
-
</div>
|
|
60
|
-
</panel>
|
|
61
|
-
</template>
|
|
62
|
-
</accordion>
|
|
63
|
-
<h4 class="panel-title" v-else>暂无相关数据</h4>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
</div>
|
|
72
|
-
</template>
|
|
73
|
-
|
|
74
|
-
<script>
|
|
75
|
-
import co from 'co'
|
|
76
|
-
import * as Util from '../../Util'
|
|
77
|
-
import {HttpResetClass} from 'vue-client'
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* 1. 首先获取当前选择的分公司下所有带定位角色的所有用户
|
|
81
|
-
* 2. 根据查询出来的所有用户的id和选择的时间去轨迹表查询,获取具体轨迹的时间段
|
|
82
|
-
* 3. 渲染给前台页面,前台根据选择的用户和时间端获取轨迹信息去渲染轨迹,每次只可以渲染一组轨迹
|
|
83
|
-
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
export default {
|
|
87
|
-
title: "安检员轨迹展示",
|
|
88
|
-
data() {
|
|
89
|
-
return {
|
|
90
|
-
toUserIds: '', //当前分公司下所有的用户id
|
|
91
|
-
selUserIds:[], // 当前选择的用户Id
|
|
92
|
-
requestData: {
|
|
93
|
-
chengeDate: Util.toStandardDateString(),
|
|
94
|
-
f_book_checker:'',
|
|
95
|
-
userIds: '',
|
|
96
|
-
},
|
|
97
|
-
searchUserEndOption: [], //当前公司的所有安检员
|
|
98
|
-
reponData: [], // 请求到的结果集合
|
|
99
|
-
outerlinedata: [], //点集
|
|
100
|
-
users:[{label: '全部', value: ''}],
|
|
101
|
-
pathnavigatorstyle: {
|
|
102
|
-
width: 16, //图标宽度
|
|
103
|
-
height: 32, // 图标高度
|
|
104
|
-
iconBase64: 'https://webapi.amap.com/ui/1.1/ui/misc/PathSimplifier/examples/imgs/car.png'//图标地址(外链地址或者Base64)
|
|
105
|
-
},
|
|
106
|
-
f_filialeids: '', //分公司ids
|
|
107
|
-
path: [],
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
methods: {
|
|
111
|
-
initBookChecker(){
|
|
112
|
-
new HttpResetClass().load('POST', '/rs/search', {
|
|
113
|
-
data: {
|
|
114
|
-
source: `root.getResourceById($${this.$login.f.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($网格员$) != -1)`,
|
|
115
|
-
userid: this.$login.f.id
|
|
116
|
-
}
|
|
117
|
-
}, {resolveMsg: null, rejectMsg: null}).then(res=>{
|
|
118
|
-
let data = res.data
|
|
119
|
-
const addedNames = new Set()
|
|
120
|
-
this.users = []
|
|
121
|
-
data.forEach(user => {
|
|
122
|
-
if (user.state === '在职') {
|
|
123
|
-
if (!addedNames.has(user.name)) {
|
|
124
|
-
this.users.push({label:user.name,value:user.id})
|
|
125
|
-
addedNames.add(user.name)
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
})
|
|
129
|
-
console.log(this.users)
|
|
130
|
-
})
|
|
131
|
-
},
|
|
132
|
-
search() {
|
|
133
|
-
if (this.selUserIds.length==0&&!this.requestData.userIds) {
|
|
134
|
-
this.requestData.userIds = this.toUserIds
|
|
135
|
-
}
|
|
136
|
-
if (this.requestData.f_book_checker){
|
|
137
|
-
const content = this.requestData.userIds.slice(1, -1)
|
|
138
|
-
const elements = content.split(',')
|
|
139
|
-
elements.push(`'${this.requestData.f_book_checker}'`)
|
|
140
|
-
this.requestData.userIds = `(${elements.join(',')})`
|
|
141
|
-
}
|
|
142
|
-
if (!this.f_filialeids) {
|
|
143
|
-
return this.$showMessage("请选择需要查询的分公司")
|
|
144
|
-
}
|
|
145
|
-
if (!this.requestData.chengeDate) {
|
|
146
|
-
return this.$showMessage("请选择需要查看的轨迹时间")
|
|
147
|
-
}
|
|
148
|
-
this.$resetpost('rs/logic/QueryUserTracksByCompany',this.requestData,{resolveMsg: "轨迹记录查询成功", rejectMsg: "轨迹记录查询失败"}).then((response)=>{
|
|
149
|
-
if (response!=undefined && response.data.code == 200) {
|
|
150
|
-
this.reponData = response.data.data
|
|
151
|
-
}else if (response!=null && response.data.code == 404) {
|
|
152
|
-
this.reponData = []
|
|
153
|
-
this.$showMessage("未查询到当前用户的相关轨迹信息")
|
|
154
|
-
} else if (response!=null && response.data.code == 555) {
|
|
155
|
-
this.$showMessage("查询轨迹信息错误!错误原因:"+response.data.msg)
|
|
156
|
-
}
|
|
157
|
-
})
|
|
158
|
-
},
|
|
159
|
-
getRes(obj){
|
|
160
|
-
// this.model.f_filialeids = this.$login.convertToIn(obj.resids);
|
|
161
|
-
console.log(obj)
|
|
162
|
-
if (obj.res != undefined && obj.res.length > 0 && obj.res[0] != undefined) {
|
|
163
|
-
this.getNewData(obj.res[0])
|
|
164
|
-
this.initBookChecker(obj.res[0])
|
|
165
|
-
}
|
|
166
|
-
this.f_filialeids = this.$login.convertToIn(obj.resids);
|
|
167
|
-
},
|
|
168
|
-
chengeLocation(row) {
|
|
169
|
-
console.log(row)
|
|
170
|
-
this.$resetpost('rs/logic/queryRemoteLocationMapData',{data:{id:row.id}},{resolveMsg: "查询渲染轨迹成功", rejectMsg:"查询渲染轨迹失败!"}).then((response)=>{
|
|
171
|
-
if (response!=undefined && response.data!=undefined) {
|
|
172
|
-
this.path = response.data
|
|
173
|
-
let name = `${row.f_user_name},${row.f_start_date}~${row.f_end_date}轨迹`
|
|
174
|
-
this.outerlinedata = [{path:this.path,speed:Math.ceil(this.path.length / 2),name:name}]
|
|
175
|
-
}
|
|
176
|
-
})
|
|
177
|
-
},
|
|
178
|
-
//获取定位人员类表
|
|
179
|
-
async getNewData(organization){
|
|
180
|
-
// let organization = '公司名称'
|
|
181
|
-
// let userRolestr = '需要定位人员'
|
|
182
|
-
let userRolestr = '安检员'
|
|
183
|
-
let res =await new HttpResetClass().load('POST', '/rs/search', {
|
|
184
|
-
// source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($需要定位人员$) != -1))',
|
|
185
|
-
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)",
|
|
186
|
-
userid: this.$login.f.id
|
|
187
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
188
|
-
let dataEnd = [];
|
|
189
|
-
let idsEnd = [];
|
|
190
|
-
res.data.forEach(res=>{
|
|
191
|
-
let h=true
|
|
192
|
-
dataEnd.forEach(per=>{
|
|
193
|
-
if(res.id==per.value){
|
|
194
|
-
h=false
|
|
195
|
-
}
|
|
196
|
-
})
|
|
197
|
-
if(h){
|
|
198
|
-
dataEnd.push({label:res.name,value:res.id})
|
|
199
|
-
idsEnd.push(res.id)
|
|
200
|
-
}
|
|
201
|
-
})
|
|
202
|
-
this.toUserIds = this.$login.convertToIn(idsEnd); //所有的员工ID
|
|
203
|
-
this.searchUserEndOption = dataEnd
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
ready(){
|
|
207
|
-
this.initBookChecker()
|
|
208
|
-
},
|
|
209
|
-
watch: {
|
|
210
|
-
'selUserIds':function (val) {
|
|
211
|
-
if (val=='') {
|
|
212
|
-
this.requestData.userIds = ''
|
|
213
|
-
}else {
|
|
214
|
-
this.requestData.userIds = this.$login.convertToIn(val)
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
</script>
|
|
220
|
-
|
|
221
|
-
<style lang="less" scoped>
|
|
222
|
-
.amap-main {
|
|
223
|
-
height: 90%;
|
|
224
|
-
padding-right:10px;
|
|
225
|
-
}
|
|
226
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="basic-main" style="height: 100%">
|
|
3
|
+
<div>
|
|
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">公  司</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="requestData.chengeDate"
|
|
16
|
+
v-model="requestData.chengeDate"
|
|
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="selUserIds" v-model='selUserIds'
|
|
23
|
+
:value-single="false" clear-button search multiple
|
|
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 class="select_list select"
|
|
30
|
+
placeholder='请选择' style="width: 60%"
|
|
31
|
+
:value.sync="requestData.f_book_checker" v-model="requestData.f_book_checker"
|
|
32
|
+
:options='users'
|
|
33
|
+
filer-key="name"
|
|
34
|
+
close-on-select clear-button
|
|
35
|
+
:value-single="true">
|
|
36
|
+
</v-select>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="col-sm-3 form-input-group" style="width: 20%;float:right;">
|
|
39
|
+
<button class="btn btn-primary" @click="search">查询</button>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<amap-trajectory :outerlinedata.sync="outerlinedata" :pathnavigatorstyle="pathnavigatorstyle" ></amap-trajectory>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="col-sm-3">
|
|
46
|
+
<div id="zzz" class="basic-main" style="flex:1;margin-left: 0px;overflow: hidden">
|
|
47
|
+
<div class="flex">
|
|
48
|
+
<div class="panel panel-info" style="flex: 4;margin-top:0px;height: 50%">
|
|
49
|
+
<div class="panel-heading" style="height: auto">
|
|
50
|
+
<h3 class="panel-title">轨迹记录</h3>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="panel-body" style="overflow: scroll">
|
|
53
|
+
<accordion :one-at-a-time="true" v-if="reponData.length>0">
|
|
54
|
+
<template v-for="row in reponData">
|
|
55
|
+
<panel is-open="false" type="primary">
|
|
56
|
+
<strong slot="header">用户编号:{{row.f_user_id}} 用户姓名:{{row.f_user_name}}</strong>
|
|
57
|
+
<div v-for="(idx,item) in row.result" @click="chengeLocation(item)" :class="{'alert alert-info':idx%2===0,'alert alert-success':idx%2!==0}">
|
|
58
|
+
轨迹时间段:{{item.f_start_date}} ~ {{item.f_end_date}}
|
|
59
|
+
</div>
|
|
60
|
+
</panel>
|
|
61
|
+
</template>
|
|
62
|
+
</accordion>
|
|
63
|
+
<h4 class="panel-title" v-else>暂无相关数据</h4>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<script>
|
|
75
|
+
import co from 'co'
|
|
76
|
+
import * as Util from '../../Util'
|
|
77
|
+
import {HttpResetClass} from 'vue-client'
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* 1. 首先获取当前选择的分公司下所有带定位角色的所有用户
|
|
81
|
+
* 2. 根据查询出来的所有用户的id和选择的时间去轨迹表查询,获取具体轨迹的时间段
|
|
82
|
+
* 3. 渲染给前台页面,前台根据选择的用户和时间端获取轨迹信息去渲染轨迹,每次只可以渲染一组轨迹
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
export default {
|
|
87
|
+
title: "安检员轨迹展示",
|
|
88
|
+
data() {
|
|
89
|
+
return {
|
|
90
|
+
toUserIds: '', //当前分公司下所有的用户id
|
|
91
|
+
selUserIds:[], // 当前选择的用户Id
|
|
92
|
+
requestData: {
|
|
93
|
+
chengeDate: Util.toStandardDateString(),
|
|
94
|
+
f_book_checker:'',
|
|
95
|
+
userIds: '',
|
|
96
|
+
},
|
|
97
|
+
searchUserEndOption: [], //当前公司的所有安检员
|
|
98
|
+
reponData: [], // 请求到的结果集合
|
|
99
|
+
outerlinedata: [], //点集
|
|
100
|
+
users:[{label: '全部', value: ''}],
|
|
101
|
+
pathnavigatorstyle: {
|
|
102
|
+
width: 16, //图标宽度
|
|
103
|
+
height: 32, // 图标高度
|
|
104
|
+
iconBase64: 'https://webapi.amap.com/ui/1.1/ui/misc/PathSimplifier/examples/imgs/car.png'//图标地址(外链地址或者Base64)
|
|
105
|
+
},
|
|
106
|
+
f_filialeids: '', //分公司ids
|
|
107
|
+
path: [],
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
methods: {
|
|
111
|
+
initBookChecker(){
|
|
112
|
+
new HttpResetClass().load('POST', '/rs/search', {
|
|
113
|
+
data: {
|
|
114
|
+
source: `root.getResourceById($${this.$login.f.orgid}$,$organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$).indexOf($网格员$) != -1)`,
|
|
115
|
+
userid: this.$login.f.id
|
|
116
|
+
}
|
|
117
|
+
}, {resolveMsg: null, rejectMsg: null}).then(res=>{
|
|
118
|
+
let data = res.data
|
|
119
|
+
const addedNames = new Set()
|
|
120
|
+
this.users = []
|
|
121
|
+
data.forEach(user => {
|
|
122
|
+
if (user.state === '在职') {
|
|
123
|
+
if (!addedNames.has(user.name)) {
|
|
124
|
+
this.users.push({label:user.name,value:user.id})
|
|
125
|
+
addedNames.add(user.name)
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
console.log(this.users)
|
|
130
|
+
})
|
|
131
|
+
},
|
|
132
|
+
search() {
|
|
133
|
+
if (this.selUserIds.length==0&&!this.requestData.userIds) {
|
|
134
|
+
this.requestData.userIds = this.toUserIds
|
|
135
|
+
}
|
|
136
|
+
if (this.requestData.f_book_checker){
|
|
137
|
+
const content = this.requestData.userIds.slice(1, -1)
|
|
138
|
+
const elements = content.split(',')
|
|
139
|
+
elements.push(`'${this.requestData.f_book_checker}'`)
|
|
140
|
+
this.requestData.userIds = `(${elements.join(',')})`
|
|
141
|
+
}
|
|
142
|
+
if (!this.f_filialeids) {
|
|
143
|
+
return this.$showMessage("请选择需要查询的分公司")
|
|
144
|
+
}
|
|
145
|
+
if (!this.requestData.chengeDate) {
|
|
146
|
+
return this.$showMessage("请选择需要查看的轨迹时间")
|
|
147
|
+
}
|
|
148
|
+
this.$resetpost('rs/logic/QueryUserTracksByCompany',this.requestData,{resolveMsg: "轨迹记录查询成功", rejectMsg: "轨迹记录查询失败"}).then((response)=>{
|
|
149
|
+
if (response!=undefined && response.data.code == 200) {
|
|
150
|
+
this.reponData = response.data.data
|
|
151
|
+
}else if (response!=null && response.data.code == 404) {
|
|
152
|
+
this.reponData = []
|
|
153
|
+
this.$showMessage("未查询到当前用户的相关轨迹信息")
|
|
154
|
+
} else if (response!=null && response.data.code == 555) {
|
|
155
|
+
this.$showMessage("查询轨迹信息错误!错误原因:"+response.data.msg)
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
},
|
|
159
|
+
getRes(obj){
|
|
160
|
+
// this.model.f_filialeids = this.$login.convertToIn(obj.resids);
|
|
161
|
+
console.log(obj)
|
|
162
|
+
if (obj.res != undefined && obj.res.length > 0 && obj.res[0] != undefined) {
|
|
163
|
+
this.getNewData(obj.res[0])
|
|
164
|
+
this.initBookChecker(obj.res[0])
|
|
165
|
+
}
|
|
166
|
+
this.f_filialeids = this.$login.convertToIn(obj.resids);
|
|
167
|
+
},
|
|
168
|
+
chengeLocation(row) {
|
|
169
|
+
console.log(row)
|
|
170
|
+
this.$resetpost('rs/logic/queryRemoteLocationMapData',{data:{id:row.id}},{resolveMsg: "查询渲染轨迹成功", rejectMsg:"查询渲染轨迹失败!"}).then((response)=>{
|
|
171
|
+
if (response!=undefined && response.data!=undefined) {
|
|
172
|
+
this.path = response.data
|
|
173
|
+
let name = `${row.f_user_name},${row.f_start_date}~${row.f_end_date}轨迹`
|
|
174
|
+
this.outerlinedata = [{path:this.path,speed:Math.ceil(this.path.length / 2),name:name}]
|
|
175
|
+
}
|
|
176
|
+
})
|
|
177
|
+
},
|
|
178
|
+
//获取定位人员类表
|
|
179
|
+
async getNewData(organization){
|
|
180
|
+
// let organization = '公司名称'
|
|
181
|
+
// let userRolestr = '需要定位人员'
|
|
182
|
+
let userRolestr = '安检员'
|
|
183
|
+
let res =await new HttpResetClass().load('POST', '/rs/search', {
|
|
184
|
+
// source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($需要定位人员$) != -1))',
|
|
185
|
+
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)",
|
|
186
|
+
userid: this.$login.f.id
|
|
187
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
188
|
+
let dataEnd = [];
|
|
189
|
+
let idsEnd = [];
|
|
190
|
+
res.data.forEach(res=>{
|
|
191
|
+
let h=true
|
|
192
|
+
dataEnd.forEach(per=>{
|
|
193
|
+
if(res.id==per.value){
|
|
194
|
+
h=false
|
|
195
|
+
}
|
|
196
|
+
})
|
|
197
|
+
if(h){
|
|
198
|
+
dataEnd.push({label:res.name,value:res.id})
|
|
199
|
+
idsEnd.push(res.id)
|
|
200
|
+
}
|
|
201
|
+
})
|
|
202
|
+
this.toUserIds = this.$login.convertToIn(idsEnd); //所有的员工ID
|
|
203
|
+
this.searchUserEndOption = dataEnd
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
ready(){
|
|
207
|
+
this.initBookChecker()
|
|
208
|
+
},
|
|
209
|
+
watch: {
|
|
210
|
+
'selUserIds':function (val) {
|
|
211
|
+
if (val=='') {
|
|
212
|
+
this.requestData.userIds = ''
|
|
213
|
+
}else {
|
|
214
|
+
this.requestData.userIds = this.$login.convertToIn(val)
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
</script>
|
|
220
|
+
|
|
221
|
+
<style lang="less" scoped>
|
|
222
|
+
.amap-main {
|
|
223
|
+
height: 90%;
|
|
224
|
+
padding-right:10px;
|
|
225
|
+
}
|
|
226
|
+
</style>
|