|
@@ -1,78 +1,87 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="customerStaff-wrap" v-loading="pageLoading">
|
3
|
|
- <!-- S 筛选区 -->
|
4
|
|
- <div class="screenBox" style="padding-right: 100px;">
|
5
|
|
- <!-- 企微主体 -->
|
6
|
|
- <div class="common-screen-item">
|
7
|
|
- <label class="common-screen-label">企微主体</label>
|
8
|
|
- <!-- 系统管理员 -->
|
9
|
|
- <el-cascader v-if="$cookie.getCookie('isSuperManage') == 1" v-model="system_enterprise" size="small" :options="enterpriseList" :props="{value:'self_id',label:'self_name',children:'manage_corp_list'}" @change="onChangeCorpidSystem" clearable filterable placeholder="请选择" class="select-cls cascader" />
|
10
|
|
- <!-- 非系统管理员 -->
|
11
|
|
- <el-select v-else v-model="filter.corpid" size="small" filterable placeholder="请选择" @change="onChangeCorpid" clearable class="select-cls">
|
12
|
|
- <el-option v-for="(item, index) in enterpriseList" :key="index+'enterpriseList'" :label="item.corp_name?item.corp_name:item.corp_full_name?item.corp_full_name:item.corpid" :value="item.corpid" />
|
13
|
|
- </el-select>
|
14
|
|
- </div>
|
15
|
|
- <!-- 成员 -->
|
16
|
|
- <selfInputV2 v-model="filter.keyword" label_name="成员" placeholder="请输入" @change="onChangeKeyword" />
|
17
|
|
- <!-- 客服状态 -->
|
18
|
|
- <selfChannel title="客服状态" type="customerStaffStatus" :reset="reset" placeholder="请选择" @channelDefine="onChangeCuStStatus" />
|
19
|
|
- <!-- 激活状态 -->
|
20
|
|
- <selfChannel title="激活状态" type="isActive" :reset="reset" placeholder="请选择" @channelDefine="onChangeActiveStatus" />
|
21
|
|
- <!-- 运营人员 -->
|
22
|
|
- <selfChannel title="运营人员" type="circleCreate" :reset="reset" placeholder="请选择" @channelDefine="onChangeOperatorId" />
|
23
|
|
-
|
24
|
|
- <div class="reset" @click="onClickReset">重置</div>
|
25
|
|
- <el-button v-if="isCanExport" class="export-btn" type="primary" size="mini" @click="onClickExport">导出Excel</el-button>
|
|
3
|
+ <!-- S 筛选区 -->
|
|
4
|
+ <div class="screenBox" style="padding-right: 100px;">
|
|
5
|
+ <!-- 企微主体 -->
|
|
6
|
+ <div class="common-screen-item">
|
|
7
|
+ <label class="common-screen-label">企微主体</label>
|
|
8
|
+ <!-- 系统管理员 -->
|
|
9
|
+ <el-cascader v-if="$cookie.getCookie('isSuperManage') == 1" v-model="system_enterprise" size="small" :options="enterpriseList" :props="{value:'self_id',label:'self_name',children:'manage_corp_list'}" @change="onChangeCorpidSystem" clearable filterable placeholder="请选择" class="select-cls cascader" />
|
|
10
|
+ <!-- 非系统管理员 -->
|
|
11
|
+ <el-select v-else v-model="filter.corpid" size="small" filterable placeholder="请选择" @change="onChangeCorpid" clearable class="select-cls">
|
|
12
|
+ <el-option v-for="(item, index) in enterpriseList" :key="index+'enterpriseList'" :label="item.corp_name?item.corp_name:item.corp_full_name?item.corp_full_name:item.corpid" :value="item.corpid" />
|
|
13
|
+ </el-select>
|
26
|
14
|
</div>
|
27
|
|
- <!-- E 筛选区 -->
|
28
|
|
- <!-- S 数据更新时间 -->
|
29
|
|
- <div class="update-time"><i class="el-icon-warning-outline" />数据更新时间:{{ updateTime || '-' }}</div>
|
30
|
|
- <!-- E 数据更新时间 -->
|
31
|
|
- <!-- S 明细表 detailsTable -->
|
32
|
|
- <div v-loading="detailLoading">
|
33
|
|
- <ux-grid class="detailsTable" ref="detailsTable" :border="false" @row-click="() => { return }" :header-cell-style="getHeaderCellStyle" show-footer-overflow="tooltip" show-overflow="tooltip" size="mini" :height="height">
|
34
|
|
- <ux-table-column v-for="(item, idx) in detailsTableCol" :key="item.column + item.name" :resizable="true" :field="item.column" :title="item.name" :min-width="item.min_width ? item.min_width : 160" :fixed="item.fixed ? item.fixed : ''" align="center">
|
35
|
|
- <template #header>
|
36
|
|
- <div class="flex-align-jus-center">
|
37
|
|
- {{ item.name }}
|
38
|
|
- <el-tooltip v-if="item.notes" :content="item.notes" placement="top">
|
39
|
|
- <div><i class="el-icon-question" /></div>
|
40
|
|
- </el-tooltip>
|
41
|
|
- <div v-if="item.enable_to_sort" class="sort-wrap">
|
42
|
|
- <i class="el-icon-caret-top" :class="{ 'active': filter.sort_field === item.column && filter.sort_type === 'asc' }" @click="onClickSort(item.column, 'asc')" />
|
43
|
|
- <i class="el-icon-caret-bottom" :class="{ 'active': filter.sort_field === item.column && filter.sort_type === 'desc' }" @click="onClickSort(item.column, 'desc')" />
|
44
|
|
- </div>
|
|
15
|
+ <!-- 成员 -->
|
|
16
|
+ <selfInputV2 v-model="filter.keyword" label_name="成员" placeholder="请输入" @change="onChangeKeyword" />
|
|
17
|
+ <!-- 客服状态 -->
|
|
18
|
+ <selfChannel title="客服状态" type="customerStaffStatus" :reset="reset" placeholder="请选择" @channelDefine="onChangeCuStStatus" />
|
|
19
|
+ <!-- 激活状态 -->
|
|
20
|
+ <selfChannel title="激活状态" type="isActive" :reset="reset" placeholder="请选择" @channelDefine="onChangeActiveStatus" />
|
|
21
|
+ <!-- 运营人员 -->
|
|
22
|
+ <selfChannel title="运营人员" type="circleCreate" :reset="reset" placeholder="请选择" @channelDefine="onChangeOperatorId" />
|
|
23
|
+
|
|
24
|
+ <div class="reset" @click="onClickReset">重置</div>
|
|
25
|
+ <el-button v-if="isCanExport" class="export-btn" type="primary" size="mini" @click="onClickExport">导出Excel</el-button>
|
|
26
|
+ </div>
|
|
27
|
+ <!-- E 筛选区 -->
|
|
28
|
+ <!-- S 数据更新时间 -->
|
|
29
|
+ <div class="update-time"><i class="el-icon-warning-outline" />数据更新时间:{{ updateTime || '-' }}</div>
|
|
30
|
+ <!-- E 数据更新时间 -->
|
|
31
|
+ <!-- S 明细表 detailsTable -->
|
|
32
|
+ <div v-loading="detailLoading">
|
|
33
|
+ <ux-grid class="detailsTable" ref="detailsTable" :border="false" @row-click="() => { return }" :header-cell-style="getHeaderCellStyle" show-footer-overflow="tooltip" show-overflow="tooltip" size="mini" :height="height">
|
|
34
|
+ <ux-table-column v-for="(item, idx) in detailsTableCol" :key="item.column + item.name" :resizable="true" :field="item.column" :title="item.name" :min-width="item.min_width ? item.min_width : 160" :fixed="item.fixed ? item.fixed : ''" align="center">
|
|
35
|
+ <template #header>
|
|
36
|
+ <div class="flex-align-jus-center">
|
|
37
|
+ {{ item.name }}
|
|
38
|
+ <el-tooltip v-if="item.notes" :content="item.notes" placement="top">
|
|
39
|
+ <div><i class="el-icon-question" /></div>
|
|
40
|
+ </el-tooltip>
|
|
41
|
+ <div v-if="item.enable_to_sort" class="sort-wrap">
|
|
42
|
+ <i class="el-icon-caret-top" :class="{ 'active': filter.sort_field === item.column && filter.sort_type === 'asc' }" @click="onClickSort(item.column, 'asc')" />
|
|
43
|
+ <i class="el-icon-caret-bottom" :class="{ 'active': filter.sort_field === item.column && filter.sort_type === 'desc' }" @click="onClickSort(item.column, 'desc')" />
|
45
|
44
|
</div>
|
46
|
|
- </template>
|
47
|
|
- <template v-slot="{ row }">
|
48
|
|
- <span>{{ (row[item.column] || row[item.column] == 0) ? $formatNum(row[item.column]) : '-' }}</span>
|
49
|
|
- </template>
|
50
|
|
- </ux-table-column>
|
|
45
|
+ </div>
|
|
46
|
+ </template>
|
|
47
|
+ <template v-slot="{ row }">
|
|
48
|
+ <span>{{ (row[item.column] || row[item.column] == 0) ? $formatNum(row[item.column]) : '-' }}</span>
|
|
49
|
+ </template>
|
|
50
|
+ </ux-table-column>
|
51
|
51
|
|
52
|
|
- <ux-table-column :width="120" fixed="right" align="center" title="操作">
|
53
|
|
- <template v-slot="{ row }">
|
54
|
|
- <span class="c-00B38A pointer" @click="onClickStatus(row)">客服状态</span>
|
55
|
|
- </template>
|
56
|
|
- </ux-table-column>
|
57
|
|
- </ux-grid>
|
58
|
|
- <div class="pagination" v-show="pagination.total > 0">
|
59
|
|
- <el-pagination background :current-page="pagination.page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pagination.pages)' />
|
60
|
|
- </div>
|
|
52
|
+ <ux-table-column :width="120" fixed="right" align="center" title="操作">
|
|
53
|
+ <template v-slot="{ row }">
|
|
54
|
+ <span class="c-00B38A pointer" @click="onClickStatus(row)">客服状态</span>
|
|
55
|
+ </template>
|
|
56
|
+ </ux-table-column>
|
|
57
|
+ </ux-grid>
|
|
58
|
+ <div class="pagination" v-show="pagination.total > 0">
|
|
59
|
+ <el-pagination background :current-page="pagination.page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count='Number(pagination.pages)' />
|
61
|
60
|
</div>
|
62
|
|
- <!-- E 明细表 detailsTable -->
|
|
61
|
+ </div>
|
|
62
|
+ <!-- E 明细表 detailsTable -->
|
|
63
|
+
|
|
64
|
+ <!-- S 设置客服状态 -->
|
|
65
|
+ <setStatusDialog
|
|
66
|
+ :dialogVisible="setStatusDialogVisible"
|
|
67
|
+ :currentCustomer="currentCustomer"
|
|
68
|
+ @confirm="handleSetStatusConfirm"
|
|
69
|
+ @cancel="handleSetStatusCancel"
|
|
70
|
+ />
|
|
71
|
+ <!-- E 设置客服状态 -->
|
63
|
72
|
</div>
|
64
|
73
|
</template>
|
65
|
74
|
|
66
|
75
|
<script>
|
67
|
76
|
import selfChannel from '@/components/assembly/screen/channel.vue'
|
68
|
77
|
import selfInputV2 from '@/components/assembly/screen/inputV2.vue'
|
69
|
|
-import selfCustomerservice from '@/components/assembly/screen/customerService.vue'
|
|
78
|
+import setStatusDialog from './setStatusDialog.vue'
|
70
|
79
|
|
71
|
80
|
export default {
|
72
|
81
|
components: {
|
73
|
82
|
selfChannel,
|
74
|
83
|
selfInputV2,
|
75
|
|
- selfCustomerservice,
|
|
84
|
+ setStatusDialog,
|
76
|
85
|
},
|
77
|
86
|
data() {
|
78
|
87
|
const DEFAULT_TIME = [this.$getDay(-30, false), this.$getDay(0, false)]
|
|
@@ -107,6 +116,9 @@ export default {
|
107
|
116
|
is_active: '', // 激活状态
|
108
|
117
|
},
|
109
|
118
|
updateTime: '', // 数据更新时间
|
|
119
|
+
|
|
120
|
+ setStatusDialogVisible: false,
|
|
121
|
+ currentCustomer: {},
|
110
|
122
|
}
|
111
|
123
|
},
|
112
|
124
|
computed: {
|
|
@@ -171,6 +183,10 @@ export default {
|
171
|
183
|
})
|
172
|
184
|
this.detailsTableCol = Object.freeze(detailsTableCol)
|
173
|
185
|
await this.$nextTick()
|
|
186
|
+ // mock
|
|
187
|
+ res.rst.data[0].status = 2
|
|
188
|
+ res.rst.data[1].status = 1
|
|
189
|
+ // mock
|
174
|
190
|
const detailsTableList = Array.isArray(res.rst.data) ? res.rst.data : []
|
175
|
191
|
this.$refs.detailsTable.reloadData(detailsTableList)
|
176
|
192
|
this.pagination.total = res.rst.pageInfo.total
|
|
@@ -389,6 +405,17 @@ export default {
|
389
|
405
|
|
390
|
406
|
onClickStatus(row) {
|
391
|
407
|
console.log('row => ', row)
|
|
408
|
+ this.currentCustomer = {...row}
|
|
409
|
+ this.setStatusDialogVisible = true
|
|
410
|
+ },
|
|
411
|
+ handleSetStatusConfirm() {
|
|
412
|
+ this.currentCustomer = {}
|
|
413
|
+ this.setStatusDialogVisible = false
|
|
414
|
+ this.handleGetData()
|
|
415
|
+ },
|
|
416
|
+ handleSetStatusCancel() {
|
|
417
|
+ this.currentCustomer = {}
|
|
418
|
+ this.setStatusDialogVisible = false
|
392
|
419
|
},
|
393
|
420
|
},
|
394
|
421
|
}
|