|
@ -1,39 +1,67 @@
|
1
|
1
|
<template>
|
2
|
|
<div class="track-container">
|
|
2
|
<div class="track-container" @click="customVisibled = false">
|
3
|
3
|
<div class="search-container">
|
4
|
4
|
<div class="search-ctn">
|
5
|
5
|
<div>
|
6
|
|
<div class="input-rule">
|
7
|
|
<t-date-picker v-model="queryCondition.rangeDate"
|
8
|
|
align-right
|
9
|
|
style="width:320px;"
|
10
|
|
type="dateTimeRange"
|
11
|
|
placeholder="选择时间段"
|
12
|
|
@date-change="onChange"></t-date-picker>
|
|
6
|
<div style="display: flex;">
|
|
7
|
<t-input v-model="queryCondition.alarmPerson" placeholder="员工姓名/员工工号">
|
|
8
|
<template slot="append">
|
|
9
|
<t-button color="success" icon="search-outline" @click="onSearch">查询</t-button>
|
|
10
|
</template>
|
|
11
|
</t-input>
|
|
12
|
<t-button icon="filter-outline" style="margin: 0 10px;" @click="slideVisible = !slideVisible"></t-button>
|
13
|
13
|
</div>
|
14
|
14
|
</div>
|
15
|
|
<div>
|
16
|
|
<div class="label">姓名:</div>
|
17
|
|
<div class="input-rule">
|
18
|
|
<t-input v-model="queryCondition.alarmPerson" placeholder="请输入..."></t-input>
|
19
|
|
</div>
|
20
|
|
</div>
|
21
|
|
<div class="btns">
|
22
|
|
<t-button color="success" icon="search-outline" @click="onSearch">查询</t-button>
|
23
|
|
<t-button color="secondary" icon="loading" class="reset-btn" @click="onReset">重置</t-button>
|
|
15
|
<div class="btns" >
|
24
|
16
|
<t-button color="secondary" icon="upload-outline" @click="toExport">导出至Excel</t-button>
|
|
17
|
<t-dropdown :visibled="customVisibled" trigger-mode="custom">
|
|
18
|
<t-button slot="trigger" color="secondary" icon="tile-four-outline" @click="onTriggerClick"></t-button><!--aid-table-edit-->
|
|
19
|
<div slot="popper">
|
|
20
|
<div style="border-radius: 5px;padding: 20px 20px 20px 20px;background-color: white;">
|
|
21
|
<t-checkbox-group v-model="social" vertical @change="checkAllGroupChange">
|
|
22
|
<t-checkbox v-for="(item) in columns" :key="item.label" :value="item.label" :label="item.label">
|
|
23
|
<span>{{ item.label }}</span>
|
|
24
|
</t-checkbox>
|
|
25
|
</t-checkbox-group>
|
|
26
|
<div style="padding-bottom: 10px">
|
|
27
|
<t-checkbox
|
|
28
|
:indeterminate="indeterminate"
|
|
29
|
:checked.sync="checkAll"
|
|
30
|
@click.prevent.native="handleCheckAll">全选
|
|
31
|
</t-checkbox>
|
|
32
|
</div>
|
|
33
|
<t-button color="success" size="sm" @click="onCloseClick">确认</t-button>
|
|
34
|
</div>
|
|
35
|
</div>
|
|
36
|
</t-dropdown>
|
|
37
|
<t-button color="secondary" icon="loading" class="reset-btn" @click="onReset"></t-button>
|
25
|
38
|
</div>
|
26
|
39
|
</div>
|
|
40
|
<div class="animate-demo-wrapper">
|
|
41
|
<transition name="slide-up">
|
|
42
|
<div v-show="slideVisible" class="transition-box allCondition">
|
|
43
|
<div class="input-rule" style="display: flex;">
|
|
44
|
<div class="label" style="display: flex;align-items: center;">时间:</div>
|
|
45
|
<t-date-picker v-model="queryCondition.rangeDate"
|
|
46
|
align-right
|
|
47
|
style="width:320px;"
|
|
48
|
type="dateTimeRange"
|
|
49
|
placeholder="选择时间段"
|
|
50
|
@date-change="onChange"></t-date-picker>
|
|
51
|
</div>
|
|
52
|
</div>
|
|
53
|
</transition>
|
|
54
|
</div>
|
27
|
55
|
</div>
|
28
|
|
<div>
|
|
56
|
<div style="padding-top: 5px">
|
29
|
57
|
<t-table :data="table.data" :loading="tableLoading" >
|
30
|
58
|
<t-table-column type="selection" width="70"></t-table-column>
|
31
|
|
<t-table-column prop="entityName" label="姓名"></t-table-column>
|
32
|
|
<t-table-column prop="entityPosition" label="职务"></t-table-column>
|
33
|
|
<t-table-column prop="mapAreaName" label="位置区域"></t-table-column>
|
34
|
|
<t-table-column prop="durationTime" label="停留时长"></t-table-column>
|
35
|
|
<t-table-column prop="inTime" :formatter="timestampToTime" label="进入时间"></t-table-column>
|
36
|
|
<t-table-column prop="outTime" :formatter="timestampToTime" label="离开时间"></t-table-column>
|
|
59
|
<t-table-column v-if="columns[0].show" prop="entityName" label="姓名"></t-table-column>
|
|
60
|
<t-table-column v-if="columns[1].show" prop="entityPosition" label="职务"></t-table-column>
|
|
61
|
<t-table-column v-if="columns[2].show" prop="mapAreaName" label="位置区域"></t-table-column>
|
|
62
|
<t-table-column v-if="columns[3].show" prop="durationTime" label="停留时长"></t-table-column>
|
|
63
|
<t-table-column v-if="columns[4].show" :formatter="timestampToTime" prop="inTime" label="进入时间"></t-table-column>
|
|
64
|
<t-table-column v-if="columns[5].show" :formatter="timestampToTime" prop="outTime" label="离开时间"></t-table-column>
|
37
|
65
|
</t-table>
|
38
|
66
|
<t-pager :total="table.pager.total" :current.sync="table.pager.currentPage"
|
39
|
67
|
:page-size.sync="table.pager.size"
|
|
@ -52,6 +80,32 @@ import services from '../../conf/services'
|
52
|
80
|
export default {
|
53
|
81
|
data() {
|
54
|
82
|
return {
|
|
83
|
slideVisible: false,
|
|
84
|
indeterminate: true,
|
|
85
|
checkAll: true,
|
|
86
|
social: ['姓名', '职务', '位置区域', '停留时长', '进入时间', '离开时间'],
|
|
87
|
columns: [
|
|
88
|
{
|
|
89
|
label: '姓名',
|
|
90
|
show: true
|
|
91
|
}, {
|
|
92
|
label: '职务',
|
|
93
|
show: true
|
|
94
|
}, {
|
|
95
|
label: '位置区域',
|
|
96
|
show: true
|
|
97
|
}, {
|
|
98
|
label: '停留时长',
|
|
99
|
show: true
|
|
100
|
}, {
|
|
101
|
label: '进入时间',
|
|
102
|
show: true
|
|
103
|
}, {
|
|
104
|
label: '离开时间',
|
|
105
|
show: true
|
|
106
|
}
|
|
107
|
],
|
|
108
|
customVisibled: false,
|
55
|
109
|
table: {
|
56
|
110
|
data: [],
|
57
|
111
|
pager: {
|
|
@ -72,6 +126,41 @@ export default {
|
72
|
126
|
this.getList()
|
73
|
127
|
},
|
74
|
128
|
methods: {
|
|
129
|
checkAllGroupChange () {
|
|
130
|
if (this.social.length === 6) {
|
|
131
|
this.indeterminate = false
|
|
132
|
this.checkAll = true
|
|
133
|
} else if (this.social.length > 0) {
|
|
134
|
this.indeterminate = true
|
|
135
|
this.checkAll = false
|
|
136
|
} else {
|
|
137
|
this.indeterminate = false
|
|
138
|
this.checkAll = false
|
|
139
|
}
|
|
140
|
},
|
|
141
|
handleCheckAll () {
|
|
142
|
debugger
|
|
143
|
if (this.indeterminate) {
|
|
144
|
this.checkAll = false
|
|
145
|
} else {
|
|
146
|
this.checkAll = !this.checkAll
|
|
147
|
}
|
|
148
|
this.indeterminate = false
|
|
149
|
if (this.checkAll) {
|
|
150
|
this.social = ['姓名', '职务', '位置区域', '停留时长', '进入时间', '离开时间']
|
|
151
|
} else {
|
|
152
|
this.social = []
|
|
153
|
}
|
|
154
|
},
|
|
155
|
onTriggerClick() {
|
|
156
|
this.customVisibled = true
|
|
157
|
},
|
|
158
|
onCloseClick() {
|
|
159
|
this.columns.forEach(e => {
|
|
160
|
e.show = this.social.indexOf(e.label) >= 0
|
|
161
|
})
|
|
162
|
this.customVisibled = false
|
|
163
|
},
|
75
|
164
|
getList() {
|
76
|
165
|
this.tableLoading = true
|
77
|
166
|
var start = ''
|