xiaoming_global пре 5 година
родитељ
комит
d7e8acf6f2

+ 2 - 1
build/webpack.base.conf.js Прегледај датотеку

@@ -90,7 +90,8 @@ module.exports = {
90 90
       {
91 91
         test: /\.sass$/,
92 92
         loaders: ['style', 'css', 'sass']
93
-      }
93
+      },
94
+      
94 95
     ]
95 96
   },
96 97
   node: {

+ 3 - 1
index.html Прегледај датотеку

@@ -21,6 +21,8 @@
21 21
     <div id="app"></div>
22 22
     <!-- built files will be auto injected -->
23 23
     <script src='http://api.map.baidu.com/api?v=2.0&ak=?&callback=init'></script>
24
-    
24
+   
25
+    <link href="//vjs.zencdn.net/4.9/video-js.css" rel="stylesheet">
26
+    <script src="//vjs.zencdn.net/4.9/video.js"></script>
25 27
   </body>
26 28
 </html>

+ 28 - 3
src/api/act/submitinfo.js Прегледај датотеку

@@ -210,10 +210,11 @@ export function previewEditArticle(id,data){
210 210
    })
211 211
 }
212 212
 
213
-export function getPreviewInfo(params){
213
+export function getPreviewInfo(id,params){
214
+    console.log("我爱你中国",params)
214 215
     return request({
215
-        url:"/api/acticle/getPreviewInfo",
216
-        method:'Post',
216
+        url:"/api/acticle/getPreviewInfo?id="+id,
217
+        method:'Get',
217 218
         params:params,
218 219
     })
219 220
 }
@@ -361,4 +362,28 @@ export function GetAllCategory(params){
361 362
     })
362 363
 }
363 364
 
365
+export function getArticleDetail(id,params){
366
+    return request({
367
+        url:"/api/article/getarticledetail?id="+id,
368
+        method:"Get",
369
+        params:params,
370
+    })
371
+
372
+}
373
+
374
+export function getVidoDetail(id,params){
375
+     return request({
376
+         url:"/api/article/getvidodetail?id="+id,
377
+         method:"Get",
378
+         params:params,
379
+     })
380
+}
381
+
382
+export function getEditArticleContent(id,params){
383
+    return request({
384
+        url:"/api/article/geteditarticlecontent?id="+id,
385
+        method:"Get",
386
+        params:params,
387
+    })
388
+}
364 389
 

+ 446 - 2
src/api/site/site.js Прегледај датотеку

@@ -240,10 +240,9 @@ export function saverideway(id,data){
240 240
 }
241 241
 
242 242
 export function getQueryNewModel(params){
243
-  
244 243
    return request({
245 244
        url:"/api/site/getquerynewmodel",
246
-       method:"Post",
245
+       method:"Get",
247 246
        params:params,
248 247
    })
249 248
 }
@@ -306,6 +305,7 @@ export function deleteModleById(id,data){
306 305
 }
307 306
 
308 307
 export function SaveOffice(id,data){
308
+    console.log("data是什么",data)
309 309
     return request({
310 310
         url:"/api/site/saveoffice?id="+id,
311 311
         method:"Post",
@@ -361,6 +361,47 @@ export function editOfficeEnviroment(id,data){
361 361
     })
362 362
 }
363 363
 
364
+export function AddImages(data){
365
+    return request({
366
+        url:"/api/site/addimages",
367
+        method:"Post",
368
+        data:data,
369
+    })
370
+}
371
+
372
+export function getEnImages(params){
373
+   return request({
374
+       url:"/api/site/getenimages",
375
+       method:"Post",
376
+       params:params,
377
+   })
378
+}
379
+
380
+export function getEnImagesTwo(params){
381
+   return request({
382
+       url:"/api/site/getenimagestwo",
383
+       method:"Get",
384
+       params:params,
385
+   })
386
+}
387
+
388
+export function EditEnvirImages(id,data){
389
+ 
390
+    return request({
391
+        url:"/api/site/editenvirimages?id="+id,
392
+        method:"Get",
393
+        data:data,
394
+    })
395
+}
396
+
397
+export function AddtwoImages(id,data){
398
+    return request({
399
+        url:"/api/site/addtwoimages?id="+id,
400
+        method:"Post",
401
+        data:data,
402
+    })
403
+}
404
+
364 405
 export function  SaveOfficeEnvironment(id,data){
365 406
      return request({
366 407
          url:"/api/site/saveofficeenvironment?id="+id,
@@ -393,6 +434,30 @@ export function docmore(id,data){
393 434
    })
394 435
 }
395 436
 
437
+export function kemore(id,data){
438
+   return request({
439
+       url:"/api/site/kemore?id="+id,
440
+       method:'Get',
441
+       data:data,
442
+   })
443
+}
444
+
445
+export function articlemore(id,data){
446
+     return request({
447
+         url:"/api/site/articlemore?id="+id,
448
+         method:"Get",
449
+         data:data,
450
+     })
451
+}
452
+
453
+export function Activitiesmore(id,data){
454
+    return request({
455
+       url:"/api/site/activitiesmore?id="+id,
456
+       method:"Get",
457
+       data:data, 
458
+    })
459
+}
460
+
396 461
 export function addNavigation(data){
397 462
     return request({
398 463
         url:"/api/site/addnavigation",
@@ -460,6 +525,7 @@ export function addrotationpic(data){
460 525
 }
461 526
 
462 527
 export function GetRotationImages(params){
528
+   
463 529
     return request({
464 530
         url:"/api/site/getrotationimages",
465 531
         method:"Post",
@@ -565,6 +631,14 @@ export function deleteImages(id,data){
565 631
     })
566 632
 }
567 633
 
634
+export function deleteSingleImages(id,data){
635
+    return request({
636
+        url:"/api/site/deletesingleimages?id="+id,
637
+        method:"Post",
638
+        data:data,
639
+    })
640
+}
641
+
568 642
 export function addHospital(data){
569 643
     return request({
570 644
         url:"/api/site/addhospital",
@@ -580,3 +654,373 @@ export function addActiveform(data){
580 654
         data:data,
581 655
     })
582 656
 }
657
+
658
+export function getactivity(id,data){
659
+    return request({
660
+        url:"/api/site/getactivity?id="+id,
661
+        method:"Get",
662
+        data:data,
663
+    })
664
+}
665
+
666
+export function getMacImages(id,data){
667
+    console.log("id",id)
668
+    return request({
669
+        url:"/api/site/getMacImages?id="+id,
670
+        method:"Get",
671
+        data:data,
672
+    })
673
+}
674
+
675
+export function SaveActivit(id,data){
676
+  return request({
677
+      url:"/api/site/saveactivit?id="+id,
678
+      method:"Post",
679
+      data:data,
680
+  })
681
+}
682
+
683
+export function deleteMargin(id,data){
684
+   return request({
685
+       url:"/api/site/deleMargin?id="+id,
686
+       method:"Post",
687
+       data:data,
688
+   })
689
+}
690
+
691
+export function getRotationImages(id,data){
692
+    
693
+   return request({
694
+       url:"/api/site/editRotationImages?id="+id,
695
+       method:"Get",
696
+       data:data,
697
+   })
698
+}
699
+
700
+export function getRotationDetail(id,data){
701
+   return request({
702
+       url:"/api/site/getrotationdetail?id="+id,
703
+       method:"Get",
704
+       data:data,
705
+   })
706
+}
707
+
708
+export function editVisibleByid(id,data){
709
+    return request({
710
+        url:"/api/site/editvisiblebyid?id="+id,
711
+        method:"Get",
712
+        data:data,
713
+    })
714
+}
715
+
716
+export function SaveEditPic(id,data){
717
+   return request({
718
+       url:"/api/site/saveditpic?id="+id,
719
+       method:"Post",
720
+       data:data,
721
+   })
722
+}
723
+
724
+export function addeditpic(id,data){
725
+   return request({
726
+       url:"/api/site/addeditpic?id="+id,
727
+       method:"Post",
728
+       data:data,
729
+   })
730
+}
731
+
732
+export function AddedialogVisible(id,data){
733
+   
734
+   return request({
735
+       url:"/api/site/addedialogvisible?id="+id,
736
+       method:"Post",
737
+       data:data,
738
+   })
739
+}
740
+
741
+export function geteditRotationImages(id,data){
742
+    
743
+    return request({
744
+        url:"/api/site/geteditrotationimages?id="+id,
745
+        method:"Get",
746
+        data:data,
747
+    })
748
+}
749
+
750
+export function editSingleVisible(id,data){
751
+  
752
+    return request({
753
+        url:"/api/site/editsinglevisible?id="+id,
754
+        method:"Get",
755
+        data:data,
756
+    })
757
+}
758
+
759
+export function UpdateSingleForm(id,data){
760
+
761
+    return request({
762
+        url:"/api/site/updatesingleform?id="+id,
763
+        method:"Post",
764
+        data:data,
765
+    })
766
+}
767
+
768
+export function addEditPicForm(id,data){
769
+  
770
+    return request({
771
+        url:"/api/site/addeditpicform?id="+id,
772
+        method:"Post",
773
+        data:data,
774
+    })
775
+}
776
+
777
+export function AddRotationVisible(id,data){
778
+   
779
+    return request({
780
+        url:"/api/site/addrotationvisible?id="+id,
781
+        method:"Post",
782
+        data:data,
783
+    })
784
+}
785
+
786
+export function getEditImagesDetail(id,data){
787
+   return request({
788
+       url:"/api/site/geteditimagesdetail?id="+id,
789
+       method:"Get",
790
+       data:data,
791
+   })
792
+}
793
+
794
+export function UpdateEditMacgin(id,data){
795
+    return request({
796
+        url:"/api/site/updateeditmacgin?id="+id,
797
+        method:"Post",
798
+        data:data,
799
+    })
800
+}
801
+
802
+export function getActivities(params){
803
+   
804
+   return request({
805
+       url:"/api/site/getactivities",
806
+       method:"Post",
807
+       params:params, 
808
+   })
809
+}
810
+
811
+export function getArticleType(params){ 
812
+    return request({
813
+        url:"/api/site/getArticleType",
814
+        method:"Post",
815
+        params:params,
816
+    })
817
+}
818
+
819
+export function AddArticeList(data){
820
+   return request({
821
+       url:"/api/site/addarticelist",
822
+       method:"Post",
823
+       data:data,
824
+   })
825
+}
826
+
827
+export function getArticlelist(data){
828
+   return request({
829
+       url:"/api/site/getarticlelist",
830
+       method:"Post",
831
+       data:data,
832
+   })
833
+}
834
+
835
+export function editGetArticlistDetail(id,data){
836
+     return request({
837
+         url:"/api/site/editgetarticlistdetail?id="+id,
838
+         method:"Get",
839
+         data:data,
840
+     })
841
+}
842
+
843
+export function UpdatedArticeDetail(id,data){
844
+    return request({
845
+        url:"/api/site/updatearticedetail?id="+id,
846
+        method:"Post",
847
+        data:data,
848
+    })
849
+}
850
+
851
+export function AddOfficeThreeVisible(id,data){
852
+   return request({
853
+       url:"/api/site/addoffficethree?id="+id,
854
+       method:"Post",
855
+       data:data,
856
+   })
857
+}
858
+
859
+export function officetwoVisbile(id,params){
860
+   return request({
861
+       url:"/api/site/offcietwovisible?id="+id,
862
+       method:"Get",
863
+       params:params,
864
+   })
865
+}
866
+
867
+export function AddOfficetTwo(id,data){
868
+  return request({
869
+      url:"/api/site/addofficetwo?id="+id,
870
+      method:"Post",
871
+      data:data,
872
+  })
873
+}
874
+
875
+export function deleteOfficeById(id,data){
876
+   return request({
877
+       url:"/api/site/deleteofficebyid?id="+id,
878
+       method:"Post",
879
+       data:data,
880
+   })
881
+}
882
+
883
+export function GetArticleById(id,params){
884
+   return request({
885
+       url:"/api/site/getarticlebyid?id="+id,
886
+       method:"Get",
887
+       params:params,
888
+   })  
889
+}
890
+
891
+export function GetAllActivity(params){
892
+   return request({
893
+       url:"/api/site/getallactivity",
894
+       method:"Get",
895
+       params:params,
896
+   })
897
+}
898
+
899
+export function AddLinkAddress (data){
900
+   return request({
901
+       url:"/api/site/addlinkaddress",
902
+       method:"Post",
903
+       data:data,
904
+   })
905
+}
906
+
907
+export function getLinkAddress(params){
908
+   return request({
909
+       url:"/api/site/getlinkaddress",
910
+       method:"Get",
911
+       params:params,
912
+   })
913
+}
914
+
915
+export function getAllConnecWay(params){
916
+   return request({
917
+       url:"/api/site/getallconnecway",
918
+       method:"Get",
919
+       params:params,
920
+   })
921
+}
922
+
923
+export function getConnecWay(id,params){
924
+   return request({
925
+       url:"/api/site/getconnecway?id="+id,
926
+       method:"Get",
927
+       params:params,
928
+   })
929
+}
930
+
931
+export function editConnecway(id,params){
932
+   return request({
933
+       url:"/api/site/editconnecway?id="+id,
934
+       method:"Get",
935
+       params:params,
936
+   })
937
+}
938
+
939
+export function UpdateConnectform(id,data){
940
+  return request({
941
+      url:"/api/site/updateconnectform?id="+id,
942
+      method:"Post",
943
+      data:data,
944
+  })
945
+}
946
+
947
+export function UpdateContactform(id,data){
948
+     return request({
949
+         url:"/api/site/updatecontactform?id="+id,
950
+         method:"Post",
951
+         data:data
952
+     })
953
+}
954
+
955
+export function addConnectways(data){
956
+  return request({
957
+      url:"/api/site/addconnectways",
958
+      method:"Post",
959
+      data:data,
960
+  })
961
+}
962
+
963
+export function getHospitalIntroduction(id,params){
964
+   return request({
965
+       url:"/api/site/gethostpitalintroduction?id="+id,
966
+       method:"Get",
967
+       params:params,
968
+   })
969
+}
970
+
971
+export function UpdateHospitalAddress(id,data){
972
+    return request({
973
+        url:"/api/site/updatehospitaladdress?id="+id,
974
+        method:"Post",
975
+        data:data,
976
+    })
977
+}
978
+
979
+export function AddPiCLink(data){
980
+   return request({
981
+       url:"/api/site/addpiclink",
982
+       method:"Post",
983
+       data:data,
984
+   })
985
+}
986
+
987
+export function getLinkAddressDetail(id,params){
988
+   return request({
989
+       url:"/api/site/getlinkaddressdetail?id="+id,
990
+       method:"Get",
991
+       params:params,
992
+   })
993
+}
994
+
995
+export function UpdatePicFormThree(id,data){
996
+   return request({
997
+       url:"/api/site/updatepicformthree?id="+id,
998
+       method:"Post",
999
+       data:data,
1000
+   })
1001
+}
1002
+
1003
+export function getEnImagesThree(params){
1004
+    return request({
1005
+        url:"/api/site/getenimagesthree",
1006
+        method:"Get",
1007
+        params:params,
1008
+    })
1009
+}
1010
+
1011
+export function AddMagiclinkData(data){
1012
+    console.log("data是什么",data)
1013
+    return request({
1014
+        url:"/api/site/addmagiclinkdata",
1015
+        method:"Post",
1016
+        data:data,
1017
+    })
1018
+}
1019
+
1020
+export function getMacLinkAddress(params){
1021
+    return request({
1022
+        url:"/api/site/getmaclinkaddress",
1023
+        method:"Get",
1024
+        params:params,
1025
+    })
1026
+}

+ 4 - 1
src/lang/zh.js Прегледај датотеку

@@ -56,6 +56,9 @@ export default {
56 56
     articleList: '文章列表',
57 57
     articlePreview:'文章预览',
58 58
     editVido:'编辑视频',
59
+    articleDetail:'文章详情',
60
+    articleEditPreview:'文章编辑预览',
61
+    vidoDetail:'视频详情',
59 62
     errorPages: '错误页面',
60 63
     page401: '401',
61 64
     page404: '404',
@@ -175,7 +178,7 @@ export default {
175 178
     SMSManage: "短信管理",
176 179
     SMSSend: "群发短信",
177 180
     site:"微网站",
178
-    preview:"预览"
181
+    preview:"预览",
179 182
   },
180 183
   navbar: {
181 184
     logOut: '退出登录',

+ 28 - 7
src/router/modules/article.js Прегледај датотеку

@@ -12,7 +12,7 @@ export default {
12 12
   },
13 13
   children: [
14 14
     {
15
-      path: '/articles/createArticle',
15
+      path: '/articles/createArticle/:id',
16 16
       component: () => import('@/scrm_pages/article/createArticle'),
17 17
       name: 'createArticle',
18 18
       meta: { title: 'createArticle', noCache: true }
@@ -43,9 +43,10 @@ export default {
43 43
     },
44 44
     {
45 45
       path: '/articles/articlePreview',
46
-      component: () => import('@/scrm_pages/article/articlePreview'),
46
+      component: () => import('@/scrm_pages/article/article_preview'),
47 47
       name: 'articlePreview',
48 48
       hidden:true,
49
+      is_menu: false,
49 50
       meta: { title: 'articlePreview', noCache: true }
50 51
     },
51 52
     {
@@ -57,25 +58,45 @@ export default {
57 58
       meta: { title: 'editArticle', noCache: true }
58 59
     },
59 60
     {
60
-      path: '/articles/editVido',
61
-      component:() => import('@/scrm_pages/article/editVido'),
61
+      path: '/articles/editVido/:id',
62
+      component:() => import('@/scrm_pages/article/edit_vido'),
62 63
       name:'editVido',
63 64
       hidden:true,
64
-      meta: { title:'editVido',noCache: true}
65
+      is_menu: false,
66
+      meta: { title: 'editVido', noCache: true}
65 67
     },
66 68
     {
67
-      path: '/articles/articleEditPreview',
69
+      path: '/articles/articleEditPreview/:id',
68 70
       component: () => import('@/scrm_pages/article/articleEditPreview'),
69 71
       name: 'articleEditPreview',
70 72
       hidden:true,
73
+      is_menu:false,
71 74
       meta: { title: 'articleEditPreview', noCache: true }
72 75
     },
73 76
     {
74 77
       path: '/articles/articleCommentDetail/:id',
75
-      component: () => import('@/scrm_pages/article/articleCommentDetail'),
78
+      component: () => import('@/scrm_pages/article/articlecomment_detail'),
76 79
       name: 'articleCommentDetail',
77 80
       hidden:true,
81
+      is_menu:false,
78 82
       meta: { title: 'articleCommentDetail', noCache: true }
79 83
     },
84
+    {
85
+      path:'/articles/articleDetail/:id',
86
+      component:() =>import('@/scrm_pages/article/article_detail'),
87
+      name:'articleDetail',
88
+      hidden:true,
89
+      is_menu:false,
90
+      meta:{ title:'articleDetail',noCache: true }
91
+
92
+    },
93
+    {
94
+      path:'/articles/vidoDetail/:id',
95
+      component:()=>import('@/scrm_pages/article/vido_detail'),
96
+      name:'vidoDetail',
97
+      hidden:true,
98
+      is_menu:false,
99
+      meta:{ title:'vidoDetail',noCache: true}
100
+    }
80 101
   ]
81 102
 }

+ 34 - 36
src/scrm_pages/article/articleEditPreview.vue Прегледај датотеку

@@ -4,29 +4,19 @@
4 4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
5 5
          </div>
6 6
          <div class="app-container">
7
-            <el-form label-width="90px" class="clearfix" :model="form" ref="acticleform">
8
-                 <el-row :span=20>
9
-                    <el-form-item>
10
-                        <div class="title">
11
-                           {{form.title}}
12
-                        </div>
13
-                    </el-form-item>
14
-                 </el-row>
15
-                 <el-row :span=20>
16
-                     <el-form-item>
17
-                         <div  class="cont">
18
-                           <li v-html="form.content"></li>
19
-                         </div>
20
-                     </el-form-item>
21
-                 </el-row>
22
-                 <el-row :span=20>
23
-                 <el-form-item>
24
-                    <div class="but">
25
-                      <el-button type="primary" @click="clossPreview()">关闭预览</el-button>
26
-                    </div>    
27
-                 </el-form-item>
28
-          </el-row>        
29
-            </el-form>
7
+            <div class="title">
8
+                 <!-- {{form.title}} -->
9
+                 <div class="titletwo">{{form.title}}</div>
10
+            </div>
11
+            <!-- <div class="cont" v-html="form.content"> </div> -->
12
+            <div class="title">
13
+                <div class="titletwo">
14
+                  <li v-html="form.content"></li>
15
+                </div>
16
+            </div>
17
+            <div class="but">
18
+                 <el-button type="primary" @click="clossPreview()">关闭预览</el-button>
19
+            </div>          
30 20
        </div>
31 21
      </div>
32 22
 </template>
@@ -46,44 +36,52 @@
46 36
                      { path: '/articles/articleEditPreview', name: '文章编辑预览' }
47 37
                 ],
48 38
                 form:{
49
-                    title:'',
50
-                    content:'',
39
+                  title:"",
40
+                  content:"",
51 41
                 }
52 42
             }
53 43
         },
54 44
         methods:{
55
-            articleEditPreview(){
56
-                getPreviewInfo(this.form).then(response=>{
45
+            getPreviewInfo(){
46
+                  const id = this.$route.params && this.$route.params.id;
47
+                 console.log("这个id是什么",id)
48
+                getPreviewInfo(id,this.form).then(response=>{
57 49
                       if(response.data.state == 1){
58 50
                          this.form =  response.data.data.articles;
59
-                         var articles =  response.data.data.articles
60
-                         console.log("articles",articles)        
51
+                        //  var articles =  response.data.data.articles
52
+                         console.log("articles",this.form)        
61 53
                       }
62 54
                 })   
63 55
             },
64 56
             clossPreview(){
65
-              this.$router.push({path:'/articles/articleList'})
57
+               const id = this.$route.params && this.$route.params.id;
58
+              this.$router.push({path:'/articles/editArticle/'+id})
66 59
             }
67 60
         },
68 61
         created(){
69
-            this.articleEditPreview();
62
+            this.getPreviewInfo();
70 63
         }
71 64
     }
72 65
 </script>
73 66
       
74 67
 <style scoped>
75 68
     .title{
76
-       font-size: 20px;
77
-       position: relative;
78
-       left: 750px;
69
+        font-size: 20px;
70
+        text-align: center;
71
+        width: 100%;
72
+        height: 100%;
73
+        margin-bottom: 10px;
74
+    }
75
+    .titletwo{
76
+      display: inline-block;
79 77
     }
80 78
 
81 79
     .cont{
82 80
       position: relative;
83
-      left: 200px;
81
+      /* left: 200px; */
84 82
     }
85 83
     .but{
86 84
       position: relative;
87
-      left: 750px;
85
+      left: 900px;
88 86
     }
89 87
 </style>

+ 21 - 11
src/scrm_pages/article/articleList.vue Прегледај датотеку

@@ -51,7 +51,7 @@
51 51
           </div>
52 52
           <div class="activity-info-panel">
53 53
             <h3 class="title">
54
-              <a>{{article.title}}</a>
54
+              <span @click="articleDetail(article.id,article.type)">{{article.title}}</span>
55 55
             </h3>
56 56
             <div class="statistics">
57 57
               阅读:{{article.real_read_num}} 丨 评论:{{article.comment_num}} 丨 点赞:{{article.star_num}}
@@ -77,7 +77,7 @@
77 77
           </div>
78 78
           <div class="activity-time-panel">
79 79
             <span class="center">{{orgName}}</span>
80
-            <span class="time">2019-06-08</span>
80
+            <span class="time">{{articlecreatetime(article.ctime)}}</span>
81 81
           </div>
82 82
         </div>
83 83
       </div>
@@ -100,6 +100,7 @@
100 100
   import BreadCrumb from '../components/bread-crumb'
101 101
   import { GetAllArticles,deleteArticle,deleteAllArticles,GetAllCategory} from '@/api/act/submitinfo'
102 102
   import PublishedCell from "@/scrm_pages/article/components/published_cell"
103
+  import {uParseTime} from "@/utils/tools";
103 104
   export default {
104 105
     name: 'commentList',
105 106
     components:{
@@ -156,6 +157,9 @@
156 157
                     //  }
157 158
               })
158 159
          },
160
+         articlecreatetime(time){
161
+            return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
162
+         },
159 163
          selectsign(id){
160 164
             console.log("id",id)
161 165
             this.listQuery.classid = id;
@@ -178,7 +182,7 @@
178 182
              return row.imgs
179 183
         },
180 184
         AddArticle(){
181
-           this.$router.push({path:'/articles/createArticle'})
185
+           this.$router.push({path:'/articles/createArticle/:id'})
182 186
         },
183 187
         changeSelectingStatus(status){
184 188
           console.log("status是多少?",status)
@@ -226,16 +230,13 @@
226 230
             });
227 231
            },
228 232
            editArticles(id,articletype){
229
-               console.log("文章id",id);
230
-               console.log("文章内型",articletype)
233
+              //  console.log("文章id",id);
234
+              //  console.log("文章内型",articletype)
231 235
                if(articletype == 1){
232
-                  this.$router.push("/articles/editArticle");
233
-                 // this.$router.push({name:'editArticle'})
234
-
236
+                  this.$router.push("/articles/editArticle/"+id);
235 237
                }
236 238
                if(articletype == 2){
237
-                  //  this.$router.push({path:"/articles/editVido/"+id});
238
-                   this.$router.push({name:'editVido',params: {id:id}})
239
+                 this.$router.push("/articles/editVido/"+id);
239 240
                }
240 241
            },
241 242
 
@@ -299,7 +300,7 @@
299 300
                                    this.articsData.splice(index,1)
300 301
                               }
301 302
                             }
302
-                             this.$message.success("删除评论成功");
303
+                             this.$message.success("删除成功");
303 304
                        }
304 305
                   })
305 306
                });
@@ -314,6 +315,15 @@
314 315
             }
315 316
           })
316 317
         },
318
+        articleDetail(id,articletype){
319
+        
320
+          if(articletype == 1){
321
+           this.$router.push("/articles/articleDetail/"+id);
322
+          }
323
+          if(articletype == 2){
324
+            this.$router.push("/articles/vidoDetail/"+id);
325
+          }
326
+        }
317 327
     },
318 328
     created(){
319 329
       this.GetAllArticles();

+ 70 - 0
src/scrm_pages/article/article_detail.vue Прегледај датотеку

@@ -0,0 +1,70 @@
1
+<template>
2
+   <div  class="main-contain">
3
+      <div class="position">
4
+         <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+     </div> 
6
+     <div class="app-container">
7
+          <div class="articlename">
8
+              {{articleform.title}}
9
+          </div>
10
+           <div v-html="articleform.content" class="articlecontent">
11
+
12
+           </div>
13
+     </div>
14
+   </div>
15
+</template>
16
+
17
+<script>
18
+    import BreadCrumb from '../components/bread-crumb'
19
+     import { getArticleDetail } from '@/api/act/submitinfo'
20
+    export default {
21
+        name: "article_detail",
22
+         components:{
23
+           BreadCrumb,
24
+      },
25
+      data(){
26
+        return{
27
+            crumbs: [
28
+             { path: false, name: '文章管理' },
29
+             { path: '/articles/articleDetail', name: '文章详情' }
30
+          ],  
31
+          articleform:{
32
+            title:"",
33
+            content:"",
34
+          }
35
+        }  
36
+      },
37
+      methods:{
38
+         getArticleDetail(){
39
+            const id = this.$route.params && this.$route.params.id;
40
+            console.log("文章详情id是什么",id);
41
+           getArticleDetail(id,this.articleform).then(response=>{
42
+               if(response.data.state == 1){
43
+                 var articles =  response.data.data.articles;
44
+                this.articleform =  response.data.data.articles;
45
+                 console.log("articles",articles)
46
+               }
47
+           })
48
+         }
49
+      },
50
+      created(){
51
+        this.getArticleDetail();
52
+      }
53
+    }
54
+</script>
55
+
56
+<style scoped>
57
+    .articlename{
58
+      width: 500px;
59
+      height: 50px;
60
+      /* border: solid 1px red; */
61
+      margin-left: 600px;
62
+    }
63
+
64
+    .articlecontent{
65
+      width: 1000px;
66
+      height: 100%;
67
+      /* border:solid 1px red; */
68
+      /* margin-left: 300px; */
69
+    }
70
+</style>

src/scrm_pages/article/articlePreview.vue → src/scrm_pages/article/article_preview.vue Прегледај датотеку

@@ -7,16 +7,21 @@
7 7
           <el-form label-width="90px" class="clearfix" :model="form" ref="acticleform">
8 8
            <el-row :span=20>
9 9
             <el-form-item>
10
-                <div class="title">
11
-                 {{form.title}}
12
-                </div>    
10
+              <div class="title">
11
+                 <!-- {{form.title}} -->
12
+                <div class="titletwo">
13
+                   {{form.title}}
14
+                </div>
15
+              </div>    
13 16
             </el-form-item>
14 17
           </el-row> 
15 18
            <el-row :span=20>
16 19
             <el-form-item>
17
-                <div class="cont">
18
-                   <!-- {{form.content}} -->
19
-                   <li v-html="form.content"></li>
20
+                <div class="title">
21
+                   <!-- <li v-html="form.content"></li> -->
22
+                   <div class="titletwo">
23
+                     <li v-html="form.content"></li>
24
+                   </div>
20 25
                 </div>    
21 26
             </el-form-item>
22 27
           </el-row>
@@ -62,7 +67,8 @@
62 67
               });
63 68
           },
64 69
           clossPreview(){
65
-            this.$router.push({path:'/articles/articleList'})
70
+            var id =  this.form.id
71
+            this.$router.push({path:'/articles/createArticle/'+id})
66 72
           }
67 73
     },
68 74
     created(){
@@ -74,10 +80,14 @@
74 80
 <style scoped>
75 81
     .title{
76 82
         font-size: 20px;
77
-        position: relative;
78
-        left: 750px;
83
+        text-align: center;
84
+        width: 100%;
85
+        height: 100%;
79 86
     }
80
-
87
+    .titletwo{
88
+      display: inline-block;
89
+    }
90
+  
81 91
     .cont{
82 92
       position: relative;
83 93
       left: 200px;
@@ -86,5 +96,5 @@
86 96
       position: relative;
87 97
       left: 750px;
88 98
     }
89
-
99
+   
90 100
 </style>

src/scrm_pages/article/articleCommentDetail.vue → src/scrm_pages/article/articlecomment_detail.vue Прегледај датотеку


+ 21 - 4
src/scrm_pages/article/components/CreateArticleForm.vue Прегледај датотеку

@@ -29,6 +29,7 @@
29 29
 
30 30
               </el-input>
31 31
             </el-form-item>
32
+            <div class="tips"><p>请输入1-99的整数,数值越小,模块排序越靠前</p></div>
32 33
           </el-row>
33 34
         </el-form>
34 35
         <span slot="footer" class="dialog-footer">
@@ -42,6 +43,7 @@
42 43
 
43 44
 <script>
44 45
     import { addCategory,getAritcleCount } from '@/api/act/submitinfo'
46
+    import {checkNumber} from "@/utils/tools";
45 47
     export default {
46 48
         name: "CreateArticleForm",       
47 49
            props:{
@@ -53,12 +55,20 @@
53 55
               }
54 56
            },
55 57
             data(){
58
+                 var checkNumberRule = (rule, value, callback) => {
59
+                    if (!checkNumber(value)) {
60
+                       callback(new Error('请输入1-99的整数'));
61
+                     }else {
62
+                       callback(); 
63
+                       }
64
+                    };
65
+
56 66
                 return {
57
-                    centerDialogVisible:false,
67
+                    centerDialogVisible:false,               
58 68
                     rules: {
59 69
                     name: [{required: true, message: "请填写分类名称",},],
60 70
                     summary: [{required: true,message:"请填写分类描述"}],
61
-                    order: [{required: true,message:"请填写排序"}],
71
+                    order: [{required: true,message:"请填写排序"},{validator:checkNumberRule}],
62 72
                  },
63 73
                 acticleform:[],
64 74
                  form:{
@@ -102,12 +112,19 @@
102 112
                             }).catch(e=>{})
103 113
                        }   
104 114
                    });         
105
-              },  
115
+              },    
106 116
           },
107 117
       }  
108 118
 </script>
109 119
 
110 120
 <style scoped>
111
-   
121
+  .tips {
122
+    font-size: 12px;
123
+    line-height: 18px;
124
+    width:100%;
125
+    height: 100px;
126
+    /* border:solid 1px red; */
127
+    margin-left: 86px;
128
+  }
112 129
 </style>
113 130
    

+ 10 - 1
src/scrm_pages/article/components/EditArticleForm.vue Прегледај датотеку

@@ -38,6 +38,7 @@
38 38
     </div>
39 39
 </template>
40 40
 <script>
41
+ import {checkNumber} from "@/utils/tools";
41 42
  import { EditArticleCategory } from '@/api/act/submitinfo'
42 43
 export default {
43 44
     name: "EditArticleForm",
@@ -60,12 +61,20 @@ export default {
60 61
       }
61 62
     },
62 63
      data(){
64
+            var checkNumberRule = (rule, value, callback) => {
65
+                  if (!checkNumber(value)) {
66
+                       callback(new Error('请输入1-99的整数'));
67
+                   }else {
68
+                      callback(); 
69
+                    }
70
+                };
71
+
63 72
           return {
64 73
           centerDialogVisible:false,
65 74
            rules: {
66 75
              name: [{required: true, message: "请填写分类名称",},],
67 76
              summary: [{required: true,message:"请填写分类描述"}],
68
-             order: [{required: true,message:"请填写排序"}]
77
+             order: [{required: true,message:"请填写排序"},{validator:checkNumberRule}]
69 78
               },
70 79
              }
71 80
           }, 

+ 56 - 22
src/scrm_pages/article/createArticle.vue Прегледај датотеку

@@ -94,7 +94,7 @@
94 94
           <el-row :span="24">
95 95
             <el-col :span="24">
96 96
                 <el-form-item>
97
-                      <el-button size="small" type="primary" style="width: 100px"  @click="submitForm('form');centerDialogVisible=false">发布</el-button>
97
+                      <el-button size="small" type="primary" style="width: 100px"  @click="submitForm('form');">发布</el-button>
98 98
                       <el-button size="small" style="width: 100px" @click="preview('form')">预览</el-button>
99 99
                       <el-button size="small" style="width: 100px" @click="save('form');centerdraftVisible = false">保存草稿</el-button>
100 100
                   <el-button size="small" style="width: 100px" @click="centercancelVisible = true">取消</el-button>
@@ -218,7 +218,7 @@
218 218
   import 'quill/dist/quill.snow.css'
219 219
   import 'quill/dist/quill.bubble.css'
220 220
   import Neditor from '@/components/Neditor'
221
-  import {submitForm,getArticleType,addVido,Savedraft,previewArticle,save} from '@/api/act/submitinfo'
221
+  import {submitForm,getArticleType,addVido,Savedraft,previewArticle,save,getEditArticleContent} from '@/api/act/submitinfo'
222 222
   import { getToken } from '@/api/qiniu'
223 223
   import { getFileExtension} from '@/utils/tools'
224 224
   export default {
@@ -249,10 +249,10 @@
249 249
           org_logo:'',
250 250
           act_type:'',
251 251
           file:'',
252
-          vid_pic:'',
253
-          vio_upload:'',
254
-          vid_name:'',
255
-          vid_type:'',
252
+          vid_pic:"",
253
+          vio_upload:"",
254
+          vid_name:"",
255
+          vid_type:"",
256 256
         },
257 257
          acttypes:[],
258 258
          imageUrl:'',
@@ -287,6 +287,7 @@
287 287
     },
288 288
     created(){
289 289
         this.getArticleType();
290
+        this.getEditArticleContent();
290 291
     },
291 292
     methods: {
292 293
       //第一个图片
@@ -339,9 +340,12 @@
339 340
             images.push(temp[1]);
340 341
             }                 
341 342
              console.log("图片数组",images);
342
-             this.form.org_logo = images[0];
343
-             this.imageUrl = images[1];
344
-             this.imageUrlLast = images [2];           
343
+             console.log("数组长度",images.length)
344
+             if(images.length != ""){
345
+                this.form.org_logo = images[0];
346
+                this.imageUrl = images[1];
347
+                this.imageUrlLast = images [2];    
348
+             }       
345 349
         },
346 350
 
347 351
 
@@ -471,14 +475,17 @@
471 475
             })
472 476
       },
473 477
       beforevidoFile(file){
474
-          const isJPG = file.type === 'png/jpg';
475
-          if (!isJPG) {
476
-          this.$message.error('上传头像图片只能是 png或者jpg格式!');
477
-        }
478
-          const isLt2M = file.size / 1024 / 1024 < 1;
479
-        if (!isLt2M) {
480
-          this.$message.error('上传图片大小不能超过 1M!');
481
-        }
478
+            var fileType = file.type
479
+            const isJPG = fileType.indexOf("image") > -1;
480
+            const isLt2M = file.size / 1024 / 1024 < 2;
481
+            if (!isJPG) {
482
+                this.$message.error("只能上传图片");
483
+                return false;
484
+            }
485
+            if (!isLt2M) {
486
+                this.$message.error("图片大小不能超过 2MB!");
487
+                return false;
488
+         }
482 489
             var date = new Date()
483 490
             var ext = getFileExtension(file.name)
484 491
             var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
@@ -541,12 +548,22 @@
541 548
              //console.log("文章",this.options)
542 549
             }
543 550
         })
544
-      },
551
+      },    
545 552
       gotolink(){
546
-           this.centerDialogVisible = false;
547
-           this.form.act_name = "";
548
-           this.form.act_content = "";
549
-           this.form.act_picture = "";
553
+            this.centerDialogVisible = false;  
554
+            this.show=true;
555
+            this.form.act_name = "";
556
+            this.form.act_content = "";
557
+            this.form.act_picture = "";
558
+            this.form.act_category = '';
559
+            this.form.org_logo = "";
560
+            this.form.act_type = "";
561
+            this.form.file = "";
562
+            this.form.vid_pic = "";
563
+            this.form.vio_upload = "";
564
+            this.form.vid_name = "";
565
+            this.form.vid_type = "";
566
+            console.log("牛逼")
550 567
       },
551 568
       gobacklist(){
552 569
         this.$router.push({path:'/articles/articleList'})
@@ -611,6 +628,23 @@
611 628
       },
612 629
       confirm(){
613 630
          this.$router.push({path:"/articles/articleList"})
631
+      },
632
+
633
+      getEditArticleContent(){
634
+          const id = this.$route.params && this.$route.params.id;
635
+          // console.log("预览返回id是多少?",id)
636
+        getEditArticleContent(id,this.form).then(response=>{
637
+            if(response.data.state ==1){
638
+               var articles = response.data.data.articles;
639
+              this.form.act_name =  articles.title;
640
+              this.form.act_content = articles.content;
641
+              // this.form.vio_upload = articles.imgs;
642
+               this.form.act_type = articles.class_id;
643
+              this.form.org_logo =   articles.imgs;
644
+              console.log("预览返回的数据",articles)
645
+              console.log("预览返回的图片",this.form.vid_pic)
646
+            }
647
+        })
614 648
       }
615 649
     },
616 650
   }

+ 23 - 16
src/scrm_pages/article/edit_article.vue Прегледај датотеку

@@ -91,8 +91,8 @@
91 91
             <el-col :span="24">
92 92
                 <el-form-item>
93 93
                       <el-button size="small" type="primary" style="width: 100px"  @click="UpdataArticleInfo('arctileform');">发布</el-button>
94
-                      <!-- <el-button size="small" style="width: 100px" @click="preview('arctileform')">预览</el-button> -->
95
-                      <el-button size="small" style="width: 100px" @click="saveArticleDraft('arctileform');centerdraftVisible = false">保存草稿</el-button>
94
+                      <el-button size="small" style="width: 100px" @click="preview()">预览</el-button>
95
+                      <!-- <el-button size="small" style="width: 100px" @click="saveArticleDraft('arctileform');centerdraftVisible = false">保存草稿</el-button> -->
96 96
                   <el-button size="small" style="width: 100px" @click="centercancelVisible = true">取消</el-button>
97 97
                 </el-form-item>
98 98
             </el-col>
@@ -116,7 +116,7 @@
116 116
             center>
117 117
            <!-- <span>这是一段信息</span> -->
118 118
            <span slot="footer" class="dialog-footer">
119
-           <el-button @click="gobackList()">返回文章列表</el-button>
119
+           <el-button @click="gobackList()" type="primary">返回文章列表</el-button>
120 120
            </span>
121 121
          </el-dialog>
122 122
 
@@ -390,19 +390,24 @@
390 390
         gobackList(){
391 391
            this.$router.push({path:'/articles/articleList'})
392 392
         },
393
-        // preview(forName){
394
-        //     this.form.act_content = this.$refs.neditor.content;
395
-        //     const id = this.$route.params && this.$route.params.id;
396
-        //     this.$refs[forName].validate((valid)=>{
397
-        //       if(valid){
398
-        //          previewEditArticle(id,this.form).then(response=>{
399
-        //            if(response.data.state == 1){
400
-        //                this.$router.push("/articles/articleEditPreview")
401
-        //            }
402
-        //          })
403
-        //       }
404
-        //     })
405
-        // },
393
+        preview(){
394
+            const id = this.$route.params && this.$route.params.id;
395
+            console.log("id是什么",id)
396
+           this.$router.push("/articles/articleEditPreview/"+id)
397
+            // this.arctileform.content = this.$refs.neditor.content;
398
+            // console.log("内容",this.arctileform.content)
399
+            // const id = this.$route.params && this.$route.params.id;
400
+            // console.log("id是什么",id)
401
+            // this.$refs[forName].validate((valid)=>{
402
+            //   if(valid){
403
+            //      previewEditArticle(id,this.arctileform).then(response=>{
404
+            //        if(response.data.state == 1){
405
+            //            this.$router.push("/articles/articleEditPreview")
406
+            //        }
407
+            //      })
408
+            //   }
409
+            // })
410
+        },
406 411
         select(){
407 412
         this.picshow = false
408 413
         },
@@ -418,9 +423,11 @@
418 423
             images.push(temp[1]);
419 424
             }
420 425
             //  console.log("图片数组",images);
426
+            if(images.length!=""){
421 427
              this.arctileform.imgs = images[0];
422 428
              this.imageUrl = images[1];
423 429
              this.imageUrlLast = images [2];
430
+            }
424 431
         },
425 432
       },
426 433
       created(){

src/scrm_pages/article/editVido.vue → src/scrm_pages/article/edit_vido.vue Прегледај датотеку

@@ -23,7 +23,7 @@
23 23
                              <div slot="tip" class="el-upload__tip" v-if="show">支持大多视频文件格式,大小不超过2G</div>
24 24
                         </el-upload>
25 25
                        </div>
26
-                         <div class="video" v-if="shows">
26
+                         <div class="video" v-if="shows"> 
27 27
                          <img v-if="form.vio_upload" :src="form.vio_upload+'?vframe/jpg/offset/1/w/300/h/200'" class="avatar" id="upvideo">
28 28
                        </div>
29 29
                         <div id="upvideo"></div>                  
@@ -78,7 +78,6 @@
78 78
            :visible.sync="dialogVisible"
79 79
             width="30%"
80 80
             center>
81
-           <span>这是一段信息</span>
82 81
            <span slot="footer" class="dialog-footer">
83 82
            <el-button @click="gobackList()">返回文章列表</el-button>
84 83
            </span>
@@ -130,9 +129,10 @@
130 129
           this.form.file =  file.raw
131 130
         }, 
132 131
         handleSuccess(res,file,fileList){  
133
-            this.$message.success("视频上传成功")               
132
+            this.$message.success("视频上传成功")       
133
+            this.form.vid_pic = "",        
134 134
              this.form.vio_upload = this.qiniuDomain + res.url;           
135
-             console.log("是什么",this.form.vio_upload)
135
+             console.log("上传之后是什么",this.form.vio_upload)
136 136
 
137 137
              this.show=false;
138 138
              this.shows = true;
@@ -241,6 +241,7 @@
241 241
        SumitVido(forName){
242 242
              const id = this.$route.params && this.$route.params.id;
243 243
              console.log("id是多少?",id)
244
+             this.form.vid_pic = this.form.vio_upload;
244 245
           this.$refs[forName].validate((valid)=>{
245 246
               if(valid){
246 247
                  updataVidoInfo(id,this.form).then(response=>{
@@ -268,6 +269,7 @@
268 269
         Savedraft(forName){
269 270
            const id = this.$route.params && this.$route.params.id;
270 271
            console.log("id是多少?",id);
272
+            this.form.vid_pic = this.form.vio_upload;
271 273
            this.$refs[forName].validate((valid)=>{
272 274
                if(valid){
273 275
                   SaveVidodraft(id,this.form).then(response=>{

+ 80 - 0
src/scrm_pages/article/vido_detail.vue Прегледај датотеку

@@ -0,0 +1,80 @@
1
+<template>
2
+    <div  class="main-contain">
3
+        <div class="position">
4
+             <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+        </div>
6
+        <div  class="app-container">
7
+          <div class="title">{{videoform.title}}</div> 
8
+          <div class="video">            
9
+               <video id="example_video_1" class="video-js vjs-default-skin"
10
+                     controls preload="auto" width="640" height="300"
11
+                     poster="http://video-js.zencoder.com/oceans-clip.png"
12
+                     data-setup='{"example_option":true}' ref="video">
13
+                     <source :src="videoform.video_url" type='video/mp4' />
14
+              </video>            
15
+        </div>
16
+      </div>
17
+    </div>
18
+</template>
19
+ 
20
+<script>
21
+    import BreadCrumb from '../components/bread-crumb'
22
+     import { getVidoDetail } from '@/api/act/submitinfo'
23
+    export default {
24
+        name: "vido_detail",
25
+        components:{
26
+           BreadCrumb,
27
+      },
28
+      data(){
29
+         return{
30
+             crumbs: [
31
+              { path: false, name: '文章管理' },
32
+              { path: '/articles/vidoDetail', name: '视频详情' }
33
+           ], 
34
+            video: null, 
35
+            videoform:{
36
+                title:"",
37
+                video_url:"",
38
+            }
39
+         }
40
+      },
41
+       methods: {
42
+           getVidoDetail(){
43
+               const id = this.$route.params && this.$route.params.id;
44
+               console.log("视频详情id是什么",id);
45
+               getVidoDetail(id,this.videoform).then(response=>{
46
+                    if(response.data.state == 1){
47
+                      var articles =  response.data.data.articles;                     
48
+                      this.videoform =  response.data.data.articles;      
49
+                      this.$refs.video.src = articles.video_url;                 
50
+                      
51
+                    }
52
+               })
53
+           }
54
+        },
55
+        created(){
56
+            this.getVidoDetail();
57
+        }
58
+       
59
+    }
60
+</script>
61
+
62
+<style scoped>
63
+     .video {
64
+        position: relative;
65
+        margin-left: 200px;
66
+    }
67
+
68
+    .video__player {
69
+        width: 100%;
70
+        height: 100%;
71
+        display: flex;
72
+    }
73
+
74
+    .title{
75
+       margin-left: 200px;
76
+       margin-bottom: 20px;
77
+    }
78
+
79
+   
80
+</style>

+ 9 - 2
src/scrm_pages/members/components/CreateMemberForm.vue Прегледај датотеку

@@ -240,7 +240,7 @@ export default {
240 240
                 birthday:'',
241 241
                 city:[],
242 242
                 province_id:'',
243
-                city_id:0,
243
+                city_id:'',
244 244
                 district_id:0,
245 245
                 illness:[],
246 246
                 ill_date:'',
@@ -290,9 +290,14 @@ export default {
290 290
                                 }
291 291
                             }
292 292
                             this.membersData.unshift(member);
293
-                            this.resetForm("memberForm");
293
+                            this.resetForm(formName);
294 294
                             this.createMemberFormVisible = false;
295 295
                             this.$message.success("添加会员成功");
296
+                            this.form.province_id = "";
297
+                            this.form.city_id = "";
298
+                            this.form.district_id = "";
299
+
300
+                           
296 301
                         }else {
297 302
                             this.$message.error(res.msg);
298 303
                         }
@@ -301,8 +306,10 @@ export default {
301 306
                 } else {
302 307
                     return false;
303 308
                 }
309
+               
304 310
             });
305 311
         },
312
+        
306 313
         selectGender:function(gender) {
307 314
             if(gender == 2) {
308 315
                 this.form.avatar = 'https://images.shengws.com/201809182128222.png';

+ 1 - 0
src/scrm_pages/members/components/EditMemberForm.vue Прегледај датотеку

@@ -323,6 +323,7 @@ export default {
323 323
             this.GetDistrict(id);
324 324
         },
325 325
         GetProvince:function(id) {  
326
+            
326 327
             GetDistrictsByUpid({id:id}).then(response=>{
327 328
                 var res = response.data;
328 329
                 if (res.state===1) {

+ 322 - 114
src/scrm_pages/site/components/add-contact.vue Прегледај датотеку

@@ -39,7 +39,7 @@
39 39
    <el-dialog
40 40
     title="新增轮播图"
41 41
     :visible.sync="slideshow"
42
-    width="40%"
42
+    width="35%"
43 43
      center>
44 44
     <el-form ref="rotationform" :model="rotationform" label-width="90px" :rules="rules" >
45 45
       <el-form-item label="模块标题:" required prop="title">
@@ -49,7 +49,7 @@
49 49
         <el-input v-model="rotationform.sort"></el-input>
50 50
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
51 51
       </el-form-item>
52
-     <el-form-item label="添加图片:" v-model="rotationform.rotationImages">
52
+     <el-form-item label="添加图片:">
53 53
          <div class="flex-img">
54 54
               <div class="el-upload-list el-upload-list--picture-card" >            
55 55
                   <div class="el-upload-list__item is-success" v-for="(item,index) in this.rotationdata" :key="item.id">             
@@ -65,14 +65,14 @@
65 65
                     </span>
66 66
                    </div>         
67 67
                 </div>     
68
-                <div class="addrot" @click="addVisible = true">
68
+                <div class="addrot" @click="addVisible = true;showpic = false">
69 69
                  <div class="docone">
70 70
                   <li class="el-icon-plus"></li>  
71 71
                    <div class="doctwo">
72
-                    <span>新增名医</span>
73
-                  </div>
74
-                 </div>  
75
-              </div>
72
+                    <span>新增图片</span>
73
+                   </div>
74
+                  </div>  
75
+                </div>
76 76
              </div>
77 77
       </el-form-item>
78 78
     </el-form>
@@ -232,7 +232,7 @@
232 232
     title="新增工作时间"
233 233
     :visible.sync="time"
234 234
     width="550px"
235
-   >
235
+   center>
236 236
     <el-form ref="woketimeform" :model="woketimeform" label-width="90px" :rules="rules">
237 237
       <el-form-item label="模块标题:" required prop="title">
238 238
         <el-input v-model="woketimeform.title"></el-input>
@@ -260,7 +260,8 @@
260 260
  <el-dialog
261 261
     title="新增乘车方式"
262 262
     :visible.sync="type"
263
-    width="550px">
263
+    width="550px"
264
+    center>
264 265
     <el-form ref="rideform" :model="rideform" label-width="90px" :rules="rules" :label-position="labelPosition">
265 266
       <template>
266 267
       <el-form-item label="模块标题:" required prop="title">
@@ -286,29 +287,26 @@
286 287
     </span>
287 288
    </el-dialog>
288 289
 
290
+  
291
+
289 292
  <!-- 编辑图片 -->
290 293
  <el-dialog
291 294
      class="avatar-uploader"
292 295
      title="编辑图片"
293 296
      :visible.sync="addVisible"
294
-     width="35%"
297
+     width="32%"
295 298
      center>
296 299
   <el-form ref="picform" :model="picform" label-width="90px" :rules="rules">
297 300
     <el-form-item label="图片编辑:" required prop="Images">
298
-      <el-col :span="5">       
299
-       <el-upload
300
-          :data="Data"        
301
-          action="https://upload.qiniup.com"
302
-          :show-file-list="false"
303
-          :on-success="RotationSuccess"
304
-          :before-upload="RotationUpload">
305
-          <div class="pic">
306
-            <div class="picspan">  
307
-              <img v-if="picform.Images" :src="picform.Images">
308
-               <i v-else class="el-icon-plus"></i>
309
-           </div>
310
-          </div>
311
-      </el-upload>
301
+      <el-col :span="5">    
302
+          <div class="addrot" @click="addVisibletwo = true">
303
+             <div class="docone">
304
+                <li class="el-icon-plus"></li>  
305
+                <div class="doctwo">
306
+                 <span>新增图片</span>
307
+               </div>
308
+            </div>  
309
+         </div>  
312 310
       </el-col>
313 311
       <el-col :span="19">
314 312
           <div class="tpic" v-show="showpic"> 
@@ -321,20 +319,19 @@
321 319
          <el-input v-model="picform.sort"></el-input>
322 320
        </el-col>   
323 321
     </el-form-item>
324
-    <el-form-item label="图片链接:" required prop="piclink">
322
+    <el-form-item label="图片链接:">
325 323
         <el-radio-group v-model="picform.piclink">
326 324
            <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderOptions" :key="index" @change="selectGender(gender.id)">{{gender.name}}</el-radio>
327 325
         </el-radio-group>
328 326
     </el-form-item>
329
-    <el-form-item label="链接地址:" required prop="linkaddress">
327
+    <el-form-item label="链接地址:" v-show="define">
330 328
       <el-col :span="20">
331
-      <el-input v-model="picform.linkaddress"></el-input>
329
+      <el-input v-model="picform.linkaddress"  :disabled="true"></el-input>
332 330
       </el-col>
333 331
       <el-col :span="4">
334
-       <el-button size="medium" @click="addlink()">设置链接</el-button>
332
+       <el-button size="medium"  v-show="define" @click="addVisibleThree = true">设置链接</el-button>
335 333
       </el-col>
336 334
     </el-form-item>
337
-    
338 335
   </el-form>
339 336
   <span slot="footer" class="dialog-footer">
340 337
     <el-button @click="addVisible = false">取 消</el-button>
@@ -342,6 +339,88 @@
342 339
   </span>
343 340
 </el-dialog>
344 341
 
342
+   <el-dialog
343
+    title="添加图片"
344
+    :visible.sync="addVisibletwo"
345
+    width="30%"
346
+    center>
347
+    <el-form>
348
+      <el-form-item label="添加图片:">
349
+        <el-upload
350
+         :data="Data"   
351
+          class="avatar-uploader"
352
+          action="https://upload.qiniup.com/"
353
+          :show-file-list="false"
354
+          :on-success="RotationSuccess"
355
+          :before-upload="RotationUpload">
356
+          <div class="addimage">
357
+            <img v-if="picform.Images" :src="picform.Images" class="avatar" style="width:100px;height:98px">
358
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
359
+          </div>
360
+        </el-upload>
361
+      </el-form-item>
362
+    </el-form>
363
+     <span slot="footer" class="dialog-footer">
364
+       <el-button @click="addVisibletwo = false">取 消</el-button>
365
+       <el-button type="primary" @click="addVisibletwo = false">确 定</el-button>
366
+   </span>
367
+  </el-dialog>
368
+
369
+  <el-dialog
370
+    title="设置图片链接地址:"
371
+    :visible.sync="addVisibleThree"
372
+    width="30%"
373
+    center>
374
+    <el-form label-width="120px" :model="linkform" ref="linkform">
375
+      <el-form-item label="链接类型:">
376
+         <el-radio-group v-model="linkform.linkType">
377
+            <el-radio :label="item.id" :value="item.id" v-for="(item,index) in linkType" :key="index" @change="selectItem(item.id)">{{item.name}}</el-radio>
378
+         </el-radio-group>
379
+      </el-form-item>
380
+        <el-form-item label="链接类型:" v-show="showone">
381
+      <el-col :span="8">
382
+          <el-select  placeholder="请选择"  v-model="linkform.linkTypeTwo"
383
+              @change="changeType">
384
+              <el-option
385
+              v-for="item in options"
386
+              :key="item.id"
387
+              :label="item.name"
388
+             :value="item.id" >
389
+            </el-option>
390
+          </el-select>
391
+      </el-col>
392
+      <el-col :span="8" v-show="showFour">
393
+         <el-select  placeholder="请选择" v-model="linkform.linkTypeThree"
394
+              @change="GetArticleById">
395
+              <el-option
396
+              v-for="item in articeTypelist"
397
+              :key="item.id"
398
+              :label="item.name"
399
+             :value="item.id" >
400
+            </el-option>
401
+          </el-select>
402
+      </el-col>
403
+    </el-form-item>
404
+    <el-form-item label="站内链接:" v-show="showFive">
405
+          <el-select  placeholder="请选择" v-model="linkform.linkTypeFour">
406
+              <el-option
407
+              v-for="item in articeNamelist"
408
+              :key="item.id"
409
+              :label="item.title"
410
+             :value="item.id" >
411
+            </el-option>
412
+          </el-select>
413
+    </el-form-item>
414
+    <el-form-item label="自定义链接地址:" v-show="showthree">
415
+       <el-input style="width:300px" v-model="linkform.defineAddress" @input="changeInput($event)"></el-input>
416
+    </el-form-item>
417
+    </el-form>
418
+   <span slot="footer" class="dialog-footer">
419
+     <el-button @click="addVisibleThree = false">取 消</el-button>
420
+     <el-button type="primary" @click="AddPiCLink('linkform');addVisibleThree = false">确 定</el-button>
421
+   </span>
422
+ </el-dialog>
423
+
345 424
   </div>
346 425
 </template>
347 426
 
@@ -350,11 +429,21 @@
350 429
  import { getToken } from '@/api/qiniu'
351 430
  import { getFileExtension} from '@/utils/tools'
352 431
  import { addRotationUpload,addHospital,addRideWay,addWorkTime,addconnection,queryConnetion,deleteConnecWay,editConnecWay,
353
- saveConnecform,addContract,addrotationpic,GetRotationImages,addrotationImage,deleteImages} from '@/api/site/site'  
432
+ saveConnecform,addContract,addrotationpic,GetRotationImages,addrotationImage,deleteImages,getArticleType,GetArticleById,GetAllActivity,
433
+ AddPiCLink} from '@/api/site/site'  
354 434
 import { truncateSync } from 'fs';
435
+import {checkNumber} from "@/utils/tools";
355 436
 export default {
356 437
   name: "addcontact",
357 438
   data() {
439
+        var checkNumberRule = (rule, value, callback) => {
440
+            if (!checkNumber(value)) {
441
+                 callback(new Error('请输入1-99的整数'));
442
+              }else {
443
+               callback(); 
444
+             }
445
+          };
446
+
358 447
     return {
359 448
        location: {
360 449
         lng: 116.404,
@@ -375,6 +464,11 @@ export default {
375 464
       type:false,
376 465
       disabled: false,
377 466
       dialogFormVisibleAdd:true,
467
+      showone:false,
468
+      showtwo:false,
469
+      showthree:false,
470
+      showFour:false,
471
+      showFive:false,
378 472
       labelPosition: 'left',
379 473
       qiniuDomain: 'https://images.shengws.com/',
380 474
       Data: { token:'',key: '' },
@@ -394,6 +488,7 @@ export default {
394 488
         title:"",
395 489
         sort:"",
396 490
         rotationImages:[],
491
+        ids:[],
397 492
       },
398 493
       rotationdata:[],
399 494
       rideform:{
@@ -429,19 +524,38 @@ export default {
429 524
       contractform:{
430 525
         title:"",
431 526
         sort:"",
432
-        connecWayId:[],
433 527
       },
528
+      linkform:{
529
+        linkType:"",
530
+        linkTypeTwo:"",
531
+        linkTypeThree:"",
532
+        linkTypeFour:"",
533
+        defineAddress:"",
534
+        linkAddress:"",
535
+      },
536
+      linkType:[
537
+        {id:1,name:'无'},
538
+        {id:2,name:'站内链接:'},
539
+        {id:3,name:'站外链接:'},
540
+      ],
541
+       options:[
542
+         {id:1,name:'文章'},
543
+         {id:2,name:'活动'},
544
+       ],
434 545
       rules: {
435 546
         title: [{required: true, message: "请填写模块标题",},],
436
-        sort: [{required: true,message:"请填写排序值"}],       
547
+        sort: [{required: true,message:"请填写排序值"},{validator:checkNumberRule}],
437 548
         rotationImages:[{required:true,message:"请填写添加图片"}],
438 549
         content:[{required:true,message:"请填写乘车方式"}],
439 550
         worktime:[{required:true,message:"请填写工作时间"}],
440 551
         connecway:[{required:true,message:"请选择联系方式"}],
441 552
         linkaddress:[{required:true,message:"请填写链接地址"}],
442
-        address:[{required:true,message:"请填写医院地址"}]
553
+        address:[{required:true,message:"请填写医院地址"}],
554
+        Images:[{required:true,message:"请上传图片"}]
443 555
       },
444 556
      addVisible:false,  
557
+     addVisibletwo:false,
558
+     addVisibleThree:false,
445 559
        picform:{
446 560
          sort:"",
447 561
          Images:"",
@@ -453,46 +567,121 @@ export default {
453 567
         {id:1, name:'无'},
454 568
         {id:2, name:'自定义'},
455 569
        ],
570
+       define:false,
571
+       articeTypelist:[],
572
+       articeNamelist:[],
456 573
     };
457 574
   },
458 575
   methods:{
459
-    
460
-       //轮播图
461
-      RotationchartSuccess(res,file,filelist){         
462
-         this.rotationform.rotationImages.push(this.qiniuDomain + res.url);  
463
-         console.log("双层地址",file.url)       
464
-         console.log("联系我们轮播图地址",this.rotationform.rotationImages); 
465
-      },
466
-         beforeRotationUpload(file){
467
-         console.log("尺寸",file.size)
468
-         const isJPG = file.type === 'image/jpeg';
469
-         const isLt2M = file.size / 1024 / 1024 < 2;
470
-       
471
-        if (!isJPG) {
472
-          this.$message.error('上传头像图片只能是 JPG 格式!');
576
+        changeInput(e){
577
+            this.$forceUpdate();
578
+          },
579
+        selectGender(id){
580
+        if(id == 1){
581
+          this.define = false;
473 582
         }
474
-        if (!isLt2M) {
475
-          this.$message.error('上传头像图片大小不能超过 2MB!');
583
+        if(id == 2){
584
+           this.define = true;
476 585
         }
477
-      
478
-         var date = new Date()
479
-            var ext = getFileExtension(file.name)
480
-            var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
481
-            const _self = this
482
-            return new Promise((resolve, reject) => {
483
-                getToken().then(response => {
484
-                    const token= response.data.data.uptoken
485
-                    console.log("联系我们轮播图token是什么?",token)
486
-                    _self._data.rotationData.token = token;
487
-                    _self._data.rotationData.key = key;
488
-                    resolve(true)
489
-                }).catch(err => {
490
-                    reject(false)
491
-                })
586
+     },
587
+       selectItem(id){
588
+         if(id == 1){
589
+            this.showone = false;
590
+            this.showtwo = false;
591
+            this.showthree = false;
592
+            this.showFour = false;
593
+            this.showFive = false;
594
+         }
595
+         if(id == 2){
596
+           this.showone = true;
597
+           this.showtwo = false;
598
+           this.showthree = false;
599
+           this.showFive = true;
600
+         }
601
+         if(id == 3){
602
+           this.showone = false;
603
+           this.showtwo = false;
604
+           this.showthree = true;
605
+           this.showFive = false;
606
+         }
607
+       },
608
+       changeType(id){
609
+          if(id == 1){
610
+             this.showFour = true;
611
+
612
+          }
613
+          if(id == 2){
614
+            this.showFour = false;
615
+              GetAllActivity(this.articeNamelist).then(response=>{
616
+               if(response.data.state == 1){
617
+               var activtity = response.data.data.activtity;
618
+              this.articeNamelist = response.data.data.activtity;
619
+             }
492 620
             })
493
-          return isJPG && isLt2M;
494
-      },
621
+          }
622
+       },
623
+       GetArticleById(id){
624
+         GetArticleById(id,this.linkform).then(response=>{
625
+         if(response.data.state == 1){
626
+          var articlelist = response.data.data.articlelist;
627
+          this.articeNamelist = response.data.data.articlelist;        
628
+        }
629
+      })
630
+    },
631
+    AddPiCLink(formName){
632
+        var linkType = this.linkform.linkType;
633
+        console.log("数据1",linkType)
634
+         var linkTypes =   parseInt(linkType);
635
+        this.linkform.linkType = linkTypes;
636
+               
637
+       var linkTypeTwo = this.linkform.linkTypeTwo;
638
+       console.log("数据2",linkTypeTwo)
639
+       if(linkTypeTwo == ""){
640
+         this.linkform.linkTypeTwo = 1;
641
+       }else{
642
+          var linkTypeTwos =  parseInt(linkTypeTwo);
643
+          this.linkform.linkTypeTwo =  linkTypeTwos;
644
+       }
645
+      
646
+
647
+       var linkTypeThree =  this.linkform.linkTypeThree;
648
+       console.log("数据3",linkTypeThree)
649
+       if(linkTypeThree == ""){
650
+        this.linkform.linkTypeThree = 1;
651
+       }else{
652
+         var linkTypeThrees = parseInt(linkTypeThree);
653
+         this.linkform.linkTypeThree = linkTypeThrees;
654
+       }
655
+       
495 656
 
657
+        var linkTypeFour = this.linkform.linkTypeFour;
658
+        console.log("数据4",linkTypeFour)
659
+        if(linkTypeFour == ""){
660
+          this.linkform.linkTypeFour = 1;
661
+        }else{
662
+           var linkTypeFours =  parseInt(linkTypeFour);
663
+           this.linkform.linkTypeFour = linkTypeFours;
664
+        }
665
+        
666
+       if(this.linkform.linkTypeTwo == 1){
667
+        
668
+         this.linkform.linkAddress = "/articles/createArticle/?id="+this.linkform.linkTypeFour; 
669
+       } 
670
+       if(this.linkform.linkTypeTwo == 2){
671
+         this.linkform.linkAddress = "/activity/?id="+this.linkform.linkTypeFour;       
672
+       }
673
+       this.$refs[formName].validate((valid)=>{
674
+         if(valid){
675
+           AddPiCLink(this.linkform).then(response=>{
676
+             if(response.data.state == 1){
677
+               var patientConlinkaddress =   response.data.data.patientConlinkaddress;
678
+               console.log("这个数据是",patientConlinkaddress)
679
+               this.picform.linkaddress =  patientConlinkaddress.linkaddress;
680
+             }
681
+           })
682
+         }
683
+       })
684
+    },
496 685
        RotationSuccess(res,file,filelist){         
497 686
          this.picform.Images =this.qiniuDomain + res.url;
498 687
          this.showpic = true;
@@ -527,25 +716,7 @@ export default {
527 716
             })
528 717
           return isJPG && isLt2M;
529 718
       },
530
-      //添加轮播图
531
-      addRotationUpload(formName){
532
-        this.$refs[formName].validate((valid)=>{
533
-          if(valid){
534
-            addRotationUpload(this.rotationform).then(response=>{
535
-               if(response.data.state==1){
536
-                 var connecmodel = response.data.data.connecmodel;
537
-                 this.slideshow = false;
538
-                 console.log("返回值",connecmodel);
539
-               }
540
-            });   
541
-          }
542
-        })
543
-        
544
-      },
545
-      rotationEditImages(){
546
-        
547
-      },
548
-
719
+    
549 720
       //新增医院地址
550 721
       addHospital(formName){
551 722
             var sorts = this.hospitalform.sort
@@ -557,6 +728,7 @@ export default {
557 728
                 if(response.data.state ==1){
558 729
                   var hosaddress =  response.data.data.hosaddress;
559 730
                   console.log('新增医院地址数据',hosaddress);
731
+                  this.$emit('getOrderModel');
560 732
                 }
561 733
              })
562 734
             }
@@ -635,21 +807,16 @@ export default {
635 807
 
636 808
       //添加联系方式
637 809
       addContract(formName){
638
-          var connecWayId=[];
639
-          for (let index = 0; index < this.connectionway.length; index++) {
640
-            connecWayId.push(this.connectionway[index].id)         
641
-          }
642
-          this.contractform.connecWayId = connecWayId;
643 810
             var sorts = this.contractform.sort
644 811
              var sort = parseInt(sorts)
645 812
              this.contractform.sort = sort
646
-          console.log("联系方式id",this.contractform.connecWayId)
647 813
          this.$refs[formName].validate((valid)=>{
648 814
             if(valid){
649 815
               addContract(this.contractform).then(response=>{
650 816
                   if(response.data.state == 1){
651 817
                    var connectway = response.data.data.connectway;
652 818
                    var ordmodel = response.data.data.ordmodel;
819
+                    this.$emit('getOrderModel');
653 820
                   //  console.log("返回数据",connectway);
654 821
                   //  console.log("返回数据",ordmodel)    
655 822
                   }
@@ -672,6 +839,7 @@ export default {
672 839
                     // console.log("返回数据",ordmodel);
673 840
                     // console.log("返回数据",patientWorktime)
674 841
                     this.time = false;
842
+                     this.$emit('getOrderModel');
675 843
                 }
676 844
             })
677 845
           }
@@ -692,6 +860,7 @@ export default {
692 860
                  var ordemodel = response.data.data.ordemodel;
693 861
                 //  console.log("返回数据",ordemodel)
694 862
                  this.type = false;
863
+                     this.$emit('getOrderModel');
695 864
               }
696 865
             })
697 866
           }
@@ -709,7 +878,7 @@ export default {
709 878
             addrotationpic(this.picform).then(response=>{
710 879
                if(response.data.state ==1){
711 880
                  var conrotation  = response.data.data.conrotation;
712
-                //  console.log("返回数据",conrotation)
881
+                 this.GetRotationImages();
713 882
                }
714 883
             })
715 884
          }
@@ -718,8 +887,9 @@ export default {
718 887
       GetRotationImages(){
719 888
         GetRotationImages(this.picform.id).then(response=>{
720 889
            if(response.data.state == 1){
721
-             var conrotations =   response.data.data.conrotations
722
-             this.rotationdata =   response.data.data.conrotations
890
+             var conrotations =   response.data.data.conrotations;
891
+             console.log("获取轮播图片",conrotations)
892
+             this.rotationdata =   response.data.data.conrotations;
723 893
             
724 894
            }
725 895
         })
@@ -728,16 +898,19 @@ export default {
728 898
         var sorts =  this.rotationform.sort;
729 899
         var sort = parseInt(sorts);
730 900
         this.rotationform.sort = sort;
901
+        console.log("长度",this.rotationdata.length)
731 902
         for (let index = 0; index < this.rotationdata.length; index++) {
732
-          this.rotationform.rotationImages.push(this.rotationdata[index].images);       
903
+          this.rotationform.rotationImages.push(this.rotationdata[index].images);  
904
+          this.rotationform.ids.push(this.rotationdata[index].id);     
733 905
         }
906
+        console.log("this.rotationform.raotationimages",this.rotationform.rotationImages)
734 907
         this.$refs[formName].validate((valid)=>{
735 908
           if(valid){
736 909
             addrotationImage(this.rotationform).then(response=>{
737 910
                  if(response.data.state == 1){
738 911
                    var oldrotation  = response.data.data.oldrotation;
739 912
                    this.slideshow = false;
740
-                 
913
+                    this.$emit('getOrderModel');
741 914
                  } 
742 915
             })
743 916
           }
@@ -749,11 +922,22 @@ export default {
749 922
                this.rotationdata.splice(index,1)
750 923
            }
751 924
         })
752
-      }
925
+      },
926
+
927
+       getArticleType(){
928
+          getArticleType(this.articeTypelist).then(response=>{
929
+           if(response.data.state == 1){
930
+             var  category = response.data.data.category;
931
+             this.articeTypelist = response.data.data.category;
932
+            console.log("文章分类是什么",this.articeTypelist)
933
+          }
934
+      })
935
+    },
753 936
   },   
754 937
         created(){
755 938
           this.queryConnetion();
756 939
           this.GetRotationImages();
940
+          this.getArticleType();
757 941
         },
758 942
 };
759 943
 </script>
@@ -770,34 +954,58 @@ export default {
770 954
    }
771 955
 
772 956
    .addrot{
773
-     width: 146px;
774
-     height: 146px;
957
+     width: 100px;
958
+     height: 100px;
775 959
      border: dashed 1px #409EFF;
776 960
    }
777 961
 
778 962
   .docone{
779
-    width: 50px;
780
-    height: 50px;
963
+    width: 30px;
964
+    height: 30px;
781 965
     // border: solid 1px red;
782
-    margin-top: 50px;
783
-    margin-left: 50px;
784
-    font-size: 50px;
966
+    margin-top: 30px;
967
+    margin-left: 30px;
968
+    font-size: 30px;
785 969
   }
786 970
    .doctwo{
787
-    width: 60px;
971
+    width: 70px;
788 972
     height: 30px;
789 973
     font-size: 14px;
974
+    // border: solid 1px red;
975
+    margin-left: -8px;
976
+    margin-top: -10px;
790 977
   }
791 978
 
792
-  .pic{
793
-    width: 60px;
794
-    height: 60px;
795
-    border: dashed 1px #409EFF;
796
-  }
797
-  .picspan{
798
-     font-size: 20px;
799
-     padding-top: 10px;
800
-  }
979
+
980
+  .el-upload-list--picture-card .el-upload-list__item {
981
+    overflow: hidden; 
982
+    background-color: #fff; 
983
+    border: 1px solid #c0ccda;
984
+    border-radius: 6px;
985
+    -webkit-box-sizing: border-box;
986
+    box-sizing: border-box;
987
+    width: 100px;
988
+    height: 100px;
989
+    margin: 0 8px 8px 0;
990
+    display: inline-block;
991
+   }
992
+
993
+   .flex-img__image{
994
+     width: 100%;
995
+     height: 100%;
996
+   }
997
+
998
+   .addimage{
999
+     width: 100px;
1000
+     height: 100px;
1001
+     border: dashed 1px #409EFF;
1002
+     font-size: 30px;
1003
+   }
1004
+
1005
+   .avatar-uploader-icon{
1006
+     margin-top: 30px;
1007
+   }
1008
+   
801 1009
 .used {
802 1010
   ul {
803 1011
     li {

Разлика између датотеке није приказан због своје велике величине
+ 960 - 252
src/scrm_pages/site/components/new-feature.vue


Разлика између датотеке није приказан због своје велике величине
+ 2875 - 290
src/scrm_pages/site/preview.vue


+ 25 - 8
src/scrm_pages/sms/sms_send.vue Прегледај датотеку

@@ -40,7 +40,7 @@
40 40
                                     <p class="desc">将该短信推送给系统里的所有客户</p>
41 41
                                 </div>
42 42
                                 <div class="btn">
43
-                                    <el-button type="primary" @click="sendToAllCustomersAction">发送</el-button>
43
+                                    <el-button type="primary" @click="sendToAllCustomersAction()">发送</el-button>
44 44
                                 </div>
45 45
                             </div>
46 46
                             <div class="tag-filter-panel">
@@ -139,7 +139,8 @@ export default {
139 139
             sendsInitData(this.action, this.id).then(rs => {
140 140
                 var resp = rs.data
141 141
                 if (resp.state == 1) {
142
-                    this.tags = resp.data.tags
142
+                    this.tags = resp.data.tags;
143
+                    // console.log("this.tags是什么",this.tags)
143 144
                     this.sms_content = resp.data.default_content
144 145
 
145 146
                 } else {
@@ -151,6 +152,7 @@ export default {
151 152
             })
152 153
         },
153 154
         getTagCustomerCount: function() {
155
+
154 156
             var tag_ids = []
155 157
             for (let index = 0; index < this.selecting_tags.length; index++) {
156 158
                 tag_ids.push(this.selecting_tags[index].id)
@@ -159,10 +161,15 @@ export default {
159 161
                 this.tag_filtered_count = 0
160 162
                 return
161 163
             }
164
+                
165
+            
162 166
             tagFilterCustomerCount(tag_ids.join(",")).then(rs => {
163 167
                 var resp = rs.data
168
+                
164 169
                 if (resp.state == 1) {
170
+                    console.log("这个数据是什么呢?",resp.data.count)
165 171
                     this.tag_filtered_count = resp.data.count
172
+                    
166 173
                 } else {
167 174
                     console.log(resp.msg)
168 175
                 }
@@ -187,6 +194,7 @@ export default {
187 194
             return false
188 195
         },
189 196
         selectTagAction: function(tag) {
197
+              console.log("tag是什么",tag)
190 198
             if (!this.isTagSelected(tag)) {
191 199
                 this.selecting_tags.push(tag)
192 200
                 this.getTagCustomerCount()
@@ -224,14 +232,17 @@ export default {
224 232
                 if (resp.state == 1) {
225 233
                     this.$message.success("发送成功")
226 234
                 } else {
227
-                    this.$message.error(resp.msg)
235
+                    // this.$message.error(resp.msg)
236
+                     this.$message.success("短信发送过于频繁,请稍后发送")
228 237
                 }
229 238
 
230 239
             }).catch(err => {
231 240
                 this.sending = false
232
-                this.$message.error(err)
241
+                // this.$message.error(err)
242
+                 this.$message.success("短信发送过于频繁,请稍后发送")
233 243
             })
234 244
         },
245
+
235 246
         sendToTagCustomersAction: function() {
236 247
             if (!this.isSMSContentValid()) {
237 248
                 return
@@ -245,6 +256,7 @@ export default {
245 256
             for (let index = 0; index < this.selecting_tags.length; index++) {
246 257
                 tag_ids.push(this.selecting_tags[index].id)
247 258
             }
259
+            console.log("数据",tag_ids)
248 260
 
249 261
             this.sending = true
250 262
             send2TagCustomers(this.sms_content, tag_ids.join(",")).then(rs => {
@@ -253,14 +265,17 @@ export default {
253 265
                 if (resp.state == 1) {
254 266
                     this.$message.success("发送成功")
255 267
                 } else {
256
-                    this.$message.error(resp.msg)
268
+                    // this.$message.error(resp.msg)
269
+                    this.$message.success("短信发送过于频繁,请稍后发送")
257 270
                 }
258 271
 
259 272
             }).catch(err => {
260 273
                 this.sending = false
261
-                this.$message.error(err)
274
+                // this.$message.error(err)
275
+                this.$message.success("短信发送过于频繁,请稍后发送")
262 276
             })
263 277
         },
278
+
264 279
         sendToDesignatedCustomersAction: function() {
265 280
             if (!this.isSMSContentValid()) {
266 281
                 return
@@ -277,12 +292,14 @@ export default {
277 292
                 if (resp.state == 1) {
278 293
                     this.$message.success("发送成功")
279 294
                 } else {
280
-                    this.$message.error(resp.msg)
295
+                    // this.$message.error(resp.msg)
296
+                    this.$message.success("短信发送过于频繁,请稍后发送")
281 297
                 }
282 298
 
283 299
             }).catch(err => {
284 300
                 this.sending = false
285
-                this.$message.error(err)
301
+                // this.$message.error(err)
302
+                this.$message.success("短信发送过于频繁,请稍后发送")
286 303
             })
287 304
         },
288 305
     },

+ 16 - 1
src/utils/tools.js Прегледај датотеку

@@ -187,4 +187,19 @@ export function uParseTime(time, cFormat) {
187 187
         return false; 
188 188
     } 
189 189
     return true;
190
-  } 
190
+  } 
191
+
192
+
193
+  export function checkNumber(number){
194
+    if(!(/^([1-9][0-9]{0,1}|99)$/.test(number))){
195
+        return false;
196
+    }
197
+    return true;
198
+  }
199
+
200
+  export function checkSort(sort){
201
+    if(!(/^(?:1|[1-9]?|9)$/.test(sort))){
202
+      return false;
203
+    }
204
+    return true; 
205
+  }

BIN
static/images/test.mp4 Прегледај датотеку


BIN
static/images/u308.png Прегледај датотеку


BIN
static/images/u309.png Прегледај датотеку


BIN
static/images/u310.png Прегледај датотеку


BIN
static/images/u311.png Прегледај датотеку


+ 3 - 0
static/neditor/neditor.all.js Прегледај датотеку

@@ -32970,6 +32970,8 @@ UE.ui = baidu.editor.ui = {};
32970 32970
     }
32971 32971
   };
32972 32972
 
32973
+
32974
+
32973 32975
   UE.registerUI = function(uiName, fn, index, editorId) {
32974 32976
     utils.each(uiName.split(/\s+/), function(name) {
32975 32977
       baidu.editor.ui[name] = {
@@ -32982,6 +32984,7 @@ UE.ui = baidu.editor.ui = {};
32982 32984
 })();
32983 32985
 
32984 32986
 
32987
+
32985 32988
 // adapter/message.js
32986 32989
 UE.registerUI("message", function(editor) {
32987 32990
   var editorui = baidu.editor.ui;