miaofuhao 1 год назад
Родитель
Сommit
dc0d93c8e5

+ 119 - 66
CMS1.0/src/components/main/drawer-phone/cpns/page-phone.vue

@@ -7,7 +7,7 @@
7 7
           <el-radio-button label="通讯录" />
8 8
         </el-radio-group>
9 9
       </div>
10
-      <div class="contentBox">
10
+      <div class="contentBox" ref="scrollDivUser" v-if="radio2==='通讯录'" @scroll="handleScrollUser">
11 11
         <el-input
12 12
           v-if="radio2==='通讯录'"
13 13
           v-model="addressBookSearch"
@@ -16,6 +16,36 @@
16 16
           placeholder="请输入姓名"
17 17
           :suffix-icon="Search"
18 18
         />
19
+        <div class="contentList" v-for="item in addressBookData">
20
+          
21
+          <div class="leftBox">
22
+            <div class="telPhoneBox">
23
+              <span>{{item.dept.deptName}} -- </span>
24
+              <span>{{item.nickName}}</span>
25
+              <!-- <span>({{item.nickName}})</span> -->
26
+              <!-- {{
27
+                item.callType
28
+                  ? getUnprefixNuber(item.callee)
29
+                  : getUnprefixNuber(item.caller)
30
+              }} -->
31
+            </div>
32
+            <div class="remarkBox">
33
+              <span style="margin-right: 15px">{{ item.phonenumber }}</span>
34
+              <!-- <span>{{ getCallSate(item.callType, item.endTime) }}</span> -->
35
+            </div>
36
+          </div>
37
+          <div class="rightBox">
38
+            <el-icon
39
+              color="#409EFC"
40
+              class="no-inherit"
41
+              @click="phoneIconHandle(item)"
42
+            >
43
+              <Phone />
44
+            </el-icon>
45
+          </div>
46
+        </div>
47
+      </div>
48
+      <div class="contentBox" ref="scrollDivCall" v-if="radio2==='通话记录'" @scroll="handleScrollCall">
19 49
         <div class="contentList" v-for="item in tableData" v-if="radio2==='通话记录'">
20 50
           <div class="leftBox">
21 51
             <div class="telPhoneBox">
@@ -46,16 +76,9 @@
46 76
             <div class="telPhoneBox">
47 77
               <span>{{item.dept.deptName}} -- </span>
48 78
               <span>{{item.nickName}}</span>
49
-              <!-- <span>({{item.nickName}})</span> -->
50
-              <!-- {{
51
-                item.callType
52
-                  ? getUnprefixNuber(item.callee)
53
-                  : getUnprefixNuber(item.caller)
54
-              }} -->
55 79
             </div>
56 80
             <div class="remarkBox">
57 81
               <span style="margin-right: 15px">{{ item.phonenumber }}</span>
58
-              <!-- <span>{{ getCallSate(item.callType, item.endTime) }}</span> -->
59 82
             </div>
60 83
           </div>
61 84
           <div class="rightBox">
@@ -68,21 +91,8 @@
68 91
             </el-icon>
69 92
           </div>
70 93
         </div>
71
-        <div style="margin-top: 15px" v-if="tableCount">
72
-          <el-pagination
73
-            v-model:page-size="pageSize4"
74
-            :small="small"
75
-            :disabled="disabled"
76
-            :background="background"
77
-            layout="total, prev, jumper, next"
78
-            :total="tableCount"
79
-            @size-change="handleSizeChange"
80
-            @current-change="handleCurrentChange"
81
-          />
82
-        </div>
83 94
       </div>
84
-    </div>
85
-
95
+  </div>
86 96
     <div v-if="callOrListState">
87 97
       <div class="plate" v-if="getCallState === '2'">
88 98
         <el-input
@@ -176,42 +186,44 @@
176 186
           </el-row>
177 187
         </div>
178 188
       </div>
179
-
180
-      <el-button
181
-        size="large"
182
-        type="danger"
183
-        :icon="Phone"
184
-        circle
185
-        v-if="getCallState === '1'"
186
-        :disabled="dropCallState"
187
-        class="btnHangUp"
188
-        @click="dropCall"
189
-      />
190
-      <el-button
191
-        size="large"
192
-        type="success"
193
-        :icon="Phone"
194
-        circle
195
-        v-if="getCallState === '2'"
196
-        class="btnCall"
197
-        @click="btnCallType"
198
-      />
199
-      <el-button
200
-        size="large"
201
-        :icon="Edit"
202
-        circle
203
-        type="primary"
204
-        class="btnCut"
205
-        @click="btnTellState"
206
-      />
207
-      <el-button
208
-        size="large"
209
-        :icon="ArrowDownBold"
210
-        circle
211
-        type="primary"
212
-        class="btnPage"
213
-        @click="btnCutPage"
214
-      />
189
+      <div class="btnBox">
190
+        <el-button
191
+          size="large"
192
+          type="danger"
193
+          :icon="Phone"
194
+          circle
195
+          v-if="getCallState === '1'"
196
+          :disabled="dropCallState"
197
+          class="btnHangUp"
198
+          @click="dropCall"
199
+        />
200
+        <el-button
201
+          size="large"
202
+          type="success"
203
+          :icon="Phone"
204
+          circle
205
+          v-if="getCallState === '2'"
206
+          class="btnCall"
207
+          @click="btnCallType"
208
+        />
209
+        <el-button
210
+          size="large"
211
+          :icon="Edit"
212
+          circle
213
+          type="primary"
214
+          class="btnCut"
215
+          @click="btnTellState"
216
+        />
217
+        <el-button
218
+          size="large"
219
+          :icon="ArrowDownBold"
220
+          circle
221
+          type="primary"
222
+          class="btnPage"
223
+          @click="btnCutPage"
224
+        />
225
+      </div>
226
+      
215 227
     </div>
216 228
 
217 229
     <el-button
@@ -245,8 +257,12 @@ import { Send, ws } from '@/utils/telWebsocket'
245 257
 import useSocketStore from '@/store/modules/socket'
246 258
 import useSelectStore from '@/store/commonSelect/common';
247 259
 import { Search } from '@element-plus/icons-vue'
260
+import { onMounted, ref, watch, nextTick } from 'vue';
248 261
 
249 262
 const { proxy } = getCurrentInstance()
263
+const scrollDivUser = ref(null)
264
+const scrollDivCall = ref(null)
265
+
250 266
 
251 267
 const radio2 = ref('通话记录')
252 268
 const scoketDatas = ref({})
@@ -259,7 +275,7 @@ const telNumber = ref('')
259 275
 const getCallState = ref('')
260 276
 const getCallData = ref({})
261 277
 
262
-const pageSize4 = ref(7)
278
+const pageSize4 = ref(15)
263 279
 const small = ref(false)
264 280
 const background = ref(false)
265 281
 const disabled = ref(false)
@@ -304,9 +320,11 @@ const props = defineProps({
304 320
 function aaaa(e) {
305 321
   console.log(e)
306 322
   // if (e == '通话记录') {
307
-  //   tableCount.value = tableRecordCount.value
323
+  //   paramsSearch.value.pageNum = 1
324
+  //   getUserData()
308 325
   // } else if(e == '通讯录'){
309
-  //   tableCount.value = addressBookCount.value
326
+  //   paramsSearch.value.pageNum = 1
327
+        // getCustomeData()
310 328
   // }
311 329
 }
312 330
 watch(
@@ -429,12 +447,35 @@ onMounted(() => {
429 447
   paramsSearch.value.pageSize = pageSize4.value
430 448
   getCustomeData()
431 449
   getUserData()
450
+ 
451
+
432 452
 })
453
+const handleScrollUser = () => {
454
+  const container = scrollDivUser.value
455
+  if (container.scrollTop + container.clientHeight >= container.scrollHeight) {
456
+    // loadMore()
457
+    console.log('通讯录到底了');
458
+    paramsSearch.value.pageNum +=1
459
+    getUserData()
460
+    
461
+  }
462
+}
463
+const handleScrollCall = () => {
464
+  const container = scrollDivCall.value
465
+  if (container.scrollTop + container.clientHeight >= container.scrollHeight) {
466
+    // loadMore()
467
+    console.log('通话记录到底了');
468
+    paramsSearch.value.pageNum +=1
469
+    getCustomeData()
470
+  }
471
+}
433 472
 function getCustomeData() {
434 473
   delete paramsSearch.value.nickName
435 474
   getPageListData('/call/calllog', paramsSearch.value).then(
436 475
     ({ data, total }) => {
437
-      tableData.value = data
476
+      console.log(data);
477
+      const newArray = data
478
+      tableData.value =  tableData.value.concat(newArray)
438 479
       tableRecordCount.value = total
439 480
     }
440 481
   )
@@ -448,8 +489,9 @@ function getUserData() {
448 489
  
449 490
   getPageListData('/system/user', paramsSearch.value).then(
450 491
     ({ data, total }) => {
451
-      addressBookData.value = data
452
-      console.log(data,total)
492
+      console.log(data);
493
+      const newArray = data
494
+      addressBookData.value =  addressBookData.value.concat(newArray)
453 495
       addressBookCount.value = total
454 496
       
455 497
     }
@@ -547,10 +589,14 @@ function retrieveBack() {
547 589
       width: 162px;
548 590
       margin: 0 auto;
549 591
     }
550
-
592
+    .contentBox::-webkit-scrollbar {
593
+      display: none; /* Chrome Safari */
594
+    }
551 595
     .contentBox {
552 596
       border-top: 1px solid #999;
553 597
       margin-top: 15px;
598
+      height: 590px;
599
+      overflow-y: auto;
554 600
 
555 601
       .contentList {
556 602
         width: 100%;
@@ -607,7 +653,14 @@ function retrieveBack() {
607 653
     right: 30px;
608 654
     z-index: 2;
609 655
   }
610
-
656
+  .btnBox{
657
+    width: 100%; 
658
+    height: 60px; 
659
+    background-color: #ffffff;
660
+    position: absolute;
661
+    bottom: 0px;
662
+    right: 0px;
663
+  }
611 664
   .btnHangUp {
612 665
     position: absolute;
613 666
     bottom: 30px;

+ 2 - 2
CMS1.0/src/components/main/drawer-phone/index.vue

@@ -60,7 +60,7 @@ function showPhone() {
60 60
   drawerPhoneID.value = document.getElementById('drawerPhone')
61 61
   drawerPhoneID.value.style.width = '360px'
62 62
   drawerPhoneID.value.style.left = defaultLeft.value + 'px'
63
-  drawerPhoneID.value.style.top = window.innerHeight - 650 + 'px'
63
+  drawerPhoneID.value.style.top = window.innerHeight - 790 + 'px'
64 64
 }
65 65
 //隐藏
66 66
 function hidePhone() {
@@ -161,7 +161,7 @@ const handleRemove = (e) => {
161 161
 
162 162
 .drawerPhoneBox {
163 163
   width: 100%;
164
-  height: 610px;
164
+  height: 750px;
165 165
   background: #fff;
166 166
   z-index: 4;
167 167
 }

+ 25 - 24
CMS1.0/src/router/index.js

@@ -57,31 +57,16 @@ export const constantRoutes = [
57 57
     component: () => import('@/views/LeaveAmessage'),
58 58
     hidden: true
59 59
   },
60
-  // {
61
-  //   path: '/redirect',
62
-  //   component: Layout,
63
-  //   hidden: true,
64
-  //   children: [
65
-  //     {
66
-  //       path: '/redirect/:path(.*)',
67
-  //       component: () => import('@/views/redirect/index.vue')
68
-  //     }
69
-  //   ]
70
-  // },
71 60
   {
72
-    path: '/login',
73
-    component: () => import('@/views/login/login'),
74
-    hidden: true
75
-  },
76
-  {
77
-    path: '/:pathMatch(.*)*',
78
-    component: () => import('@/views/error/404'),
79
-    hidden: true
80
-  },
81
-  {
82
-    path: '/401',
83
-    component: () => import('@/views/error/401'),
84
-    hidden: true
61
+    path: '/redirect',
62
+    component: Layout,
63
+    hidden: true,
64
+    children: [
65
+      {
66
+        path: '/redirect/:path(.*)',
67
+        component: () => import('@/views/redirect/index.vue')
68
+      }
69
+    ]
85 70
   },
86 71
   {
87 72
     path: '',
@@ -97,6 +82,22 @@ export const constantRoutes = [
97 82
     ]
98 83
   },
99 84
   {
85
+    path: '/login',
86
+    component: () => import('@/views/login/login'),
87
+    hidden: true
88
+  },
89
+  {
90
+    path: '/:pathMatch(.*)*',
91
+    component: () => import('@/views/error/404'),
92
+    hidden: true
93
+  },
94
+  {
95
+    path: '/401',
96
+    component: () => import('@/views/error/401'),
97
+    hidden: true
98
+  },
99
+  
100
+  {
100 101
     path: '/user',
101 102
     component: Layout,
102 103
     hidden: true,

+ 1 - 0
CMS1.0/src/store/modules/tagsView.js

@@ -57,6 +57,7 @@ const useTagsViewStore = defineStore('tags-view', {
57 57
     },
58 58
     delIframeView(view) {
59 59
       return new Promise((resolve) => {
60
+        console.log(view.path);
60 61
         this.iframeViews = this.iframeViews.filter(
61 62
           (item) => item.path !== view.path
62 63
         )

+ 3 - 3
CMS1.0/src/utils/commonDic.js

@@ -178,17 +178,17 @@ export const sex = [
178 178
   {
179 179
     title: '未知',
180 180
     color: '',
181
-    value: '0',
181
+    value: 0,
182 182
   },
183 183
   {
184 184
     title: '男',
185 185
     color: '',
186
-    value: '1',
186
+    value: 1,
187 187
   },
188 188
   {
189 189
     title: '女',
190 190
     color: '',
191
-    value: '2',
191
+    value: 2,
192 192
   },
193 193
 ];
194 194
 

+ 9 - 0
CMS1.0/src/views/main/followUp/addFollowUpPlan/addFollowUpPlan.vue

@@ -365,6 +365,8 @@ watch(getPlanId, (nweProps) => {
365 365
     if (router.query.planState) {
366 366
       state.value = router.query.planState
367 367
     }
368
+  }else{
369
+    cleanForm()
368 370
   }
369 371
 });
370 372
 
@@ -564,6 +566,13 @@ function getPlanDetail(planId) {
564 566
       if (screenData.value.length>0) {
565 567
         filterData.value = []
566 568
         screenData.value.forEach(ele => {
569
+          if (ele.field =='sex') {
570
+            if (ele.value == '1') {
571
+              ele.value = '男'
572
+            }else if (ele.value == '2') {
573
+              ele.value = '女'
574
+            }
575
+          }
567 576
           const obj = {
568 577
               officeItem:{
569 578
                 type: 'select',

+ 1 - 0
CMS1.0/src/views/main/followUp/addFollowUpPlan/cpns/patientList/patientList.vue

@@ -123,6 +123,7 @@ function initMethod(data) {
123 123
 function getPlanpatient() {
124 124
   queryParams.value.plId = planId.value
125 125
   getPageListData('/SfPlanPatient/sfplanpatient',queryParams.value).then((res)=>{
126
+    tableData.value = []
126 127
     if (res.data.length>0) {
127 128
       tableData.value = res.data
128 129
       total.value = res.total

+ 4 - 3
CMS1.0/src/views/main/followUp/followUpPlan/cpns/dataBoard.vue

@@ -40,17 +40,17 @@
40 40
         <div class="page-content">
41 41
             <el-row :gutter="20">
42 42
                 <el-col :span="24">
43
-                    <el-card class="page-card" v-if="listeningStatusData.length||sfCompleteData.length">
43
+                    <el-card class="page-card">
44 44
                         <template #header>
45 45
                             <div class="card-header">
46 46
                                 <span>完成量统计</span>
47 47
                             </div>
48 48
                         </template>
49 49
                         <el-row>
50
-                            <el-col :span="16" v-if="listeningStatusData.length">
50
+                            <el-col :span="16">
51 51
                                 <div id="mainEcharts1" style="width: 100%; height: 300px;"></div>
52 52
                             </el-col>
53
-                            <el-col :span="8" v-if="sfCompleteData.length">
53
+                            <el-col :span="8">
54 54
                                 <div>
55 55
                                     <div class="card-title">坐席完成量排名</div>
56 56
                                     <el-row v-for="(item,index) in sfCompleteData" :key="index" class="card-list">
@@ -60,6 +60,7 @@
60 60
                                         <el-col :span="8">{{item.name}}</el-col>
61 61
                                         <el-col :span="8">{{item.number}}</el-col>
62 62
                                     </el-row>
63
+                                    <el-empty :image-size="50" v-if="!sfCompleteData.length"/>
63 64
                                 </div>
64 65
                             </el-col>
65 66
                         </el-row>

+ 1 - 0
CMS1.0/src/views/main/followUp/followUpPlan/cpns/patientFileList/patientFileList.vue

@@ -152,6 +152,7 @@ function initMethod(data) {
152 152
 function getPlanpatient() {
153 153
   queryParams.value.plId = planId.value
154 154
   getPageListData('/SfPlanPatient/sfplanpatient',queryParams.value).then((res)=>{
155
+    tableData.value = []
155 156
     if (res.data.length>0) {
156 157
       tableData.value = res.data
157 158
       total.value = res.total

+ 1 - 1
CMS1.0/src/views/main/followUp/followUpPlan/followUpPlan.vue

@@ -191,7 +191,7 @@ onActivated(() => {
191 191
   geFollowUpList();
192 192
 })
193 193
 onMounted(() => {
194
-  // geFollowUpList()
194
+  geFollowUpList()
195 195
 });
196 196
 function handleKeyUpEnter() {
197 197
   console.log('回车');

+ 5 - 0
CMS1.0/src/views/main/followUp/followUpTask/cpns/visitDetails.vue

@@ -108,6 +108,7 @@ const props = defineProps({
108 108
     },
109 109
 });
110 110
 watch(props, (nweProps) => {
111
+    
111 112
     initMethod(props)
112 113
 });
113 114
 
@@ -163,6 +164,7 @@ async function initMethod(props) {
163 164
                     form.value.state = taskDetail.value.callState;
164 165
                     form.value.desc = taskDetail.value.sfResult;
165 166
                 } else {
167
+                    form.value.desc = '';
166 168
                     const initStatus = taskResults.find((o) => { return !!o.checked });
167 169
                     if (initStatus) form.value.state = initStatus.value
168 170
                 }
@@ -363,6 +365,9 @@ const callPhone = () => {
363 365
             .content-submit {
364 366
                 margin: 0 auto;
365 367
                 text-align: center;
368
+                position: absolute;
369
+                bottom: 12px;
370
+                width: 45%;
366 371
             }
367 372
 
368 373
         }

+ 35 - 13
CMS1.0/src/views/main/homePage/cpns/followUpReport.vue

@@ -210,10 +210,17 @@ function geFollowSituation() {
210 210
 }
211 211
 // 随访接通率
212 212
 function getCallDuration() {
213
-    const params = {
214
-        beginTime :dateRange.value && moment(dateRange.value[0]).format('YYYY-MM-DD'),
215
-        endTime : dateRange.value && moment(dateRange.value[1]).format('YYYY-MM-DD'),
216
-        type:dateType.value,
213
+    let params = {}
214
+    if (dateType.value) {
215
+        params = {
216
+            type:dateType.value,
217
+        }
218
+    }else{
219
+        params = {
220
+            beginTime :dateRange.value && moment(dateRange.value[0]).format('YYYY-MM-DD'),
221
+            endTime : dateRange.value && moment(dateRange.value[1]).format('YYYY-MM-DD'),
222
+            type:dateType.value,
223
+        }
217 224
     }
218 225
     getPageListData("/SfPlanReport/getSfCallState",params).then((res)=>{ 
219 226
         if (res.data) {
@@ -232,10 +239,17 @@ function getCallDuration() {
232 239
 }
233 240
 // 坐席完成量
234 241
 function getSfComplete() {
235
-    const params = {
236
-        beginTime :dateRange.value && moment(dateRange.value[0]).format('YYYY-MM-DD'),
237
-        endTime : dateRange.value && moment(dateRange.value[1]).format('YYYY-MM-DD'),
238
-        type:dateType.value,
242
+    let params = {}
243
+    if (dateType.value) {
244
+        params = {
245
+            type:dateType.value,
246
+        }
247
+    }else{
248
+        params = {
249
+            beginTime :dateRange.value && moment(dateRange.value[0]).format('YYYY-MM-DD'),
250
+            endTime : dateRange.value && moment(dateRange.value[1]).format('YYYY-MM-DD'),
251
+            type:dateType.value,
252
+        }
239 253
     }
240 254
     getPageListData("/SfPlanReport/selectComplete",params).then((res)=>{ 
241 255
         if (res.data) {
@@ -246,10 +260,17 @@ function getSfComplete() {
246 260
 
247 261
 // 随访量
248 262
 function selectPlComplete() {
249
-    const params = {
250
-        beginTime :dateRange.value && moment(dateRange.value[0]).format('YYYY-MM-DD'),
251
-        endTime : dateRange.value && moment(dateRange.value[1]).format('YYYY-MM-DD'),
252
-        type:dateType.value,
263
+    let params = {}
264
+    if (dateType.value) {
265
+        params = {
266
+            type:dateType.value,
267
+        }
268
+    }else{
269
+        params = {
270
+            beginTime :dateRange.value && moment(dateRange.value[0]).format('YYYY-MM-DD'),
271
+            endTime : dateRange.value && moment(dateRange.value[1]).format('YYYY-MM-DD'),
272
+            type:dateType.value,
273
+        }
253 274
     }
254 275
     getPageListData("/SfPlanReport/getSfNumber",params).then((res)=>{
255 276
         if (res.data) {
@@ -328,9 +349,10 @@ function optionData1(xData,yData) {
328 349
     return resultData
329 350
 }
330 351
 function optionData2() {
352
+
331 353
     let resultData = {
332 354
         tooltip: {
333
-            trigger: 'axis'
355
+            trigger: 'item'
334 356
         },
335 357
         grid: {
336 358
             left: '2%',

+ 14 - 0
CMS1.0/src/views/redirect/index.vue

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div></div>
3
+</template>
4
+
5
+<script setup>
6
+import { useRoute, useRouter } from 'vue-router'
7
+
8
+const route = useRoute()
9
+const router = useRouter()
10
+const { params, query } = route
11
+const { path } = params
12
+
13
+router.replace({ path: '/' + path, query })
14
+</script>