Przeglądaj źródła

联系我们模块更新

xiaoming_global 5 lat temu
rodzic
commit
eeb4d5cd9d

+ 65 - 0
src/api/site/site.js Wyświetl plik

@@ -451,3 +451,68 @@ export function getOrderModel(params){
451 451
     })
452 452
 }
453 453
 
454
+
455
+export function addrotationpic(data){
456
+   return request({
457
+       url:"/api/site/addrotationpic",
458
+       method:"Post",
459
+       data:data,
460
+   })
461
+}
462
+
463
+export function GetRotationImages(params){
464
+    return request({
465
+        url:"/api/site/getrotationimages",
466
+        method:"Post",
467
+        params:params
468
+    })
469
+}
470
+
471
+export function addrotationImage(data){
472
+    return request({
473
+        url:"/api/site/addrotationimage",
474
+        method:"Post",
475
+        data:data,
476
+    })
477
+}
478
+
479
+export function AddImageslink(data){
480
+   return request({
481
+       url:"/api/site/addimageslink",
482
+       method:"Post",
483
+       data:data,
484
+   })
485
+}
486
+
487
+export function getEditImages(params){
488
+    return request({
489
+        url:"/api/site/geteditimages",
490
+        method:"Post",
491
+        params:params
492
+    })
493
+}
494
+
495
+export function AddMagicNavi(data){
496
+   return request({
497
+       url:"/api/site/addmagicnavi",
498
+       method:"Post",
499
+       data:data,
500
+   })
501
+}
502
+
503
+export function getMagicImages(params){
504
+   return request({
505
+      url:"/api/site/getmagicimages",
506
+      method:"Post",
507
+      params:params,
508
+   })
509
+}
510
+
511
+export function AddMarginChart(data){
512
+   return request({
513
+      url:"/api/site/addmarginchart",
514
+      method:"Post",
515
+      data:data,
516
+   })
517
+}
518
+

+ 232 - 56
src/scrm_pages/site/components/add-contact.vue Wyświetl plik

@@ -35,59 +35,50 @@
35 35
                 </li>
36 36
             </ul>
37 37
          </div>
38
-
39
-<!-- 轮播图 -->
40
-<el-dialog
38
+  <!-- 新增轮播图 -->
39
+   <el-dialog
41 40
     title="新增轮播图"
42 41
     :visible.sync="slideshow"
43 42
     width="550px"
44
-    >
45
-    <el-form ref="rotationform" :model="rotationform" label-width="90px" :rules="rules" :label-position="labelPosition">
46
-      <el-form-item label="模块标题:" required prop="title">      
47
-        <el-input v-model="rotationform.title" ></el-input>
43
+     center>
44
+    <el-form ref="rotationform" :model="rotationform" label-width="90px" :rules="rules" >
45
+      <el-form-item label="模块标题:" required prop="title">
46
+        <el-input v-model="rotationform.title"></el-input>
48 47
       </el-form-item>
49 48
       <el-form-item label="排序值:" required prop="sort">
50 49
         <el-input v-model="rotationform.sort"></el-input>
51 50
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
52 51
       </el-form-item>
53
-      <el-form-item label="添加图片:" v-model="rotationform.rotationImages" required prop="rotationImages">
54
-         <el-upload
55
-          :data="rotationData"
56
-          action="https://upload.qiniup.com"
57
-          list-type="picture-card"
58
-          :on-success="RotationchartSuccess"
59
-         :before-upload="beforeRotationUpload"
60
-         >
61
-        <i slot="default" class="el-icon-plus"></i>
62
-        <div slot="file" slot-scope="{file}">
63
-          <img
64
-           class="el-upload-list__item-thumbnail"
65
-           :src="file.url"
66
-          >
67
-        <span class="el-upload-list__item-actions"> 
68
-         <span
69
-           v-if="!disabled"
70
-           class="el-upload-list__item-delete"
71
-         >
72
-         <i class="el-icon-edit-outline" @click="rotationEditImages('rotationform')"></i>
73
-          </span> 
74
-         <span
75
-           v-if="!disabled"
76
-           class="el-upload-list__item-delete"
77
-         >
78
-          <i class="el-icon-delete"></i>
79
-          </span> 
80
-         </span> 
81
-        </div> 
82
-     </el-upload>
52
+     <el-form-item label="添加图片:" v-model="rotationform.rotationImages">
53
+         <div class="flex-img">
54
+              <div class="el-upload-list el-upload-list--picture-card" >            
55
+                  <div class="el-upload-list__item is-success" v-for="(item,index) in this.rotationdata" :key="item.id">             
56
+                    <img class="flex-img__image" :src="item.images">              
57
+                    <label class="el-upload-list__item-status-label">
58
+                     <i class="el-icon-upload-success el-icon-check"></i>
59
+                    </label>
60
+                     <span class="el-upload-list__item-actions">
61
+                    <span class="el-upload-list__item-delete">
62
+                    <i class="el-icon-edit-outline" @click="editImages(item.id);editcenterDialogVisible = true"></i>
63
+                    <i class="el-icon-delete" @click="deleteDoctor(item.id,index)"></i>
64
+                    </span>
65
+                    </span>
66
+                   </div>         
67
+                </div>     
68
+                <img src="static/images/u679.png" @click="addVisible = true">   
69
+             </div>
70
+              <!-- <div class="addrot">
71
+
72
+              </div> -->
83 73
       </el-form-item>
84 74
     </el-form>
85 75
     <span slot="footer" class="dialog-footer">
86 76
       <el-button @click="slideshow = false">取 消</el-button>
87
-      <el-button type="primary" @click="addRotationUpload('rotationform');">确 定</el-button>
77
+      <el-button type="primary" @click="addrotationImage('rotationform')">确 定</el-button>
88 78
     </span>
89 79
   </el-dialog>
90 80
 
81
+
91 82
   <!-- 医院地址 -->
92 83
   <el-dialog
93 84
     title="新增医院地址"
@@ -289,6 +280,58 @@
289 280
       <el-button type="primary" @click="addRideWay('rideform');">确 定</el-button>
290 281
     </span>
291 282
    </el-dialog>
283
+
284
+ <!-- 编辑图片 -->
285
+ <el-dialog
286
+     class="avatar-uploader"
287
+     title="编辑图片"
288
+     :visible.sync="addVisible"
289
+     width="35%"
290
+     center>
291
+  <el-form ref="picform" :model="picform" label-width="90px" :rules="rules">
292
+    <el-form-item label="图片编辑:" required prop="Images">
293
+      <el-col :span="5">       
294
+       <el-upload
295
+          :data="Data"        
296
+          action="https://upload.qiniup.com"
297
+          :show-file-list="false"
298
+          :on-success="RotationSuccess"
299
+          :before-upload="RotationUpload">
300
+          <img v-if="picform.Images" :src="picform.Images" class="avatar">
301
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
302
+      </el-upload>
303
+      </el-col>
304
+      <el-col :span="19">
305
+          <div class="tpic" v-show="showpic"> 
306
+            <img :src="picform.Images" style="width:200px;height:100px">
307
+          </div>
308
+      </el-col>
309
+    </el-form-item>
310
+    <el-form-item label="排序值:" required prop="sort">
311
+       <el-col :span="24">
312
+         <el-input v-model="picform.sort"></el-input>
313
+       </el-col>   
314
+    </el-form-item>
315
+    <el-form-item label="图片链接:" required prop="piclink">
316
+        <el-radio-group v-model="picform.piclink">
317
+           <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderOptions" :key="index" @change="selectGender(gender.id)">{{gender.name}}</el-radio>
318
+        </el-radio-group>
319
+    </el-form-item>
320
+    <el-form-item label="链接地址:" required prop="linkaddress">
321
+      <el-col :span="20">
322
+      <el-input v-model="picform.linkaddress"></el-input>
323
+      </el-col>
324
+      <el-col :span="4">
325
+       <el-button size="medium" @click="addlink()">设置链接</el-button>
326
+      </el-col>
327
+    </el-form-item>
328
+  </el-form>
329
+  <span slot="footer" class="dialog-footer">
330
+    <el-button @click="addVisible = false">取 消</el-button>
331
+    <el-button type="primary" @click="addrotationpic('picform');addVisible = false">确 定</el-button>
332
+  </span>
333
+</el-dialog>
334
+
292 335
   </div>
293 336
 </template>
294 337
 
@@ -296,12 +339,15 @@
296 339
 <script>
297 340
  import { getToken } from '@/api/qiniu'
298 341
  import { getFileExtension} from '@/utils/tools'
299
- import { addRotationUpload,addRideWay,addWorkTime,addconnection,queryConnetion,deleteConnecWay,editConnecWay,saveConnecform,addContract} from '@/api/site/site'  
342
+ import { addRotationUpload,addRideWay,addWorkTime,addconnection,queryConnetion,deleteConnecWay,editConnecWay,
343
+ saveConnecform,addContract,addrotationpic,GetRotationImages,addrotationImage} from '@/api/site/site'  
300 344
 import { truncateSync } from 'fs';
301 345
 export default {
302 346
   name: "addcontact",
303 347
   data() {
304 348
     return {
349
+      show:false,
350
+      imageUrl:false,
305 351
       dialogshow:false,
306 352
       slideshow:false,
307 353
       address:false,
@@ -315,6 +361,7 @@ export default {
315 361
       dialogFormVisibleAdd:true,
316 362
       labelPosition: 'left',
317 363
       qiniuDomain: 'https://images.shengws.com/',
364
+      Data: { token:'',key: '' },
318 365
       rotationData: { token:'',key: '' },
319 366
       new1: require("../../../assets/preview/u481.png"),
320 367
       new2: require("../../../assets/preview/u493.png"),
@@ -332,6 +379,7 @@ export default {
332 379
         sort:"",
333 380
         rotationImages:[],
334 381
       },
382
+      rotationdata:[],
335 383
       rideform:{
336 384
         title:"",
337 385
         sort:"",
@@ -373,12 +421,25 @@ export default {
373 421
         rotationImages:[{required:true,message:"请填写添加图片"}],
374 422
         content:[{required:true,message:"请填写乘车方式"}],
375 423
         worktime:[{required:true,message:"请填写工作时间"}],
376
-        connecway:[{required:true,message:"请选择联系方式"}]
424
+        connecway:[{required:true,message:"请选择联系方式"}],
425
+        linkaddress:[{required:true,message:"请填写链接地址"}]
377 426
       },
378
-
427
+     addVisible:false,  
428
+       picform:{
429
+         sort:"",
430
+         Images:"",
431
+         piclink:"",
432
+         linkaddress:"",
433
+      },
434
+      showpic:false,
435
+      genderOptions:[
436
+        {id:1, name:'无'},
437
+        {id:2, name:'自定义'},
438
+       ],
379 439
     };
380 440
   },
381 441
   methods:{
442
+    
382 443
        //轮播图
383 444
       RotationchartSuccess(res,file,filelist){         
384 445
          this.rotationform.rotationImages.push(this.qiniuDomain + res.url);  
@@ -414,6 +475,41 @@ export default {
414 475
             })
415 476
           return isJPG && isLt2M;
416 477
       },
478
+
479
+       RotationSuccess(res,file,filelist){         
480
+         this.picform.Images =this.qiniuDomain + res.url;
481
+         this.showpic = true;
482
+      },
483
+         RotationUpload(file){
484
+             var fileType = file.type
485
+            const isJPG = fileType.indexOf("image") > -1;
486
+            const isLt2M = file.size / 1024 / 1024 < 2;
487
+            if (!isJPG) {
488
+                this.$message.error("只能上传图片");
489
+                return false;
490
+            }
491
+            if (!isLt2M) {
492
+                this.$message.error("图片大小不能超过 2MB!");
493
+                return false;
494
+         }
495
+      
496
+         var date = new Date()
497
+            var ext = getFileExtension(file.name)
498
+            var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
499
+            const _self = this
500
+            return new Promise((resolve, reject) => {
501
+                getToken().then(response => {
502
+                    const token= response.data.data.uptoken
503
+                    console.log("联系我们轮播图token是什么?",token)
504
+                    _self._data.Data.token = token;
505
+                    _self._data.Data.key = key;
506
+                    resolve(true)
507
+                }).catch(err => {
508
+                    reject(false)
509
+                })
510
+            })
511
+          return isJPG && isLt2M;
512
+      },
417 513
       //添加轮播图
418 514
       addRotationUpload(formName){
419 515
         this.$refs[formName].validate((valid)=>{
@@ -440,7 +536,7 @@ export default {
440 536
             addconnection(this.connecform).then(response=>{
441 537
               if(response.data.state==1){
442 538
                  var cooection =  response.data.data.connection;
443
-                 console.log("返回数据",cooection);
539
+                //  console.log("返回数据",cooection);
444 540
                  this.queryConnetion();
445 541
                  this.connecform.title = "";
446 542
                  this.connecform.content = "";
@@ -455,7 +551,7 @@ export default {
455 551
         queryConnetion().then(response=>{
456 552
            if(response.data.state ==1){
457 553
              this.connectionway = response.data.data.conection;
458
-             console.log("联系方式返回数据",this.connectionway);
554
+            //  console.log("联系方式返回数据",this.connectionway);
459 555
            }
460 556
         })
461 557
       },
@@ -482,7 +578,7 @@ export default {
482 578
         editConnecWay(id).then(response=>{
483 579
             if(response.data.state == 1){
484 580
               this.editconnecform = response.data.data.connection;
485
-              console.log("返回数据",this.connecform);
581
+              // console.log("返回数据",this.connecform);
486 582
             }
487 583
         })      
488 584
       },
@@ -494,7 +590,7 @@ export default {
494 590
               saveConnecform(this.editconnecform.id,this.editconnecform).then(response=>{
495 591
                   if(response.data.state == 1){
496 592
                      var connection =  response.data.data.connection;
497
-                     console.log("返回数据",connection);
593
+                    //  console.log("返回数据",connection);
498 594
                       this.editLink =false;
499 595
                       this.queryConnetion();
500 596
                   }    
@@ -520,8 +616,8 @@ export default {
520 616
                   if(response.data.state == 1){
521 617
                    var connectway = response.data.data.connectway;
522 618
                    var ordmodel = response.data.data.ordmodel;
523
-                   console.log("返回数据",connectway);
524
-                   console.log("返回数据",ordmodel)    
619
+                  //  console.log("返回数据",connectway);
620
+                  //  console.log("返回数据",ordmodel)    
525 621
                   }
526 622
               })           
527 623
             }
@@ -539,8 +635,8 @@ export default {
539 635
                   if(response.data.state==1){
540 636
                     var ordmodel = response.data.data.ordmodel;
541 637
                     var patientWorktime = response.data.data.patientWorktime
542
-                    console.log("返回数据",ordmodel);
543
-                    console.log("返回数据",patientWorktime)
638
+                    // console.log("返回数据",ordmodel);
639
+                    // console.log("返回数据",patientWorktime)
544 640
                     this.time = false;
545 641
                 }
546 642
             })
@@ -558,9 +654,9 @@ export default {
558 654
             addRideWay(this.rideform).then(response=>{
559 655
               if(response.data.state==1){
560 656
                  var rideway = response.data.data.rideway;
561
-                 console.log("返回数据",rideway);
657
+                //  console.log("返回数据",rideway);
562 658
                  var ordemodel = response.data.data.ordemodel;
563
-                 console.log("返回数据",ordemodel)
659
+                //  console.log("返回数据",ordemodel)
564 660
                  this.type = false;
565 661
               }
566 662
             })
@@ -569,6 +665,49 @@ export default {
569 665
       },
570 666
       hospitaAddress(){
571 667
         this.hostaddress = true;
668
+      },
669
+      addrotationpic(formName){
670
+         var sorts = this.picform.sort
671
+         var sort = parseInt(sorts)
672
+         this.picform.sort = sort
673
+       this.$refs[formName].validate((valid)=>{
674
+         if(valid){
675
+            addrotationpic(this.picform).then(response=>{
676
+               if(response.data.state ==1){
677
+                 var conrotation  = response.data.data.conrotation;
678
+                //  console.log("返回数据",conrotation)
679
+               }
680
+            })
681
+         }
682
+       })  
683
+      },
684
+      GetRotationImages(){
685
+        GetRotationImages(this.picform.id).then(response=>{
686
+           if(response.data.state == 1){
687
+             var conrotations =   response.data.data.conrotations
688
+             this.rotationdata =   response.data.data.conrotations
689
+            
690
+           }
691
+        })
692
+      },
693
+      addrotationImage(formName){
694
+        var sorts =  this.rotationform.sort;
695
+        var sort = parseInt(sorts);
696
+        this.rotationform.sort = sort;
697
+        for (let index = 0; index < this.rotationdata.length; index++) {
698
+          this.rotationform.rotationImages.push(this.rotationdata[index].images);       
699
+        }
700
+        this.$refs[formName].validate((valid)=>{
701
+          if(valid){
702
+            addrotationImage(this.rotationform).then(response=>{
703
+                 if(response.data.state == 1){
704
+                   var oldrotation  = response.data.data.oldrotation;
705
+                   this.slideshow = false;
706
+                 
707
+                 } 
708
+            })
709
+          }
710
+        })
572 711
       }
573 712
   },
574 713
        mounted(){
@@ -622,9 +761,10 @@ export default {
622 761
         
623 762
         created(){
624 763
           this.queryConnetion();
764
+          this.GetRotationImages();
625 765
         },
626 766
 
627
-          updated(){
767
+       updated(){
628 768
           this.$nextTick(function () {
629 769
                 var th = this
630 770
                 // 创建Map实例
@@ -685,10 +825,10 @@ export default {
685 825
         margin-top: 20px;
686 826
       //  border:1px solid green;
687 827
     }
688
-.tips {
689
-  font-size: 12px;
690
-  line-height: 18px;
691
-}
828
+  .tips {
829
+    font-size: 12px;
830
+    line-height: 18px;
831
+   }
692 832
 .used {
693 833
   ul {
694 834
     li {
@@ -710,5 +850,41 @@ export default {
710 850
       }
711 851
     }
712 852
   }
853
+  
854
+   .avatar-uploader{
855
+      border: 1px dashed #d9d9d9;
856
+      border-radius: 6px;
857
+      cursor: pointer;
858
+      position: relative;
859
+      overflow: hidden;
860
+      width: 100px;
861
+      height: 100px;
862
+     }
863
+  .avatar-uploader{
864
+    border-color: #409EFF;
865
+  }
866
+  .avatar-uploader-icon {
867
+    font-size: 14px;
868
+    color: #8c939d;
869
+    width: 50px;
870
+    height: 50px;
871
+    line-height: 50px;
872
+    margin-left: 25px;
873
+    margin-top: 25px;
874
+    text-align: center;
875
+  }
876
+
877
+   .tpic{
878
+     width:200px;
879
+     height:200px;
880
+     border:solid 1px red;
881
+   }
882
+
883
+  //  .addrot{
884
+  //    width: 146px;
885
+  //    height: 146px;
886
+  //    border: dashed 1px red;
887
+  //  }
888
+  
713 889
 }
714 890
 </style>

+ 19 - 31
src/scrm_pages/site/components/contact-us.vue Wyświetl plik

@@ -1,47 +1,22 @@
1 1
 <template>
2 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 3
         <div  v-for="item in this.ordmodel" :key="item.id">
29 4
            <div>
30 5
               <div v-if="item.mode_type == 1">
31
-                 <div class="rotation">
32
-
6
+                 <div class="modefive">
7
+                     <img src="static/images/a.jpg" style="width:315px;height:200px">
33 8
                  </div>
34 9
               </div>
35 10
                 <div class="modelone" v-if="item.mode_type == 2">
36 11
                  <div>
37
-
12
+                    
38 13
                  </div>
39 14
               </div>
40 15
               <div  v-if="item.mode_type == 3">
41 16
                  <div class="modeone">
42
-                   <span>{{item.title}}:13318464642</span><br>
43
-                   <span>{{item.title}}:13318464642</span><br>
44
-                   <span>{{item.title}}:13318464642</span><br>
17
+                   <span>{{item.title}}:&nbsp;&nbsp;13318464642</span><br>
18
+                   <span>{{item.title}}:&nbsp;&nbsp;13318464642</span><br>
19
+                   <span>{{item.title}}:&nbsp;&nbsp;13318464642</span><br>
45 20
                   </div>
46 21
               </div>
47 22
                <div class="modetwo" v-if="item.mode_type == 4">
@@ -77,6 +52,12 @@ import { fchown } from 'fs';
77 52
                  if(response.data.state == 1){
78 53
                   var ordmodel = response.data.data.ordmodel;
79 54
                   this.ordmodel = response.data.data.ordmodel;
55
+        
56
+                  for (let index = 0; index < this.ordmodel.length; index++) {
57
+                    var images = this.ordmodel[index].Oldration.rotation_images;     
58
+                    console.log("images是什么?",images)              
59
+                  }
60
+                  console.log(images)
80 61
                   console.log("马文强",ordmodel)
81 62
                  }
82 63
              })
@@ -178,6 +159,13 @@ import { fchown } from 'fs';
178 159
     margin-bottom: 10px;
179 160
   }
180 161
 
162
+  .modefive{
163
+    width:315px;
164
+    height: 200px;
165
+    /* border: solid 1px red; */
166
+    margin-bottom: 5px;
167
+  }
168
+
181 169
   .rotation{
182 170
     width: 320px;
183 171
     height: 220px;

+ 0 - 109
src/scrm_pages/site/components/doctor-introduction.vue Wyświetl plik

@@ -1,109 +0,0 @@
1
-<template>
2
-    <div class="wq5">                         
3
-       <img src="static\images\u.png" style="width:5px;height:20px;">                           
4
-        <div class="kefont"><span >名医介绍</span></div>
5
-        <div class="more" @click="more()">查看更多</div>
6
-        <div class="logo"><img src="static\images\u216.png"></div>
7
-        <div class="famdoc" v-for="item in doctorInfos" :key="item.id">
8
-        <div class="dochead">
9
-        <img :src="item.dochead" style="width:100px;height:100px">
10
-        </div>
11
-        <div class="docname">
12
-        <span  class="zzcontent">{{item.docname}}</span>
13
-         </div>
14
-        <div class="docintroduction"><span  class="zzcontent" v-html="item.docintroduction"></span></div>
15
-       </div>
16
-    </div>  
17
-</template>
18
-
19
-<script>
20
-    export default {
21
-        name: "doctor-introduction",
22
-        data(){
23
-           return{
24
-              doctorInfos:[],  
25
-           } 
26
-        },
27
-        methods:{}
28
-    }
29
-</script>
30
-
31
-<style scoped>
32
-    .wq5{
33
-        width: 320px;
34
-        height: 290px;
35
-        /* background-color: rgba(242, 242, 242, 1); */
36
-        color: #ffffff;
37
-        /* border: solid 1px black; */
38
-     }
39
-    
40
-     .kefont{
41
-       font-size: 14px;
42
-       color: red;
43
-       margin-left: 8px;
44
-       margin-top: -20px;
45
-    }
46
-
47
-    .more{
48
-       position: absolute;
49
-       font-size: 14px;
50
-       color:black;
51
-       margin-left: 220px;
52
-       margin-top: -22px;
53
-     }
54
-
55
-    .logo{
56
-       position: absolute;
57
-       margin-left: 280px;
58
-       margin-top: -22px;
59
-     }
60
-     .content{
61
-       position: absolute;
62
-       font-size: 14px;
63
-       color: black;
64
-     }
65
-
66
-     
67
-     .famdoc{
68
-       position: relative;
69
-       width: 320px;
70
-       height: 130px;
71
-       background-color: rgba(242, 242, 242, 1);
72
-     }
73
-
74
-     .dochead{
75
-       width:100px;
76
-       height: 100px;
77
-     /* //  border:solid 1px green; */
78
-       margin-top: 10px;
79
-       margin-left: 10px;
80
-     }
81
-
82
-     .docname{
83
-       position: absolute;
84
-       width:50px;
85
-       height: 20px;
86
-      /* // border: solid 1px green; */
87
-       margin-left: 130px;
88
-       margin-top: -90px;
89
-       font-size: 14px;
90
-       color:black;
91
-     }
92
-    .zzcontent{
93
-     overflow: hidden;
94
-     text-overflow: ellipsis;
95
-     display: -webkit-box;
96
-     -webkit-line-clamp: 3;
97
-     -webkit-box-orient: vertical   
98
-   }   
99
-     .docintroduction{
100
-       position: absolute;
101
-       width: 150px;
102
-       height: 50px;
103
-      /* // border: solid 1px green; */
104
-       margin-left: 130px;
105
-       margin-top: -60px;
106
-       font-size: 14px;
107
-       color: black;
108
-     }
109
-</style>

+ 0 - 99
src/scrm_pages/site/components/hospital-introduction.vue Wyświetl plik

@@ -1,99 +0,0 @@
1
-<template>
2
-    <div class="wq3">                         
3
-      <img src="static\images\u.png" style="width:5px;height:20px;">                           
4
-      <div class="kefont"><span >医院介绍</span></div>
5
-      <div class="more" @click="more()">查看更多</div>
6
-      <div class="logo"><img src="static\images\u216.png"></div>
7
-      <div class="content">
8
-        <span v-html="hispitalform.introduction" id="content" class="yycontent"></span>
9
-       </div>    
10
-    </div>
11
-</template>
12
-
13
-<script>
14
-     import { GetHospitalInfo } from '@/api/site/site'
15
-    export default {
16
-        name: "hospital-introduction",
17
-        data(){
18
-          return{
19
-            hispitalform:{
20
-             title:"",
21
-             sort:"",
22
-             introduction:"",
23
-            },
24
-          }
25
-        },
26
-        methods:{
27
-             //获取医院介绍
28
-            GetHospitalInfo(){
29
-              GetHospitalInfo().then(response=>{
30
-               if(response.data.state == 1){
31
-                var hospital =  response.data.data.hospital;
32
-               this.hispitalform =  response.data.data.hospital;
33
-             // console.log("获取医院介绍数据",hospital);
34
-             }
35
-           })
36
-          },
37
-        },
38
-        created(){
39
-           this.GetHospitalInfo(); 
40
-        },
41
-         updated(){
42
-            let obj = document.getElementById('content');
43
-            console.log("obj是什么",obj)
44
-            let imgs =  obj.getElementsByTagName('img');
45
-            console.log("imgs",imgs)
46
-            for(let i=0;i<imgs.length;i++){
47
-            imgs[i].style.width = '332px';
48
-            imgs[i].style.height = '100px';
49
-         }
50
-       }
51
-    }
52
-</script>
53
-
54
-<style scoped>
55
-   
56
-     .wq3{
57
-        width: 320px;
58
-        height: 230px;
59
-        background-color: white;
60
-        color: #ffffff;
61
-      /* border: solid 1px black; */
62
-        margin-bottom: 0px;
63
-     }
64
-
65
-    .kefont{
66
-       font-size: 14px;
67
-       color: red;
68
-       margin-left: 8px;
69
-       margin-top: -20px;
70
-     }
71
-
72
-     .more{
73
-       position: absolute;
74
-       font-size: 14px;
75
-       color:black;
76
-       margin-left: 220px;
77
-       margin-top: -22px;
78
-     }
79
-
80
-    .logo{
81
-       position: absolute;
82
-       margin-left: 280px;
83
-       margin-top: -22px;
84
-     }
85
-
86
-      .content{
87
-       position: absolute;
88
-       font-size: 14px;
89
-       color: black;
90
-     }
91
-
92
-     .yycontent{
93
-     overflow: hidden;
94
-     text-overflow: ellipsis;
95
-     display: -webkit-box;
96
-     -webkit-line-clamp: 6;
97
-     -webkit-box-orient: vertical   
98
-   }
99
-</style>

+ 342 - 212
src/scrm_pages/site/components/new-feature.vue Wyświetl plik

@@ -57,8 +57,9 @@
57 57
   <el-dialog
58 58
     title="新增轮播图"
59 59
     :visible.sync="dialogVisible"
60
-    width="550px"
61
-    :before-close="handleClose">
60
+    width="35%"
61
+    :before-close="handleClose"
62
+    center>
62 63
     <el-form ref="rotationform" :model="rotationform" label-width="90px" :rules="rules" >
63 64
       <el-form-item label="模块标题:" required prop="title">
64 65
         <el-input v-model="rotationform.title"></el-input>
@@ -67,42 +68,33 @@
67 68
         <el-input v-model="rotationform.sort"></el-input>
68 69
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
69 70
       </el-form-item>
70
-      <el-form-item label="添加图片:" v-model="rotationform.rotationImages" required prop="rotationImages">
71
-        <div>
72
-        </div>
73
-         <el-upload
74
-          :data="rotationData"
75
-          action="https://upload.qiniup.com"
76
-          list-type="picture-card"
77
-         :on-success="RotationchartSuccess"
78
-         :before-upload="beforeRotationUpload"
79
-         v-show="show">
80
-        <i slot="default" class="el-icon-plus"></i>
81
-        <div slot="file" slot-scope="{file}">
82
-          <img
83
-           class="el-upload-list__item-thumbnail"
84
-           :src="file.url"
85
-          >
86
-        <span class="el-upload-list__item-actions"> 
87
-         <span
88
-           v-if="!disabled"
89
-           class="el-upload-list__item-delete"
90
-         >
91
-         <i class="el-icon-edit-outline" @click="rotationEditImages()"></i>
92
-          </span> 
93
-         <span
94
-           v-if="!disabled"
95
-           class="el-upload-list__item-delete"
96
-         >
97
-          <i class="el-icon-delete"></i>
98
-          </span> 
99
-         </span> 
100
-        </div> 
101
-     </el-upload>
102
-      <img  src="static/images/u679.png" @click="addpic()">
71
+        <el-form-item label="添加图片:" v-model="rotationform.rotationImages">
72
+         <div class="flex-img">
73
+              <div class="el-upload-list el-upload-list--picture-card" >            
74
+                  <div class="el-upload-list__item is-success" v-for="(item,index) in this.rotationdata" :key="item.id">             
75
+                    <img class="flex-img__image" :src="item.images">              
76
+                    <label class="el-upload-list__item-status-label">
77
+                     <i class="el-icon-upload-success el-icon-check"></i>
78
+                    </label>
79
+                     <span class="el-upload-list__item-actions">
80
+                    <span class="el-upload-list__item-delete">
81
+                    <i class="el-icon-edit-outline" @click="editImages(item.id);editcenterDialogVisible = true"></i>
82
+                    <i class="el-icon-delete" @click="deleteDoctor(item.id,index)"></i>
83
+                    </span>
84
+                    </span>
85
+                   </div>         
86
+                </div>     
87
+                <div class="addrot" @click="addpicVisible = true">
88
+                   <div class="addrotone">
89
+                     <i class="el-icon-plus"></i>
90
+                   </div>  
91
+                   <div class="addrotwo">
92
+                     <span>新增图片</span>
93
+                   </div>
94
+                </div>
95
+             </div>
103 96
       </el-form-item>
104
-       
105
-       <span class="uploadfont">图片已上传0张,最多上传9张图片</span>
97
+       <!-- <span class="uploadfont">图片已上传0张,最多上传9张图片</span> -->
106 98
     </el-form>
107 99
     <span slot="footer" class="dialog-footer">
108 100
       <el-button @click="dialogVisible = false">取 消</el-button>
@@ -114,49 +106,50 @@
114 106
    <el-dialog
115 107
      title="编辑图片"
116 108
      :visible.sync="addpicVisible"
117
-     width="30%"
118
-    >
119
-  <el-form ref="picform" :model="picform" label-width="90px">
120
-    <el-form-item label="图片编辑:">
109
+     width="35%"
110
+     center>
111
+  <el-form ref="picform" :model="picform" label-width="90px" :rules="rules">
112
+    <el-form-item label="图片编辑:" required prop="imageUrl">
121 113
       <el-col :span="5">
122 114
        <el-upload
123
-         :data="rotationData"
115
+         :data="imageData"
124 116
          class="avatar-uploader"
125 117
          action="https://upload.qiniup.com"
126 118
         :show-file-list="false"
127
-         :on-success="RotationchartSuccess"
128
-        :before-upload="beforeRotationUpload">
129
-        <img v-if="imageUrl" :src="imageUrl" class="avatar">
119
+         :on-success="rotationSuccess"
120
+        :before-upload="rotationUpload">
121
+        <img v-if="picform.imageUrl" :src="picform.imageUrl" class="avatar">
130 122
        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
131 123
       </el-upload>
132 124
       </el-col>
133
-      <el-col :span="19">
125
+      <!-- <el-col :span="19">
134 126
           <div class="tpic"> 
135
-            <img src="static/images/a.jpg">
127
+            <img src="static/images/a.jpg" style="width:250px;height:150px">
136 128
           </div>
137
-      </el-col>
129
+      </el-col> -->
138 130
     </el-form-item>
139
-    <el-form-item label="排序值:">
131
+    <el-form-item label="排序值:" required prop="sort">
140 132
        <el-col :span="24">
141
-         <el-input></el-input>
133
+         <el-input v-model="picform.sort" style="width:410px"></el-input>
142 134
        </el-col>   
143 135
     </el-form-item>
144
-    <el-form-item label="图片链接:">
145
-      <el-radio v-model="radio" label="1">无</el-radio>
146
-      <el-radio v-model="radio" label="2">自定义</el-radio> 
136
+    <el-form-item label="图片链接:" required prop="imagelink">
137
+        <el-radio-group v-model="picform.imagelink">
138
+          <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderOptions" :key="index" @change="select(gender.id)">{{gender.name}}</el-radio>
139
+        </el-radio-group>
147 140
     </el-form-item>
148
-    <el-form-item label="链接地址:">
149
-      <el-col :span="20">
150
-      <el-input></el-input>
141
+    <el-form-item label="链接地址:" required prop="linkaddress">
142
+      <el-col :span="15">
143
+      <el-input v-model="picform.linkaddress" v-show="selectone" style="width:300px"></el-input>
151 144
       </el-col>
152 145
       <el-col :span="4">
153
-       <el-button size="medium" @click="addlink()">设置链接</el-button>
146
+       <el-button size="medium" @click="addlink()" v-show="selectone">设置链接</el-button>
154 147
       </el-col>
155 148
     </el-form-item>
156 149
   </el-form>
157 150
   <span slot="footer" class="dialog-footer">
158 151
     <el-button @click="addpicVisible = false">取 消</el-button>
159
-    <el-button type="primary" @click="addpicVisible = false">确 定</el-button>
152
+    <el-button type="primary" @click="AddImageslink('picform');addpicVisible = false">确 定</el-button>
160 153
   </span>
161 154
 </el-dialog>
162 155
   
@@ -192,11 +185,9 @@
192 185
          </el-select>
193 186
        </el-form-item>
194 187
        <el-form-item >
195
-        <el-input style="width: 300px"  placeholder="请输入您需要搜索的内容"></el-input>
196
-          <el-button type="primary"  icon="el-icon-search">搜索</el-button>
197 188
        </el-form-item>
198 189
        <el-form-item label="自定义地址:">
199
-          <el-input></el-input>
190
+          <el-input style="width:350px"></el-input>
200 191
        </el-form-item>
201 192
      </el-form>
202 193
     <span slot="footer" class="dialog-footer">
@@ -296,7 +287,15 @@
296 287
             </div>         
297 288
         </div>        
298 289
     </div>
299
-      <img src="static/images/u646.png" @click="centerDialogVisible = true">
290
+      <!-- <img src="static/images/u646.png" @click="centerDialogVisible = true"> -->
291
+      <div class="doc" @click="centerDialogVisible = true">
292
+         <div class="docone">
293
+         <li class="el-icon-plus"></li>  
294
+         </div>
295
+         <div class="doctwo">
296
+            <span>新增名医</span>
297
+         </div>
298
+      </div>
300 299
       </el-form-item>
301 300
     </el-form>
302 301
     <span slot="footer" class="dialog-footer">
@@ -548,11 +547,11 @@
548 547
     </span>
549 548
   </el-dialog>
550 549
   <!-- 新增魔方导航 -->
551
-
552 550
     <el-dialog
553 551
     title="新增魔方导航"
554 552
     :visible.sync="eight"
555
-    width="550px">
553
+    width="550px"
554
+    center>
556 555
     <el-form ref="marginform" :model="marginform" label-width="90px" :rules="rules" >
557 556
       <el-form-item label="模块标题:" required prop="title">
558 557
         <el-input v-model="marginform.title"></el-input>
@@ -561,44 +560,36 @@
561 560
         <el-input v-model="marginform.sort"></el-input>
562 561
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
563 562
       </el-form-item>
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"
570
-          list-type="picture-card"
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"
579
-          >
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()">
563
+       <el-form-item label="添加图片:" v-model="marginform.marginImages" required prop="marginImages">
564
+         <div class="flex-img">
565
+              <div class="el-upload-list el-upload-list--picture-card" v-for="item in margindata" :key="item.id">            
566
+                  <div class="el-upload-list__item is-success">             
567
+                    <img class="flex-img__image" :src="item.margimage">              
568
+                    <label class="el-upload-list__item-status-label">
569
+                     <i class="el-icon-upload-success el-icon-check"></i>
570
+                    </label>
571
+                     <span class="el-upload-list__item-actions">
572
+                    <span class="el-upload-list__item-delete">
573
+                    <i class="el-icon-edit-outline" @click="editImages(item.id);editcenterDialogVisible = true"></i>
574
+                    <i class="el-icon-delete" @click="deleteDoctor(item.id,index)"></i>
575
+                    </span>
576
+                    </span>
577
+                   </div>         
578
+                </div>     
579
+                <div class="upic" @click="MagicNavigation = true">
580
+                  <div class="icon">
581
+                     <i class="el-icon-plus"></i>
582
+                  </div>
583
+                  <div class="ufont">
584
+                      <span>新增导航</span>
585
+                  </div>
586
+                </div>
587
+         </div>
597 588
       </el-form-item>
598 589
     </el-form>
599 590
     <span slot="footer" class="dialog-footer">
600 591
       <el-button @click="eight = false">取 消</el-button>
601
-      <el-button type="primary" @click="AddRotationChart('rotationform')">确 定</el-button>
592
+      <el-button type="primary" @click="AddMarginChart('marginform');">确 定</el-button>
602 593
     </span>
603 594
   </el-dialog>
604 595
  
@@ -606,13 +597,13 @@
606 597
    <el-dialog
607 598
      title="编辑魔法导航"
608 599
      :visible.sync="MagicNavigation"
609
-     width="40%"
600
+     width="35%"
610 601
      center>
611 602
      <el-form  label-width="90px"  ref="editmarginform" :model="editmarginform" :rules="rules">
612
-       <el-form-item label="导航标题:" prop="title">
603
+       <el-form-item label="导航标题:" required prop="margtitle">
613 604
          <el-input style="width:400px" v-model="editmarginform.margtitle"></el-input>
614 605
        </el-form-item>
615
-       <el-form-item label="导航图标:" prop="margimage">
606
+       <el-form-item label="导航图标:" required prop="margImage" >
616 607
        <el-upload
617 608
          class="avatar-uploader"
618 609
           :data="magicData"
@@ -624,14 +615,14 @@
624 615
          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
625 616
        </el-upload>
626 617
        </el-form-item>
627
-       <el-form-item label="跳转设置">
628
-         <el-radio-group v-model="form.gender">
618
+       <el-form-item label="跳转设置" required prop="jumpset">
619
+         <el-radio-group v-model="editmarginform.jumpset">
629 620
             <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 621
           </el-radio-group>
631 622
        </el-form-item>
632 623
        <el-form-item>
633
-         <el-col :span="12" v-mode="editmarginform.marginaddress">
634
-          <el-input style="width:300px" v-show="define"></el-input>
624
+         <el-col :span="15">
625
+           <el-input style="width:300px" v-model="editmarginform.marginaddress" v-show="define"></el-input>
635 626
         </el-col>
636 627
         <el-col :span="4">
637 628
          <el-button size="medium" @click="setlink()" v-show="define">设置链接</el-button>
@@ -640,7 +631,7 @@
640 631
      </el-form>
641 632
     <span slot="footer" class="dialog-footer">
642 633
     <el-button @click="MagicNavigation = false">取 消</el-button>
643
-    <el-button type="primary" @click="MagicNavigation = false">确 定</el-button>
634
+    <el-button type="primary" @click="AddMagicNavi('editmarginform');MagicNavigation = false">确 定</el-button>
644 635
   </span>
645 636
 </el-dialog> 
646 637
 
@@ -693,7 +684,8 @@
693 684
 </template>
694 685
 
695 686
 <script>
696
-   import { AddRotationChart, saveHispital,addOffices,AddDoctor,AddDoctorInfo,AddOfficeEnvironment,getQueryDocInfo,change,getQueryDoCHead,editDoctor,saveDocInfo,deleteDoctor } from '@/api/site/site'  
687
+   import { AddRotationChart, saveHispital,addOffices,AddDoctor,AddDoctorInfo,AddOfficeEnvironment,getQueryDocInfo,change,
688
+   getQueryDoCHead,editDoctor,saveDocInfo,deleteDoctor,AddImageslink,getEditImages,AddMagicNavi,getMagicImages,AddMarginChart} from '@/api/site/site'  
697 689
    import { getToken } from '@/api/qiniu'
698 690
    import { getFileExtension} from '@/utils/tools'
699 691
    import { isIP } from 'net';
@@ -704,6 +696,7 @@
704 696
    import 'quill/dist/quill.bubble.css'
705 697
    import { constants } from 'crypto';
706 698
 import { fail } from 'assert';
699
+import { get } from 'http';
707 700
 export default {
708 701
   name: "newfeature",
709 702
   components:{
@@ -741,6 +734,7 @@ export default {
741 734
        definetwo:false,
742 735
        definethree:false,
743 736
        definefour:false,
737
+       selectone:true,
744 738
        docnames:[],
745 739
        radio: '1',
746 740
        radiotwo:'2',
@@ -795,10 +789,13 @@ export default {
795 789
       rotationData: { token:'',key: '' },
796 790
       magicData:{ token:'',key:''},
797 791
       keData: { token: '' ,key: ''},
792
+      imageData: { token:'',key: ''},
798 793
       file: this.image ? this.image : '',
799 794
       hideShow:false,
800 795
       show:false,
801 796
       centerDialogVisible:false,
797
+      rotationdata:[],
798
+      margindata:[],
802 799
       filelist:[],
803 800
       radio:3,
804 801
       form: {
@@ -855,6 +852,7 @@ export default {
855 852
         margtitle:"",
856 853
         margImage:"",
857 854
         marginaddress:"",
855
+        jumpset:"",
858 856
       },
859 857
       keform:{
860 858
         title:"",
@@ -862,7 +860,10 @@ export default {
862 860
         keImages:[],
863 861
       },
864 862
       picform:{
865
-
863
+        imageUrl:"",
864
+        sort:"",
865
+        imagelink:"",
866
+        linkaddress:"",
866 867
       },
867 868
 
868 869
        rules: {
@@ -881,19 +882,15 @@ export default {
881 882
          rotationImages:[{required:true,message:"请填写添加图片"}],
882 883
          keimages:[{required:true,message:"请填写新增科室环境"}],
883 884
          user_title:[{required:true,message:"请填写医生职称"}],
884
-         docimages:[{required:true,message:"请填写新增名医"}]
885
+         docimages:[{required:true,message:"请填写新增名医"}],
886
+         linkaddress:[{required:true,message:"请填写链接地址"}],
887
+         imageUrl:[{required:true,message:"请填写图片编辑"}],
888
+         margtitle:[{required:true,message:"请填写导航标题"}]
885 889
       },
886 890
     };
887 891
   },
888 892
   // 医院介绍模块
889 893
   methods:{  
890
-    
891
-      addpic(){
892
-       this.addpicVisible = true;
893
-      },
894
-      addmagin(){
895
-        this.MagicNavigation = true
896
-      },
897 894
       addlink(){
898 895
         this.linkVisible = true;
899 896
       },
@@ -916,14 +913,17 @@ export default {
916 913
         this.doctorform.docimages.push(this.qiniuDomain + res.url)
917 914
       },
918 915
       beforeUpload(file) {   
919
-        const isJPG = file.type === 'image/jpeg';
916
+        var fileType = file.type
917
+        const isJPG = fileType.indexOf("image") > -1;
920 918
         const isLt2M = file.size / 1024 / 1024 < 2;
921 919
         if (!isJPG) {
922
-          this.$message.error('上传头像图片只能是 JPG 格式!');
920
+          this.$message.error("只能上传图片");
921
+           return false;
922
+          }
923
+         if (!isLt2M) {
924
+           this.$message.error("图片大小不能超过 2MB!");
925
+           return false;
923 926
          }
924
-        if (!isLt2M) {
925
-          this.$message.error('上传头像图片大小不能超过 2MB!');
926
-        }
927 927
            var date = new Date()
928 928
             var ext = getFileExtension(file.name)
929 929
             var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
@@ -945,6 +945,43 @@ export default {
945 945
             })
946 946
 
947 947
         },
948
+
949
+        rotationSuccess(res,file){
950
+          this.picform.imageUrl = this.qiniuDomain + res.url;
951
+        },
952
+
953
+        rotationUpload(file){
954
+            var fileType = file.type
955
+            const isJPG = fileType.indexOf("image") > -1;
956
+            const isLt2M = file.size / 1024 / 1024 < 2;
957
+            if (!isJPG) {
958
+                this.$message.error("只能上传图片");
959
+                return false;
960
+            }
961
+            if (!isLt2M) {
962
+                this.$message.error("图片大小不能超过 2MB!");
963
+                return false;
964
+         }
965
+           var date = new Date()
966
+            var ext = getFileExtension(file.name)
967
+            var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
968
+            this.uploading = true;
969
+            this.loadingText = '封面图片上传中'
970
+
971
+            const _self = this
972
+            return new Promise((resolve, reject) => {
973
+                getToken().then(response => {
974
+                    const tokentree = response.data.data.uptoken
975
+                    console.log("token是什么?",tokentree)
976
+                    _self._data.imageData.token = tokentree;
977
+                    _self._data.imageData.key = key;
978
+                    resolve(true)
979
+                }).catch(err => {
980
+                    reject(false)
981
+                    this.uploading = false;
982
+                })
983
+            })   
984
+        },
948 985
         handleRemove() {
949 986
             this.file = '';
950 987
       },
@@ -1036,17 +1073,18 @@ export default {
1036 1073
          console.log("轮播图地址",this.rotationform.rotationImages); 
1037 1074
       },
1038 1075
       beforeRotationUpload(file){
1039
-           console.log("尺寸",file.size)
1040
-        const isJPG = file.type === 'image/jpeg';
1041
-        const isLt2M = file.size / 1024 / 1024 < 2;
1042
-       
1043
-        if (!isJPG) {
1044
-          this.$message.error('上传头像图片只能是 JPG 格式!');
1045
-        }
1046
-        if (!isLt2M) {
1047
-          this.$message.error('上传头像图片大小不能超过 2MB!');
1048
-        }
1049
-      
1076
+          var fileType = file.type
1077
+          const isJPG = fileType.indexOf("image") > -1;
1078
+          const isLt2M = file.size / 1024 / 1024 < 2;
1079
+          if (!isJPG) {
1080
+             this.$message.error("只能上传图片");
1081
+            return false;
1082
+          }
1083
+          if (!isLt2M) {
1084
+            this.$message.error("图片大小不能超过 2MB!");
1085
+             return false;
1086
+         }
1087
+
1050 1088
          var date = new Date()
1051 1089
             var ext = getFileExtension(file.name)
1052 1090
             var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
@@ -1074,15 +1112,17 @@ export default {
1074 1112
       },
1075 1113
 
1076 1114
       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
-        }
1115
+            var fileType = file.type
1116
+            const isJPG = fileType.indexOf("image") > -1;
1117
+            const isLt2M = file.size / 1024 / 1024 < 2;
1118
+            if (!isJPG) {
1119
+                this.$message.error("只能上传图片");
1120
+                return false;
1121
+            }
1122
+            if (!isLt2M) {
1123
+                this.$message.error("图片大小不能超过 2MB!");
1124
+                return false;
1125
+         }
1086 1126
       
1087 1127
          var date = new Date()
1088 1128
             var ext = getFileExtension(file.name)
@@ -1105,6 +1145,12 @@ export default {
1105 1145
 
1106 1146
       //新增轮播图
1107 1147
       AddRotationChart(formName){
1148
+            var sorts =  this.rotationform.sort;
1149
+            var sort = parseInt(sorts);
1150
+            this.rotationform.sort = sort;
1151
+            for (let index = 0; index < this.rotationdata.length; index++) {
1152
+            this.rotationform.rotationImages.push(this.rotationdata[index].images);       
1153
+          }
1108 1154
           this.$refs[formName].validate((valid)=>{
1109 1155
             if(valid){
1110 1156
               AddRotationChart(this.rotationform).then(response=>{
@@ -1276,15 +1322,18 @@ export default {
1276 1322
          console.log("图片数组",this.keform.keImages)
1277 1323
       },
1278 1324
       beforekeUpload(file){
1279
-        const isJPG = file.type === 'image/jpeg';
1280
-        const isLt2M = file.size / 1024 / 1024 < 2;
1281
-        console.log("图片尺寸",file.size)
1282
-        if (!isJPG) {
1283
-          this.$message.error('上传头像图片只能是 JPG 格式!');
1284
-         }
1285
-        if (!isLt2M) {
1286
-          this.$message.error('上传头像图片大小不能超过 2MB!');
1287
-        }
1325
+            var fileType = file.type
1326
+            const isJPG = fileType.indexOf("image") > -1;
1327
+            const isLt2M = file.size / 1024 / 1024 < 2;
1328
+            if (!isJPG) {
1329
+                this.$message.error("只能上传图片");
1330
+                return false;
1331
+            }
1332
+            if (!isLt2M) {
1333
+                this.$message.error("图片大小不能超过 2MB!");
1334
+                return false;
1335
+            }
1336
+
1288 1337
            var date = new Date()
1289 1338
             var ext = getFileExtension(file.name)
1290 1339
             var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
@@ -1319,9 +1368,6 @@ export default {
1319 1368
            }
1320 1369
          })
1321 1370
       },
1322
-      add(){
1323
-     
1324
-      },
1325 1371
      selectGender(id){
1326 1372
         if(id == 1){
1327 1373
           this.define = true;
@@ -1354,11 +1400,91 @@ export default {
1354 1400
          this.definetwo = false;
1355 1401
          this.definethree = false;
1356 1402
        }
1357
-     }
1403
+     },
1404
+     select(id){
1405
+        if(id == 1){
1406
+          this.selectone = true;
1407
+        }
1408
+
1409
+        if(id == 2){
1410
+          this.selectone = false;
1411
+        }
1412
+     },
1413
+
1414
+     AddImageslink(formName){
1415
+          var sorts = this.picform.sort
1416
+          var sort = parseInt(sorts)
1417
+          this.picform.sort = sort
1418
+          console.log("hhhe",this.picform.sort)
1419
+        this.$refs[formName].validate((valid)=>{
1420
+          if(valid){
1421
+             AddImageslink(this.picform).then(response=>{
1422
+                if(response.data.state ==1){
1423
+                  var editpiclink = response.data.data.editpiclink;
1424
+                  console.log("数据返回",editpiclink)
1425
+                }
1426
+             })
1427
+          }
1428
+        })
1429
+     },
1430
+     getEditImages(){
1431
+       getEditImages().then(response=>{
1432
+         if(response.data.state == 1){
1433
+          var editpiclinks = response.data.data.editpiclinks;
1434
+          this.rotationdata = response.data.data.editpiclinks;
1435
+          console.log("好嗨哦",editpiclinks)
1436
+         }
1437
+       })
1438
+     },
1439
+
1440
+     AddMagicNavi(formName){
1441
+        this.$refs[formName].validate((valid)=>{
1442
+          if(valid){
1443
+            AddMagicNavi(this.editmarginform).then(response=>{
1444
+              if(response.data.state == 1){
1445
+               var editmargin  = response.data.data.editmargin;
1446
+               
1447
+              }
1448
+            })
1449
+          }
1450
+        }) 
1451
+     },
1452
+
1453
+     getMagicImages(){
1454
+       getMagicImages().then(response=>{
1455
+           if(response.data.state == 1){
1456
+             var editmargins = response.data.data.editmargins;
1457
+             this.margindata = response.data.data.editmargins;
1458
+             
1459
+             console.log("这个是什么",editmargins);
1460
+           }
1461
+       })
1462
+     },
1463
+       AddMarginChart(formName){
1464
+         var sorts = this.marginform.sort
1465
+          var sort = parseInt(sorts)
1466
+          this.marginform.sort = sort
1467
+          for (let index = 0; index < this.margindata.length; index++) {
1468
+            this.marginform.marginImages.push(this.margindata[index].margimage);          
1469
+          }
1470
+      this.$refs[formName].validate((valid)=>{
1471
+        if(valid){
1472
+          AddMarginChart(this.marginform).then(response=>{
1473
+             if(response.data.state ==1){
1474
+              var macnavigation = response.data.data.macnavigation;
1475
+              this.eight = false;
1476
+              console.log("数据",macnavigation)
1477
+             }
1478
+          })
1479
+        }
1480
+      })
1481
+  },
1358 1482
   },  
1359 1483
    created(){
1360 1484
      this.getQueryDocInfo();
1361 1485
      this.getQueryDoCHead();  
1486
+     this.getEditImages();
1487
+     this.getMagicImages();
1362 1488
    },
1363 1489
  };
1364 1490
 </script>
@@ -1437,67 +1563,71 @@ export default {
1437 1563
     margin-left: 25px;
1438 1564
     margin-top: 25px;
1439 1565
     text-align: center;
1440
-  }
1441
-  
1442
-</style>
1443
-<style  /deep/scoped>
1444
-     .disabled {
1445
-        display: none;
1446
-    }
1566
+  }  
1447 1567
 
1448
-    .el-upload--picture-card {
1449
-        height: auto
1450
-    }
1451
-
1452
-    .el-upload-list--picture-card .el-upload-list__item {
1453
-        height: auto;
1454
-    }
1455
-
1456
-    .el-upload-list--picture-card .el-upload-list__item {
1457
-        overflow: hidden;
1458
-        background-color: #fff;
1459
-        border: 1px solid #c0ccda;
1460
-        border-radius: 6px;
1461
-        -webkit-box-sizing: border-box;
1462
-        box-sizing: border-box;
1463
-        width: 148px;
1464
-        height: auto;
1465
-        margin: 0 8px 8px 0;
1466
-        display: inline-block;
1467
-    }
1468
-
1469
-    .el-upload-list__item.is-success .el-upload-list__item-status-label {
1470
-        display: block;
1471
-        position: absolute;
1472
-        right: -15px;
1473
-        top: -6px;
1474
-        width: 40px;
1475
-        height: 24px;
1476
-        background: #13ce66;
1477
-        text-align: center;
1478
-        -webkit-transform: rotate(45deg);
1479
-        transform: rotate(45deg);
1480
-        -webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
1481
-        box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
1482
-    }
1483
-
1484
-    .el-upload-list--picture-card .el-upload-list__item-actions {
1485
-        position: absolute;
1486
-        width: 100%;
1487
-        height: 100%;
1488
-        left: 0;
1489
-        top: 0;
1490
-        cursor: default;
1491
-        text-align: center;
1492
-        color: #fff;
1493
-        opacity: 0;
1494
-        font-size: 20px;
1495
-        background-color: rgba(0, 0, 0, 0.5);
1496
-        -webkit-transition: opacity .3s;
1497
-        transition: opacity .3s;
1498
-    }
1568
+  .upic{
1569
+    width: 146px;
1570
+    height:146px;
1571
+    border: dashed 1px #409EFF;
1572
+    background-color: white;
1573
+    font-size: 40px;
1574
+  }
1575
+  .icon{
1576
+    width: 40px;
1577
+    height: 40px;
1578
+    // border: solid 1px red;
1579
+    margin-left: 60px;
1580
+    margin-top: 50px;
1581
+  }
1582
+  .ufont{
1583
+    width:80px;
1584
+    height: 28px;
1585
+    // border:solid 1px red;
1586
+    margin-left: 55px;
1587
+    font-size: 14px;
1588
+  }
1499 1589
 
1590
+  .addrot{
1591
+    width:146px;
1592
+    height: 146px;
1593
+    border: dashed 1px #409EFF;
1594
+    margin-left: 10px;
1595
+    background-color: white;
1596
+  }
1597
+  .addrotone{
1598
+    font-size: 50px;
1599
+    width:50px;
1600
+    height: 50px;
1601
+    // border: solid 1px red;
1602
+    margin-left: 50px;
1603
+    margin-top: 50px;
1604
+  }
1605
+  .addrotwo{
1606
+    width:60px;
1607
+    height: 30px;
1608
+    // border: dashed 1px #409EFF;
1609
+    margin-left: 50px;
1610
+  }
1500 1611
 
1612
+  .doc{
1613
+    width: 146px;
1614
+    height:146px;
1615
+    border: dashed 1px #409EFF;
1616
+  }
1501 1617
 
1618
+  .docone{
1619
+    width: 50px;
1620
+    height: 50px;
1621
+    // border: solid 1px red;
1622
+    margin-top: 50px;
1623
+    margin-left: 50px;
1624
+    font-size: 50px;
1625
+  }
1626
+  .doctwo{
1627
+    width: 60px;
1628
+    height: 30px;
1629
+    margin-left: 50px;
1630
+    // border: solid 1px red;
1631
+  }
1502 1632
 </style>
1503 1633
 

+ 0 - 98
src/scrm_pages/site/components/office-environment.vue Wyświetl plik

@@ -1,98 +0,0 @@
1
-<template>
2
-     <div class="wq6">
3
-        <img src="static\images\u.png" style="width:5px;height;20px;">
4
-        <div class="kefont"><span >科室环境</span></div>
5
-        <div class="more" @click="more()">查看更多</div>
6
-        <div class="logo"><img src="static\images\u216.png"></div>                                
7
-        <div class="swiper-container" id="swiper2">
8
-         <div class="swiper-wrapper" id="wrapper2">
9
-          <div class="swiper-slide" v-for="item in keEnvironmentImages" :key="item.id">
10
-           <img :src="item" style="width:150px;height:125px;border-radius:5px;"/>
11
-          </div>
12
-         </div>
13
-        </div>
14
-    </div>
15
-</template>
16
-
17
-<script>
18
-    import { GetOffEnvironment } from '@/api/site/site'
19
-    export default {
20
-        name: "office-environment",
21
-        data(){
22
-           return{
23
-             keEnvironmentImages:[],
24
-           }
25
-        },
26
-        methods:{
27
-         //获取科室环境
28
-          GetOffEnvironment(){
29
-             GetOffEnvironment().then(response=>{
30
-             if(response.data.state == 1){
31
-              var offenvironment = response.data.data.offenvironment;
32
-              console.log("获取科室环境",offenvironment);
33
-              console.log("获取轮播图片",offenvironment.keimages);
34
-              var str = offenvironment.keimages;
35
-              var Images = [];
36
-              Images = str.split(",");
37
-              console.log("数组",Images);
38
-             this.keEnvironmentImages =  Images;
39
-            }
40
-          });
41
-         },
42
-        },
43
-        created(){
44
-           this.GetOffEnvironment();
45
-        },
46
-        mounted(){
47
-            var mySwiper = new Swiper('#swiper2', {
48
-                direction:"horizontal",
49
-                loop: true, // 循环播放,
50
-                spaceBetween:1,
51
-                loopAdditionalSlides:10,
52
-                slidesPerView: 'auto', // 设置slider容器能够同时显示的slides数量
53
-                centeredSlides: true, // active slide 居中
54
-                observer:true,//动态加载图片
55
-                observeParents:true,
56
-                pagination: {
57
-                    el: '.swiper-pagination',
58
-                },
59
-            });
60
-        },
61
-        
62
-    }
63
-</script>
64
-
65
-<style scoped>
66
-   .wq6{
67
-    width: 320px;
68
-    height: 165px;
69
- /* // background-color: red; */
70
-    color: #ffffff;
71
- /* // border: solid 1px black; */
72
-    margin-bottom: 0px;
73
-  }
74
-   #wrapper2{
75
-     width: 50%;
76
-   }
77
-   .kefont{
78
-      font-size: 14px;
79
-       color: red;
80
-       margin-left: 8px;
81
-       margin-top: -20px;
82
-    }
83
-
84
-     .more{
85
-       position: absolute;
86
-       font-size: 14px;
87
-       color:black;
88
-       margin-left: 220px;
89
-       margin-top: -22px;
90
-     }
91
-
92
-     
93
-    .logo{
94
-       position: absolute;
95
-       margin-left: 280px;
96
-       margin-top: -22px;
97
-     }
98
-</style>

+ 0 - 97
src/scrm_pages/site/components/office-introduction.vue Wyświetl plik

@@ -1,97 +0,0 @@
1
-<template>
2
-     <div class="wq4">                         
3
-        <img src="static\images\u.png" style="width:5px;height:20px;">                           
4
-        <div class="kefont"><span >{{officeform.title}}</span></div>
5
-         <div class="more" @click="kemore()">查看更多</div>
6
-        <div class="logo"><img src="static\images\u216.png"></div>
7
-        <div class="content">
8
-         <span v-html="officeform.introduction" id="officecontent" class="xxcontent"></span>
9
-        </div>
10
-     </div>
11
-</template>
12
-
13
-<script>
14
-    import { GetOfficeInfo } from '@/api/site/site'
15
-    export default {
16
-        name: "office-introduction",
17
-        data(){
18
-          return{
19
-            officeform:{
20
-              title:"",
21
-              sort:"",
22
-              introduction:"", 
23
-           },
24
-          }
25
-        },
26
-        methods:{      
27
-     //获取科室介绍
28
-       GetOfficeInfo(){
29
-         GetOfficeInfo().then(response=>{
30
-           if(response.data.state == 1){
31
-             var offices =   response.data.data.offices;
32
-             this.officeform =  response.data.data.offices;
33
-            // console.log("获取科室介绍数据",offices);
34
-           }
35
-          })
36
-         },
37
-        },
38
-        created(){
39
-          this.GetOfficeInfo();
40
-        },
41
-        updated(){
42
-            let officObj =  document.getElementById('officecontent');
43
-            console.log("officeObj是什么",officObj)
44
-            let officeImages =  officObj.getElementsByTagName('img');
45
-            console.log("officeImages",officeImages)
46
-           for(let i=0;i<officeImages.length;i++){
47
-             officeImages[i].style.width = '332px';
48
-             officeImages[i].style.height = '100px';
49
-           }  
50
-        }
51
-    }
52
-</script>
53
-
54
-<style scoped>
55
-   .wq4{
56
-        width: 320px;
57
-        height: 230px;
58
-        background-color: white;
59
-        color: #ffffff;
60
-       /* border: solid 1px black; */
61
-        margin-bottom: 0px;
62
-     }
63
-
64
-      .kefont{
65
-       font-size: 14px;
66
-       color: red;
67
-       margin-left: 8px;
68
-       margin-top: -20px;
69
-     }
70
-
71
-     .more{
72
-       position: absolute;
73
-       font-size: 14px;
74
-       color:black;
75
-       margin-left: 220px;
76
-     }
77
-
78
-    .logo{
79
-       position: absolute;
80
-       margin-left: 280px;
81
-     }
82
-
83
-      .content{
84
-       position: absolute;
85
-       font-size: 14px;
86
-       color: black;
87
-     }
88
-
89
-    .xxcontent{
90
-     overflow: hidden;
91
-     text-overflow: ellipsis;
92
-     display: -webkit-box;
93
-     -webkit-line-clamp: 6;
94
-     -webkit-box-orient: vertical   
95
-   }
96
-
97
-</style>

+ 0 - 338
src/scrm_pages/site/components/parent-component.vue Wyświetl plik

@@ -1,338 +0,0 @@
1
-<template>
2
-   <div>
3
-    <div v-for="item in this.patientModels" :key="item.id">
4
-     <div class="parent">  
5
-       <!--医院介绍-->
6
-       <div v-if="item.mode_type == 2" class="modetwo"> 
7
-           <img src="static\images\u.png" style="width:5px;height:20px;">
8
-           <div class="kefont"><span >{{item.title}}</span></div>   
9
-           <div class="more" @click="more()">查看更多</div>
10
-           <div class="logo"><img src="static\images\u216.png"></div>  
11
-           <div class="content">
12
-             <span v-html="item.Hospitals.introduction" id="content" class="yycontent"></span>
13
-          </div>
14
-        </div>
15
-       <!-- 科室介绍 -->
16
-       <div v-if="item.mode_type == 3" class="modethree">
17
-           <img src="static\images\u.png" style="width:5px;height:20px;">
18
-           <div class="kefont"><span >{{item.title}}</span></div>   
19
-           <div class="more" @click="more()">查看更多</div>
20
-           <div class="logo"><img src="static\images\u216.png"></div>  
21
-           <div class="xcontent">
22
-             <span v-html="item.Offices.introduction" id="ycontent" class="zzcontent"></span>
23
-           </div>
24
-        </div>
25
-
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>
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>
61
-   </div>  
62
-   </div> 
63
-</template>
64
-
65
-<script>
66
-  import { getQueryNewModel,getHospital,getHospitaldata } from '@/api/site/site' 
67
-  import Swiper from "swiper"; 
68
-  import { truncateSync } from 'fs';
69
-    export default {
70
-        name: "parent-component",
71
-        data(){
72
-          return{
73
-            modeltitle:[],
74
-            hospitalform:[],
75
-            patientModels:[],  
76
-            keEnvironmentImages:[],     
77
-            doctors:[],
78
-            
79
-          }  
80
-        },
81
-        methods:{
82
-         more(){
83
-           alert("aaaa")
84
-         },
85
-         getHospital(){
86
-            getHospital().then(response=>{
87
-                if(response.data.state == 1){
88
-                  this.hospitalform = response.data.data.hostital;
89
-                  // console.log("中国第一人",this.hospitalform);
90
-                }
91
-            }) 
92
-         },
93
-          getHospitaldata(){
94
-           getHospitaldata(this.patientModels).then(response=>{
95
-                if(response.data.state == 1){
96
-                  var str = "";
97
-                 this.patientModels = response.data.data.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;
106
-                }
107
-           })
108
-         },
109
-        },
110
-        created(){
111
-            this.getHospital();
112
-            this.getHospitaldata();
113
-        },
114
-         updated(){
115
-            let obj = document.getElementById('content');
116
-          
117
-            let imgs =  obj.getElementsByTagName('img');
118
-          
119
-            for(let i=0;i<imgs.length;i++){
120
-            imgs[i].style.width = '332px';
121
-            imgs[i].style.height = '100px';            
122
-         }
123
-          let ycontent = document.getElementById('ycontent');
124
-         
125
-          let ximgs = ycontent.getElementsByTagName('img');
126
-         
127
-          for(let j=0;j<ximgs.length;j++){
128
-             ximgs[j].style.width = '332px';
129
-             ximgs[j].style.height = '100px';
130
-          }
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
-        },
149
-    }
150
-</script>
151
-
152
-<style scoped>
153
-
154
-    .clickmore{
155
-      width: 200px;
156
-      height: 200px;
157
-      border: solid 1px red;
158
-    }
159
-
160
-    .parent{
161
-      width: 320px;
162
-      height: 230px;
163
-      /* background-color:  rgba(204, 204, 204, 1); */
164
-    }
165
-
166
-    .box{
167
-      width: 320px;
168
-      height: 8px;
169
-      background-color: rgba(204, 204, 204, 1);  
170
-    }
171
-
172
-    .modetwo{
173
-      width: 320px;
174
-      height: 220px;
175
-      /* border: solid 1px red;   */
176
-      /* background-color: red; */
177
-    }
178
-    .modethree{
179
-       width: 320px;
180
-      height: 220px;
181
-      /* border: solid 1px blue;   */
182
-      /* background-color: blue; */
183
-    }
184
-
185
-    .modefour{
186
-      width:320px;
187
-      height: 230px;
188
-    }
189
-
190
-    .modefive{
191
-      width:320px;
192
-      height: 220px;
193
-    }
194
-
195
-     .logo{
196
-       position: absolute;
197
-       margin-left: 280px;
198
-       margin-top: -16px;
199
-     }
200
-     .kefont{
201
-       font-size: 14px;
202
-       color: red;
203
-       margin-left: 8px;
204
-       margin-top: -20px;
205
-     }
206
-
207
-     .more{
208
-       position: absolute;
209
-       font-size: 14px;
210
-       color:black;
211
-       margin-left: 220px;
212
-       margin-top: -15px;
213
-     }
214
-
215
-    .content{
216
-       position: absolute;
217
-       font-size: 14px;
218
-       color: black;
219
-       margin-top: 6px;
220
-     }
221
-
222
-     .xcontent{
223
-       position: absolute;
224
-       font-size: 14px;
225
-       color: black;
226
-       margin-top: 6px;
227
-     }
228
-
229
-    .yycontent{
230
-     overflow: hidden;
231
-     text-overflow: ellipsis;
232
-     display: -webkit-box;
233
-     -webkit-line-clamp: 6;
234
-     -webkit-box-orient: vertical   
235
-   }
236
-
237
-    .zzcontent{
238
-     overflow: hidden;
239
-     text-overflow: ellipsis;
240
-     display: -webkit-box;
241
-     -webkit-line-clamp: 6;
242
-     -webkit-box-orient: vertical   
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
-   }
338
-</style>

+ 0 - 61
src/scrm_pages/site/components/rotation-image.vue Wyświetl plik

@@ -1,61 +0,0 @@
1
-<template>
2
-  <div>
3
-     <div class="wq">
4
-        <div class="swiper-slide">
5
-            <mt-swipe :auto="4000">
6
-              <mt-swipe-item v-for="item in rotationImages" :key="item.id">
7
-                  <img :src="item" style="width:480px;height:250px">
8
-              </mt-swipe-item>
9
-            </mt-swipe>
10
-        </div>
11
-     </div>
12
- </div>
13
-</template>
14
-
15
-<script>
16
-    import { GetRationImages } from '@/api/site/site'
17
-    export default {
18
-        name: "rotation-image",
19
-        data(){
20
-           return{
21
-             rotationImages:[],  
22
-             rotationform:[],            
23
-           } 
24
-        },
25
-
26
-        methods:{
27
-        //获取轮播图
28
-         GetRationImages(){
29
-          GetRationImages().then(response=>{
30
-            if(response.data.state ==1){
31
-                var rotation =  response.data.data.rotationImages;    
32
-                this.rotationform =  response.data.data.rotationImages;    
33
-               console.log("获取轮播图数据",rotation)        
34
-              //  console.log("获取轮播图",rotation.rotation_images); 
35
-              //  var str = rotation.rotation_images;
36
-              //  var Images = [];
37
-              //  Images = str.split(",");
38
-              //  console.log("数组",Images)
39
-              //  this.rotationImages = Images;
40
-            }
41
-          })
42
-         },
43
-       },
44
-       created(){
45
-           this.GetRationImages();
46
-       }
47
-    }
48
-</script>
49
-
50
-
51
-<style rel="stylesheet/scss" lang="scss" scoped>
52
-     .wq{
53
-        width: 320px;
54
-        height: 185px;
55
-        background-color: rgba(204, 204, 204, 1);
56
-        color: #ffffff;
57
-      //  border: solid 1px red;
58
-        margin-bottom: 0px;
59
-    }
60
-
61
-</style>

+ 23 - 1
src/scrm_pages/site/index.vue Wyświetl plik

@@ -9,7 +9,7 @@
9 9
               <div class="success">
10 10
                 <h1 class="name">欢迎来到微官网主页</h1>
11 11
                 <div class="tips">您可以手机扫码访问或在右侧预览</div>
12
-                <div class="site-code"><img :src="codeImg" alt=""></div>
12
+                <div id="qrcode" class="qrcode"></div>
13 13
                 <router-link to="/site/preview">
14 14
                   <el-button type="primary">进入微官网后台</el-button>
15 15
                 </router-link>
@@ -25,6 +25,7 @@
25 25
 
26 26
 <script>
27 27
 import BreadCrumb from "../components/bread-crumb";
28
+import QRCode from 'qrcodejs2';
28 29
 export default {
29 30
   name: "site",
30 31
   components: {
@@ -35,6 +36,22 @@ export default {
35 36
       crumbs: [{ path: false, name: "微网站" }],
36 37
       codeImg: require("../../assets/home/wei.jpg")
37 38
     };
39
+  },
40
+  methods:{
41
+      qrcode () {
42
+      let qrcode = new QRCode('qrcode', {
43
+        width: 100,
44
+        height: 100, // 高度
45
+        text: '56663159' // 二维码内容
46
+        // render: 'canvas' // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
47
+        // background: '#f0f'
48
+        // foreground: '#ff0'
49
+      })
50
+      console.log(qrcode)
51
+    },
52
+  },
53
+  mounted(){
54
+    this.qrcode();
38 55
   }
39 56
 };
40 57
 </script>
@@ -63,5 +80,10 @@ export default {
63 80
       width: 100%;
64 81
     }
65 82
   }
83
+  .qrcode{
84
+    margin-bottom: 10px;
85
+    width: 100px;
86
+    height: 100px;
87
+  }
66 88
 }
67 89
 </style>

+ 201 - 41
src/scrm_pages/site/preview.vue Wyświetl plik

@@ -12,9 +12,10 @@
12 12
                         <span slot="label"  @click="myindex()">首页</span>
13 13
                         <el-tabs v-model="activeName">
14 14
                             <el-tab-pane label="新增模块" name="first">
15
-                                 <new-feature> </new-feature>                    
15
+                                 <new-feature></new-feature>                    
16 16
                             </el-tab-pane>
17
-                            <el-tab-pane label="已使用" name="second">
17
+                            <el-tab-pane>
18
+                                <span slot="label" name="second" @click="clickAddmodel()">已使用</span>
18 19
                                 <div class="used" v-for="(item,index) in this.modelform" :key="item.id">
19 20
                                   <ul>
20 21
                                    <li>
@@ -471,7 +472,6 @@
471 472
                     </el-form-item>
472 473
                     <el-form-item>
473 474
                       <el-col :span="18" >
474
-                        <!-- <el-input :disabled="true"  v-show="define" v-model="navigationform.navigationaddress"></el-input> -->
475 475
                         <el-input   v-show="define" v-model="navigationform.navigationaddress"></el-input> 
476 476
                      </el-col>
477 477
                     <el-col :span="4">
@@ -540,7 +540,14 @@
540 540
                      <div class="swiper-container swiper-no-swiping" id="swiper1">
541 541
                       <div class="swiper-wrapper" id="wrapper1">   
542 542
                          <div v-for="item in this.patientModels" :key="item.id" v-show="modelshowtwo">
543
-                            <div class="parent">  
543
+                           <!-- 轮播图 -->
544
+                             <div v-if="item.mode_type == 1" class="modeone">                                                                 
545
+                                 <mt-swipe :auto="4000" class="swipertwo">
546
+                                 <mt-swipe-item v-for="it in rotatationImages" :key="it.id">
547
+                                   <img :src="it" style="width:318px;height:230px" >
548
+                                 </mt-swipe-item>
549
+                                 </mt-swipe>                                                                             
550
+                             </div>
544 551
                               <!--医院介绍-->
545 552
                             <div v-if="item.mode_type == 2" class="modetwo"> 
546 553
                                <img src="static\images\u.png" style="width:5px;height:20px;">
@@ -570,14 +577,14 @@
570 577
                                 <div class="logo"><img src="static\images\u216.png"></div>
571 578
                                 <div class="docborde">
572 579
                                  <div class="docheart" v-for="doc in item.Editdoctor" :key="doc.id">
573
-                                 <div class="docimage">
574
-                                  <img :src="doc.dochead" style="height:80px;width:80px">
575
-                                  </div>
576
-                             <div class="doctitle"><span class="docnamefont">{{doc.doc_name}}</span></div>
577
-                              <div class="doccontent"><span class="xxcontent" v-html="doc.docintroduction"></span></div>
578
-                              </div>
580
+                                   <div class="docimage">
581
+                                    <img :src="doc.dochead" style="height:80px;width:80px">
582
+                                   </div>
583
+                                 <div class="doctitle"><span class="docnamefont">{{doc.doc_name}}</span></div>
584
+                                 <div class="doccontent"><span class="xxcontent" v-html="doc.docintroduction"></span></div>
585
+                               </div>
579 586
                               </div>
580
-                             </div>
587
+                          </div>
581 588
 
582 589
                             <!-- 科室环境 -->
583 590
                            <div v-if="item.mode_type == 5" class="modefive">
@@ -588,22 +595,25 @@
588 595
                             <div class="swiperimages">
589 596
                             <div class="swiper-container" id="swipertwo">
590 597
                             <div class="swiper-wrapper" id="wrapper2">
591
-                            <div class="swiper-slide"  v-for="it in item.OfficeEnviroment" :key="it.id">
592
-                             <img :src="it.keimages" style="width:150px;height:140px;border-radius:5px;"/>
598
+                            <div class="swiper-slide"  v-for="it in keEnvironmentImages" :key="it.id">
599
+                             <img :src="it" style="width:150px;height:140px;border-radius:5px;"/>
593 600
                            </div>
594 601
                            </div>
595 602
                            </div>
596 603
                             </div>
597 604
                            </div>
598
-                          </div>
605
+
606
+                           <!-- 魔方导航 -->
607
+                           <div v-if="item.mode_type== 8" class="modeeight">
608
+                              {{item.title}}     
609
+                           </div>
610
+                          
599 611
                           <div class="box"></div>
600 612
                          </div>  
601 613
                           <contact-us  v-show="modelshow"></contact-us>                              
602 614
                       </div>         
603 615
                      </div>
604 616
                    </div>  
605
-                      
606
-                     
607 617
                       <!-- 医院介绍详情页-->                
608 618
                       <div class="xiangqing"  v-show="shows" v-html="hospitalform.introduction"></div> 
609 619
                       <!-- 科室介绍详情页 -->                        
@@ -622,7 +632,25 @@
622 632
                              </div>
623 633
                           </div>
624 634
                         </div>
625
-            
635
+                         
636
+                       <!--返回首页-->
637
+                     <div class="reback" v-show="showback">
638
+                       <div class="rebackone">
639
+                         <img src="static/images/u373.png">
640
+                       </div>
641
+                       <div class="rebacktwo">
642
+                         <span @click="returnIndex()">首页</span>
643
+                      </div>
644
+                     </div>
645
+                     <!-- 回到顶部 -->
646
+                     <div class="reindex" v-show="showindex">
647
+                        <div class="reindexone">
648
+                           <img src="static/images/u378.png">
649
+                        </div>
650
+                        <div class="reindextwo">
651
+                            <span>顶部</span>
652
+                        </div>
653
+                     </div>
626 654
                       
627 655
                       <div id="qrcode" class="qrcode"></div>
628 656
 
@@ -762,6 +790,7 @@ import Neditor from '@/components/Neditor'
762 790
 import { rejects, fail } from 'assert';
763 791
 import { copyFile } from 'fs'; 
764 792
 import { truncateSync } from 'fs';
793
+import { isAbsolute } from 'path';
765 794
 export default {
766 795
   name: "preview",
767 796
   components: {
@@ -788,6 +817,7 @@ export default {
788 817
        patientModels:[],  
789 818
        keEnvironmentImages:[],     
790 819
        doctors:[],
820
+       rotatationImages:[],
791 821
       crumbs: [{ path: false, name: "预览" }],
792 822
       activeName: 'first',
793 823
       name: "car",
@@ -819,6 +849,8 @@ export default {
819 849
        definethree:false,
820 850
        definefour:false,
821 851
        disabled:true,
852
+       showback:false,
853
+       showindex:false,
822 854
       ellipsis:'',
823 855
       docnames:[],
824 856
        options: [{
@@ -868,7 +900,6 @@ export default {
868 900
           worktime:[{required:true,message:"请填写工作时间"}],
869 901
           rideway:[{required:true,message:"请填写乘车方式"}]   
870 902
       },
871
-        rotationImages:[],
872 903
         keEnvironmentImages:[],
873 904
         qiniuDomain: 'https://images.shengws.com/',
874 905
         rotationData: { token:'',key: '' },
@@ -1025,16 +1056,27 @@ export default {
1025 1056
           getHospitaldata(){
1026 1057
            getHospitaldata(this.patientModels).then(response=>{
1027 1058
                 if(response.data.state == 1){
1028
-                  var str = "";
1059
+                  var str = [];
1060
+                  var images = [];
1029 1061
                  this.patientModels = response.data.data.patientModels;
1030
-                  console.log("获取的数据",this.patientModels);
1031
-                 for (let index = 0; index < this.patientModels.length; index++) {
1032
-                   const element = this.patientModels[index].OfficeEnviroment;
1033
-                   console.log("element",element)
1034
-                 }
1035
-                //   var strs = str.split(",");
1036
-                //   console.log("strs",strs)             
1037
-                //  this.keEnvironmentImages = strs;
1062
+                 for (let index = 0; index < this.patientModels.length; index++) {   
1063
+                   if(this.patientModels[index].Rotation.rotation_images!=""){
1064
+                     str.push(this.patientModels[index].Rotation.rotation_images);
1065
+                   }                                               
1066
+                }   
1067
+                var  strs =  str.join(",")
1068
+                var ss = strs.split(",")
1069
+                this.rotatationImages = ss;
1070
+                for(let i = 0; i<this.patientModels.length;i++){
1071
+                  if(this.patientModels[i].OfficeEnviroment.keimages !=""){
1072
+                     images.push(this.patientModels[i].OfficeEnviroment.keimages);
1073
+                  }       
1074
+                }
1075
+                var imgs =  str.join(",")
1076
+                var imgss = imgs.split(",")
1077
+                this.keEnvironmentImages = imgss;
1078
+                console.log("keimages是什么",imgss);
1079
+                console.log("获取的各模块数据",this.patientModels);   
1038 1080
                 }
1039 1081
            })
1040 1082
          },
@@ -1172,7 +1214,7 @@ export default {
1172 1214
       },
1173 1215
 
1174 1216
       shareAvatarUpload(file){
1175
-           var fileType = file.type
1217
+            var fileType = file.type
1176 1218
             const isJPG = fileType.indexOf("image") > -1;
1177 1219
             const isLt2M = file.size / 1024 / 1024 < 2;
1178 1220
             if (!isJPG) {
@@ -1229,10 +1271,21 @@ export default {
1229 1271
             console.log("医院详情数据",hospital)
1230 1272
             console.log("医院详情数据是",this.hospitalform)
1231 1273
             this.show = false;
1232
-           this.shows = true;
1274
+            this.shows = true;
1275
+            this.showback = true;
1276
+            this.showindex = true;
1233 1277
          }
1234 1278
       })
1235 1279
     },
1280
+    returnIndex(){
1281
+      this.show = true;
1282
+      this.shows = false;
1283
+      this.showback = false;
1284
+      this.showindex = false;
1285
+      this.docshow = false;
1286
+      this.shows = false;
1287
+      this.keshow = false;
1288
+    },
1236 1289
 
1237 1290
     //查看科室详情
1238 1291
     officemore(id){
@@ -1243,6 +1296,8 @@ export default {
1243 1296
            console.log("科室详情数据",offices)
1244 1297
            this.show = false;
1245 1298
            this.keshow = true;
1299
+           this.showback = true;
1300
+           this.showindex = true;
1246 1301
          }
1247 1302
       })   
1248 1303
     },
@@ -1255,6 +1310,8 @@ export default {
1255 1310
            this.editdocfrom  =  response.data.data.editdoctor;
1256 1311
             this.show = false;
1257 1312
             this.docshow = true;
1313
+            this.showback = true;
1314
+            this.showindex = true;
1258 1315
            console.log("编辑医生返回数据",editdoctor)
1259 1316
          }
1260 1317
        })
@@ -1279,13 +1336,15 @@ export default {
1279 1336
      clickmodel(){
1280 1337
         this.GetUserdModel();
1281 1338
      },
1339
+     clickAddmodel(){
1340
+       this.getQueryNewModel();
1341
+     },
1282 1342
      //查询首页已使用的模块
1283 1343
       getQueryNewModel(){
1284 1344
            getQueryNewModel(this.modelform).then(response=>{
1285 1345
             if(response.data.state ==1){
1286 1346
              var model  = response.data.data.model;
1287
-             this.modelform  = response.data.data.model;
1288
-             console.log("返回新的数据",model);
1347
+             this.modelform  = response.data.data.model;           
1289 1348
             }
1290 1349
           });
1291 1350
          },
@@ -1754,11 +1813,12 @@ export default {
1754 1813
        let obj = document.getElementById('content');
1755 1814
           
1756 1815
        let imgs =  obj.getElementsByTagName('img');
1757
-          
1816
+  
1758 1817
         for(let i=0;i<imgs.length;i++){
1759 1818
           imgs[i].style.width = '332px';
1760 1819
           imgs[i].style.height = '100px';            
1761 1820
         }
1821
+
1762 1822
         let ycontent = document.getElementById('ycontent');
1763 1823
          
1764 1824
         let ximgs = ycontent.getElementsByTagName('img');
@@ -2030,6 +2090,7 @@ export default {
2030 2090
      font-size: 14px;
2031 2091
      overflow-y: auto;
2032 2092
      color: black;
2093
+     overflow: hidden;
2033 2094
    }
2034 2095
    officexiangqing{
2035 2096
       position: relative;
@@ -2123,6 +2184,18 @@ export default {
2123 2184
       background-color: rgba(204, 204, 204, 1);  
2124 2185
     }
2125 2186
 
2187
+    .modeone{      
2188
+        width: 318px;
2189
+        height: 210px;
2190
+        // border: solid 1px red;
2191
+    }
2192
+    .swipertwo{
2193
+      width:318px;
2194
+      height: 230px;
2195
+      margin-top: 25px;
2196
+      // border:solid 1px red;
2197
+    }
2198
+
2126 2199
     .modetwo{
2127 2200
       width: 320px;
2128 2201
       height: 220px;
@@ -2139,11 +2212,40 @@ export default {
2139 2212
     .modefour{
2140 2213
       width:320px;
2141 2214
       height: 230px;
2215
+      
2142 2216
     }
2143 2217
 
2144 2218
     .modefive{
2145 2219
       width:320px;
2146
-      height: 220px;
2220
+      height: 200px;
2221
+      // border: solid 1px red;
2222
+    }
2223
+
2224
+    .modeeight{
2225
+      width: 320px;
2226
+      height: 200px;
2227
+      // border: solid 1px red;
2228
+    }
2229
+
2230
+     .mac{
2231
+       position: absolute;
2232
+       width: 300px;
2233
+       height: 100px;
2234
+       border:solid 1px red;
2235
+       margin-left: 5px;
2236
+       margin-top: 5px;
2237
+    }   
2238
+    #mactwo{
2239
+
2240
+    }
2241
+
2242
+    .macone{
2243
+      position: absolute;
2244
+      width: 50px;
2245
+      height: 90px;
2246
+      border: solid 1px red;
2247
+      top: 5px;
2248
+      left: 5px;
2147 2249
     }
2148 2250
 
2149 2251
      .logo{
@@ -2199,7 +2301,7 @@ export default {
2199 2301
    .docborde{
2200 2302
      width: 320px;
2201 2303
      height: 200px;
2202
-     /* border: solid 1px red; */
2304
+    //  border: solid 1px red; 
2203 2305
      overflow: hidden;
2204 2306
    }
2205 2307
 
@@ -2211,25 +2313,25 @@ export default {
2211 2313
      margin-top: 8px;
2212 2314
    }
2213 2315
    .docheart{
2214
-     width: 300px;
2316
+     width: 310px;
2215 2317
      height: 92px;
2216
-     /* border: solid 1px blue; */
2318
+    //  border: solid 1px blue; 
2319
+     background-color: rgba(242, 242, 242, 1);
2217 2320
      margin-top: 5px;
2218 2321
      margin-left: 3px;
2219 2322
    }
2220 2323
    .docimage{
2221 2324
      width: 80px;
2222 2325
      height: 80px;
2223
-     /* border:solid 1px red; */
2224
-     margin-top: 10px;
2225 2326
      margin-left: 10px;
2327
+     padding-top: 5px;
2226 2328
    }
2227 2329
    .doctitle{
2228 2330
      width: 50px;
2229 2331
      height: 20px;
2230 2332
      /* border: solid 1px blue; */
2231 2333
      float: right;
2232
-     margin-right: 140px;
2334
+     margin-right: 152px;
2233 2335
      margin-top: -75px;
2234 2336
    }
2235 2337
 
@@ -2276,7 +2378,7 @@ export default {
2276 2378
        height:100px;
2277 2379
       //  border: solid red 1px;
2278 2380
        margin-left: 5px;
2279
-
2381
+      overflow: hidden;
2280 2382
      }
2281 2383
 
2282 2384
      .doctwo{
@@ -2331,7 +2433,7 @@ export default {
2331 2433
      width: 320px;
2332 2434
      height: 150;
2333 2435
      /* border: solid 1px red; */
2334
-     margin-top: 40px;
2436
+     margin-top: 20px;
2335 2437
    }
2336 2438
 
2337 2439
    .navigationone{
@@ -2544,6 +2646,64 @@ export default {
2544 2646
     margin-top: 50px;
2545 2647
     margin-left: 10px;
2546 2648
   }
2649
+
2650
+  .reback{
2651
+    position: absolute;
2652
+    width:50px;
2653
+    height: 50px;
2654
+    border:solid 1px rgba(255, 255, 255, 1);
2655
+    margin-left: 298px;
2656
+    margin-top: -390px;
2657
+    background-color: rgba(255, 255, 255, 1);
2658
+  }
2659
+  .rebackone{
2660
+    position: absolute;
2661
+    width:20px;
2662
+    height: 20px;
2663
+    // border: solid 1px red;
2664
+    left: 13px;
2665
+    top:5px;
2666
+  }
2667
+  .reindexone{
2668
+    position: absolute;
2669
+    width:20px;
2670
+    height: 20px;
2671
+    // border: solid 1px red;
2672
+    left:13px;
2673
+    top:5px;
2674
+  }
2675
+
2676
+  .rebacktwo{
2677
+    position: absolute;
2678
+    width: 30px;
2679
+    height: 20px;
2680
+    // border:solid 1px red;
2681
+    left: 10px;
2682
+    top: 28px;
2683
+    font-size: 14px;
2684
+    color: #FF6600;
2685
+  }
2686
+  
2687
+  .reindextwo{
2688
+    position: absolute;
2689
+    width: 30px;
2690
+    height: 20px;
2691
+    left: 10px;
2692
+    top:28px;
2693
+    font-size: 14px;
2694
+    color: #FF6600;
2695
+    
2696
+  }
2697
+  .reindex{
2698
+    position: absolute;
2699
+    width: 50px;
2700
+    height: 50px;
2701
+    border: solid 1px rgba(255, 255, 255, 1);
2702
+    margin-left: 298px;
2703
+    margin-top: -335px;
2704
+  }
2705
+
2706
+ 
2547 2707
 </style>
2548 2708
 
2549 2709
 

+ 12 - 10
src/scrm_pages/systemsetting/components/CreateStaffForm.vue Wyświetl plik

@@ -197,15 +197,17 @@
197 197
               console.log("上传轮机",this.form.dochead)
198 198
               },
199 199
              beforeAvatarUpload(file) {
200
-              const isJPG = file.type === 'image/jpeg';
201
-              console.log("是什么呢",isJPG)
200
+               var fileType = file.type
201
+               const isJPG = fileType.indexOf("image") > -1;
202 202
               const isLt2M = file.size / 1024 / 1024 < 2;
203
-             if (!isJPG) {
204
-              this.$message.error('上传头像图片只能是JPG或者png格式!');
205
-            }
206
-            if (!isLt2M) {
207
-              this.$message.error('上传头像图片大小不能超过 2MB!');
208
-            }
203
+              if (!isJPG) {
204
+                this.$message.error("只能上传图片");
205
+                return false;
206
+             }
207
+             if (!isLt2M) {
208
+                this.$message.error("图片大小不能超过 2MB!");
209
+                return false;
210
+             }
209 211
 
210 212
              var date = new Date()
211 213
              var ext = getFileExtension(file.name)
@@ -274,14 +276,14 @@
274 276
     .avatar-uploader-icon {
275 277
       font-size: 20px;
276 278
       color: #8c939d;
277
-      width: 44px;
279
+      width: 50px;
278 280
       height: 50px;
279 281
       line-height: 50px;
280 282
       text-align: center;
281 283
     }
282 284
     .avatar {
283 285
       width: 68px;
284
-      height: 50px;
286
+      height: 40px;
285 287
       display: block;
286 288
     }
287 289
 </style>

BIN
static/images/u373.png Wyświetl plik


BIN
static/images/u378.png Wyświetl plik