|
|
@@ -7,41 +7,47 @@
|
|
7
|
7
|
<el-col v-if="showType" :span="18">
|
|
8
|
8
|
<div class="info-card">
|
|
9
|
9
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
|
10
|
|
-
|
|
|
10
|
+ <el-tab-pane label="变更日志" name="six">
|
|
|
11
|
+ <log :patientId="patientId" @getLogs="getLogs" />
|
|
|
12
|
+ </el-tab-pane>
|
|
|
13
|
+
|
|
11
|
14
|
<el-tab-pane label="工单" name="third">
|
|
12
|
|
-
|
|
13
|
|
- <!-- <operation-log></operation-log> -->
|
|
14
|
15
|
<div>
|
|
15
|
|
- <!-- 表格 -->
|
|
16
|
16
|
<el-table
|
|
17
|
|
- :data="tableData"
|
|
|
17
|
+ :data="tableData2"
|
|
18
|
18
|
stripe
|
|
19
|
19
|
border
|
|
20
|
20
|
:default-sort="{ prop: 'date', order: 'ascending' }"
|
|
21
|
21
|
@sort-change="handleSortChange"
|
|
22
|
22
|
>
|
|
23
|
|
- <el-table-column prop="date" label="日期" sortable></el-table-column>
|
|
24
|
|
- <el-table-column prop="name" label="姓名"></el-table-column>
|
|
25
|
|
- <el-table-column prop="address" label="地址"></el-table-column>
|
|
26
|
|
- </el-table>
|
|
|
23
|
+ <el-table-column prop="workordercode" label="工单编号">
|
|
|
24
|
+ <template #default="scope">
|
|
|
25
|
+ <a style="color: blue" @click="openWorkHandle(scope.row)">{{ scope.row['workordercode'] }}</a>
|
|
|
26
|
+ </template>
|
|
|
27
|
+ </el-table-column>
|
|
|
28
|
+ <el-table-column prop="workordercatename" label="工单类型"></el-table-column>
|
|
|
29
|
+ <el-table-column prop="content" label="工单内容"></el-table-column>
|
|
|
30
|
+ <el-table-column prop="dealusername" label="受理人"></el-table-column>
|
|
|
31
|
+ <el-table-column prop="createtime" label="受理时间"></el-table-column>
|
|
|
32
|
+ <el-table-column prop="limittime" label="办理时限"></el-table-column>
|
|
|
33
|
+ <el-table-column prop="workorderstatename" label="状态"></el-table-column></el-table>
|
|
27
|
34
|
|
|
28
|
|
- <!-- 分页组件 -->
|
|
29
|
35
|
<el-pagination
|
|
30
|
36
|
style="float: right; margin-top: 15px;"
|
|
31
|
|
- @size-change="handleSizeChange"
|
|
32
|
|
- @current-change="handleCurrentChange"
|
|
33
|
|
- :current-page="currentPage"
|
|
|
37
|
+ @size-change="handleSizeChange2"
|
|
|
38
|
+ @current-change="handleCurrentChange2"
|
|
|
39
|
+ :current-page="currentPage2"
|
|
34
|
40
|
:page-sizes="[10, 20, 30]"
|
|
35
|
41
|
:page-size="pageSize"
|
|
36
|
42
|
layout="total, sizes, prev, pager, next, jumper"
|
|
37
|
|
- :total="tableData.length"
|
|
|
43
|
+ :total="total2"
|
|
38
|
44
|
>
|
|
39
|
45
|
</el-pagination>
|
|
40
|
46
|
</div>
|
|
41
|
47
|
</el-tab-pane>
|
|
|
48
|
+
|
|
42
|
49
|
<el-tab-pane label="通话记录" name="fourth">
|
|
43
|
50
|
<div>
|
|
44
|
|
- <!-- 表格 -->
|
|
45
|
51
|
<el-table
|
|
46
|
52
|
:data="tableData"
|
|
47
|
53
|
stripe
|
|
|
@@ -49,12 +55,36 @@
|
|
49
|
55
|
:default-sort="{ prop: 'date', order: 'ascending' }"
|
|
50
|
56
|
@sort-change="handleSortChange"
|
|
51
|
57
|
>
|
|
52
|
|
- <el-table-column prop="date" label="日期" sortable></el-table-column>
|
|
53
|
|
- <el-table-column prop="name" label="姓名"></el-table-column>
|
|
54
|
|
- <el-table-column prop="address" label="地址"></el-table-column>
|
|
|
58
|
+ <el-table-column label="电话号码">
|
|
|
59
|
+ <template #default="scope">
|
|
|
60
|
+ {{ getOfffixNuber(scope.row.callType==1 ? scope.row.caller : scope.row.callee) }}
|
|
|
61
|
+ </template>
|
|
|
62
|
+ </el-table-column>
|
|
|
63
|
+ <el-table-column label="坐席工号">
|
|
|
64
|
+ <template #default="scope">
|
|
|
65
|
+ {{ scope.row.callType==2 ? scope.row.callerAgent : scope.row.calleeAgent }}
|
|
|
66
|
+ </template>
|
|
|
67
|
+ </el-table-column>
|
|
|
68
|
+ <el-table-column label="坐席分机号">
|
|
|
69
|
+ <template #default="scope">
|
|
|
70
|
+ {{ scope.row.callType==2 ? scope.row.caller : scope.row.callee }}
|
|
|
71
|
+ </template>
|
|
|
72
|
+ </el-table-column>
|
|
|
73
|
+ <el-table-column label="呼叫状态">
|
|
|
74
|
+ <template #default="scope">
|
|
|
75
|
+ {{ getCallSate(scope.row.callType, scope.row.isAnswer) }}
|
|
|
76
|
+ </template>
|
|
|
77
|
+ </el-table-column>
|
|
|
78
|
+ <el-table-column prop="answerTime" label="通话开始时间"></el-table-column>
|
|
|
79
|
+ <el-table-column prop="hangupTime" label="通话结束时间"></el-table-column>
|
|
|
80
|
+ <el-table-column label="通话时长">
|
|
|
81
|
+ <template #default="scope">
|
|
|
82
|
+ {{ getTimeLimit(scope.row.answerTime, scope.row.hangupTime) }}
|
|
|
83
|
+ </template>
|
|
|
84
|
+ </el-table-column>
|
|
|
85
|
+
|
|
55
|
86
|
</el-table>
|
|
56
|
87
|
|
|
57
|
|
- <!-- 分页组件 -->
|
|
58
|
88
|
<el-pagination
|
|
59
|
89
|
style="float: right; margin-top: 15px;"
|
|
60
|
90
|
@size-change="handleSizeChange"
|
|
|
@@ -63,16 +93,13 @@
|
|
63
|
93
|
:page-sizes="[10, 20, 30]"
|
|
64
|
94
|
:page-size="pageSize"
|
|
65
|
95
|
layout="total, sizes, prev, pager, next, jumper"
|
|
66
|
|
- :total="tableData.length"
|
|
|
96
|
+ :total="total"
|
|
67
|
97
|
>
|
|
68
|
98
|
</el-pagination>
|
|
69
|
99
|
</div>
|
|
70
|
|
- <!-- <knowledge-list></knowledge-list> -->
|
|
71
|
100
|
</el-tab-pane>
|
|
72
|
101
|
|
|
73
|
|
- <el-tab-pane label="变更日志" name="six">
|
|
74
|
|
- <log :patientId="patientId" @getLogs="getLogs" />
|
|
75
|
|
- </el-tab-pane>
|
|
|
102
|
+
|
|
76
|
103
|
</el-tabs>
|
|
77
|
104
|
</div>
|
|
78
|
105
|
</el-col>
|
|
|
@@ -93,9 +120,9 @@ import patientInfo from "../patientInfo/patientInfo";
|
|
93
|
120
|
import log from "../logs/log.vue";
|
|
94
|
121
|
|
|
95
|
122
|
import patientIcon from '@/assets/images/patientIcon.png'
|
|
96
|
|
-import { useRoute } from 'vue-router';
|
|
|
123
|
+import { useRoute,useRouter } from 'vue-router';
|
|
97
|
124
|
import { getPatientInfo } from '@/api/patient/patient';
|
|
98
|
|
-import { userDecryptToAsterisk } from '@/utils/aes'
|
|
|
125
|
+import { userDecryptToAsterisk,userDecrypt } from '@/utils/aes'
|
|
99
|
126
|
import { nations, patientStatus, sex, patientSource, phoneStatus } from "@/utils/commonDic.js";
|
|
100
|
127
|
import { getStrById, areaTrees } from "@/utils/area.js";
|
|
101
|
128
|
import { ArrayToMap } from '@/utils/tools'
|
|
|
@@ -105,27 +132,34 @@ import { modalConfig } from '../../config/modal.config'
|
|
105
|
132
|
import { ElMessage } from 'element-plus'
|
|
106
|
133
|
import { Avatar, Edit } from '@element-plus/icons-vue'
|
|
107
|
134
|
import { getPageListData } from '@/api/main/system/system';
|
|
108
|
|
-
|
|
109
|
|
-// 工单开始
|
|
|
135
|
+import { getCallSate, getUnprefixNuber,getOfffixNuber } from '@/utils/index';
|
|
|
136
|
+const router = useRoute();
|
|
|
137
|
+const routerPath = useRouter();
|
|
|
138
|
+// 通话记录开始
|
|
110
|
139
|
// 模拟表格数据
|
|
111
|
|
-const tableData = ref([
|
|
112
|
|
- {
|
|
113
|
|
- date: '2024-01-01',
|
|
114
|
|
- name: '张三',
|
|
115
|
|
- address: '北京市朝阳区'
|
|
116
|
|
- },
|
|
117
|
|
- {
|
|
118
|
|
- date: '2024-01-02',
|
|
119
|
|
- name: '李四',
|
|
120
|
|
- address: '上海市浦东新区'
|
|
121
|
|
- },
|
|
122
|
|
- {
|
|
123
|
|
- date: '2024-01-03',
|
|
124
|
|
- name: '王五',
|
|
125
|
|
- address: '广州市天河区'
|
|
126
|
|
- },
|
|
127
|
|
- // 可以添加更多数据
|
|
128
|
|
-])
|
|
|
140
|
+const { proxy } = getCurrentInstance();
|
|
|
141
|
+const total = ref(0)
|
|
|
142
|
+const tableData = ref([])
|
|
|
143
|
+const queryParams = ref({
|
|
|
144
|
+ pageNum: 1,
|
|
|
145
|
+ pageSize: 10,
|
|
|
146
|
+})
|
|
|
147
|
+function getCalllog(phone) {
|
|
|
148
|
+ queryParams.value.phone = phone
|
|
|
149
|
+ getPageListData('/call/calllog',queryParams.value).then((res)=>{
|
|
|
150
|
+ tableData.value = []
|
|
|
151
|
+ total.value = 0
|
|
|
152
|
+ if (res.data.length>0) {
|
|
|
153
|
+ tableData.value = res.data
|
|
|
154
|
+ console.log(tableData.value)
|
|
|
155
|
+ total.value = res.total
|
|
|
156
|
+ }
|
|
|
157
|
+ })
|
|
|
158
|
+}
|
|
|
159
|
+function getTimeLimit(startTime, endTime) {
|
|
|
160
|
+ return proxy.getTimeDifference(startTime, endTime);
|
|
|
161
|
+}
|
|
|
162
|
+
|
|
129
|
163
|
|
|
130
|
164
|
// 当前页码
|
|
131
|
165
|
const currentPage = ref(1)
|
|
|
@@ -135,11 +169,15 @@ const pageSize = ref(10)
|
|
135
|
169
|
// 处理每页显示条数变化
|
|
136
|
170
|
const handleSizeChange = (newSize) => {
|
|
137
|
171
|
pageSize.value = newSize
|
|
|
172
|
+ queryParams.value.pageSize = newSize
|
|
|
173
|
+ getCalllog(queryParams.value.phone)
|
|
138
|
174
|
}
|
|
139
|
175
|
|
|
140
|
176
|
// 处理当前页码变化
|
|
141
|
177
|
const handleCurrentChange = (newPage) => {
|
|
142
|
178
|
currentPage.value = newPage
|
|
|
179
|
+ queryParams.value.pageNum = newPage
|
|
|
180
|
+ getCalllog(queryParams.value.phone)
|
|
143
|
181
|
}
|
|
144
|
182
|
|
|
145
|
183
|
// 处理表格排序变化
|
|
|
@@ -147,19 +185,69 @@ const handleSortChange = ({ prop, order }) => {
|
|
147
|
185
|
console.log(`排序字段: ${prop}, 排序顺序: ${order}`)
|
|
148
|
186
|
// 这里可以根据 prop 和 order 对 tableData 进行排序
|
|
149
|
187
|
}
|
|
150
|
|
-// 工单结束
|
|
|
188
|
+// 通话记录结束
|
|
151
|
189
|
|
|
|
190
|
+// 工单开始
|
|
|
191
|
+const total2 = ref(0)
|
|
|
192
|
+const tableData2 = ref([])
|
|
|
193
|
+const queryParams2 = ref({
|
|
|
194
|
+ listType: 0,
|
|
|
195
|
+ pageNum: 1,
|
|
|
196
|
+ pageSize: 10,
|
|
|
197
|
+})
|
|
|
198
|
+function getWorkorder(phone) {
|
|
|
199
|
+ queryParams2.value.callnum = phone
|
|
|
200
|
+ getPageListData('/order/workorder',queryParams2.value).then((res)=>{
|
|
|
201
|
+ tableData2.value = []
|
|
|
202
|
+ total2.value = 0
|
|
|
203
|
+ if (res.data.length>0) {
|
|
|
204
|
+ tableData2.value = res.data
|
|
|
205
|
+ console.log(tableData2.value)
|
|
|
206
|
+ total2.value = res.total
|
|
|
207
|
+ }
|
|
|
208
|
+ })
|
|
|
209
|
+}
|
|
|
210
|
+// 处理弹出框
|
|
|
211
|
+function openWorkHandle(rowData) {
|
|
|
212
|
+ let type = 'djb'
|
|
|
213
|
+ let query = {
|
|
|
214
|
+ workordercode : rowData.workordercode,
|
|
|
215
|
+ type,
|
|
|
216
|
+ listType:0
|
|
|
217
|
+ }
|
|
|
218
|
+ sessionStorage.setItem('workQuery', JSON.stringify(query))
|
|
|
219
|
+ routerPath.push({ path : '/workHandle' })
|
|
|
220
|
+}
|
|
|
221
|
+// 当前页码
|
|
|
222
|
+const currentPage2 = ref(1)
|
|
|
223
|
+// 每页显示条数
|
|
|
224
|
+const pageSize2 = ref(10)
|
|
152
|
225
|
|
|
153
|
|
-const activeName = ref('third')
|
|
|
226
|
+// 处理每页显示条数变化
|
|
|
227
|
+const handleSizeChange2 = (newSize) => {
|
|
|
228
|
+ pageSize.value = newSize
|
|
|
229
|
+ queryParams2.value.pageSize = newSize
|
|
|
230
|
+ getWorkorder(queryParams2.value.phone)
|
|
|
231
|
+}
|
|
|
232
|
+
|
|
|
233
|
+// 处理当前页码变化
|
|
|
234
|
+const handleCurrentChange2 = (newPage) => {
|
|
|
235
|
+ queryParams2.value.pageNum = newPage
|
|
|
236
|
+ getWorkorder(queryParams2.value.phone)
|
|
|
237
|
+}
|
|
|
238
|
+
|
|
|
239
|
+// 工单结束
|
|
|
240
|
+
|
|
|
241
|
+const activeName = ref('six')
|
|
154
|
242
|
function handleClick() {
|
|
155
|
243
|
}
|
|
156
|
244
|
|
|
157
|
|
-const router = useRoute();
|
|
|
245
|
+
|
|
158
|
246
|
|
|
159
|
247
|
let detail = ref({});
|
|
160
|
248
|
|
|
161
|
249
|
const patientId = ref(router.query.patientId || router.query.id);
|
|
162
|
|
-console.log(patientId.value)
|
|
|
250
|
+
|
|
163
|
251
|
const props = defineProps({
|
|
164
|
252
|
descColumn: {
|
|
165
|
253
|
type: Number,
|
|
|
@@ -177,6 +265,8 @@ const props = defineProps({
|
|
177
|
265
|
watch(props, (nweProps) => {
|
|
178
|
266
|
if (nweProps.patientCallNumber) {
|
|
179
|
267
|
customerDetail(nweProps.patientCallNumber)
|
|
|
268
|
+ getCalllog(nweProps.patientCallNumber)
|
|
|
269
|
+ getWorkorder(nweProps.patientCallNumber)
|
|
180
|
270
|
}
|
|
181
|
271
|
});
|
|
182
|
272
|
|
|
|
@@ -196,11 +286,15 @@ const stateLog = ref();
|
|
196
|
286
|
async function customerDetail(customerno) {
|
|
197
|
287
|
const resultData = await getPageListData('/patient/patient',{phoneNumber:customerno});
|
|
198
|
288
|
detail.value = resultData.data[0]
|
|
199
|
|
- console.log(detail.value);
|
|
|
289
|
+ console.log('customerDetail',detail.value);
|
|
200
|
290
|
}
|
|
201
|
291
|
const getDetail = async () => {
|
|
202
|
292
|
const res = await getPatientInfo(patientId.value)
|
|
203
|
293
|
detail.value = res.data
|
|
|
294
|
+ console.log('getPatientInfo',detail.value);
|
|
|
295
|
+ getCalllog(userDecrypt(detail.value.phoneNumber))
|
|
|
296
|
+ getWorkorder(userDecrypt(detail.value.phoneNumber))
|
|
|
297
|
+
|
|
204
|
298
|
}
|
|
205
|
299
|
onBeforeMount(async () => {
|
|
206
|
300
|
if (props.patientCallNumber) {
|