|
|
@@ -14,6 +14,15 @@
|
|
14
|
14
|
start-placeholder="开始日期"
|
|
15
|
15
|
end-placeholder="结束日期"/>
|
|
16
|
16
|
<el-input v-model="keyword" placeholder="请输入呼叫号码" class="filter-item"/>
|
|
|
17
|
+ <el-cascader
|
|
|
18
|
+ v-model="provinceCity"
|
|
|
19
|
+ :options="provinceCityDatas"
|
|
|
20
|
+ :props="props"
|
|
|
21
|
+ placeholder="请选择省市"
|
|
|
22
|
+ class="filter-item"
|
|
|
23
|
+ clearable
|
|
|
24
|
+ filterable
|
|
|
25
|
+ change-on-select />
|
|
17
|
26
|
<el-select v-model="roleId" class="filter-item" filterable clearable placeholder="请选择角色">
|
|
18
|
27
|
<el-option
|
|
19
|
28
|
v-for="item in roleOptions"
|
|
|
@@ -22,6 +31,7 @@
|
|
22
|
31
|
:value="item.usercode"/>
|
|
23
|
32
|
</el-select>
|
|
24
|
33
|
<el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
|
|
|
34
|
+ <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_export">导出</el-button>
|
|
25
|
35
|
</div>
|
|
26
|
36
|
|
|
27
|
37
|
<el-table v-loading="loading" :data="dataLists" border stripe>
|
|
|
@@ -100,10 +110,12 @@
|
|
100
|
110
|
</template>
|
|
101
|
111
|
|
|
102
|
112
|
<script>
|
|
|
113
|
+import { getProviceCity } from '@/api/commonAPI'
|
|
103
|
114
|
import { getUserAccountLists } from '@/api/systemSetup/roleSetting/userManage'
|
|
104
|
115
|
import { getCallRecords } from '@/api/trafficData/trafficData'
|
|
105
|
116
|
import audioPlayer from '@/components/audioPlayer'
|
|
106
|
117
|
import { pickerOptions } from '@/utils'
|
|
|
118
|
+import { mapGetters } from 'vuex'
|
|
107
|
119
|
import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
|
|
108
|
120
|
export default {
|
|
109
|
121
|
name: 'CallRecord',
|
|
|
@@ -175,6 +187,14 @@ export default {
|
|
175
|
187
|
roleOptions: [],
|
|
176
|
188
|
searchDate: '',
|
|
177
|
189
|
pickerOptions,
|
|
|
190
|
+ provinceCity: [], // 省市下拉绑定的值
|
|
|
191
|
+ provinceCityDatas: [], // 省市下拉数据
|
|
|
192
|
+ props: {
|
|
|
193
|
+ // 自定义省市下拉数据的key值
|
|
|
194
|
+ value: 'name',
|
|
|
195
|
+ label: 'name',
|
|
|
196
|
+ children: 'entityJson'
|
|
|
197
|
+ },
|
|
178
|
198
|
recordpath: '', // 录音的路径
|
|
179
|
199
|
pageParams: {
|
|
180
|
200
|
pageindex: 1, // 当前第几页
|
|
|
@@ -184,7 +204,13 @@ export default {
|
|
184
|
204
|
dataLists: [] // 列表数据
|
|
185
|
205
|
}
|
|
186
|
206
|
},
|
|
|
207
|
+ computed: {
|
|
|
208
|
+ ...mapGetters([
|
|
|
209
|
+ 'token'
|
|
|
210
|
+ ])
|
|
|
211
|
+ },
|
|
187
|
212
|
created() {
|
|
|
213
|
+ this.getProCity()
|
|
188
|
214
|
this.getRoleSelects()
|
|
189
|
215
|
this.getList()
|
|
190
|
216
|
document.onkeyup = (e) => {
|
|
|
@@ -202,6 +228,8 @@ export default {
|
|
202
|
228
|
pagesize: this.pageParams.pagesize, // 每页几条信息
|
|
203
|
229
|
keyword: this.keyword.replace(/\s*/g, ""), // 否 string 模糊查询(呼叫号码)
|
|
204
|
230
|
usercode: this.roleId, // 否 string 模糊查询(呼叫号码)
|
|
|
231
|
+ province: this.provinceCity[0] == undefined?'':this.provinceCity[0],//省
|
|
|
232
|
+ city: this.provinceCity[1] == undefined?'':this.provinceCity[1],//市
|
|
205
|
233
|
stime: this.searchDate && this.searchDate[0],
|
|
206
|
234
|
etime: this.searchDate && this.searchDate[1]
|
|
207
|
235
|
}
|
|
|
@@ -219,6 +247,20 @@ export default {
|
|
219
|
247
|
btn_search() {
|
|
220
|
248
|
this.getList()
|
|
221
|
249
|
},
|
|
|
250
|
+ //导出
|
|
|
251
|
+ btn_export() {
|
|
|
252
|
+ alert(this.token)
|
|
|
253
|
+ debugger
|
|
|
254
|
+ window.location.href = this.$store.getters.serverConfig.BASE_API + 'callrecords/exportexcel?pageindex=' + this.pageParams.pageindex +
|
|
|
255
|
+ '&pagesize=' + this.pageParams.pagesize +
|
|
|
256
|
+ '&stime=' + this.searchDate && this.searchDate[0] +
|
|
|
257
|
+ '&etime=' + this.searchDate && this.searchDate[1] +
|
|
|
258
|
+ '&province=' + this.provinceCity[0] == undefined?'':this.provinceCity[0] +
|
|
|
259
|
+ '&city=' + this.provinceCity[1] == undefined?'':this.provinceCity[1] +
|
|
|
260
|
+ '&keyword=' + this.keyword.replace(/\s*/g, "") +
|
|
|
261
|
+ '&token=' + this.token +
|
|
|
262
|
+ '&usercode=' + this.roleId
|
|
|
263
|
+ },
|
|
222
|
264
|
// 获取角色下拉
|
|
223
|
265
|
getRoleSelects() {
|
|
224
|
266
|
getUserAccountLists().then(response => {
|
|
|
@@ -227,6 +269,17 @@ export default {
|
|
227
|
269
|
}
|
|
228
|
270
|
})
|
|
229
|
271
|
},
|
|
|
272
|
+ // 获取省市下拉数据
|
|
|
273
|
+ getProCity() {
|
|
|
274
|
+ return new Promise(resolve => {
|
|
|
275
|
+ getProviceCity().then(response => {
|
|
|
276
|
+ if (response.state.toLowerCase() === 'success') {
|
|
|
277
|
+ this.provinceCityDatas = response.data
|
|
|
278
|
+ }
|
|
|
279
|
+ })
|
|
|
280
|
+ resolve()
|
|
|
281
|
+ })
|
|
|
282
|
+ },
|
|
230
|
283
|
// 播放录音
|
|
231
|
284
|
playSound(rec_file, artist) {
|
|
232
|
285
|
this.$layer.iframe({
|