Browse Source

联系我们模块的更新

xiaoming_global 5 years ago
parent
commit
4ed1dea4a9

+ 121 - 9
src/api/site/site.js View File

89
    })
89
    })
90
 }
90
 }
91
 
91
 
92
-export function GetDoctorInfo(params){
93
-    
94
-    return request({
95
-        url:"/api/site/getdoctorinfo",
96
-        method:'Get',
97
-        params:params,
98
-    })
99
-}
100
-
101
 export function editDoctor(id,data){
92
 export function editDoctor(id,data){
102
   
93
   
103
     return request({
94
     return request({
338
    })
329
    })
339
 }
330
 }
340
 
331
 
332
+export function editDoc(id,data){
333
+   return request({
334
+       url:"/api/site/editdoc?id="+id,
335
+       method:"Get",
336
+       data:data,
337
+   })
338
+}
339
+
340
+export function editImages(id,data){
341
+    return request({
342
+        url:"/api/site/editImages?id="+id,
343
+        method:"Get",
344
+        data,data,
345
+    })
346
+}
347
+
348
+export function SaveDocdata(id,data){
349
+     return request({
350
+         url:"/api/site/savedocdata?id="+id,
351
+         method:"Post",
352
+         data:data,
353
+     })
354
+}
355
+
356
+export function editOfficeEnviroment(id,data){
357
+    return request({
358
+        url:"/api/site/editofficeenviroment?id="+id,
359
+        method:"Get",
360
+        data:data,
361
+    })
362
+}
363
+
364
+export function  SaveOfficeEnvironment(id,data){
365
+    console.log("科室环境我爱你中",id)
366
+     return request({
367
+         url:"/api/site/saveofficeenvironment?id="+id,
368
+         method:"Post",
369
+         data:data,
370
+     })
371
+}
372
+
373
+export function hispitalmore(id,data){
374
+  return request({
375
+      url:"/api/site/hispitalmore?id="+id,
376
+      method:"Get",
377
+      data:data,
378
+  })
379
+}
380
+
381
+export function officemore(id,data){
382
+   return request({
383
+       url:"/api/site/officemore?id="+id,
384
+       method:"Get",
385
+       data:data,
386
+   })
387
+}
388
+
389
+export function docmore(id,data){
390
+   return request({
391
+      url:"/api/site/docmore?id="+id,
392
+      method:"Get",
393
+      data:data,
394
+   })
395
+}
396
+
397
+export function addNavigation(data){
398
+    return request({
399
+        url:"/api/site/addnavigation",
400
+        method:"Post",
401
+        data:data,
402
+    })
403
+}
404
+
405
+export function getNavigationList(params){
406
+     return request({
407
+         url:"/api/site/getnavigationlist",
408
+         method:"Post",
409
+         params:params,
410
+     })
411
+}
412
+
413
+export function AddShareInfo(data){
414
+  return request({
415
+      url:"/api/site/addshareinfo",
416
+      method:"Post",
417
+      data:data,
418
+  })
419
+}
420
+
421
+export function getShareInfo(params){
422
+    return request({
423
+        url:"/api/site/getshareinfo",
424
+        method:"Post",
425
+        params:params,
426
+    })
427
+}
428
+
429
+export function deleteNavigation(id,data){
430
+    return request({
431
+        url:"/api/site/deletenavition?id="+id,
432
+        method:"Get",
433
+        data:data,
434
+    })
435
+}
436
+
437
+export function deletemodle(id,data){
438
+    console.log("这个ID是谁?",id)
439
+    return request({
440
+        url:"/api/site/deletemodle?id="+id,
441
+        method:"Get",
442
+        data:data,
443
+    })
444
+}
445
+
446
+export function getOrderModel(params){
447
+    return request({
448
+        url:"/api/site/getordermodel",
449
+        method:"Post",
450
+        params:params,
451
+    })
452
+}
341
 
453
 

+ 84 - 11
src/scrm_pages/site/components/add-contact.vue View File

105
       
105
       
106
        <el-form-item label="医院地址:">
106
        <el-form-item label="医院地址:">
107
          <div id="all">
107
          <div id="all">
108
-          <el-input id="suggestId"  v-model="hospitalform.address"></el-input>
108
+          <el-input  v-model="hospitalform.address" id="suggestId"></el-input>
109
         </div>
109
         </div>
110
        </el-form-item>
110
        </el-form-item>
111
        <el-form-item label="医院地图:">  
111
        <el-form-item label="医院地图:">  
112
-        <div id="allmap"></div>  
112
+        <div id="allmap"></div>
113
        </el-form-item>
113
        </el-form-item>
114
     
114
     
115
     </el-form>
115
     </el-form>
126
     :visible.sync="contact"
126
     :visible.sync="contact"
127
     width="550px"
127
     width="550px"
128
     >
128
     >
129
-    <el-form ref="contractform" :model="contractform" label-width="90px">
129
+    <el-form ref="contractform" :model="contractform" label-width="90px" :rules="rules">
130
       <el-form-item label="模块标题:" required prop="title">
130
       <el-form-item label="模块标题:" required prop="title">
131
         <el-input v-model="contractform.title"></el-input>
131
         <el-input v-model="contractform.title"></el-input>
132
       </el-form-item>
132
       </el-form-item>
134
         <el-input v-model="contractform.sort"></el-input>
134
         <el-input v-model="contractform.sort"></el-input>
135
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
135
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
136
       </el-form-item>
136
       </el-form-item>
137
-      <el-form-item label="联系方式:" v-model="contractform.way">
137
+      <el-form-item label="联系方式:">
138
         <div class="used">
138
         <div class="used">
139
              <ul>
139
              <ul>
140
                  <li v-for="(item,index) in this.connectionway" :key="item.id">
140
                  <li v-for="(item,index) in this.connectionway" :key="item.id">
365
       contractform:{
365
       contractform:{
366
         title:"",
366
         title:"",
367
         sort:"",
367
         sort:"",
368
-        way:[],
368
+        connecWayId:[],
369
       },
369
       },
370
       rules: {
370
       rules: {
371
         title: [{required: true, message: "请填写模块标题",},],
371
         title: [{required: true, message: "请填写模块标题",},],
455
         queryConnetion().then(response=>{
455
         queryConnetion().then(response=>{
456
            if(response.data.state ==1){
456
            if(response.data.state ==1){
457
              this.connectionway = response.data.data.conection;
457
              this.connectionway = response.data.data.conection;
458
-             this.contractform.way =  response.data.data.cooection.id;
459
              console.log("联系方式返回数据",this.connectionway);
458
              console.log("联系方式返回数据",this.connectionway);
460
            }
459
            }
461
         })
460
         })
506
 
505
 
507
       //添加联系方式
506
       //添加联系方式
508
       addContract(formName){
507
       addContract(formName){
508
+          var connecWayId=[];
509
+          for (let index = 0; index < this.connectionway.length; index++) {
510
+            connecWayId.push(this.connectionway[index].id)         
511
+          }
512
+          this.contractform.connecWayId = connecWayId;
513
+            var sorts = this.contractform.sort
514
+             var sort = parseInt(sorts)
515
+             this.contractform.sort = sort
516
+          console.log("联系方式id",this.contractform.connecWayId)
509
          this.$refs[formName].validate((valid)=>{
517
          this.$refs[formName].validate((valid)=>{
510
             if(valid){
518
             if(valid){
511
               addContract(this.contractform).then(response=>{
519
               addContract(this.contractform).then(response=>{
512
                   if(response.data.state == 1){
520
                   if(response.data.state == 1){
513
-                         
521
+                   var connectway = response.data.data.connectway;
522
+                   var ordmodel = response.data.data.ordmodel;
523
+                   console.log("返回数据",connectway);
524
+                   console.log("返回数据",ordmodel)    
514
                   }
525
                   }
515
               })           
526
               })           
516
             }
527
             }
519
 
530
 
520
       //添加工作时间
531
       //添加工作时间
521
       addWorkTime(formName){
532
       addWorkTime(formName){
533
+             var sorts = this.woketimeform.sort
534
+             var sort = parseInt(sorts)
535
+             this.woketimeform.sort = sort
522
         this.$refs[formName].validate((valid)=>{
536
         this.$refs[formName].validate((valid)=>{
523
           if(valid){
537
           if(valid){
524
             addWorkTime(this.woketimeform).then(response=>{
538
             addWorkTime(this.woketimeform).then(response=>{
525
                   if(response.data.state==1){
539
                   if(response.data.state==1){
526
-                    var sgjworktime = response.data.data.sgjworktime;
527
-                    console.log("返回数据",sgjworktime);
540
+                    var ordmodel = response.data.data.ordmodel;
541
+                    var patientWorktime = response.data.data.patientWorktime
542
+                    console.log("返回数据",ordmodel);
543
+                    console.log("返回数据",patientWorktime)
528
                     this.time = false;
544
                     this.time = false;
529
                 }
545
                 }
530
             })
546
             })
534
 
550
 
535
       //添加乘车方式
551
       //添加乘车方式
536
       addRideWay(formName){
552
       addRideWay(formName){
553
+         var sorts = this.rideform.sort
554
+         var sort = parseInt(sorts)
555
+         this.rideform.sort = sort
537
         this.$refs[formName].validate((valid)=>{
556
         this.$refs[formName].validate((valid)=>{
538
           if(valid){
557
           if(valid){
539
             addRideWay(this.rideform).then(response=>{
558
             addRideWay(this.rideform).then(response=>{
540
               if(response.data.state==1){
559
               if(response.data.state==1){
541
                  var rideway = response.data.data.rideway;
560
                  var rideway = response.data.data.rideway;
542
                  console.log("返回数据",rideway);
561
                  console.log("返回数据",rideway);
562
+                 var ordemodel = response.data.data.ordemodel;
563
+                 console.log("返回数据",ordemodel)
543
                  this.type = false;
564
                  this.type = false;
544
               }
565
               }
545
             })
566
             })
560
                 map.centerAndZoom(point, 15);
581
                 map.centerAndZoom(point, 15);
561
                 map.enableScrollWheelZoom();
582
                 map.enableScrollWheelZoom();
562
                 var ac = new BMap.Autocomplete(    //建立一个自动完成的对象
583
                 var ac = new BMap.Autocomplete(    //建立一个自动完成的对象
584
+                    
563
                     {
585
                     {
564
                         "input":"suggestId", 
586
                         "input":"suggestId", 
565
                         "location": map,
587
                         "location": map,
597
 
619
 
598
             })
620
             })
599
         },
621
         },
600
-
622
+        
601
         created(){
623
         created(){
602
           this.queryConnetion();
624
           this.queryConnetion();
603
-        }
625
+        },
626
+
627
+          updated(){
628
+          this.$nextTick(function () {
629
+                var th = this
630
+                // 创建Map实例
631
+                var map = new BMap.Map("allmap");
632
+                // 初始化地图,设置中心点坐标,
633
+                var point = new BMap.Point(121.160724,31.173277); // 创建点坐标,汉得公司的经纬度坐标
634
+                map.centerAndZoom(point, 15);
635
+                map.enableScrollWheelZoom();
636
+                var ac = new BMap.Autocomplete(    //建立一个自动完成的对象
637
+                    
638
+                    {
639
+                        "input":"suggestId", 
640
+                        "location": map,
641
+                    })
642
+                   
643
+                var myValue
644
+                ac.addEventListener("onconfirm", function (e) {    //鼠标点击下拉列表后的事件
645
+                    var _value = e.item.value;
646
+                    
647
+                    myValue = _value.province + _value.city + _value.district + _value.street + _value.business;
648
+                    this.address_detail = myValue
649
+                    setPlace();
650
+                });
651
+
652
+                function setPlace() {
653
+                    map.clearOverlays();    //清除地图上所有覆盖物
654
+                    function myFun() {
655
+                        th.userlocation = local.getResults().getPoi(0).point;    //获取第一个智能搜索的结果
656
+                        map.centerAndZoom(th.userlocation, 18);
657
+                        map.addOverlay(new BMap.Marker(th.userlocation));    //添加标注
658
+                    }
659
+
660
+                    var local = new BMap.LocalSearch(map, { //智能搜索
661
+                        onSearchComplete: myFun
662
+                    });
663
+                    local.search(myValue);
664
+
665
+                    //测试输出坐标(指的是输入框最后确定地点的经纬度)
666
+                    map.addEventListener("click",function(e){
667
+                        //经度
668
+                        console.log(th.userlocation.lng);
669
+                        //维度
670
+                        console.log(th.userlocation.lat);
671
+
672
+                    })
673
+                }
674
+
675
+            })
676
+        },
604
 };
677
 };
605
 </script>
678
 </script>
606
 
679
 

+ 186 - 0
src/scrm_pages/site/components/contact-us.vue View File

1
+<template>
2
+    <div>
3
+        <!-- <div class="us">
4
+          <img src="static/images/d.jpg">
5
+        </div>
6
+        <div class="hosname">
7
+           <span>北京大学深圳医院</span>
8
+        </div>
9
+        <div class="hosaddress">
10
+            地址:广东省深圳市福田莲花路1120号北京大学深圳医院三楼
11
+        </div>
12
+        <div class="hosphone">
13
+           总部电话:0755-83923333
14
+        </div>
15
+        <div class="hosphone">
16
+            预约电话:0755-83923333
17
+        </div>
18
+        <div class="hosphone">
19
+            微信号:13318464642
20
+        </div>
21
+        <div class="hosphone">
22
+            办公时间:周一至周五,上午8:00-12:00,下午2:00-5:00.其他时间请联系医院值班电话
23
+        </div>
24
+        <div class="hostake">
25
+            乘车指南:11路空调; 12路空调; 14路; 59路空调; 71路空调; 79路; 104路空调; 209路空调; 213路空调; 323路空调; 365路空调;m358路空调;n13路空调;n6路空调; 购物线
26
+        </div> -->
27
+        <!-- :class="sstt[index]" -->
28
+        <div  v-for="item in this.ordmodel" :key="item.id">
29
+           <div>
30
+              <div v-if="item.mode_type == 1">
31
+                 <div class="rotation">
32
+
33
+                 </div>
34
+              </div>
35
+                <div class="modelone" v-if="item.mode_type == 2">
36
+                 <div>
37
+
38
+                 </div>
39
+              </div>
40
+              <div  v-if="item.mode_type == 3">
41
+                 <div class="modeone">
42
+                   <span>{{item.title}}:13318464642</span><br>
43
+                   <span>{{item.title}}:13318464642</span><br>
44
+                   <span>{{item.title}}:13318464642</span><br>
45
+                  </div>
46
+              </div>
47
+               <div class="modetwo" v-if="item.mode_type == 4">
48
+                 <div><span>{{item.title}}:&nbsp;&nbsp;{{item.Worktime.worktime}}</span></div>
49
+              </div>
50
+               <div class="modethree" v-if="item.mode_type == 5">
51
+                 <div><span>{{item.title}}:&nbsp;&nbsp;{{item.Rideway.ride_way}}</span></div>
52
+              </div>
53
+           </div>
54
+        </div>
55
+    </div>
56
+</template>
57
+
58
+<script>
59
+     import { getOrderModel } from '@/api/site/site' 
60
+import { fchown } from 'fs';
61
+    export default {
62
+        name: "contact-us",
63
+        data(){
64
+          return{
65
+            ordmodel:[],
66
+            sstt:[
67
+              "ss1",
68
+              "ss2",
69
+              "ss3",
70
+              "ss4",
71
+            ],
72
+          }
73
+        },
74
+        methods:{
75
+           getOrderModel(){
76
+             getOrderModel().then(response=>{
77
+                 if(response.data.state == 1){
78
+                  var ordmodel = response.data.data.ordmodel;
79
+                  this.ordmodel = response.data.data.ordmodel;
80
+                  console.log("马文强",ordmodel)
81
+                 }
82
+             })
83
+           }
84
+        },
85
+        created(){
86
+           this.getOrderModel();
87
+        },
88
+    }
89
+</script>
90
+
91
+<style scoped>
92
+  .us{
93
+    width: 320px;
94
+    height: 220px;
95
+    /* border: solid 1px red; */
96
+  }
97
+
98
+  .hosname{
99
+    width:300px;
100
+    height: 30px; 
101
+    /* border:solid 1px red; */
102
+    margin-top: 20px;
103
+    margin-left: 10px; 
104
+    font-size: 20px;
105
+    font-weight: 700;
106
+  }
107
+
108
+  .hosaddress{
109
+    width:300px;
110
+    height: 54px;  
111
+    /* border:solid 1px red; */
112
+    margin-left: 10px;   
113
+  }
114
+  .hosphone{
115
+    width:300px;
116
+    height: 30px;  
117
+    /* border:solid 1px red; */
118
+    margin-left: 10px;  
119
+    font-size: 14px;
120
+    margin-bottom: 5px;
121
+  }
122
+
123
+  .hostake{
124
+    width:300px;
125
+    height: 100px;  
126
+    /* border:solid 1px red; */
127
+    margin-left: 10px;  
128
+    font-size: 14px;
129
+    margin-bottom: 5px;  
130
+  }
131
+
132
+  .ordmodel{
133
+    width:330px;
134
+    height: 200px;
135
+    border: solid 1px red;
136
+    background-color: #666666;
137
+  }
138
+
139
+  .ss1{
140
+    width: 320px;
141
+    height: 220px;
142
+    background-color: red;
143
+  }
144
+  .ss2{
145
+    width:300px;
146
+    height: 30px; 
147
+    background-color: yellow;
148
+    margin-top: 20px;
149
+    margin-left: 10px; 
150
+    font-size: 20px;
151
+    font-weight: 700;
152
+  }
153
+  .modeone{
154
+    width: 300px;
155
+    height: 100%;
156
+    /* background-color: red; */
157
+    color: black;
158
+    /* border:solid 1px red; */
159
+    font-size: 14px;
160
+    margin-bottom: 5px;
161
+  }
162
+  
163
+   .modetwo{
164
+    width: 300px;
165
+    height: 30px;
166
+    color: black;
167
+    /* border:solid 1px red; */
168
+    font-size: 14px;
169
+    margin-bottom: 5px;
170
+  }
171
+
172
+   .modethree{
173
+    width: 300px;
174
+    height: 100%;
175
+    color: black;
176
+    /* border:solid 1px red; */
177
+    font-size: 14px;
178
+    margin-bottom: 10px;
179
+  }
180
+
181
+  .rotation{
182
+    width: 320px;
183
+    height: 220px;
184
+    /* border: solid 1px red; */
185
+  }
186
+</style>

+ 1 - 17
src/scrm_pages/site/components/doctor-introduction.vue View File

17
 </template>
17
 </template>
18
 
18
 
19
 <script>
19
 <script>
20
-     import { GetDoctorInfo } from '@/api/site/site'
21
     export default {
20
     export default {
22
         name: "doctor-introduction",
21
         name: "doctor-introduction",
23
         data(){
22
         data(){
25
               doctorInfos:[],  
24
               doctorInfos:[],  
26
            } 
25
            } 
27
         },
26
         },
28
-        methods:{
29
-       //获取名医介绍
30
-        GetDoctorInfo(){
31
-          GetDoctorInfo().then(response=>{
32
-           if(response.data.state == 1){
33
-             var doctor = response.data.data.doctor;
34
-             console.log("doctor是什么",doctor)
35
-             this.doctorInfos = response.data.data.doctor;
36
-              console.log("获取名医介绍",this.doctorInfos);
37
-            }
38
-          })
39
-         },
40
-        },
41
-        created(){
42
-            this.GetDoctorInfo();
43
-        }
27
+        methods:{}
44
     }
28
     }
45
 </script>
29
 </script>
46
 
30
 

+ 284 - 55
src/scrm_pages/site/components/new-feature.vue View File

53
       </ul>
53
       </ul>
54
   </div>    
54
   </div>    
55
   <div class="clear"></div>
55
   <div class="clear"></div>
56
-
57
   <!-- 新增轮播图 -->
56
   <!-- 新增轮播图 -->
58
   <el-dialog
57
   <el-dialog
59
     title="新增轮播图"
58
     title="新增轮播图"
270
   <el-dialog
269
   <el-dialog
271
     title="新增名医介绍"
270
     title="新增名医介绍"
272
     :visible.sync="four"
271
     :visible.sync="four"
273
-    width="550px">
272
+    width="550px"
273
+    center>
274
     <el-form ref="doctorform" :model="doctorform" label-width="90px" :rules="rules" >
274
     <el-form ref="doctorform" :model="doctorform" label-width="90px" :rules="rules" >
275
       <el-form-item label="模块标题:" required prop="title">
275
       <el-form-item label="模块标题:" required prop="title">
276
         <el-input v-model="doctorform.title"></el-input>
276
         <el-input v-model="doctorform.title"></el-input>
282
       <el-form-item label="新增名医:" v-model="doctorform.image">
282
       <el-form-item label="新增名医:" v-model="doctorform.image">
283
          <div class="flex-img" v-show="headshow">
283
          <div class="flex-img" v-show="headshow">
284
         <div class="el-upload-list el-upload-list--picture-card" >            
284
         <div class="el-upload-list el-upload-list--picture-card" >            
285
-            <div class="el-upload-list__item is-success" v-for="item in this.docform" :key="item.id">             
285
+            <div class="el-upload-list__item is-success" v-for="(item,index) in this.docform" :key="item.id">             
286
                  <img class="flex-img__image" :src="item.dochead">              
286
                  <img class="flex-img__image" :src="item.dochead">              
287
                 <label class="el-upload-list__item-status-label">
287
                 <label class="el-upload-list__item-status-label">
288
                     <i class="el-icon-upload-success el-icon-check"></i>
288
                     <i class="el-icon-upload-success el-icon-check"></i>
301
     </el-form>
301
     </el-form>
302
     <span slot="footer" class="dialog-footer">
302
     <span slot="footer" class="dialog-footer">
303
       <el-button @click="four = false">取 消</el-button>
303
       <el-button @click="four = false">取 消</el-button>
304
-      <el-button type="primary" @click="AddDoctor('doctorform')">确 定</el-button>
304
+      <el-button type="primary" @click="AddDoctor('doctorform');editDoctorInfo('doctorform')">确 定</el-button>
305
     </span>
305
     </span>
306
   </el-dialog>
306
   </el-dialog>
307
 
307
 
308
-    <!-- 编辑名医介绍 -->
308
+    <!-- 新增医生信息 -->
309
    <el-dialog
309
    <el-dialog
310
-      title="编辑医生介绍"
310
+      title="新增医生信息"
311
       :visible.sync="centerDialogVisible"
311
       :visible.sync="centerDialogVisible"
312
       width="50%"
312
       width="50%"
313
       center>
313
       center>
315
           <el-row :span=20>
315
           <el-row :span=20>
316
             <el-col :span="12">
316
             <el-col :span="12">
317
              <el-form-item label="医生姓名:">
317
              <el-form-item label="医生姓名:">
318
-              <el-select v-model="eidtDoctorform.name" placeholder="请选择"  @change="change(eidtDoctorform.name)">
318
+              <el-select  placeholder="请选择" v-model="eidtDoctorform.name"  @change="change(eidtDoctorform.name)">
319
                 <el-option
319
                 <el-option
320
                  v-for="item in docnames"
320
                  v-for="item in docnames"
321
                  :key="item.id"
321
                  :key="item.id"
322
                  :label="item.name"
322
                  :label="item.name"
323
-                 :value="item.id"
324
-                 >
323
+                 :value="item.id" >
325
                 </el-option>
324
                 </el-option>
326
               </el-select>
325
               </el-select>
327
              </el-form-item>     
326
              </el-form-item>     
385
        <el-form label-width="90px" class="clearfix" :model="editdocfrom" ref="editdocfrom" :rules="rules">
384
        <el-form label-width="90px" class="clearfix" :model="editdocfrom" ref="editdocfrom" :rules="rules">
386
           <el-row :span=20>
385
           <el-row :span=20>
387
             <el-col :span="10">
386
             <el-col :span="10">
388
-             <el-form-item label="医生姓名:" required prop="docname">
389
-              <el-input v-model="editdocfrom.docname"></el-input>
387
+             <el-form-item label="医生姓名:" required prop="doc_name">
388
+              <el-input v-model="editdocfrom.doc_name"></el-input>
390
              </el-form-item>     
389
              </el-form-item>     
391
              </el-col> 
390
              </el-col> 
392
              <el-col :span="12">
391
              <el-col :span="12">
393
-              <el-form-item label="医生职称:" required prop="doc_position">
394
-              <!-- <el-input v-model="editdocfrom.doc_position"></el-input> -->
395
-              <el-select v-model="editdocfrom.doc_position" placeholder="请选择">
392
+              <el-form-item label="医生职称:" required prop="doc_postion">
393
+              <el-select v-model="editdocfrom.doc_postion" placeholder="请选择">
396
                 <el-option
394
                 <el-option
397
                  v-for="item in positions"
395
                  v-for="item in positions"
398
                  :key="item.index"
396
                  :key="item.index"
550
     </span>
548
     </span>
551
   </el-dialog>
549
   </el-dialog>
552
   <!-- 新增魔方导航 -->
550
   <!-- 新增魔方导航 -->
553
-  <el-dialog
551
+
552
+    <el-dialog
554
     title="新增魔方导航"
553
     title="新增魔方导航"
555
     :visible.sync="eight"
554
     :visible.sync="eight"
556
-    width="550px"
557
-    :before-close="handleClose">
558
-    <el-form ref="form" :model="form" label-width="100px">
559
-      <el-form-item label="模块标题: ">
560
-        <el-input v-model="form.name"></el-input>
555
+    width="550px">
556
+    <el-form ref="marginform" :model="marginform" label-width="90px" :rules="rules" >
557
+      <el-form-item label="模块标题:" required prop="title">
558
+        <el-input v-model="marginform.title"></el-input>
561
       </el-form-item>
559
       </el-form-item>
562
-      <el-form-item label="排序值: ">
563
-        <el-input v-model="form.name"></el-input>
560
+      <el-form-item label="排序值:" required prop="sort">
561
+        <el-input v-model="marginform.sort"></el-input>
564
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
562
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
565
       </el-form-item>
563
       </el-form-item>
566
-      <el-form-item label="新增科室环境: ">
567
-        <el-upload
568
-          action="https://jsonplaceholder.typicode.com/posts/"
564
+      <el-form-item label="添加图片:" v-model="marginform.marginImages" required prop="marginImages">
565
+        <div>
566
+        </div>
567
+         <el-upload
568
+          :data="rotationData"
569
+          action="https://upload.qiniup.com"
569
           list-type="picture-card"
570
           list-type="picture-card"
570
-          :on-remove="handleRemove"
571
+         :on-success="RotationchartSuccess"
572
+         :before-upload="beforeRotationUpload"
573
+         v-show="show">
574
+        <i slot="default" class="el-icon-plus"></i>
575
+        <div slot="file" slot-scope="{file}">
576
+          <img
577
+           class="el-upload-list__item-thumbnail"
578
+           :src="file.url"
571
           >
579
           >
572
-          <i class="el-icon-plus"></i>
573
-        </el-upload>
580
+        <span class="el-upload-list__item-actions"> 
581
+         <span
582
+           v-if="!disabled"
583
+           class="el-upload-list__item-delete"
584
+         >
585
+         <i class="el-icon-edit-outline" @click="rotationEditImages()"></i>
586
+          </span> 
587
+         <span
588
+           v-if="!disabled"
589
+           class="el-upload-list__item-delete"
590
+         >
591
+          <i class="el-icon-delete"></i>
592
+          </span> 
593
+         </span> 
594
+        </div> 
595
+     </el-upload>
596
+      <img  src="static/images/u999.png" @click="addmagin()">
574
       </el-form-item>
597
       </el-form-item>
575
     </el-form>
598
     </el-form>
576
     <span slot="footer" class="dialog-footer">
599
     <span slot="footer" class="dialog-footer">
577
       <el-button @click="eight = false">取 消</el-button>
600
       <el-button @click="eight = false">取 消</el-button>
578
-      <el-button type="primary" @click="eight = false">确 定</el-button>
601
+      <el-button type="primary" @click="AddRotationChart('rotationform')">确 定</el-button>
579
     </span>
602
     </span>
580
   </el-dialog>
603
   </el-dialog>
581
-    
582
-  
604
+ 
605
+ <!-- 编辑魔法导航 -->
606
+   <el-dialog
607
+     title="编辑魔法导航"
608
+     :visible.sync="MagicNavigation"
609
+     width="40%"
610
+     center>
611
+     <el-form  label-width="90px"  ref="editmarginform" :model="editmarginform" :rules="rules">
612
+       <el-form-item label="导航标题:" prop="title">
613
+         <el-input style="width:400px" v-model="editmarginform.margtitle"></el-input>
614
+       </el-form-item>
615
+       <el-form-item label="导航图标:" prop="margimage">
616
+       <el-upload
617
+         class="avatar-uploader"
618
+          :data="magicData"
619
+          action="https://upload.qiniup.com"
620
+           :on-success="MagicSuccess"
621
+          :before-upload="MagicUpload"
622
+         :show-file-list="false">
623
+         <img v-if="editmarginform.margImage" :src="editmarginform.margImage" class="avatar">
624
+         <i v-else class="el-icon-plus avatar-uploader-icon"></i>
625
+       </el-upload>
626
+       </el-form-item>
627
+       <el-form-item label="跳转设置">
628
+         <el-radio-group v-model="form.gender">
629
+            <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderOptions" :key="index" @change="selectGender(gender.id)">{{gender.name}}</el-radio>
630
+          </el-radio-group>
631
+       </el-form-item>
632
+       <el-form-item>
633
+         <el-col :span="12" v-mode="editmarginform.marginaddress">
634
+          <el-input style="width:300px" v-show="define"></el-input>
635
+        </el-col>
636
+        <el-col :span="4">
637
+         <el-button size="medium" @click="setlink()" v-show="define">设置链接</el-button>
638
+        </el-col>
639
+       </el-form-item>
640
+     </el-form>
641
+    <span slot="footer" class="dialog-footer">
642
+    <el-button @click="MagicNavigation = false">取 消</el-button>
643
+    <el-button type="primary" @click="MagicNavigation = false">确 定</el-button>
644
+  </span>
645
+</el-dialog> 
646
+
647
+<el-dialog
648
+  title="设置链接地址"
649
+  :visible.sync="magicVisible"
650
+  width="30%"
651
+  :before-close="handleClose"
652
+  center>
653
+  <el-form label-width="90px">
654
+     <el-form-item label="连接类型">
655
+         <el-radio-group v-model="form.gender">
656
+            <el-radio :label="item.id" :value="item.id" v-for="(item,index) in defineOptions" :key="index" @change="selectItem(item.id)">{{item.name}}</el-radio>
657
+         </el-radio-group>
658
+     </el-form-item>  
659
+       <el-form-item label="链接类型:" v-show="definetwo">
660
+       <el-select v-model="value" placeholder="请选择">
661
+        <el-option
662
+        v-for="item in options"
663
+        :key="item.value"
664
+        :label="item.label"
665
+        :value="item.value">
666
+       </el-option>
667
+      </el-select>
668
+     </el-form-item>
669
+     <el-form-item label="文章分类" v-show="definetwo">
670
+       <el-select v-model="value" placeholder="请选择">
671
+        <el-option
672
+        v-for="item in options"
673
+        :key="item.value"
674
+        :label="item.label"
675
+        :value="item.value">
676
+       </el-option>
677
+      </el-select>
678
+     </el-form-item>
679
+     <el-form-item label="电话号码:" v-show="definethree">
680
+       <el-input></el-input>
681
+     </el-form-item>
682
+     <el-form-item label="站外链接:" v-show="definefour">
683
+       <el-input></el-input>
684
+     </el-form-item>
685
+  </el-form>
686
+  <span slot="footer" class="dialog-footer">
687
+    <el-button @click="magicVisible = false">取 消</el-button>
688
+    <el-button type="primary" @click="magicVisible = false">确 定</el-button>
689
+  </span>
690
+</el-dialog>
691
+
583
 </div>
692
 </div>
584
 </template>
693
 </template>
585
 
694
 
594
    import 'quill/dist/quill.snow.css'
703
    import 'quill/dist/quill.snow.css'
595
    import 'quill/dist/quill.bubble.css'
704
    import 'quill/dist/quill.bubble.css'
596
    import { constants } from 'crypto';
705
    import { constants } from 'crypto';
706
+import { fail } from 'assert';
597
 export default {
707
 export default {
598
   name: "newfeature",
708
   name: "newfeature",
599
   components:{
709
   components:{
602
   props: ['image', 'clearList'],
712
   props: ['image', 'clearList'],
603
   data() {
713
   data() {
604
     return {
714
     return {
715
+      genderOptions:[
716
+        {id:1, name:'自定义'},
717
+        {id:2, name:'不跳转'},
718
+       ],
719
+      defineOptions:[
720
+        {id:1,name:'无'},
721
+        {id:2,name:'站内链接'},
722
+        {id:3,name:'电话'},
723
+        {id:4,name:'站外链接'},
724
+      ],  
605
       options: [{
725
       options: [{
606
           value: '选项1',
726
           value: '选项1',
607
           label: '文章'
727
           label: '文章'
617
           label:'数学',
737
           label:'数学',
618
         }],
738
         }],
619
        headshow:false,
739
        headshow:false,
740
+       define:false,
741
+       definetwo:false,
742
+       definethree:false,
743
+       definefour:false,
620
        docnames:[],
744
        docnames:[],
745
+       radio: '1',
746
+       radiotwo:'2',
621
        positions:[
747
        positions:[
622
           { index: 1, name: '医士' },
748
           { index: 1, name: '医士' },
623
           { index: 2, name: '医师' },
749
           { index: 2, name: '医师' },
632
           { index: 11, name: '主任护师' },
758
           { index: 11, name: '主任护师' },
633
           { index: 12, name: '运营专员' },
759
           { index: 12, name: '运营专员' },
634
        ],
760
        ],
761
+       form:{
762
+         gender:"",
763
+       },
635
        value: '',
764
        value: '',
765
+       imageUrl:'',
636
       new1: require("../../../assets/preview/u481.png"),
766
       new1: require("../../../assets/preview/u481.png"),
637
       new2: require("../../../assets/preview/u493.png"),
767
       new2: require("../../../assets/preview/u493.png"),
638
       new3: require("../../../assets/preview/u496.png"),
768
       new3: require("../../../assets/preview/u496.png"),
645
       dialogRotationVisible: false,
775
       dialogRotationVisible: false,
646
       editcenterDialogVisible: false,
776
       editcenterDialogVisible: false,
647
       addpicVisible:false,
777
       addpicVisible:false,
778
+      MagicNavigation:false,
779
+      magicVisible:false,
648
       radio: '1',
780
       radio: '1',
649
       two: false,
781
       two: false,
650
       three: false,
782
       three: false,
661
       doctorData: { token: '', key: '' },
793
       doctorData: { token: '', key: '' },
662
       doctorDatatwo:  { token: '', key: '' },
794
       doctorDatatwo:  { token: '', key: '' },
663
       rotationData: { token:'',key: '' },
795
       rotationData: { token:'',key: '' },
796
+      magicData:{ token:'',key:''},
664
       keData: { token: '' ,key: ''},
797
       keData: { token: '' ,key: ''},
665
       file: this.image ? this.image : '',
798
       file: this.image ? this.image : '',
666
       hideShow:false,
799
       hideShow:false,
675
         image:"",
808
         image:"",
676
       },
809
       },
677
       docform:[],
810
       docform:[],
678
-        
679
-    
811
+      
680
       hispitalform:{
812
       hispitalform:{
681
         title:"",
813
         title:"",
682
         sort:"",
814
         sort:"",
692
         sort:"",
824
         sort:"",
693
         image:"",
825
         image:"",
694
         docimages:[],
826
         docimages:[],
827
+        ids:[],
695
       },
828
       },
696
       editdocfrom:{
829
       editdocfrom:{
697
-        docname:"",
830
+        doc_name:"",
698
         dochead:"",
831
         dochead:"",
699
-        doc_position:"",
832
+        doc_postion:"",
700
         doc_sort:"",
833
         doc_sort:"",
701
         docintroduction:"",
834
         docintroduction:"",
702
       },
835
       },
712
         title:"",
845
         title:"",
713
         sort:"",
846
         sort:"",
714
         rotationImages:[],
847
         rotationImages:[],
848
+      },
849
+       marginform:{
850
+         title:"",
851
+         sort:"",
852
+         marginImages:[],
853
+      }, 
854
+      editmarginform:{
855
+        margtitle:"",
856
+        margImage:"",
857
+        marginaddress:"",
715
       },
858
       },
716
       keform:{
859
       keform:{
717
         title:"",
860
         title:"",
728
          introduction: [{required: true,message:"请填写医院介绍"}],
871
          introduction: [{required: true,message:"请填写医院介绍"}],
729
          image: [{required: true,message:"请填写新增名医"}],
872
          image: [{required: true,message:"请填写新增名医"}],
730
          docname: [{required:true,message:"请填写医生姓名"}],
873
          docname: [{required:true,message:"请填写医生姓名"}],
874
+         doc_name:[{required:true,message:"请填写医生姓名"}],
731
          docHead: [{required: true,message:"请填写医生头像"}],
875
          docHead: [{required: true,message:"请填写医生头像"}],
732
          dochead: [{required: true,message:"请填写医生头像"}],
876
          dochead: [{required: true,message:"请填写医生头像"}],
733
          docpositional:[{required:true,message:"请填写医生职位"}],
877
          docpositional:[{required:true,message:"请填写医生职位"}],
878
+         doc_postion:[{required:true,message:"请填写医生职位"}],
734
          docintroduction:[{required:true,message:"请填写医生简介"}],
879
          docintroduction:[{required:true,message:"请填写医生简介"}],
735
          images:[{required:true,message:"请填写新增科室环境"}],
880
          images:[{required:true,message:"请填写新增科室环境"}],
736
          rotationImages:[{required:true,message:"请填写添加图片"}],
881
          rotationImages:[{required:true,message:"请填写添加图片"}],
741
     };
886
     };
742
   },
887
   },
743
   // 医院介绍模块
888
   // 医院介绍模块
744
-  methods:{   
889
+  methods:{  
890
+    
745
       addpic(){
891
       addpic(){
746
        this.addpicVisible = true;
892
        this.addpicVisible = true;
747
       },
893
       },
748
-
894
+      addmagin(){
895
+        this.MagicNavigation = true
896
+      },
749
       addlink(){
897
       addlink(){
750
         this.linkVisible = true;
898
         this.linkVisible = true;
751
       },
899
       },
900
+      setlink(){
901
+        this.magicVisible = true;
902
+      },
752
      //轮播图
903
      //轮播图
753
      rotationEditImages(){
904
      rotationEditImages(){
754
         this.dialogRotationVisible = true;
905
         this.dialogRotationVisible = true;
797
         handleRemove() {
948
         handleRemove() {
798
             this.file = '';
949
             this.file = '';
799
       },
950
       },
800
-
951
+      define(){
952
+         alert("aa")
953
+      },
801
 
954
 
802
       handleAvatarSuccess(res, file) {
955
       handleAvatarSuccess(res, file) {
803
          this.eidtDoctorform.dochead = this.qiniuDomain + res.url;  
956
          this.eidtDoctorform.dochead = this.qiniuDomain + res.url;  
916
           return isJPG && isLt2M;
1069
           return isJPG && isLt2M;
917
       },
1070
       },
918
 
1071
 
1072
+      MagicSuccess(res,file){
1073
+         this.editmarginform.margImage =this.qiniuDomain + res.url;
1074
+      },
1075
+
1076
+      MagicUpload(file){
1077
+         const isJPG = file.type === 'image/jpeg';
1078
+        const isLt2M = file.size / 1024 / 1024 < 2;
1079
+       
1080
+        if (!isJPG) {
1081
+          this.$message.error('上传头像图片只能是 JPG 格式!');
1082
+        }
1083
+        if (!isLt2M) {
1084
+          this.$message.error('上传头像图片大小不能超过 2MB!');
1085
+        }
1086
+      
1087
+         var date = new Date()
1088
+            var ext = getFileExtension(file.name)
1089
+            var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;       
1090
+            this.loadingText = '封面图片上传中'
1091
+            const _self = this
1092
+            return new Promise((resolve, reject) => {
1093
+                getToken().then(response => {
1094
+                    const token= response.data.data.uptoken
1095
+                    console.log("导航头像token是什么?",token)
1096
+                    _self._data.magicData.token = token;
1097
+                    _self._data.magicData.key = key;
1098
+                    resolve(true)
1099
+                }).catch(err => {
1100
+                    reject(false)                    
1101
+                })
1102
+            })
1103
+          return isJPG && isLt2M;
1104
+      },
1105
+
919
       //新增轮播图
1106
       //新增轮播图
920
       AddRotationChart(formName){
1107
       AddRotationChart(formName){
921
           this.$refs[formName].validate((valid)=>{
1108
           this.$refs[formName].validate((valid)=>{
943
                     var hospital = response.data.data.hospital;
1130
                     var hospital = response.data.data.hospital;
944
                     //console.log("返回数据",hospital)
1131
                     //console.log("返回数据",hospital)
945
                      this.$message.success("添加医院介绍成功");  
1132
                      this.$message.success("添加医院介绍成功");  
946
-                     this.two = false;    
1133
+                     this.two = false;                       
947
                   }
1134
                   }
948
              })
1135
              })
949
           }
1136
           }
969
 
1156
 
970
      //名医介绍
1157
      //名医介绍
971
      AddDoctor(formName){ 
1158
      AddDoctor(formName){ 
972
-          var images = [];
1159
+          var images = [];  
1160
+          var ids = [];  
973
           for (let index = 0; index < this.docform.length; index++) {
1161
           for (let index = 0; index < this.docform.length; index++) {
974
-            images.push(this.docform[index].dochead);          
1162
+            images.push(this.docform[index].dochead); 
1163
+            ids.push(this.docform[index].id);     
975
           }      
1164
           }      
976
-          this.doctorform.docimages = images,
1165
+          this.doctorform.docimages = images,    
1166
+          this.doctorform.ids = ids;    
977
          this.$refs[formName].validate((valid)=>{
1167
          this.$refs[formName].validate((valid)=>{
978
            if(valid){
1168
            if(valid){
979
               AddDoctor(this.doctorform).then(response=>{
1169
               AddDoctor(this.doctorform).then(response=>{
980
-                console.log("啊啊啊",this.doctorform);
1170
+                // console.log("啊啊啊",this.doctorform);
981
                 if(response.data.state==1){
1171
                 if(response.data.state==1){
982
                   var doctor = response.data.data.doctor;
1172
                   var doctor = response.data.data.doctor;
983
                   console.log("返回数据",doctor)
1173
                   console.log("返回数据",doctor)
1174
+                  this.headshow = false;
984
                   this.four = false;
1175
                   this.four = false;
1176
+                  this.docform = "";
1177
+                  this.doctorform = "";
985
                 }
1178
                 }
986
               })
1179
               })
987
            }
1180
            }
988
          })
1181
          })
989
      },
1182
      },
1183
+
990
       getQueryDocInfo(){
1184
       getQueryDocInfo(){
991
         getQueryDocInfo(this.doctorform).then(response=>{
1185
         getQueryDocInfo(this.doctorform).then(response=>{
992
               if(response.data.state==1){
1186
               if(response.data.state==1){
993
                  this.docnames = response.data.data.doctor;
1187
                  this.docnames = response.data.data.doctor;
994
-
1188
+                 console.log("获取医生信息",response.data.data.doctor)
995
               }
1189
               }
996
         })
1190
         })
997
       },
1191
       },
999
       getQueryDoCHead(){
1193
       getQueryDoCHead(){
1000
         getQueryDoCHead().then(response=>{
1194
         getQueryDoCHead().then(response=>{
1001
           if(response.data.state==1){
1195
           if(response.data.state==1){
1002
-            //var docHead =  response.data.data.docHead;
1196
+            var docHead =  response.data.data.docHead;
1003
             this.docform =  response.data.data.docHead;
1197
             this.docform =  response.data.data.docHead;
1004
             console.log("aaa",response.data.data.docHead)
1198
             console.log("aaa",response.data.data.docHead)
1005
             this.headshow = true;
1199
             this.headshow = true;
1006
-            //console.log("数据返回",docHead)
1200
+            console.log("头像数据返回",docHead)
1007
           }
1201
           }
1008
         })
1202
         })
1009
       },
1203
       },
1010
       change(id){
1204
       change(id){
1011
-        // alert(id);
1012
         change(id).then(response=>{
1205
         change(id).then(response=>{
1013
             if(response.data.state == 1){
1206
             if(response.data.state == 1){
1014
               var docinfo =  response.data.data.docinfo;
1207
               var docinfo =  response.data.data.docinfo;
1018
             }
1211
             }
1019
         })
1212
         })
1020
       },
1213
       },
1021
-     editDoctor(id){
1214
+     editDoctor(id){ 
1022
         editDoctor(id).then(response=>{
1215
         editDoctor(id).then(response=>{
1023
            if(response.data.state ==1){
1216
            if(response.data.state ==1){
1024
              var docionfo = response.data.data.docinfo;
1217
              var docionfo = response.data.data.docinfo;
1025
-             this.editdocfrom = response.data.data.docinfo;
1218
+             this.editdocfrom = response.data.data.docinfo;             
1026
              console.log("数据",docionfo);
1219
              console.log("数据",docionfo);
1027
            }
1220
            }
1028
         });
1221
         });
1044
                  var doctor =  response.data.data.doctor;
1237
                  var doctor =  response.data.data.doctor;
1045
                  this.centerDialogVisible = false;
1238
                  this.centerDialogVisible = false;
1046
                  console.log("返回数据",doctor);
1239
                  console.log("返回数据",doctor);
1047
-                 this.eidtDoctorform = "";
1048
                  this.getQueryDoCHead();
1240
                  this.getQueryDoCHead();
1241
+                
1049
                }
1242
                }
1050
              })
1243
              })
1051
            }
1244
            }
1054
      saveDocInfo(formName){
1247
      saveDocInfo(formName){
1055
         this.$refs[formName].validate((valid)=>{
1248
         this.$refs[formName].validate((valid)=>{
1056
           if(valid){
1249
           if(valid){
1250
+                 var sorts = this.editdocfrom.doc_sort
1251
+                 var sort = parseInt(sorts)
1252
+                this.editdocfrom.doc_sort = sort
1253
+                 this.editdocfrom.docintroduction = this.$refs.neditor.content;
1254
+     
1057
                saveDocInfo(this.editdocfrom.id,this.editdocfrom).then(response=>{
1255
                saveDocInfo(this.editdocfrom.id,this.editdocfrom).then(response=>{
1058
                   if(response.data.state == 1){
1256
                   if(response.data.state == 1){
1059
-                     var doctor =  response.data.data.doctor;
1257
+                     var doctor =  response.data.data.editdoctor;
1060
                      console.log("返回数据",doctor);
1258
                      console.log("返回数据",doctor);
1061
                      this.editcenterDialogVisible = false;
1259
                      this.editcenterDialogVisible = false;
1062
                      this.$message.success("保存成功")
1260
                      this.$message.success("保存成功")
1076
         console.log("图片路径",file.url)
1274
         console.log("图片路径",file.url)
1077
          this.keform.keImages.push(this.qiniuDomain + res.url);
1275
          this.keform.keImages.push(this.qiniuDomain + res.url);
1078
          console.log("图片数组",this.keform.keImages)
1276
          console.log("图片数组",this.keform.keImages)
1079
-        // this.keform.images = this.qiniuDomain + res.url;
1080
-        // console.log("图片url",this.keform.images)
1081
       },
1277
       },
1082
       beforekeUpload(file){
1278
       beforekeUpload(file){
1083
         const isJPG = file.type === 'image/jpeg';
1279
         const isJPG = file.type === 'image/jpeg';
1126
       add(){
1322
       add(){
1127
      
1323
      
1128
       },
1324
       },
1325
+     selectGender(id){
1326
+        if(id == 1){
1327
+          this.define = true;
1328
+        }
1329
+        if(id == 2){
1330
+           this.define = false;
1331
+        }
1332
+     },
1333
+     selectItem(id){
1334
+       if(id == 1){
1335
+         this.definetwo = false;
1336
+         this.definethree = false;
1337
+         this.definefour = false;
1338
+       }
1339
+
1340
+       if(id==2){
1341
+          this.definetwo = true;
1342
+          this.definethree = false;
1343
+          this.definefour = false;
1344
+       }
1345
+
1346
+       if(id==3){
1347
+         this.definethree = true;
1348
+         this.definetwo = false;
1349
+         this.definefour = false;
1350
+       }
1351
+
1352
+       if(id==4){
1353
+         this.definefour = true;
1354
+         this.definetwo = false;
1355
+         this.definethree = false;
1356
+       }
1357
+     }
1129
   },  
1358
   },  
1130
    created(){
1359
    created(){
1131
      this.getQueryDocInfo();
1360
      this.getQueryDocInfo();
1132
-     this.getQueryDoCHead();
1133
-   }
1361
+     this.getQueryDoCHead();  
1362
+   },
1134
  };
1363
  };
1135
 </script>
1364
 </script>
1136
 
1365
 

+ 194 - 21
src/scrm_pages/site/components/parent-component.vue View File

19
            <div class="more" @click="more()">查看更多</div>
19
            <div class="more" @click="more()">查看更多</div>
20
            <div class="logo"><img src="static\images\u216.png"></div>  
20
            <div class="logo"><img src="static\images\u216.png"></div>  
21
            <div class="xcontent">
21
            <div class="xcontent">
22
-             <span v-html="item.Offices.introduction" id="xcontent" class="xxcontent"></span>
22
+             <span v-html="item.Offices.introduction" id="ycontent" class="zzcontent"></span>
23
            </div>
23
            </div>
24
         </div>
24
         </div>
25
-     </div>
26
 
25
 
27
-     <div class="box"></div>
26
+        <!-- 名医介绍 -->
27
+        <div v-if="item.mode_type == 4" class="modefour">
28
+          <img src="static\images\u.png" style="width:5px;height:20px;">
29
+           <div class="kefont"><span >{{item.title}}</span></div> 
30
+           <div class="more" @click="more()">查看更多</div>
31
+           <div class="logo"><img src="static\images\u216.png"></div>
32
+           <div class="docborde">
33
+            <div class="docheart" v-for="doc in item.Editdoctor" :key="doc.id">
34
+              <div class="docimage">
35
+                <img :src="doc.dochead" style="height:80px;width:80px">
36
+              </div>
37
+              <div class="doctitle"><span class="docnamefont">{{doc.doc_name}}</span></div>
38
+              <div class="doccontent"><span class="xxcontent" v-html="doc.docintroduction"></span></div>
39
+            </div>
40
+           </div>
41
+        </div>
28
 
42
 
43
+         <!-- 科室环境 -->
44
+        <div v-if="item.mode_type == 5" class="modefive">
45
+          <img src="static\images\u.png" style="width:5px;height:20px;"> 
46
+          <div class="kefont"><span >{{item.title}}</span></div> 
47
+           <div class="more" @click="more()">查看更多</div>
48
+           <div class="logo"><img src="static\images\u216.png"></div>
49
+           <div class="swiperimages">
50
+           <div class="swiper-container" id="swipertwo">
51
+           <div class="swiper-wrapper" id="wrapper2">
52
+           <div class="swiper-slide"  v-for="it in item.OfficeEnviroment" :key="it.id">
53
+           <img :src="it.keimages" style="width:150px;height:140px;border-radius:5px;"/>
54
+          </div>
55
+          </div>
56
+         </div>
57
+        </div>
58
+        </div>
59
+     </div>
60
+     <div class="box"></div>
29
    </div>  
61
    </div>  
30
-   </div>
62
+   </div> 
31
 </template>
63
 </template>
32
 
64
 
33
 <script>
65
 <script>
34
   import { getQueryNewModel,getHospital,getHospitaldata } from '@/api/site/site' 
66
   import { getQueryNewModel,getHospital,getHospitaldata } from '@/api/site/site' 
35
-import { truncateSync } from 'fs';
67
+  import Swiper from "swiper"; 
68
+  import { truncateSync } from 'fs';
36
     export default {
69
     export default {
37
         name: "parent-component",
70
         name: "parent-component",
38
         data(){
71
         data(){
40
             modeltitle:[],
73
             modeltitle:[],
41
             hospitalform:[],
74
             hospitalform:[],
42
             patientModels:[],  
75
             patientModels:[],  
43
-                 
76
+            keEnvironmentImages:[],     
77
+            doctors:[],
78
+            
44
           }  
79
           }  
45
         },
80
         },
46
         methods:{
81
         methods:{
47
-    
82
+         more(){
83
+           alert("aaaa")
84
+         },
48
          getHospital(){
85
          getHospital(){
49
             getHospital().then(response=>{
86
             getHospital().then(response=>{
50
                 if(response.data.state == 1){
87
                 if(response.data.state == 1){
51
                   this.hospitalform = response.data.data.hostital;
88
                   this.hospitalform = response.data.data.hostital;
52
-                  console.log("中国第一人",this.hospitalform);
89
+                  // console.log("中国第一人",this.hospitalform);
53
                 }
90
                 }
54
             }) 
91
             }) 
55
          },
92
          },
56
           getHospitaldata(){
93
           getHospitaldata(){
57
-           getHospitaldata().then(response=>{
94
+           getHospitaldata(this.patientModels).then(response=>{
58
                 if(response.data.state == 1){
95
                 if(response.data.state == 1){
96
+                  var str = "";
59
                  this.patientModels = response.data.data.patientModels;
97
                  this.patientModels = response.data.data.patientModels;
60
-                 console.log("中国第三人",this.patientModels)
98
+                  console.log("获取的数据",this.patientModels);
99
+                 for (let index = 0; index < this.patientModels.length; index++) {
100
+                   const element = this.patientModels[index].OfficeEnviroment;
101
+                   console.log("element",element)
102
+                 }
103
+                //   var strs = str.split(",");
104
+                //   console.log("strs",strs)             
105
+                //  this.keEnvironmentImages = strs;
61
                 }
106
                 }
62
            })
107
            })
63
          },
108
          },
68
         },
113
         },
69
          updated(){
114
          updated(){
70
             let obj = document.getElementById('content');
115
             let obj = document.getElementById('content');
71
-            console.log("obj是什么",obj)
116
+          
72
             let imgs =  obj.getElementsByTagName('img');
117
             let imgs =  obj.getElementsByTagName('img');
73
-            console.log("imgs",imgs)
118
+          
74
             for(let i=0;i<imgs.length;i++){
119
             for(let i=0;i<imgs.length;i++){
75
             imgs[i].style.width = '332px';
120
             imgs[i].style.width = '332px';
76
             imgs[i].style.height = '100px';            
121
             imgs[i].style.height = '100px';            
77
          }
122
          }
78
-          let xcontent = document.getElementById('xcontent');
79
-          console.log("xcontent是设么",xcontent)
80
-          let ximgs = xcontent.getElementsByTagName('img');
81
-          console.log("ximgs是什么",ximgs)
123
+          let ycontent = document.getElementById('ycontent');
124
+         
125
+          let ximgs = ycontent.getElementsByTagName('img');
126
+         
82
           for(let j=0;j<ximgs.length;j++){
127
           for(let j=0;j<ximgs.length;j++){
83
-             imgs[j].style.width = '332px';
84
-             imgs[j].style.height = '100px';
128
+             ximgs[j].style.width = '332px';
129
+             ximgs[j].style.height = '100px';
85
           }
130
           }
86
-        }
131
+        },
132
+
133
+          mounted(){
134
+            var mySwiper = new Swiper('#swipertwo', {
135
+                direction:"horizontal",
136
+                loop: true, // 循环播放,
137
+                spaceBetween:10,
138
+                autoplay:true,
139
+                loopAdditionalSlides:10,
140
+                slidesPerView: 'auto', // 设置slider容器能够同时显示的slides数量
141
+                centeredSlides: true, // active slide 居中
142
+                observer:true,//动态加载图片
143
+                observeParents:false,
144
+                pagination: {
145
+                    el: '.swiper-pagination',
146
+                },
147
+            });
148
+        },
87
     }
149
     }
88
 </script>
150
 </script>
89
 
151
 
90
 <style scoped>
152
 <style scoped>
153
+
154
+    .clickmore{
155
+      width: 200px;
156
+      height: 200px;
157
+      border: solid 1px red;
158
+    }
159
+
91
     .parent{
160
     .parent{
92
       width: 320px;
161
       width: 320px;
93
-      height: 220px;
162
+      height: 230px;
94
       /* background-color:  rgba(204, 204, 204, 1); */
163
       /* background-color:  rgba(204, 204, 204, 1); */
95
     }
164
     }
96
 
165
 
113
       /* background-color: blue; */
182
       /* background-color: blue; */
114
     }
183
     }
115
 
184
 
185
+    .modefour{
186
+      width:320px;
187
+      height: 230px;
188
+    }
189
+
190
+    .modefive{
191
+      width:320px;
192
+      height: 220px;
193
+    }
194
+
116
      .logo{
195
      .logo{
117
        position: absolute;
196
        position: absolute;
118
        margin-left: 280px;
197
        margin-left: 280px;
155
      -webkit-box-orient: vertical   
234
      -webkit-box-orient: vertical   
156
    }
235
    }
157
 
236
 
158
-    .xxcontent{
237
+    .zzcontent{
159
      overflow: hidden;
238
      overflow: hidden;
160
      text-overflow: ellipsis;
239
      text-overflow: ellipsis;
161
      display: -webkit-box;
240
      display: -webkit-box;
162
      -webkit-line-clamp: 6;
241
      -webkit-line-clamp: 6;
163
      -webkit-box-orient: vertical   
242
      -webkit-box-orient: vertical   
164
    }
243
    }
244
+
245
+   .docborde{
246
+     width: 320px;
247
+     height: 200px;
248
+     /* border: solid 1px red; */
249
+     overflow: hidden;
250
+   }
251
+
252
+   .docborder{
253
+     width: 320px;
254
+     height: 100px;
255
+     /* border: solid 1px red; */
256
+     background-color:  rgba(242, 242, 242, 1);
257
+     margin-top: 8px;
258
+   }
259
+   .docheart{
260
+     width: 300px;
261
+     height: 92px;
262
+     /* border: solid 1px blue; */
263
+     margin-top: 5px;
264
+     margin-left: 3px;
265
+   }
266
+   .docimage{
267
+     width: 80px;
268
+     height: 80px;
269
+     /* border:solid 1px red; */
270
+     margin-top: 10px;
271
+     margin-left: 10px;
272
+   }
273
+   .doctitle{
274
+     width: 50px;
275
+     height: 20px;
276
+     /* border: solid 1px blue; */
277
+     float: right;
278
+     margin-right: 140px;
279
+     margin-top: -75px;
280
+   }
281
+
282
+   .doccontent{
283
+     width: 150px;
284
+     height: 50px;
285
+     /* border: solid 1px red; */
286
+     margin-top: -50px;
287
+     margin-left: 108px;
288
+     font-size: 14px;
289
+   }
290
+   .docnamefont{
291
+     font-size: 14px;
292
+
293
+   }
294
+
295
+   .dochead{
296
+       position:absolute;
297
+       width:80px;
298
+       height: 80px;
299
+       /* border:solid 1px green; */
300
+       margin-top: 10px;
301
+       margin-left: 10px;
302
+   }
303
+
304
+    .docname{
305
+       position: absolute;
306
+       width:50px;
307
+       height: 20px;
308
+       /* border: solid 1px green; */
309
+       margin-left: 130px;
310
+       margin-top: 20px;
311
+       font-size: 14px;
312
+       color:black;
313
+     }
314
+
315
+     .docintroduction{
316
+       font-size: 14px;
317
+       color: black;
318
+     }
319
+
320
+    .xxcontent{
321
+      overflow: hidden;
322
+      text-overflow: ellipsis;
323
+      display: -webkit-box;
324
+      -webkit-line-clamp: 3;
325
+      -webkit-box-orient: vertical   
326
+   }   
327
+
328
+     #wrapper2{
329
+     width: 50%;
330
+   }
331
+
332
+   .swiperimages{
333
+     width: 320px;
334
+     height: 150;
335
+     /* border: solid 1px red; */
336
+     margin-top: 40px;
337
+   }
165
 </style>
338
 </style>

File diff suppressed because it is too large
+ 1731 - 516
src/scrm_pages/site/preview.vue


BIN
static/images/u999.png View File