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

BIN
CMS1.0/CMS1.0.rar


BIN
CMS1.0/src/assets/downLoad/template.xlsx


+ 3 - 15
CMS1.0/src/views/main/chat/online/cpns/borderMiddle/borderMiddle.vue

@@ -268,8 +268,7 @@
268 268
     :modal="false"
269 269
     :show-close="true"
270 270
   >
271
-  <page-order></page-order>
272
-    ></add-order>
271
+    <page-order/>
273 272
   </el-dialog>
274 273
   <!-- 创建工单结束 -->
275 274
 </template>
@@ -703,7 +702,6 @@
703 702
     vertical-align: middle;
704 703
     border-radius: 10px;
705 704
     word-break: break-all;
706
-    // margin: 0px 0 0 10px;
707 705
     position: relative;
708 706
     border: 1px solid #f8f2f2;
709 707
     max-width: 590px;
@@ -714,9 +712,7 @@
714 712
     width: 8.3%;
715 713
   }
716 714
 
717
-  .chatWidth83 {
718
-    // width: 83%;
719
-  }
715
+
720 716
 
721 717
   .chatPop1 span::after {
722 718
     content: '';
@@ -792,19 +788,14 @@
792 788
 
793 789
   .primary-btn {
794 790
     width: 8%;
795
-    // font-family: 仿宋;
796
-    // font-weight: bold;
797
-    // font-style: italic;
798 791
     font-size: 16px;
799 792
     height: 30px;
800 793
     margin-top: 7px;
801 794
     border-radius: 5px;
802 795
     text-align: center;
803 796
     line-height: 30px;
804
-    // letter-spacing: 2px;
805 797
     cursor: pointer;
806
-    // 按钮效果
807
-    border: #cecece 1px solid; // 909090
798
+    border: #cecece 1px solid; 
808 799
     background: #cccccc;
809 800
     color: #ffffff;
810 801
   }
@@ -819,9 +810,6 @@
819 810
     width: 0;
820 811
   }
821 812
   .infinite-list .infinite-list-item {
822
-    // display: flex;
823
-    // align-items: center;
824
-    // justify-content: center;
825 813
     display: grid;
826 814
     grid-template-columns: 94% 4%;
827 815
     column-gap: 6px;

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

@@ -26,7 +26,7 @@
26 26
               </el-select>
27 27
             </el-form-item>
28 28
             <el-form-item label="选择模版" label-width="200px" v-if="workBasicData.way === '2'">
29
-              <el-select v-model="smsValue" placeholder="请选择模版" style="width: 240px">
29
+              <el-select v-model="message" placeholder="请选择模版" style="width: 240px">
30 30
                 <el-option v-for="item in smsData" :key="item.value" :label="item.title" :value="item.value" />
31 31
               </el-select>
32 32
             </el-form-item>
@@ -63,8 +63,8 @@
63 63
             <div class="questionBox">
64 64
               <div class="questionBox">
65 65
                 <el-table :data="seatListData" border style="margin-bottom: 15px;">
66
-                  <el-table-column prop="usercode" label="成员"></el-table-column>
67
-                  <el-table-column prop="username" label="工号"></el-table-column>
66
+                  <el-table-column prop="username" label="成员"></el-table-column> 
67
+                  <el-table-column prop="usercode" label="工号"></el-table-column> 
68 68
                   <el-table-column prop="userdept" label="部门"></el-table-column>
69 69
                   <el-table-column label="比例" v-if="allocation==='2'">
70 70
                     <template #default="scope">
@@ -75,14 +75,12 @@
75 75
                       ></el-input>
76 76
                     </template>
77 77
                   </el-table-column>
78
-                  <el-table-column label="操作">
78
+                  <el-table-column label="操作" width="180" >
79 79
                     <template #default="{ row }">
80 80
                       <div style="display: flex;">
81 81
                         <el-button link @click="handleEdit(row)" v-if="allocation==='2'">编辑</el-button>
82 82
                         <el-button type="primary" link @click="handleSave" v-if="allocation==='2'">保存</el-button>
83
-                        <el-button type="danger" link @click="handleDelete(row)"
84
-                          >删除</el-button
85
-                        >
83
+                        <el-button type="danger" link @click="handleDelete(row)">删除</el-button>
86 84
                       </div>
87 85
                     </template>
88 86
                   </el-table-column>
@@ -100,7 +98,7 @@
100 98
         <template #header>
101 99
           <div class="card-header">
102 100
             <span class="card-title">患者匹配规则</span>
103
-            <a class="card-titleFr" v-if="matchingMethod === '1'">下载导入模版</a>
101
+            <a class="card-titleFr"  :href="downLoadUrl" download v-if="matchingMethod === '1'" >下载导入模版</a>
104 102
           </div>
105 103
 
106 104
         </template>
@@ -113,7 +111,7 @@
113 111
             </el-form-item>
114 112
             <el-form-item label="匹配方式" label-width="200px">
115 113
               <el-select v-model="matchingMethod" placeholder="请选择匹配方式" @change="changeSelect3" style="width: 240px">
116
-                <el-option v-for="item in matchMode" :key="item.value" :label="item.title" :value="item.value" :disabled="item.value=='1'" />
114
+                <el-option v-for="item in matchMode" :key="item.value" :label="item.title" :value="item.value"/>
117 115
               </el-select>
118 116
             </el-form-item>
119 117
             <el-form-item label="周期" label-width="200px" v-if="matchingMethod === '2'">
@@ -128,7 +126,6 @@
128 126
               <el-radio-group v-model="patientsNumRule"> 
129 127
                 <el-radio v-for="item in patientsData" :label="item.title" :value="item.value"/>
130 128
               </el-radio-group>
131
-              
132 129
             </el-form-item>
133 130
             <el-form-item label="" label-width="200px" v-if="patientsNumRule!=='1'">
134 131
               <el-input-number v-model="patientsNum" :min="1" :max="9999" />
@@ -138,8 +135,8 @@
138 135
           <el-col :span="12">
139 136
             <div class="questionBox">
140 137
               
141
-              <patient-list v-if="matchingMethod === '1'"></patient-list>
142
-              <div v-if="matchingMethod === '2'" style="position: relative;">
138
+              <patient-list :planId="planId" v-if="matchingMethod === '1' && planId "></patient-list>
139
+              <div v-if="matchingMethod === '2'" style="position: relative;width: 400px;">
143 140
                 <div>筛选条件</div>
144 141
                 <div v-for="( item , index ) in filterData" style="display: flex; margin-top: 15px;" >
145 142
                     <el-select class="formItem" v-model="item.officeItem.value" @change="officeItemChange($event,index)" placeholder="请选择" style="width: 120px">
@@ -175,7 +172,7 @@
175 172
         </el-row>
176 173
       </el-card>
177 174
       <div style="width: 100%; height: 50px;"></div>
178
-      <div class="box-btns" v-if="!planId">
175
+      <div class="box-btns" v-if="!isdetil">
179 176
         <el-button style="margin-right: 30px;" type="primary" @click="handleConfirmClick">确 定</el-button>
180 177
       </div>
181 178
 
@@ -188,7 +185,7 @@
188 185
         </el-radio-group>
189 186
       </el-form-item>
190 187
       <el-form-item  label-width="150px" v-if="messageType === '1'">
191
-        <el-select v-model="questionnaire" placeholder="请选择模版" style="width: 240px">
188
+        <el-select v-model="questionnaireMsg" placeholder="请选择模版" style="width: 240px">
192 189
           <el-option v-for="item in questionnaireData" :key="item.value" :label="item.title" :value="item.value" />
193 190
         </el-select>
194 191
       </el-form-item>
@@ -199,6 +196,7 @@
199 196
         <el-button type="primary" @click= "centerDialogVisibleQues = false">确定</el-button>
200 197
       </div>
201 198
     </el-dialog>
199
+
202 200
     <el-dialog
203 201
       v-model="centerDialogVisibleAddWorkorder"
204 202
       title="新增坐席"
@@ -207,29 +205,29 @@
207 205
       :modal="true"
208 206
       :show-close="true"
209 207
     >
210
-    <el-form-item label="请选择坐席" label-width="200px">
211
-      <el-select
212
-        v-model="seatSelectvalue"
213
-        multiple
214
-        filterable
215
-        remote
216
-        reserve-keyword
217
-        placeholder="Please enter a keyword"
218
-        :remote-method="remoteMethod"
219
-        :loading="loading"
220
-        style="width: 240px"
221
-      >
222
-        <el-option
223
-          v-for="item in rangeSeatData"
224
-          :key="item.value"
225
-          :label="item.title"
226
-          :value="item.value"
227
-        />
228
-      </el-select>
229
-    </el-form-item>
230
-    <div style="text-align: center;">
231
-      <el-button style="margin-right: 30px;" type="primary" @click="handleSeatTrue">确 定</el-button>
232
-    </div>
208
+      <el-form-item label="请选择坐席" label-width="200px">
209
+        <el-select
210
+          v-model="seatSelectvalue"
211
+          multiple
212
+          filterable
213
+          remote
214
+          reserve-keyword
215
+          placeholder="Please enter a keyword"
216
+          :remote-method="remoteMethod"
217
+          :loading="loading"
218
+          style="width: 240px"
219
+        >
220
+          <el-option
221
+            v-for="item in rangeSeatData"
222
+            :key="item.value"
223
+            :label="item.title"
224
+            :value="item.value"
225
+          />
226
+        </el-select>
227
+      </el-form-item>
228
+      <div style="text-align: center;">
229
+        <el-button style="margin-right: 30px;" type="primary" @click="handleSeatTrue">确 定</el-button>
230
+      </div>
233 231
     </el-dialog>
234 232
   </div>
235 233
 </template>
@@ -240,19 +238,22 @@
240 238
     Minus
241 239
 } from '@element-plus/icons-vue'
242 240
 import moment from 'moment';
241
+
243 242
 import PageAdd from '@/components/page-add';
244 243
 import seatList from './cpns/seatList/seatList';
245 244
 import patientList from './cpns/patientList/patientList';
246 245
 import { modalConfig } from './config/modal.config';
247 246
 import { usePageModal } from '@/hooks/use-page-add';
248 247
 import useSelectStore from '@/store/commonSelect/common';
249
-import { createPageData, editPageData,getPageListData } from '@/api/main/system/system';
250
-
248
+import { createPageData, editPageData, getPageListData,getPageDetail } from '@/api/main/system/system';
249
+import { useRoute, useRouter } from 'vue-router';
251 250
 import { 
252 251
   followType,followWay,followExecution,allotMode,repetitionMode,
253 252
   matchMode,periodData,patientsData } from "@/utils/commonDic.js";
254 253
 
255 254
 import { onMounted, ref, watch } from 'vue';
255
+// import downLoadUrl from 'src/assets/downLoad/template.xlsx'
256
+
256 257
 const props = defineProps({
257 258
   getDefaultInfo: {
258 259
     type: Object,
@@ -261,15 +262,22 @@ const props = defineProps({
261 262
   planId: {
262 263
     type: String,
263 264
     default: ''
265
+  },
266
+  isdetil:{
267
+    type: String,
268
+    default: ''
264 269
   }
265 270
 });
266 271
 watch(props, (nweProps) => {
267 272
   planId.value = nweProps.planId
273
+  isdetil.value = nweProps.isdetil
268 274
   initMethod(nweProps);
269 275
 });
270
-
271 276
 const { proxy } = getCurrentInstance();
272
-const planId = ref('')
277
+
278
+const downLoadUrl = new URL('@/assets/downLoad/template.xlsx', import.meta.url).href
279
+const router = useRoute();
280
+const isdetil = ref('')
273 281
 const loading = ref(false)
274 282
 const seatSelectvalue = ref()
275 283
 const rangeSeatData = ref([])
@@ -297,18 +305,20 @@ const filterObjData = ref({
297 305
 })
298 306
 const filterLongData = ref([])
299 307
 const filterData = ref([])
308
+const screenData = ref([])
300 309
 
301 310
 
302 311
 const formData = ref({});
303 312
 const workBasicData = ref({});
313
+const questionnaireMsg = ref('')
304 314
 const questionnaire = ref('') // 问卷模版id
305 315
 const message = ref('') // 短信模版id
306
-const quesIput = ref('1') // 链接
316
+const quesIput = ref('') // 链接
307 317
 const messageType = ref('1') // 短信模版问卷id
308 318
 const allocation = ref('') // 分配方式 
309 319
 
310 320
 const deduplication = ref('') // 去重方式
311
-const matchingMethod = ref('2') // 匹配方式
321
+const matchingMethod = ref('1') // 匹配方式
312 322
 const cycle = ref('') // 周期
313 323
 const executionTime = ref('') // 时间
314 324
 const patientsNumRule = ref('1') // 患者规则
@@ -319,42 +329,70 @@ const questionnaireData = useSelectStore().questionnaireData
319 329
 const smsData = useSelectStore().templateNameListData
320 330
 
321 331
 const centerDialogVisibleQues = ref(false)
332
+const planId = ref(Number(router.query.planId || 0));
333
+const planDetailObj = ref({})
334
+
322 335
 function changeSelect3(data) {
323 336
   console.log(data)
324 337
 }
325 338
 onMounted(() => {
326
-  workBasicData.value.way = '1'
327 339
   initMethod(props);
328 340
 });
341
+
329 342
 function initMethod(data) {
343
+  if (planId.value) {
344
+    getPlanDetail(planId.value)
345
+  }
346
+  workBasicData.value.way = '1'
330 347
   getFilterList()
331 348
   getSeatList()
332 349
   seatData.value = useSelectStore().userListData
333 350
 }
334 351
 const centerDialogVisibleAddWorkorder = ref(false);
335 352
 const onAddItem = () => {
353
+  
336 354
   seatSelectvalue.value = []
337 355
   centerDialogVisibleAddWorkorder.value = true;
356
+
338 357
 }
339 358
 function handleSeatTrue() {
340 359
   centerDialogVisibleAddWorkorder.value = false;
341
-  console.log(seatSelectvalue.value)
342
-  console.log(seatDataList.value);
360
+  const newAway = []
343 361
   seatDataList.value.forEach(element => {
344 362
     const obj = {}
345
-    obj.username = element.nickName
363
+    const obj2= {}
364
+    obj.username = element.nickName  
346 365
     obj.usercode = element.userName
366
+    obj2.username = element.nickName
367
+    obj2.usercode = element.userName
347 368
     // obj.userdept = element.dept ?element.dept.deptName:''
348 369
     obj.proportion = ''
370
+    obj2.proportion = ''
371
+    obj2.seatsId = element.userId
349 372
     if (seatSelectvalue.value.indexOf(obj.usercode)!=-1) {
350 373
       seatResultData.value.push(obj)
351
-      // obj.userdept = element.dept ?element.dept.deptName:''
374
+      obj.userdept = element.dept ?element.dept.deptName:''
352 375
       seatListData.value.push(obj)
353
-     
376
+      newAway.push(obj2)
354 377
     }
355
-    
356 378
   });
357
-  console.log(seatListData.value)
379
+  if (planId.value) {
380
+    console.log(seatSelectvalue.value)
381
+    console.log(newAway);
382
+    newAway.forEach(element => {
383
+      const params = {
384
+        plId:planId.value,
385
+        proportion:element.proportion,
386
+        userName:element.username,
387
+        usercode:element.usercode,
388
+      }
389
+      createPageData('/SfPlanSeats/sfplanseats',params).then((data) => {
390
+            proxy.$modal.msgSuccess('新增成功!');
391
+      })
392
+    });
393
+    
394
+  }
395
+  
358 396
 
359 397
 }
360 398
 const remoteMethod = (query) => {
@@ -406,9 +444,9 @@ const handleConfirmClick = () => {
406 444
       formData.value.questionnaire = questionnaire.value
407 445
       formData.value.message = message.value
408 446
       formData.value.messageType = messageType.value
409
-      formData.value.messageParameter =  messageType.value==='1' ? questionnaire.value : quesIput.value
447
+      formData.value.messageParameter =  messageType.value==='1' ? questionnaireMsg.value : quesIput.value
410 448
       formData.value.allocation = allocation.value
411
-      formData.value.seats = seatResultData.value //seatResultData.value
449
+      formData.value.seats = seatResultData.value //seatResultData.value seatDataList
412 450
       formData.value.deduplication = deduplication.value
413 451
       formData.value.matchingMethod = matchingMethod.value
414 452
       formData.value.cycle = cycle.value
@@ -417,22 +455,126 @@ const handleConfirmClick = () => {
417 455
       formData.value.patientsNum = patientsNum.value
418 456
       formData.value.screen = JSON.stringify(filterResultData.value)
419 457
       console.log(formData.value)
420
-      createPageData('/SfPlan/sfPlan', formData.value).then((data) => {
458
+      if (planId.value) {
459
+        formData.value.plId = planId.value
460
+        editPageData('/SfPlan/sfPlan', formData.value).then((data) => {
461
+          proxy.$modal.msgSuccess('编辑成功!');
462
+        })
463
+      } else{
464
+        createPageData('/SfPlan/sfPlan', formData.value).then((data) => {
421 465
             proxy.$modal.msgSuccess('新增成功!');
422
-      })
466
+        })
467
+      }
468
+      
423 469
       // editPageData('/order/workorder', formData.value).then((data) => {})
424 470
     }
425 471
   });
426 472
 };
427 473
 
474
+function getPlanDetail(planId) {
475
+  getPageDetail("/SfPlan/sfPlan/"+planId).then((res)=>{
476
+    console.log(res.data)
477
+    if (res.data) {
478
+      planDetailObj.value = res.data
479
+      defaultInfo.value.name = planDetailObj.value.name
480
+      defaultInfo.value.type = planDetailObj.value.type.toString()
481
+      defaultInfo.value.way = planDetailObj.value.way.toString()
482
+      defaultInfo.value.executionMethod = planDetailObj.value.executionMethod
483
+      defaultInfo.value.indate = [ planDetailObj.value.beginEffective , planDetailObj.value.endEffective ]
484
+      defaultInfo.value.describes = planDetailObj.value.describes
485
+      if (planDetailObj.value.way.toString() === '1') {
486
+        questionnaire.value = planDetailObj.value.questionnaire
487
+      } else  if (planDetailObj.value.way.toString() === '2') {
488
+        message.value = planDetailObj.value.message
489
+        messageType.value = planDetailObj.value.messageType.toString()
490
+        if (planDetailObj.value.messageType == '1') {
491
+          questionnaireMsg.value = Number(planDetailObj.value.messageParameter)
492
+        }else if(planDetailObj.value.messageType == '2'){
493
+          quesIput.value = planDetailObj.value.messageParameter
494
+        }
495
+      }
496
+      allocation.value = planDetailObj.value.allocation.toString()
497
+      deduplication.value = planDetailObj.value.deduplication.toString()
498
+      cycle.value = planDetailObj.value.cycle.toString()
499
+      
500
+      executionTime.value = converTime(planDetailObj.value.executionTime)
501
+      patientsNumRule.value = planDetailObj.value.patientsNumRule.toString()
502
+      patientsNum.value = planDetailObj.value.patientsNum
503
+      screenData.value = JSON.parse(planDetailObj.value.screen)
504
+      if (screenData.value.length>0) {
505
+        console.log(screenData.value)
506
+        filterData.value = []
507
+        console.log(filterData.value);
508
+        screenData.value.forEach(ele => {
509
+          const obj = {
510
+              officeItem:{
511
+                type: 'select',
512
+                data: filterOfficeData.value,
513
+                value: ele.field
514
+              },
515
+              relationItem:{
516
+                type: 'select',
517
+                data: [],
518
+                value: ele.operate
519
+              },
520
+              numberItem: {
521
+                type: 'input',
522
+                value: ele.value
523
+              }
524
+          }
525
+          filterData.value.push(obj)
526
+        });
527
+        console.log(filterData.value);
528
+      }
529
+      // defaultInfo.value = planDetailObj.value.name
530
+      // defaultInfo.value = planDetailObj.value.name
531
+      // defaultInfo.value = planDetailObj.value.name
532
+
533
+    }
534
+    
535
+  })
536
+}
428 537
 
538
+const converTime = (arr) => {
539
+  const _arr = arr.split(":");
540
+  let result = new Date(2010, 10, 10, Number(_arr[0]), Number(_arr[1]), Number(_arr[2]))
541
+  return result
542
+};
543
+function getPlanSeatList(plId) {
544
+  const params = {plId}
545
+  getPageListData("/SfPlanSeats/sfplanseats",params).then((res)=>{
546
+    if (res.data.length>0) {
547
+      // seatListData.value = res.data
548
+      res.data.forEach((element,index) => {
549
+        const obj = {}
550
+        obj.username = element.userName   
551
+        obj.usercode = element.usercode
552
+        // obj.usercode = element.userName
553
+        // obj.userdept
554
+        seatDataList.value.find(function(ele){
555
+            if (ele.userName === element.usercode) {
556
+              obj.userdept = ele.dept.deptName
557
+            }
558
+        })
559
+        obj.proportion = '' 
560
+        seatResultData.value.push(obj)
561
+        seatListData.value.push(obj)
562
+      });
563
+      console.log(seatDataList.value)
564
+      console.log(seatListData.value)
565
+    //   res.data.forEach(ele => { 
566
+    //     seatListData.value.push(ele.userName?ele.userName:ele.usercode)
567
+    //   });
568
+    }
569
+    
570
+  })
571
+}
429 572
 const editIndex = ref(-1)
430 573
 const handleEdit = (row) => {
431 574
   editIndex.value = seatListData.value.indexOf(row)
432 575
 }
433 576
 const handleSave = () => {
434 577
   editIndex.value = -1
435
-  console.log(seatListData.value)
436 578
 }
437 579
 const handleDelete = (row) => {
438 580
   seatListData.value.splice(seatListData.value.indexOf(row), 1)
@@ -444,6 +586,9 @@ const props2 = {
444 586
 function getSeatList() {
445 587
   getPageListData('/system/user').then((res)=>{
446 588
     seatDataList.value = res.data
589
+    if (planId.value) {
590
+      getPlanSeatList(planId.value)
591
+    }
447 592
   })
448 593
 }
449 594
 function filterAddItem() {
@@ -466,11 +611,12 @@ function filterAddItem() {
466 611
   }
467 612
   filterData.value.push(newObj) 
468 613
 }
614
+
469 615
 function filterMinuItem() {
470 616
   filterData.value.pop()
471 617
 }
618
+
472 619
 function handleFilter() {
473
-  console.log(filterData.value); 
474 620
   filterResultData.value = [] 
475 621
   filterData.value.forEach(ele => {
476 622
     const obj = {}
@@ -479,10 +625,8 @@ function handleFilter() {
479 625
     obj.value = ele.numberItem.value
480 626
     filterResultData.value.push(obj)
481 627
   });
482
-  console.log(JSON.stringify(filterResultData.value));
483 628
 }
484 629
 function officeItemChange(value,index) {
485
-  console.log(value,index);
486 630
   filterLongData.value.forEach(ele => {
487 631
     if (ele.field.value === value) {
488 632
       filterData.value[index].relationItem.data = ele.operate
@@ -497,7 +641,6 @@ function officeItemChange(value,index) {
497 641
 }
498 642
 function getFilterList() {
499 643
   getPageListData('/SfPlan/sfPlan/option').then((res)=>{
500
-    console.log(res);
501 644
     if (res.data.length>0) {
502 645
       filterLongData.value = res.data
503 646
       res.data.forEach(ele => {
@@ -508,9 +651,12 @@ function getFilterList() {
508 651
         filterObjData.value.officeItem.data.push(obj)
509 652
         filterOfficeData.value.push(obj)
510 653
       });
511
-      filterData.value.push(filterObjData.value)
654
+      if (screenData.value.length<1) {
655
+        
656
+        filterData.value.push(filterObjData.value)
657
+      }
658
+      
512 659
     }
513
-   console.log(filterData.value);
514 660
   })
515 661
 }
516 662
 
@@ -536,8 +682,10 @@ const [pageModalRef, defaultInfo] = usePageModal(newCallback, editCallback);
536 682
   background-color: #ffffff;
537 683
   text-align: right;
538 684
   width: calc(100% - 200px);
685
+  background-color: #ffffff;
539 686
   position: fixed;
540 687
   bottom: 0px;
688
+  z-index: 1;
541 689
 }
542 690
 
543 691
 .card-header {
@@ -573,7 +721,6 @@ const [pageModalRef, defaultInfo] = usePageModal(newCallback, editCallback);
573 721
 }
574 722
 
575 723
 .questionBox {
576
-  width: 400px;
577 724
   .filterIcon{
578 725
     position: absolute;
579 726
     right: -70px;

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

@@ -1,23 +1,35 @@
1 1
 <template>
2 2
   <div class="app-container">
3
-    <div class="questionBox">
3
+    <div class="questionBox" style="width: 100%;">
4 4
         <el-table :data="tableData" style="width: 100%">
5
-          <el-table-column fixed prop="date" label="成员" width="150" />
6
-          <el-table-column prop="name" label="工号" width="120" />
7
-          <el-table-column prop="state" label="所属部门" width="120" />
8
-          <el-table-column prop="city" label="比例" width="120" />
9
-          <el-table-column fixed="right" label="操作" width="120">
10
-            <template #default>
11
-              <el-button link type="primary" size="small" @click="handleClick"
12
-                >Detail</el-button
13
-              >
14
-              <el-button link type="primary" size="small">Edit</el-button>
15
-            </template>
16
-          </el-table-column>
5
+          <el-table-column prop="name" label="姓名" />
6
+          <el-table-column prop="seatCode" label="工号"/>
7
+          <el-table-column prop="mobile" label="手机号"  />
17 8
         </el-table>
18
-        <el-button class="mt-4" style="width: 100%" @click="onAddItem">
19
-          导入患者
20
-        </el-button>
9
+        <el-pagination
10
+          style=" margin-top: 15px;"
11
+          v-show="total > 0"
12
+          :total="total"
13
+          v-model:page="queryParams.pageNum"
14
+          v-model:limit="queryParams.pageSize"
15
+          @pagination="getList"
16
+        />
17
+        <el-upload
18
+            style="text-align: center; margin-top: 15px;"
19
+            accept=".xlsx"
20
+            v-model:file-list="fileList"
21
+            :headers="headers"
22
+            :data="upLoadParams" 
23
+            :show-file-list="false"
24
+            class="upload-demo"
25
+            :action="uploadURL+planId"
26
+            :on-success="handleExcelSuccess"
27
+          >
28
+            <el-button class="mt-4" style="width: 100%">
29
+              导入患者
30
+            </el-button>
31
+          </el-upload>
32
+        
21 33
     </div>
22 34
     <!-- 创建工单 -->
23 35
   <el-dialog
@@ -41,14 +53,38 @@ import { usePageModal } from '@/hooks/use-page-add';
41 53
 import useSelectStore from '@/store/commonSelect/common';
42 54
 import { createPageData, editPageData } from '@/api/main/system/system';
43 55
 import { onMounted, ref, watch } from 'vue';
56
+import { getToken } from '@/utils/auth';
57
+import { getPageListData } from '@/api/main/system/system';
44 58
 
45 59
 const { proxy } = getCurrentInstance();
46
-
60
+const props = defineProps({
61
+  planId: {
62
+    type: String,
63
+    default: ''
64
+  }
65
+});
66
+const planId = ref('')
67
+const total = ref(0)
47 68
 const formData = ref({});
48 69
 const workBasicData = ref({});
49 70
 const callId = ref({});
50 71
 const centerDialogVisibleAddWorkorder = ref(false);
72
+const fileList = ref([]);
73
+const headers = ref({
74
+    Authorization: 'Bearer ' + getToken(),
75
+  });
76
+const upLoadParams = ref({});
77
+const tableData = ref([])
78
+const queryParams = ref({
79
+  pageNum: 1,
80
+  pageSize: 10,
81
+  plId: undefined,
51 82
 
83
+})
84
+const uploadURL = ref(import.meta.env.VITE_APP_BASE_API + '/SfPlanPatient/sfplanpatient/importExcel?plId=');
85
+const handleExcelSuccess = (response, uploadFile, uploadFiles) => {
86
+  console.log(response, uploadFile, uploadFiles);
87
+};
52 88
 const onAddItem = () => {
53 89
   console.log('新增')
54 90
   centerDialogVisibleAddWorkorder.value = true;
@@ -56,51 +92,6 @@ const onAddItem = () => {
56 92
 const handleClick = () => {
57 93
   console.log('click')
58 94
 }
59
-
60
-const tableData = [
61
-  {
62
-    date: '2016-05-03',
63
-    name: 'Tom',
64
-    state: 'California',
65
-    city: 'Los Angeles',
66
-    address: 'No. 189, Grove St, Los Angeles',
67
-    zip: 'CA 90036',
68
-    tag: 'Home',
69
-  },
70
-  {
71
-    date: '2016-05-02',
72
-    name: 'Tom',
73
-    state: 'California',
74
-    city: 'Los Angeles',
75
-    address: 'No. 189, Grove St, Los Angeles',
76
-    zip: 'CA 90036',
77
-    tag: 'Office',
78
-  },
79
-  {
80
-    date: '2016-05-04',
81
-    name: 'Tom',
82
-    state: 'California',
83
-    city: 'Los Angeles',
84
-    address: 'No. 189, Grove St, Los Angeles',
85
-    zip: 'CA 90036',
86
-    tag: 'Home',
87
-  },
88
-  {
89
-    date: '2016-05-01',
90
-    name: 'Tom',
91
-    state: 'California',
92
-    city: 'Los Angeles',
93
-    address: 'No. 189, Grove St, Los Angeles',
94
-    zip: 'CA 90036',
95
-    tag: 'Office',
96
-  },
97
-]
98
-const props = defineProps({
99
-  getDefaultInfo: {
100
-    type: Object,
101
-    default: () => ({}),
102
-  }
103
-});
104 95
 watch(props, (nweProps) => {
105 96
   initMethod(nweProps);
106 97
 });
@@ -110,6 +101,20 @@ onMounted(() => {
110 101
 
111 102
 function initMethod(data) {
112 103
   console.log(data)
104
+  planId.value = data.planId
105
+  if (planId.value) {
106
+    getPlanpatient()
107
+  }
108
+  console.log(planId.value)
109
+}
110
+function getPlanpatient() {
111
+  queryParams.value.queryParams = planId.value
112
+  getPageListData('/SfPlanPatient/sfplanpatient',queryParams.value).then((res)=>{
113
+    if (res.data.length>0) {
114
+      tableData.value = res.data
115
+      total.value = res.total
116
+    }
117
+  })
113 118
 }
114 119
 const modalConfigRef = computed(() => {
115 120
   //  来源
@@ -127,24 +132,6 @@ const getWorkBasicData = (item) => {
127 132
 defineExpose({
128 133
   getWorkBasicData,
129 134
 });
130
-const handleConfirmClick = () => {
131
-  pageModalRef.value.formRef.ruleFormRef.validate((bool) => {
132
-    if (bool) {
133
-      if (JSON.stringify(props.getDefaultInfo) !== '{}') {
134
-        formData.value.workorderId = props.getDefaultInfo.workorderId;
135
-        editPageData('/order/workorder', formData.value).then((data) => {
136
-          proxy.$modal.msgSuccess('编辑成功!');
137
-        });
138
-      } else {
139
-        let creatUrl = '/order/workorder';
140
-          creatUrl = '/order/workorder?callid=' + callId.value;
141
-        createPageData(creatUrl, formData.value).then((data) => {
142
-          proxy.$modal.msgSuccess('新增成功!');
143
-        });
144
-      }
145
-    }
146
-  });
147
-};
148 135
 
149 136
 // 1.处理逻辑
150 137
 const newCallback = () => { };

+ 310 - 93
CMS1.0/src/views/main/followUp/followUpPlan/cpns/dataBoard.vue

@@ -4,34 +4,34 @@
4 4
             <el-row :gutter="20">
5 5
                 <el-col :span="6" style="padding: 30px 0px 30px 30px;">
6 6
                     <div class="header-text1">已完成数量</div>
7
-                    <div class="header-text2">3230</div>
7
+                    <div class="header-text2">{{boardObj.Complete}}</div>
8 8
                     <div class="header-text3">
9 9
                         <span>总数量</span>
10
-                        <span>4000</span>
10
+                        <span>{{boardObj.Total}}</span>
11 11
                     </div>
12 12
                 </el-col>
13 13
                 <el-col :span="6" style="padding: 30px 0px 30px 30px;">
14
-                    <div class="header-text1">已完成数量</div>
15
-                    <div class="header-text2">3230</div>
14
+                    <div class="header-text1">接通数量</div>
15
+                    <div class="header-text2">{{boardObj.Connected}}</div>
16 16
                     <div class="header-text3">
17
-                        <span>总数量</span>
18
-                        <span>4000</span>
17
+                        <span>接通率</span>
18
+                        <span>{{boardObj.ConnectedRate}}</span>
19 19
                     </div>
20 20
                 </el-col>
21 21
                 <el-col :span="6" style="padding: 30px 0px 30px 30px;">
22
-                    <div class="header-text1">已完成数量</div>
23
-                    <div class="header-text2">3230</div>
22
+                    <div class="header-text1">平均通话时长</div>
23
+                    <div class="header-text2">{{boardObj.longtimeAvg}}秒</div>
24 24
                     <div class="header-text3">
25
-                        <span>总数量</span>
26
-                        <span>4000</span>
25
+                        <span>总通话时长</span>
26
+                        <span>{{boardObj.longtime}}</span>
27 27
                     </div>
28 28
                 </el-col>
29 29
                 <el-col :span="6" style="padding: 30px 0px 30px 30px;">
30
-                    <div class="header-text1">已完成数量</div>
31
-                    <div class="header-text2">3230</div>
30
+                    <div class="header-text1">二次完成量</div>
31
+                    <div class="header-text2">{{boardObj.secondary}}</div>
32 32
                     <div class="header-text3">
33
-                        <span>总数量</span>
34
-                        <span>4000</span>
33
+                        <span>二次完成率</span>
34
+                        <span>{{boardObj.secondaryRate}}</span>
35 35
                     </div>
36 36
                 </el-col>
37 37
             </el-row>
@@ -53,12 +53,12 @@
53 53
                             <el-col :span="8">
54 54
                                 <div>
55 55
                                     <div class="card-title">坐席完成量排名</div>
56
-                                    <el-row v-for="o in 4" :key="o" class="card-list">
56
+                                    <el-row v-for="(item,index) in sfCompleteData" :key="index" class="card-list">
57 57
                                         <el-col :span="8">
58
-                                            <div :class="o<4?'titleRank-active':'titleRank'">{{ o }}</div>
58
+                                            <div :class="index<4?'titleRank-active':'titleRank'">{{ index+1 }}</div>
59 59
                                         </el-col>
60
-                                        <el-col :span="8">姓名</el-col>
61
-                                        <el-col :span="8">分数</el-col>
60
+                                        <el-col :span="8">{{item.name}}</el-col>
61
+                                        <el-col :span="8">{{item.number}}</el-col>
62 62
                                     </el-row>
63 63
                                 </div>
64 64
                             </el-col>
@@ -101,98 +101,315 @@
101 101
 </template>
102 102
 <script setup>
103 103
 import { onMounted, ref } from 'vue';
104
+import { getPageListData } from '@/api/main/system/system';
105
+
104 106
 import * as echarts from 'echarts';
105 107
 let chartDom1
106 108
 let chartDom2
107 109
 let chartDom3
108 110
 let chartDom4
109
-let optionData1 = {
110
-    xAxis: {
111
-        type: 'category',
112
-        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
113
-    },
114
-    yAxis: {
115
-        type: 'value'
116
-    },
117
-    series: [
118
-        {
119
-            data: [120, 200, 150, 80, 70, 110, 130],
120
-            type: 'bar'
111
+
112
+const boardObj = ref({})
113
+const completeData = ref()
114
+const sfCompleteData = ref([])
115
+const callDurationData = ref({})
116
+const dialogueRoundData = ref({})
117
+const listeningStatusData = ref([])
118
+
119
+onMounted(() => {
120
+    chartDom1 = document.getElementById('mainEcharts1');
121
+    chartDom2 = document.getElementById('mainEcharts2');
122
+    chartDom3 = document.getElementById('mainEcharts3');
123
+    chartDom4 = document.getElementById('mainEcharts4');
124
+    selectPlDataBoard()
125
+    selectPlComplete()
126
+    getSfComplete()
127
+    getCallDuration()
128
+    getDialogueRound()
129
+    getListeningStatus()
130
+})
131
+
132
+// 接听状态
133
+function getListeningStatus() {
134
+    const params = {
135
+        plId:2
136
+    }
137
+    getPageListData("/SfPlanReport/selectListeningStatus",params).then((res)=>{
138
+        if (res.data) {
139
+            listeningStatusData.value = res.data
140
+            const xData = [],yData = [],yData1 = [],yData2 = [],yData3 = [],yData4 = []
141
+            let eleData,number = 0
142
+            listeningStatusData.value.forEach((ele,index) => {
143
+                if (eleData !== ele.date) {
144
+                    xData.push(ele.date)
145
+                    yData.push(ele.callRate)
146
+                    number++
147
+                    ele.callState==='正常接听'?yData1.push(ele.connected):yData1.push(0)
148
+                    ele.callState==='无人接听'?yData2.push(ele.connected):yData2.push(0)
149
+                    ele.callState==='稍后拨打'?yData3.push(ele.connected):yData3.push(0)
150
+                    ele.callState==='号码错误'?yData4.push(ele.connected):yData4.push(0)
151
+                } else{
152
+                    if (ele.callState === '正常接听') {
153
+                        yData1[number-1] = ele.connected
154
+                    }else if (ele.callState === '无人接听'){
155
+                        yData2[number-1] = ele.connected
156
+                    }else if (ele.callState === '稍后拨打'){
157
+                        yData3[number-1] = ele.connected
158
+                    }else if (ele.callState === '号码错误'){
159
+                        yData4[number-1] = ele.connected
160
+                    }
161
+                }
162
+                eleData = ele.date
163
+            });
164
+            let myChart4 = echarts.init(chartDom4);
165
+            myChart4.setOption(optionData4(xData,yData,yData1,yData2,yData3,yData4));
121 166
         }
122
-    ]
167
+    })
123 168
 }
124
-let optionData2 = {
125
-  xAxis: {
126
-    type: 'category',
127
-    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
128
-  },
129
-  yAxis: {
130
-    type: 'value'
131
-  },
132
-  series: [
133
-    {
134
-      data: [120, 200, 150, 80, 70, 110, 130],
135
-      type: 'bar',
136
-      showBackground: true,
137
-      backgroundStyle: {
138
-        color: 'rgba(180, 180, 180, 0.2)'
139
-      }
169
+
170
+// 对话次数
171
+function getDialogueRound() {
172
+    const numbers = "10,15,30,45,60"
173
+    const params = {
174
+        plId:2
140 175
     }
141
-  ]
176
+    getPageListData("/SfPlanReport/selectDialogueRound/"+numbers,params).then((res)=>{
177
+        if (res.data) {
178
+            dialogueRoundData.value = res.data
179
+            let xData =  []
180
+            let yData = []
181
+            xData= Object.keys(dialogueRoundData.value) 
182
+            yData= Object.values(dialogueRoundData.value) 
183
+            let myChart3 = echarts.init(chartDom3);
184
+            myChart3.setOption(optionData3(xData,yData)); 
185
+        }
186
+    })
142 187
 }
143
-let optionData3 = {
144
-    xAxis: {
145
-        type: 'category',
146
-        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
147
-    },
148
-    yAxis: {
149
-        type: 'value'
150
-    },
151
-    series: [
152
-        {
153
-            data: [120, 200, 150, 80, 70, 110, 130],
154
-            type: 'bar'
188
+// 坐席完成量
189
+function getCallDuration() {
190
+    const numbers = "10,15,30,45,60"
191
+    const params = {
192
+        plId:2
193
+    }
194
+    getPageListData("/SfPlanReport/selectCallDuration/"+numbers,params).then((res)=>{
195
+        if (res.data) {
196
+            callDurationData.value = res.data
197
+            let xData =  []
198
+            let yData = []
199
+            xData= Object.keys(callDurationData.value) 
200
+            yData= Object.values(callDurationData.value) 
201
+            let myChart2 = echarts.init(chartDom2);
202
+            myChart2.setOption(optionData2(xData,yData));
155 203
         }
156
-    ]
204
+    })
157 205
 }
158
-let optionData4 = {
159
-  xAxis: {
160
-    type: 'category',
161
-    boundaryGap: false,
162
-    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
163
-  },
164
-  yAxis: {
165
-    type: 'value'
166
-  },
167
-  series: [
168
-    {
169
-      data: [820, 932, 901, 934, 1290, 1330, 1320],
170
-      type: 'line',
171
-      areaStyle: {}
206
+// 坐席完成量
207
+function getSfComplete() {
208
+    const params = {
209
+        plId:2
172 210
     }
173
-  ]
211
+    getPageListData("/SfPlanReport/selectSfComplete",params).then((res)=>{
212
+        if (res.data) {
213
+            sfCompleteData.value = res.data
214
+        }
215
+    })
174 216
 }
175
-onMounted(() => {
176
-    chartDom1 = document.getElementById('mainEcharts1');
177
-    chartDom2 = document.getElementById('mainEcharts2');
178
-    chartDom3 = document.getElementById('mainEcharts3');
179
-    chartDom4 = document.getElementById('mainEcharts4');
180
-    setEchats()
181
-})
182
-function setEchats() {
183
-    let myChart1 = echarts.init(chartDom1);
184
-    let myChart2 = echarts.init(chartDom2);
185
-    let myChart3 = echarts.init(chartDom3);
186
-    let myChart4 = echarts.init(chartDom4);
187
-
188
-    myChart1.setOption(optionData1);
189
-    myChart2.setOption(optionData2);
190
-    myChart3.setOption(optionData3);
191
-    myChart4.setOption(optionData4);
217
+
218
+// 完成量统计
219
+function selectPlComplete() {
220
+    const params = {
221
+        plId:2
222
+    }
223
+    getPageListData("/SfPlanReport/selectPlComplete",params).then((res)=>{
224
+        if (res.data) {
225
+            completeData.value = res.data
226
+            const xData = []
227
+            const yData = []
228
+            completeData.value.forEach(ele => {
229
+                xData.push(ele.date)
230
+                yData.push(ele.number)
231
+            });
232
+            let myChart1 = echarts.init(chartDom1);
233
+            myChart1.setOption(optionData1(xData,yData));
234
+        }
235
+    })
236
+}
237
+// 数据看板
238
+function selectPlDataBoard() {
239
+    const params = {
240
+        plId:2
241
+    }
242
+    getPageListData("/SfPlanReport/selectPlDataBoard",params).then((res)=>{
243
+        if (res.data) {
244
+            boardObj.value = res.data
245
+        }
246
+    })
192 247
 }
193 248
 
194 249
 
250
+function optionData1(xData,yData) {
251
+    let resultData = {
252
+        xAxis: {
253
+            type: 'category',
254
+            data: xData
255
+        },
256
+        yAxis: {
257
+            type: 'value'
258
+        },
259
+        series: [
260
+            {
261
+                data: yData,
262
+                barWidth : 30,
263
+                type: 'bar'
264
+            }
265
+        ]
266
+    }
267
+    return resultData
268
+}
269
+function optionData2(xData,yData) {
270
+    let resultData = {
271
+        xAxis: {
272
+            type: 'category',
273
+            data: xData
274
+        },
275
+        yAxis: {
276
+            type: 'value'
277
+        },
278
+        series: [
279
+            {
280
+            data: yData,
281
+            type: 'bar',
282
+            barWidth : 30,
283
+            showBackground: true,
284
+            backgroundStyle: {
285
+                color: 'rgba(180, 180, 180, 0.2)'
286
+            }
287
+            }
288
+        ]
289
+    }
290
+    return resultData
291
+}
292
+function optionData3(xData,yData) {
293
+    let resultData = {
294
+        xAxis: {
295
+            type: 'category',
296
+            data: xData
297
+        },
298
+        yAxis: {
299
+            type: 'value'
300
+        },
301
+        series: [
302
+            {
303
+                data: yData,
304
+                barWidth : 30,
305
+                type: 'bar'
306
+            }
307
+        ]
308
+    }
309
+    return resultData
310
+}
311
+function optionData4(xData,yData,yData1,yData2,yData3,yData4) {
312
+    let resultData = {
313
+        tooltip: {
314
+            trigger: 'axis',
315
+            axisPointer: {
316
+                type: 'cross',
317
+                crossStyle: {
318
+                    color: '#999'
319
+                }
320
+            }
321
+        },
322
+        legend: {
323
+            data: ['接通率','正常接通', '无人接听', '稍后拨打', '号码错误']
324
+        },
325
+        xAxis: [
326
+            {
327
+            type: 'category',
328
+            data: xData,
329
+            axisPointer: {
330
+                type: 'shadow'
331
+            }
332
+            }
333
+        ],
334
+        yAxis: [
335
+            {
336
+                type: 'value',
337
+                name: '接通率',
338
+                min: 0,
339
+                max: 100,
340
+                axisLabel: {
341
+                    formatter: '{value} %'
342
+                }
343
+            },
344
+            {
345
+                type: 'value',
346
+                name: '次数',
347
+                axisLabel: {
348
+                    formatter: '{value}'
349
+                }
350
+            }
351
+        ],
352
+        series: [
353
+            {
354
+                name: '接通率',
355
+                type: 'line',
356
+                tooltip: {
357
+                    valueFormatter: function (value) {
358
+                    return value + ' %';
359
+                    }
360
+                },
361
+                data: yData
362
+            },
363
+            {
364
+                name: '正常接通',
365
+                type: 'line',
366
+                yAxisIndex: 1,
367
+                tooltip: {
368
+                    valueFormatter: function (value) {
369
+                    return value;
370
+                    }
371
+                },
372
+                data: yData1
373
+            },
374
+            {
375
+                name: '无人接听',
376
+                type: 'line',
377
+                yAxisIndex: 1,
378
+                tooltip: {
379
+                    valueFormatter: function (value) {
380
+                    return value;
381
+                    }
382
+                },
383
+                data: yData2
384
+            },
385
+            {
386
+                name: '稍后拨打',
387
+                type: 'line',
388
+                yAxisIndex: 1,
389
+                tooltip: {
390
+                    valueFormatter: function (value) {
391
+                    return value;
392
+                    }
393
+                },
394
+                data: yData3
395
+            },
396
+            {
397
+                name: '号码错误',
398
+                type: 'line',
399
+                yAxisIndex: 1,
400
+                tooltip: {
401
+                    valueFormatter: function (value) {
402
+                    return value;
403
+                    }
404
+                },
405
+                data: yData4
406
+            }
407
+        ]
408
+    };
409
+    return resultData
410
+}
195 411
 </script>
412
+
196 413
 <style scoped lang="scss">
197 414
 .wrap {
198 415
     .page-header {

+ 39 - 48
CMS1.0/src/views/main/followUp/followUpPlan/cpns/operationLog.vue

@@ -1,54 +1,45 @@
1 1
 <template>
2
-    <div class="wrap">
3
-        <el-timeline style="max-width: 600px">
4
-    <el-timeline-item
5
-      v-for="(activity, index) in activities"
6
-      :key="index"
7
-      :icon="activity.icon"
8
-      :type="activity.type"
9
-      :color="activity.color"
10
-      :size="activity.size"
11
-      :hollow="activity.hollow"
12
-      :timestamp="activity.timestamp"
13
-    >
14
-      {{ activity.content }}
15
-    </el-timeline-item>
16
-  </el-timeline>
17
-    </div>
2
+  <div class="wrap" style="margin-top: 15px;">
3
+    <el-timeline style="max-width: 600px">
4
+      <el-timeline-item v-for="(activity, index) in tableData" :key="index" :timestamp="activity.createTime">
5
+        {{ activity.content }}
6
+      </el-timeline-item>
7
+    </el-timeline>
8
+  </div>
18 9
 </template>
19 10
 <script setup>
20
-import { onMounted, ref } from 'vue';
21
-import { MoreFilled } from '@element-plus/icons-vue'
22
-
23
-const activities = [
24
-  {
25
-    content: 'Custom icon',
26
-    timestamp: '2018-04-12 20:46',
27
-    size: 'large',
28
-    type: 'primary',
29
-    icon: MoreFilled,
30
-  },
31
-  {
32
-    content: 'Custom color',
33
-    timestamp: '2018-04-03 20:46',
34
-    color: '#0bbd87',
35
-  },
36
-  {
37
-    content: 'Custom size',
38
-    timestamp: '2018-04-03 20:46',
39
-    size: 'large',
40
-  },
41
-  {
42
-    content: 'Custom hollow',
43
-    timestamp: '2018-04-03 20:46',
44
-    type: 'primary',
45
-    hollow: true,
46
-  },
47
-  {
48
-    content: 'Default node',
49
-    timestamp: '2018-04-03 20:46',
50
-  },
51
-]
11
+  import { onMounted, ref } from 'vue';
12
+  import { MoreFilled } from '@element-plus/icons-vue'
13
+  import { getPageListData } from '@/api/main/system/system';
52 14
 
15
+  const props = defineProps({
16
+    planId: {
17
+      type: String,
18
+      default: ''
19
+    }
20
+  });
21
+  const tableData = ref([])
22
+  const planId = ref('')
23
+  const queryParams = ref({})
24
+  watch(props, (nweProps) => {
25
+    initMethod(nweProps);
26
+  });
27
+  onMounted(() => {
28
+    initMethod(props);
29
+  });
30
+  function initMethod(data) {
31
+    planId.value = data.planId
32
+    if (planId.value) {
33
+      getPlanpatient()
34
+    }
35
+  }
36
+  function getPlanpatient() {
37
+    queryParams.value.planId = planId.value
38
+    getPageListData('/SfPlanOperate/sfplanoperate', queryParams.value).then((res) => {
39
+      if (res.data.length > 0) {
40
+        tableData.value = res.data
41
+      }
42
+    })
43
+  }
53 44
 </script>
54 45
 <style scoped lang="scss"></style>

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

@@ -4,36 +4,38 @@
4 4
       <el-col :span="6">
5 5
         <el-card style="width: 100%;">
6 6
           <div class="card-title">
7
-            <el-input placeholder="请输入计划名称"></el-input>
7
+            <el-input v-model="form.name"  placeholder="请输入计划名称" @keyup.enter="handleKeyUpEnter"></el-input>
8 8
             <el-icon :size="20" class="iconEl" @click="iconHandle"><Filter /></el-icon>
9
-            
10 9
           </div>
11 10
           <div class="serach-bottom" v-if="!iconFlag" style="width: 100%; margin-top: 15px;">
12 11
             <el-row :gutter="20">
13 12
               <el-col :span="24">
14
-                <el-form-item label="计划">
15
-                  <el-select v-model="form.region" placeholder="请选择计划">
16
-                    <el-option label="Zone one" value="shanghai" />
17
-                    <el-option label="Zone two" value="beijing" />
13
+                <el-form-item label="随访类型">
14
+                  <el-select v-model="form.type" placeholder="请选择随访类型" style="width: 240px">
15
+                    <el-option v-for="item in followType" :key="item.value" :label="item.title" :value="item.value" />
18 16
                   </el-select>
19 17
                 </el-form-item>
20
-                
21 18
               </el-col>
22 19
               <el-col :span="24">
23
-                <el-form-item label="任务时间">
24
-                  <el-date-picker
25
-                    v-model="form.date1"
26
-                    type="daterange"
27
-                    range-separator="至"
28
-                    start-placeholder="开始时间"
29
-                    end-placeholder="结束时间"
30
-                  />
20
+                <el-form-item label="随访方式">
21
+                  <el-select v-model="form.way" placeholder="请选择随访类型" style="width: 240px">
22
+                    <el-option v-for="item in followWay" :key="item.value" :label="item.title" :value="item.value" />
23
+                  </el-select>
24
+                </el-form-item>
25
+              </el-col>
26
+              <el-col :span="24">
27
+                <el-form-item label="状态">
28
+                  <el-select v-model="form.state" placeholder="请选择状态">
29
+                    <el-option label="未开始" value="0" />
30
+                    <el-option label="进行中" value="1" />
31
+                    <el-option label="终止" value="2" />
32
+                  </el-select>
31 33
                 </el-form-item>
32 34
               </el-col>
33 35
               <el-col :span="24">
34
-                <el-form-item label="要求时间">
36
+                <el-form-item label="开始时间">
35 37
                   <el-date-picker
36
-                    v-model="form.date2"
38
+                    v-model="form.date1"
37 39
                     type="daterange"
38 40
                     range-separator="至"
39 41
                     start-placeholder="开始时间"
@@ -41,42 +43,32 @@
41 43
                   />
42 44
                 </el-form-item>
43 45
               </el-col>
44
-              <el-col :span="24">
45
-                <el-form-item label="随访方式">
46
-                  <el-select v-model="form.delivery" placeholder="请选择随访方式">
47
-                    <el-option label="Zone one" value="shanghai" />
48
-                    <el-option label="Zone two" value="beijing" />
49
-                  </el-select>
50
-                </el-form-item>
51
-              </el-col>
52
-              <el-col :span="24">
53
-                <el-form-item label="状态">
54
-                  <el-select v-model="form.resource" placeholder="请选择状态">
55
-                    <el-option label="Zone one" value="shanghai" />
56
-                    <el-option label="Zone two" value="beijing" />
57
-                  </el-select>
58
-                </el-form-item>
59
-              </el-col>
60 46
             </el-row>
47
+            <div style="text-align: center;">
48
+              <el-button style="margin-right: 30px;" type="primary" @click="handleSearch">确 定</el-button>
49
+              <el-button style="margin-right: 30px;" type="primary" @click="handleResult">重 置</el-button>
50
+            </div>
61 51
           </div>
52
+
53
+
62 54
           <el-button class="card-add-btn" @click="onAddItem">新增计划 </el-button>
63 55
           <div class="card-content" ref="cardListRef" @scroll="doScroll">  
64
-            <el-card style="padding: 0;margin-bottom: 5px;" v-for="item in contentData">
56
+            <el-card style="padding: 0;margin-bottom: 5px;" v-for="item in planData" @click="handleItem(item)">
65 57
               <div class="content-title">
66 58
                 <el-icon class="icon-content" :size="20">
67
-                  <Phone v-if="item.type === '电话'" />
68
-                  <Message v-if="item.type === '短信'" />
59
+                  <Phone v-if="item.name === 1" />
60
+                  <Message v-if="item.name === 2" />
69 61
                 </el-icon>
70
-                <div class="titleText">{{item.title}}</div>
62
+                <div class="titleText">{{item.name}}</div>
71 63
               </div>
72 64
               <div class="content-center">
73
-                {{item.content}}
65
+                {{item.describes}}
74 66
               </div>
75 67
               <div class="content-progress">
76 68
                 <el-progress :percentage="item.percentage" />
77 69
               </div>
78 70
               <div class="content-bottom">
79
-                <div class="lf">{{item.planName}}</div>
71
+                <div class="lf">{{item.cycle===1?'周期':'每天'}}</div>
80 72
                 <div class="fr">
81 73
                   <el-button type="primary" link>{{item.state}}</el-button>
82 74
                 </div>
@@ -89,23 +81,23 @@
89 81
         
90 82
         <el-card style="width: 100%;">
91 83
           <div class="page-title">
92
-            <div class="lf">标题</div>
93
-            <el-button type="primary" link>进行中</el-button>
84
+            <div class="lf">{{planDetail.name}}</div>
85
+            <el-button type="primary" link>{{getPlanState(planDetail.state)}}</el-button>
94 86
             <div class="btn">
95
-              <el-button>编辑</el-button>
87
+              <el-button @click="handleEdit(planDetail)">编辑</el-button>
96 88
               <el-button>复制</el-button>
97 89
             </div>
98 90
           </div>
99 91
           <div class="page-content"> 
100
-            在中台产品那是一种内在的东西, 他们到达不了,也 他们到达不了,也 他们到达不了,也 他们到达不了,也
92
+            {{planDetail.describes}}
101 93
           </div>
102 94
           <div class="page-describe">
103
-            <span>患者数量:200</span>
104
-            <span>更新时间:2024-04-01 12:35:20</span>
105
-            <span>周期:2024-01-01 12:00:00 ~ 2024-12-01 12:00:00</span>
95
+            <span>患者数量:{{planDetail.patientsNum}}</span>
96
+            <span>更新时间:{{planDetail.updateTime}}</span>
97
+            <span>周期:{{planDetail.beginEffective}} ~ {{planDetail.endEffective}}</span>
106 98
           </div>
107 99
           <div class="page-describe">
108
-            <span>外呼坐席:张三、李四、王五</span>
100
+            <span>外呼坐席:{{seatData.join(',')}}</span>
109 101
           </div>
110 102
           <div class="page-mian">
111 103
             <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
@@ -116,17 +108,17 @@
116 108
               </el-tab-pane>
117 109
               <el-tab-pane label="患者列表" name="second">
118 110
                 <div class="tabList"> 
119
-                  <patient-list></patient-list>
111
+                  <patient-list :planId="planId"></patient-list>
120 112
                 </div>
121 113
               </el-tab-pane>
122 114
               <el-tab-pane label="计划详情" name="third">
123 115
                 <div class="tabList"> 
124
-                  <project-details planId="1"></project-details>
116
+                  <project-details :planId="planId" isdetil="1"></project-details>
125 117
                 </div>
126 118
               </el-tab-pane>
127 119
               <el-tab-pane label="操作日志" name="fourth">
128 120
                 <div class="tabList"> 
129
-                  <operation-log></operation-log>
121
+                  <operation-log :planId="planId"></operation-log>
130 122
                 </div>
131 123
               </el-tab-pane>
132 124
             </el-tabs>
@@ -141,84 +133,143 @@
141 133
 
142 134
 import { onMounted, ref } from 'vue';
143 135
 import dataBoard from './cpns/dataBoard';
144
-import patientList from './cpns/patientList/patientList';
136
+import patientList from '@/views/main/followUp/addFollowUpPlan/cpns/patientList/patientList';
145 137
 import projectDetails from '../addFollowUpPlan/addFollowUpPlan';
146 138
 import operationLog from './cpns/operationLog';
139
+import { getPageListData } from '@/api/main/system/system';
140
+import { useRouter } from 'vue-router';
141
+import { followType,followWay } from "@/utils/commonDic.js";
142
+import moment from 'moment';
147 143
 
148 144
 const activeName = ref('first')
149
-const handleClick = (tab, event) => {
150
-  console.log(tab, event)
151
-}
152
-
145
+const router = useRouter();
146
+const planParams = ref({
147
+  pageNum:1,
148
+  pageSize:10
149
+})
153 150
 const form = ref({
154 151
   name: '',
155
-  date1: '',
156
-  date2: '',
157
-  delivery: '',
158
-  resource: '',
152
+  type: '',
153
+  way: '',
154
+  state:'',
155
+  beginEffective: '',
156
+  endEffective:''
159 157
 })
160 158
 const iconFlag = ref(true)
159
+const contentData = ref([])
160
+const planData = ref([])
161
+const planDetail = ref({})
162
+const planId = ref('')
163
+const seatData = ref([])
164
+
165
+const handleClick = (tab, event) => {
166
+  console.log(tab, event)
167
+}
161 168
 function iconHandle() {
162 169
   console.log("点击")
163 170
   iconFlag.value = !iconFlag.value
164 171
 }
165 172
 const cardListRef = ref(null)
173
+
166 174
 onMounted(() => {
175
+  geFollowUpList()
167 176
 });
177
+function handleKeyUpEnter() {
178
+  console.log('回车');
179
+}
180
+function handleSearch() {
181
+  console.log('搜索');
182
+  planParams.value.name =  form.value.name
183
+  planParams.value.type =  form.value.type
184
+  planParams.value.way =  form.value.way
185
+  planParams.value.state =  form.value.state
186
+  planParams.value.beginEffective =  moment(form.value.date1[0]).format('YYYY-MM-DD HH:mm:ss')
187
+  planParams.value.endEffective =  moment(form.value.date1[1]).format('YYYY-MM-DD HH:mm:ss')
188
+  geFollowUpList()
189
+}
190
+function handleResult() {
191
+  console.log('重置');
192
+  form.value.name = ''
193
+  form.value.type = ''
194
+  form.value.way = ''
195
+  form.value.state = ''
196
+  form.value.date1 = ''
197
+}
198
+function geFollowUpList() {
199
+  
200
+  
201
+  getPageListData("/SfPlan/sfPlan",planParams.value).then((res)=>{
202
+    if (!planId.value) {
203
+      planId.value = res.data[0].plId
204
+      planDetail.value = res.data[0]
205
+      getPlanSeatList(planId.value)
206
+    }
207
+    contentData.value = res.data
208
+    planData.value = planData.value.concat(contentData.value);
209
+    
210
+  })
211
+}
212
+
213
+function getPlanSeatList(plId) {
214
+  const params = {plId}
215
+  getPageListData("/SfPlanSeats/sfplanseats",params).then((res)=>{
216
+    if (res.data.length>0) {
217
+      res.data.forEach(ele => {
218
+        seatData.value.push(ele.userName?ele.userName:ele.usercode)
219
+      });
220
+    }
221
+    
222
+  })
223
+}
224
+
225
+function handleEdit(item) {
226
+  router.push({
227
+    path: '/followUp/addFollowUpPlan',
228
+    query: {
229
+      planId: item.plId,
230
+    }
231
+  });
232
+}
233
+
234
+function handleItem(item) {
235
+  planDetail.value = item
236
+  getPlanSeatList(item.plId)
237
+}
238
+
239
+function getPlanState(value) {
240
+  let resultState = ''
241
+  switch (Number(value)) {
242
+    case 0:
243
+      resultState = '未开始'
244
+      break;
245
+    case 1:
246
+      resultState = '进行中'
247
+      break;
248
+    case 2:
249
+      resultState = '终止'
250
+      break;
251
+  }
252
+  return resultState
253
+}
254
+
168 255
 function doScroll() {
169 256
     const scrollwrapper = cardListRef.value
170 257
     const{ scrollTop,clientHeight,scrollHeight }= scrollwrapper // 获职滚动数据
171 258
     // 判断是否滚动到底部
172 259
     if(scrollTop +clientHeight >=scrollHeight -10){
173
-      console.log('滚动到底部')
260
+      console.log('滚动到底部',contentData.value.length)
261
+      if (contentData.value.length > 9) {
262
+        planParams.value.pageNum ++
263
+        geFollowUpList()
264
+      }
265
+      
174 266
     }
175 267
   }
268
+
176 269
 function onAddItem() {
177 270
   console.log('添加')
178 271
 }
179 272
 
180
-const contentData = ref([
181
-  {
182
-    title:'标题',
183
-    type:'电话',
184
-    percentage:50,
185
-    content:'在中台产品那是一种内在的东西, 他们到达不了,也 他们到达不了,也 他们到达不了,也 他们到达不了,也',
186
-    planName:'周期性计划',
187
-    state:'进行中'
188
-  },
189
-  {
190
-    title:'标题2',
191
-    type:'短信',
192
-    percentage:80,
193
-    content:'在中台产品那是一种内在的东西, 他们到达不了,也 他们到达不了,也 他们到达不了,也 他们到达不了,也',
194
-    planName:'周期性计划',
195
-    state:'进行中'
196
-  },
197
-  {
198
-    title:'标题2',
199
-    type:'短信',
200
-    percentage:80,
201
-    content:'在中台产品那是一种内在的东西, 他们到达不了,也 他们到达不了,也 他们到达不了,也 他们到达不了,也',
202
-    planName:'周期性计划',
203
-    state:'进行中'
204
-  },
205
-  {
206
-    title:'标题2',
207
-    type:'短信',
208
-    percentage:80,
209
-    content:'在中台产品那是一种内在的东西, 他们到达不了,也 他们到达不了,也 他们到达不了,也 他们到达不了,也',
210
-    planName:'周期性计划',
211
-    state:'进行中'
212
-  },
213
-  {
214
-    title:'标题2',
215
-    type:'短信',
216
-    percentage:80,
217
-    content:'在中台产品那是一种内在的东西, 他们到达不了,也 他们到达不了,也 他们到达不了,也 他们到达不了,也',
218
-    planName:'周期性计划',
219
-    state:'进行中'
220
-  }
221
-])
222 273
 </script>
223 274
 
224 275
 <style scoped lang="scss">
@@ -256,6 +307,7 @@ const contentData = ref([
256 307
     }
257 308
     .content-center{
258 309
       line-height: 20px;
310
+      height: 40px;
259 311
       text-overflow: ellipsis;
260 312
       display: -webkit-box;
261 313
       -webkit-line-clamp: 2;

+ 0 - 1
CMS1.0/src/views/main/followUp/followUpTask/cpns/taskDetails.vue

@@ -55,7 +55,6 @@ import patientDetail from "@/views/main/patientFile/patientFileList/cpns/patient
55 55
 import knowledgeList from "@/views/main/knowledgeBase/knowledgeList/knowledgeList";
56 56
 import visitDetails from "./visitDetails";
57 57
 import { useRoute, useRouter } from 'vue-router';
58
-import {  } from 'vue-router';
59 58
 import { getTasks } from  '@/api/patient/task';
60 59
 
61 60
 const router = useRoute();

+ 0 - 1
CMS1.0/src/views/main/patientFile/patientFileList/patientFileList.vue

@@ -79,7 +79,6 @@ export default defineComponent({
79 79
   },
80 80
   setup() {
81 81
     const router = useRouter();
82
-
83 82
     const [pageContentRef, handleResetClick, handleQueryClick] = usePageSearch()
84 83
     const activeNames = ref(['1'])
85 84
     const input2 = ref('')

+ 1 - 0
CMS1.0/src/views/main/system/menu/index.vue

@@ -223,6 +223,7 @@
223 223
                             </template>
224 224
                             <el-radio-group v-model="form.status">
225 225
                                 <el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value"/>
226
+                            </el-radio-group>
226 227
                         </el-form-item>
227 228
                     </el-col>
228 229
                 </el-row>