Browse Source

魔方导航

xiaoming_global 5 years ago
parent
commit
d7e8acf6f2

+ 2 - 1
build/webpack.base.conf.js View File

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

+ 3 - 1
index.html View File

21
     <div id="app"></div>
21
     <div id="app"></div>
22
     <!-- built files will be auto injected -->
22
     <!-- built files will be auto injected -->
23
     <script src='http://api.map.baidu.com/api?v=2.0&ak=?&callback=init'></script>
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
   </body>
27
   </body>
26
 </html>
28
 </html>

+ 28 - 3
src/api/act/submitinfo.js View File

210
    })
210
    })
211
 }
211
 }
212
 
212
 
213
-export function getPreviewInfo(params){
213
+export function getPreviewInfo(id,params){
214
+    console.log("我爱你中国",params)
214
     return request({
215
     return request({
215
-        url:"/api/acticle/getPreviewInfo",
216
-        method:'Post',
216
+        url:"/api/acticle/getPreviewInfo?id="+id,
217
+        method:'Get',
217
         params:params,
218
         params:params,
218
     })
219
     })
219
 }
220
 }
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 View File

240
 }
240
 }
241
 
241
 
242
 export function getQueryNewModel(params){
242
 export function getQueryNewModel(params){
243
-  
244
    return request({
243
    return request({
245
        url:"/api/site/getquerynewmodel",
244
        url:"/api/site/getquerynewmodel",
246
-       method:"Post",
245
+       method:"Get",
247
        params:params,
246
        params:params,
248
    })
247
    })
249
 }
248
 }
306
 }
305
 }
307
 
306
 
308
 export function SaveOffice(id,data){
307
 export function SaveOffice(id,data){
308
+    console.log("data是什么",data)
309
     return request({
309
     return request({
310
         url:"/api/site/saveoffice?id="+id,
310
         url:"/api/site/saveoffice?id="+id,
311
         method:"Post",
311
         method:"Post",
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
 export function  SaveOfficeEnvironment(id,data){
405
 export function  SaveOfficeEnvironment(id,data){
365
      return request({
406
      return request({
366
          url:"/api/site/saveofficeenvironment?id="+id,
407
          url:"/api/site/saveofficeenvironment?id="+id,
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
 export function addNavigation(data){
461
 export function addNavigation(data){
397
     return request({
462
     return request({
398
         url:"/api/site/addnavigation",
463
         url:"/api/site/addnavigation",
460
 }
525
 }
461
 
526
 
462
 export function GetRotationImages(params){
527
 export function GetRotationImages(params){
528
+   
463
     return request({
529
     return request({
464
         url:"/api/site/getrotationimages",
530
         url:"/api/site/getrotationimages",
465
         method:"Post",
531
         method:"Post",
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
 export function addHospital(data){
642
 export function addHospital(data){
569
     return request({
643
     return request({
570
         url:"/api/site/addhospital",
644
         url:"/api/site/addhospital",
580
         data:data,
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 View File

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

+ 28 - 7
src/router/modules/article.js View File

12
   },
12
   },
13
   children: [
13
   children: [
14
     {
14
     {
15
-      path: '/articles/createArticle',
15
+      path: '/articles/createArticle/:id',
16
       component: () => import('@/scrm_pages/article/createArticle'),
16
       component: () => import('@/scrm_pages/article/createArticle'),
17
       name: 'createArticle',
17
       name: 'createArticle',
18
       meta: { title: 'createArticle', noCache: true }
18
       meta: { title: 'createArticle', noCache: true }
43
     },
43
     },
44
     {
44
     {
45
       path: '/articles/articlePreview',
45
       path: '/articles/articlePreview',
46
-      component: () => import('@/scrm_pages/article/articlePreview'),
46
+      component: () => import('@/scrm_pages/article/article_preview'),
47
       name: 'articlePreview',
47
       name: 'articlePreview',
48
       hidden:true,
48
       hidden:true,
49
+      is_menu: false,
49
       meta: { title: 'articlePreview', noCache: true }
50
       meta: { title: 'articlePreview', noCache: true }
50
     },
51
     },
51
     {
52
     {
57
       meta: { title: 'editArticle', noCache: true }
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
       name:'editVido',
63
       name:'editVido',
63
       hidden:true,
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
       component: () => import('@/scrm_pages/article/articleEditPreview'),
70
       component: () => import('@/scrm_pages/article/articleEditPreview'),
69
       name: 'articleEditPreview',
71
       name: 'articleEditPreview',
70
       hidden:true,
72
       hidden:true,
73
+      is_menu:false,
71
       meta: { title: 'articleEditPreview', noCache: true }
74
       meta: { title: 'articleEditPreview', noCache: true }
72
     },
75
     },
73
     {
76
     {
74
       path: '/articles/articleCommentDetail/:id',
77
       path: '/articles/articleCommentDetail/:id',
75
-      component: () => import('@/scrm_pages/article/articleCommentDetail'),
78
+      component: () => import('@/scrm_pages/article/articlecomment_detail'),
76
       name: 'articleCommentDetail',
79
       name: 'articleCommentDetail',
77
       hidden:true,
80
       hidden:true,
81
+      is_menu:false,
78
       meta: { title: 'articleCommentDetail', noCache: true }
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 View File

4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
5
          </div>
5
          </div>
6
          <div class="app-container">
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
        </div>
20
        </div>
31
      </div>
21
      </div>
32
 </template>
22
 </template>
46
                      { path: '/articles/articleEditPreview', name: '文章编辑预览' }
36
                      { path: '/articles/articleEditPreview', name: '文章编辑预览' }
47
                 ],
37
                 ],
48
                 form:{
38
                 form:{
49
-                    title:'',
50
-                    content:'',
39
+                  title:"",
40
+                  content:"",
51
                 }
41
                 }
52
             }
42
             }
53
         },
43
         },
54
         methods:{
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
                       if(response.data.state == 1){
49
                       if(response.data.state == 1){
58
                          this.form =  response.data.data.articles;
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
             clossPreview(){
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
         created(){
61
         created(){
69
-            this.articleEditPreview();
62
+            this.getPreviewInfo();
70
         }
63
         }
71
     }
64
     }
72
 </script>
65
 </script>
73
       
66
       
74
 <style scoped>
67
 <style scoped>
75
     .title{
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
     .cont{
79
     .cont{
82
       position: relative;
80
       position: relative;
83
-      left: 200px;
81
+      /* left: 200px; */
84
     }
82
     }
85
     .but{
83
     .but{
86
       position: relative;
84
       position: relative;
87
-      left: 750px;
85
+      left: 900px;
88
     }
86
     }
89
 </style>
87
 </style>

+ 21 - 11
src/scrm_pages/article/articleList.vue View File

51
           </div>
51
           </div>
52
           <div class="activity-info-panel">
52
           <div class="activity-info-panel">
53
             <h3 class="title">
53
             <h3 class="title">
54
-              <a>{{article.title}}</a>
54
+              <span @click="articleDetail(article.id,article.type)">{{article.title}}</span>
55
             </h3>
55
             </h3>
56
             <div class="statistics">
56
             <div class="statistics">
57
               阅读:{{article.real_read_num}} 丨 评论:{{article.comment_num}} 丨 点赞:{{article.star_num}}
57
               阅读:{{article.real_read_num}} 丨 评论:{{article.comment_num}} 丨 点赞:{{article.star_num}}
77
           </div>
77
           </div>
78
           <div class="activity-time-panel">
78
           <div class="activity-time-panel">
79
             <span class="center">{{orgName}}</span>
79
             <span class="center">{{orgName}}</span>
80
-            <span class="time">2019-06-08</span>
80
+            <span class="time">{{articlecreatetime(article.ctime)}}</span>
81
           </div>
81
           </div>
82
         </div>
82
         </div>
83
       </div>
83
       </div>
100
   import BreadCrumb from '../components/bread-crumb'
100
   import BreadCrumb from '../components/bread-crumb'
101
   import { GetAllArticles,deleteArticle,deleteAllArticles,GetAllCategory} from '@/api/act/submitinfo'
101
   import { GetAllArticles,deleteArticle,deleteAllArticles,GetAllCategory} from '@/api/act/submitinfo'
102
   import PublishedCell from "@/scrm_pages/article/components/published_cell"
102
   import PublishedCell from "@/scrm_pages/article/components/published_cell"
103
+  import {uParseTime} from "@/utils/tools";
103
   export default {
104
   export default {
104
     name: 'commentList',
105
     name: 'commentList',
105
     components:{
106
     components:{
156
                     //  }
157
                     //  }
157
               })
158
               })
158
          },
159
          },
160
+         articlecreatetime(time){
161
+            return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
162
+         },
159
          selectsign(id){
163
          selectsign(id){
160
             console.log("id",id)
164
             console.log("id",id)
161
             this.listQuery.classid = id;
165
             this.listQuery.classid = id;
178
              return row.imgs
182
              return row.imgs
179
         },
183
         },
180
         AddArticle(){
184
         AddArticle(){
181
-           this.$router.push({path:'/articles/createArticle'})
185
+           this.$router.push({path:'/articles/createArticle/:id'})
182
         },
186
         },
183
         changeSelectingStatus(status){
187
         changeSelectingStatus(status){
184
           console.log("status是多少?",status)
188
           console.log("status是多少?",status)
226
             });
230
             });
227
            },
231
            },
228
            editArticles(id,articletype){
232
            editArticles(id,articletype){
229
-               console.log("文章id",id);
230
-               console.log("文章内型",articletype)
233
+              //  console.log("文章id",id);
234
+              //  console.log("文章内型",articletype)
231
                if(articletype == 1){
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
                if(articletype == 2){
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
                                    this.articsData.splice(index,1)
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
             }
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
     created(){
328
     created(){
319
       this.GetAllArticles();
329
       this.GetAllArticles();

+ 70 - 0
src/scrm_pages/article/article_detail.vue View File

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 View File

7
           <el-form label-width="90px" class="clearfix" :model="form" ref="acticleform">
7
           <el-form label-width="90px" class="clearfix" :model="form" ref="acticleform">
8
            <el-row :span=20>
8
            <el-row :span=20>
9
             <el-form-item>
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
             </el-form-item>
16
             </el-form-item>
14
           </el-row> 
17
           </el-row> 
15
            <el-row :span=20>
18
            <el-row :span=20>
16
             <el-form-item>
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
                 </div>    
25
                 </div>    
21
             </el-form-item>
26
             </el-form-item>
22
           </el-row>
27
           </el-row>
62
               });
67
               });
63
           },
68
           },
64
           clossPreview(){
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
     created(){
74
     created(){
74
 <style scoped>
80
 <style scoped>
75
     .title{
81
     .title{
76
         font-size: 20px;
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
     .cont{
91
     .cont{
82
       position: relative;
92
       position: relative;
83
       left: 200px;
93
       left: 200px;
86
       position: relative;
96
       position: relative;
87
       left: 750px;
97
       left: 750px;
88
     }
98
     }
89
-
99
+   
90
 </style>
100
 </style>

src/scrm_pages/article/articleCommentDetail.vue → src/scrm_pages/article/articlecomment_detail.vue View File


+ 21 - 4
src/scrm_pages/article/components/CreateArticleForm.vue View File

29
 
29
 
30
               </el-input>
30
               </el-input>
31
             </el-form-item>
31
             </el-form-item>
32
+            <div class="tips"><p>请输入1-99的整数,数值越小,模块排序越靠前</p></div>
32
           </el-row>
33
           </el-row>
33
         </el-form>
34
         </el-form>
34
         <span slot="footer" class="dialog-footer">
35
         <span slot="footer" class="dialog-footer">
42
 
43
 
43
 <script>
44
 <script>
44
     import { addCategory,getAritcleCount } from '@/api/act/submitinfo'
45
     import { addCategory,getAritcleCount } from '@/api/act/submitinfo'
46
+    import {checkNumber} from "@/utils/tools";
45
     export default {
47
     export default {
46
         name: "CreateArticleForm",       
48
         name: "CreateArticleForm",       
47
            props:{
49
            props:{
53
               }
55
               }
54
            },
56
            },
55
             data(){
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
                 return {
66
                 return {
57
-                    centerDialogVisible:false,
67
+                    centerDialogVisible:false,               
58
                     rules: {
68
                     rules: {
59
                     name: [{required: true, message: "请填写分类名称",},],
69
                     name: [{required: true, message: "请填写分类名称",},],
60
                     summary: [{required: true,message:"请填写分类描述"}],
70
                     summary: [{required: true,message:"请填写分类描述"}],
61
-                    order: [{required: true,message:"请填写排序"}],
71
+                    order: [{required: true,message:"请填写排序"},{validator:checkNumberRule}],
62
                  },
72
                  },
63
                 acticleform:[],
73
                 acticleform:[],
64
                  form:{
74
                  form:{
102
                             }).catch(e=>{})
112
                             }).catch(e=>{})
103
                        }   
113
                        }   
104
                    });         
114
                    });         
105
-              },  
115
+              },    
106
           },
116
           },
107
       }  
117
       }  
108
 </script>
118
 </script>
109
 
119
 
110
 <style scoped>
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
 </style>
129
 </style>
113
    
130
    

+ 10 - 1
src/scrm_pages/article/components/EditArticleForm.vue View File

38
     </div>
38
     </div>
39
 </template>
39
 </template>
40
 <script>
40
 <script>
41
+ import {checkNumber} from "@/utils/tools";
41
  import { EditArticleCategory } from '@/api/act/submitinfo'
42
  import { EditArticleCategory } from '@/api/act/submitinfo'
42
 export default {
43
 export default {
43
     name: "EditArticleForm",
44
     name: "EditArticleForm",
60
       }
61
       }
61
     },
62
     },
62
      data(){
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
           return {
72
           return {
64
           centerDialogVisible:false,
73
           centerDialogVisible:false,
65
            rules: {
74
            rules: {
66
              name: [{required: true, message: "请填写分类名称",},],
75
              name: [{required: true, message: "请填写分类名称",},],
67
              summary: [{required: true,message:"请填写分类描述"}],
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 View File

94
           <el-row :span="24">
94
           <el-row :span="24">
95
             <el-col :span="24">
95
             <el-col :span="24">
96
                 <el-form-item>
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
                       <el-button size="small" style="width: 100px" @click="preview('form')">预览</el-button>
98
                       <el-button size="small" style="width: 100px" @click="preview('form')">预览</el-button>
99
                       <el-button size="small" style="width: 100px" @click="save('form');centerdraftVisible = false">保存草稿</el-button>
99
                       <el-button size="small" style="width: 100px" @click="save('form');centerdraftVisible = false">保存草稿</el-button>
100
                   <el-button size="small" style="width: 100px" @click="centercancelVisible = true">取消</el-button>
100
                   <el-button size="small" style="width: 100px" @click="centercancelVisible = true">取消</el-button>
218
   import 'quill/dist/quill.snow.css'
218
   import 'quill/dist/quill.snow.css'
219
   import 'quill/dist/quill.bubble.css'
219
   import 'quill/dist/quill.bubble.css'
220
   import Neditor from '@/components/Neditor'
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
   import { getToken } from '@/api/qiniu'
222
   import { getToken } from '@/api/qiniu'
223
   import { getFileExtension} from '@/utils/tools'
223
   import { getFileExtension} from '@/utils/tools'
224
   export default {
224
   export default {
249
           org_logo:'',
249
           org_logo:'',
250
           act_type:'',
250
           act_type:'',
251
           file:'',
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
          acttypes:[],
257
          acttypes:[],
258
          imageUrl:'',
258
          imageUrl:'',
287
     },
287
     },
288
     created(){
288
     created(){
289
         this.getArticleType();
289
         this.getArticleType();
290
+        this.getEditArticleContent();
290
     },
291
     },
291
     methods: {
292
     methods: {
292
       //第一个图片
293
       //第一个图片
339
             images.push(temp[1]);
340
             images.push(temp[1]);
340
             }                 
341
             }                 
341
              console.log("图片数组",images);
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
             })
475
             })
472
       },
476
       },
473
       beforevidoFile(file){
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
             var date = new Date()
489
             var date = new Date()
483
             var ext = getFileExtension(file.name)
490
             var ext = getFileExtension(file.name)
484
             var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
491
             var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
541
              //console.log("文章",this.options)
548
              //console.log("文章",this.options)
542
             }
549
             }
543
         })
550
         })
544
-      },
551
+      },    
545
       gotolink(){
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
       gobacklist(){
568
       gobacklist(){
552
         this.$router.push({path:'/articles/articleList'})
569
         this.$router.push({path:'/articles/articleList'})
611
       },
628
       },
612
       confirm(){
629
       confirm(){
613
          this.$router.push({path:"/articles/articleList"})
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 View File

91
             <el-col :span="24">
91
             <el-col :span="24">
92
                 <el-form-item>
92
                 <el-form-item>
93
                       <el-button size="small" type="primary" style="width: 100px"  @click="UpdataArticleInfo('arctileform');">发布</el-button>
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
                   <el-button size="small" style="width: 100px" @click="centercancelVisible = true">取消</el-button>
96
                   <el-button size="small" style="width: 100px" @click="centercancelVisible = true">取消</el-button>
97
                 </el-form-item>
97
                 </el-form-item>
98
             </el-col>
98
             </el-col>
116
             center>
116
             center>
117
            <!-- <span>这是一段信息</span> -->
117
            <!-- <span>这是一段信息</span> -->
118
            <span slot="footer" class="dialog-footer">
118
            <span slot="footer" class="dialog-footer">
119
-           <el-button @click="gobackList()">返回文章列表</el-button>
119
+           <el-button @click="gobackList()" type="primary">返回文章列表</el-button>
120
            </span>
120
            </span>
121
          </el-dialog>
121
          </el-dialog>
122
 
122
 
390
         gobackList(){
390
         gobackList(){
391
            this.$router.push({path:'/articles/articleList'})
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
         select(){
411
         select(){
407
         this.picshow = false
412
         this.picshow = false
408
         },
413
         },
418
             images.push(temp[1]);
423
             images.push(temp[1]);
419
             }
424
             }
420
             //  console.log("图片数组",images);
425
             //  console.log("图片数组",images);
426
+            if(images.length!=""){
421
              this.arctileform.imgs = images[0];
427
              this.arctileform.imgs = images[0];
422
              this.imageUrl = images[1];
428
              this.imageUrl = images[1];
423
              this.imageUrlLast = images [2];
429
              this.imageUrlLast = images [2];
430
+            }
424
         },
431
         },
425
       },
432
       },
426
       created(){
433
       created(){

src/scrm_pages/article/editVido.vue → src/scrm_pages/article/edit_vido.vue View File

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

+ 80 - 0
src/scrm_pages/article/vido_detail.vue View File

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 View File

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

+ 1 - 0
src/scrm_pages/members/components/EditMemberForm.vue View File

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

+ 322 - 114
src/scrm_pages/site/components/add-contact.vue View File

39
    <el-dialog
39
    <el-dialog
40
     title="新增轮播图"
40
     title="新增轮播图"
41
     :visible.sync="slideshow"
41
     :visible.sync="slideshow"
42
-    width="40%"
42
+    width="35%"
43
      center>
43
      center>
44
     <el-form ref="rotationform" :model="rotationform" label-width="90px" :rules="rules" >
44
     <el-form ref="rotationform" :model="rotationform" label-width="90px" :rules="rules" >
45
       <el-form-item label="模块标题:" required prop="title">
45
       <el-form-item label="模块标题:" required prop="title">
49
         <el-input v-model="rotationform.sort"></el-input>
49
         <el-input v-model="rotationform.sort"></el-input>
50
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
50
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
51
       </el-form-item>
51
       </el-form-item>
52
-     <el-form-item label="添加图片:" v-model="rotationform.rotationImages">
52
+     <el-form-item label="添加图片:">
53
          <div class="flex-img">
53
          <div class="flex-img">
54
               <div class="el-upload-list el-upload-list--picture-card" >            
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">             
55
                   <div class="el-upload-list__item is-success" v-for="(item,index) in this.rotationdata" :key="item.id">             
65
                     </span>
65
                     </span>
66
                    </div>         
66
                    </div>         
67
                 </div>     
67
                 </div>     
68
-                <div class="addrot" @click="addVisible = true">
68
+                <div class="addrot" @click="addVisible = true;showpic = false">
69
                  <div class="docone">
69
                  <div class="docone">
70
                   <li class="el-icon-plus"></li>  
70
                   <li class="el-icon-plus"></li>  
71
                    <div class="doctwo">
71
                    <div class="doctwo">
72
-                    <span>新增名医</span>
73
-                  </div>
74
-                 </div>  
75
-              </div>
72
+                    <span>新增图片</span>
73
+                   </div>
74
+                  </div>  
75
+                </div>
76
              </div>
76
              </div>
77
       </el-form-item>
77
       </el-form-item>
78
     </el-form>
78
     </el-form>
232
     title="新增工作时间"
232
     title="新增工作时间"
233
     :visible.sync="time"
233
     :visible.sync="time"
234
     width="550px"
234
     width="550px"
235
-   >
235
+   center>
236
     <el-form ref="woketimeform" :model="woketimeform" label-width="90px" :rules="rules">
236
     <el-form ref="woketimeform" :model="woketimeform" label-width="90px" :rules="rules">
237
       <el-form-item label="模块标题:" required prop="title">
237
       <el-form-item label="模块标题:" required prop="title">
238
         <el-input v-model="woketimeform.title"></el-input>
238
         <el-input v-model="woketimeform.title"></el-input>
260
  <el-dialog
260
  <el-dialog
261
     title="新增乘车方式"
261
     title="新增乘车方式"
262
     :visible.sync="type"
262
     :visible.sync="type"
263
-    width="550px">
263
+    width="550px"
264
+    center>
264
     <el-form ref="rideform" :model="rideform" label-width="90px" :rules="rules" :label-position="labelPosition">
265
     <el-form ref="rideform" :model="rideform" label-width="90px" :rules="rules" :label-position="labelPosition">
265
       <template>
266
       <template>
266
       <el-form-item label="模块标题:" required prop="title">
267
       <el-form-item label="模块标题:" required prop="title">
286
     </span>
287
     </span>
287
    </el-dialog>
288
    </el-dialog>
288
 
289
 
290
+  
291
+
289
  <!-- 编辑图片 -->
292
  <!-- 编辑图片 -->
290
  <el-dialog
293
  <el-dialog
291
      class="avatar-uploader"
294
      class="avatar-uploader"
292
      title="编辑图片"
295
      title="编辑图片"
293
      :visible.sync="addVisible"
296
      :visible.sync="addVisible"
294
-     width="35%"
297
+     width="32%"
295
      center>
298
      center>
296
   <el-form ref="picform" :model="picform" label-width="90px" :rules="rules">
299
   <el-form ref="picform" :model="picform" label-width="90px" :rules="rules">
297
     <el-form-item label="图片编辑:" required prop="Images">
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
       </el-col>
310
       </el-col>
313
       <el-col :span="19">
311
       <el-col :span="19">
314
           <div class="tpic" v-show="showpic"> 
312
           <div class="tpic" v-show="showpic"> 
321
          <el-input v-model="picform.sort"></el-input>
319
          <el-input v-model="picform.sort"></el-input>
322
        </el-col>   
320
        </el-col>   
323
     </el-form-item>
321
     </el-form-item>
324
-    <el-form-item label="图片链接:" required prop="piclink">
322
+    <el-form-item label="图片链接:">
325
         <el-radio-group v-model="picform.piclink">
323
         <el-radio-group v-model="picform.piclink">
326
            <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderOptions" :key="index" @change="selectGender(gender.id)">{{gender.name}}</el-radio>
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
         </el-radio-group>
325
         </el-radio-group>
328
     </el-form-item>
326
     </el-form-item>
329
-    <el-form-item label="链接地址:" required prop="linkaddress">
327
+    <el-form-item label="链接地址:" v-show="define">
330
       <el-col :span="20">
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
       </el-col>
330
       </el-col>
333
       <el-col :span="4">
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
       </el-col>
333
       </el-col>
336
     </el-form-item>
334
     </el-form-item>
337
-    
338
   </el-form>
335
   </el-form>
339
   <span slot="footer" class="dialog-footer">
336
   <span slot="footer" class="dialog-footer">
340
     <el-button @click="addVisible = false">取 消</el-button>
337
     <el-button @click="addVisible = false">取 消</el-button>
342
   </span>
339
   </span>
343
 </el-dialog>
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
   </div>
424
   </div>
346
 </template>
425
 </template>
347
 
426
 
350
  import { getToken } from '@/api/qiniu'
429
  import { getToken } from '@/api/qiniu'
351
  import { getFileExtension} from '@/utils/tools'
430
  import { getFileExtension} from '@/utils/tools'
352
  import { addRotationUpload,addHospital,addRideWay,addWorkTime,addconnection,queryConnetion,deleteConnecWay,editConnecWay,
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
 import { truncateSync } from 'fs';
434
 import { truncateSync } from 'fs';
435
+import {checkNumber} from "@/utils/tools";
355
 export default {
436
 export default {
356
   name: "addcontact",
437
   name: "addcontact",
357
   data() {
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
     return {
447
     return {
359
        location: {
448
        location: {
360
         lng: 116.404,
449
         lng: 116.404,
375
       type:false,
464
       type:false,
376
       disabled: false,
465
       disabled: false,
377
       dialogFormVisibleAdd:true,
466
       dialogFormVisibleAdd:true,
467
+      showone:false,
468
+      showtwo:false,
469
+      showthree:false,
470
+      showFour:false,
471
+      showFive:false,
378
       labelPosition: 'left',
472
       labelPosition: 'left',
379
       qiniuDomain: 'https://images.shengws.com/',
473
       qiniuDomain: 'https://images.shengws.com/',
380
       Data: { token:'',key: '' },
474
       Data: { token:'',key: '' },
394
         title:"",
488
         title:"",
395
         sort:"",
489
         sort:"",
396
         rotationImages:[],
490
         rotationImages:[],
491
+        ids:[],
397
       },
492
       },
398
       rotationdata:[],
493
       rotationdata:[],
399
       rideform:{
494
       rideform:{
429
       contractform:{
524
       contractform:{
430
         title:"",
525
         title:"",
431
         sort:"",
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
       rules: {
545
       rules: {
435
         title: [{required: true, message: "请填写模块标题",},],
546
         title: [{required: true, message: "请填写模块标题",},],
436
-        sort: [{required: true,message:"请填写排序值"}],       
547
+        sort: [{required: true,message:"请填写排序值"},{validator:checkNumberRule}],
437
         rotationImages:[{required:true,message:"请填写添加图片"}],
548
         rotationImages:[{required:true,message:"请填写添加图片"}],
438
         content:[{required:true,message:"请填写乘车方式"}],
549
         content:[{required:true,message:"请填写乘车方式"}],
439
         worktime:[{required:true,message:"请填写工作时间"}],
550
         worktime:[{required:true,message:"请填写工作时间"}],
440
         connecway:[{required:true,message:"请选择联系方式"}],
551
         connecway:[{required:true,message:"请选择联系方式"}],
441
         linkaddress:[{required:true,message:"请填写链接地址"}],
552
         linkaddress:[{required:true,message:"请填写链接地址"}],
442
-        address:[{required:true,message:"请填写医院地址"}]
553
+        address:[{required:true,message:"请填写医院地址"}],
554
+        Images:[{required:true,message:"请上传图片"}]
443
       },
555
       },
444
      addVisible:false,  
556
      addVisible:false,  
557
+     addVisibletwo:false,
558
+     addVisibleThree:false,
445
        picform:{
559
        picform:{
446
          sort:"",
560
          sort:"",
447
          Images:"",
561
          Images:"",
453
         {id:1, name:'无'},
567
         {id:1, name:'无'},
454
         {id:2, name:'自定义'},
568
         {id:2, name:'自定义'},
455
        ],
569
        ],
570
+       define:false,
571
+       articeTypelist:[],
572
+       articeNamelist:[],
456
     };
573
     };
457
   },
574
   },
458
   methods:{
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
        RotationSuccess(res,file,filelist){         
685
        RotationSuccess(res,file,filelist){         
497
          this.picform.Images =this.qiniuDomain + res.url;
686
          this.picform.Images =this.qiniuDomain + res.url;
498
          this.showpic = true;
687
          this.showpic = true;
527
             })
716
             })
528
           return isJPG && isLt2M;
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
       addHospital(formName){
721
       addHospital(formName){
551
             var sorts = this.hospitalform.sort
722
             var sorts = this.hospitalform.sort
557
                 if(response.data.state ==1){
728
                 if(response.data.state ==1){
558
                   var hosaddress =  response.data.data.hosaddress;
729
                   var hosaddress =  response.data.data.hosaddress;
559
                   console.log('新增医院地址数据',hosaddress);
730
                   console.log('新增医院地址数据',hosaddress);
731
+                  this.$emit('getOrderModel');
560
                 }
732
                 }
561
              })
733
              })
562
             }
734
             }
635
 
807
 
636
       //添加联系方式
808
       //添加联系方式
637
       addContract(formName){
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
             var sorts = this.contractform.sort
810
             var sorts = this.contractform.sort
644
              var sort = parseInt(sorts)
811
              var sort = parseInt(sorts)
645
              this.contractform.sort = sort
812
              this.contractform.sort = sort
646
-          console.log("联系方式id",this.contractform.connecWayId)
647
          this.$refs[formName].validate((valid)=>{
813
          this.$refs[formName].validate((valid)=>{
648
             if(valid){
814
             if(valid){
649
               addContract(this.contractform).then(response=>{
815
               addContract(this.contractform).then(response=>{
650
                   if(response.data.state == 1){
816
                   if(response.data.state == 1){
651
                    var connectway = response.data.data.connectway;
817
                    var connectway = response.data.data.connectway;
652
                    var ordmodel = response.data.data.ordmodel;
818
                    var ordmodel = response.data.data.ordmodel;
819
+                    this.$emit('getOrderModel');
653
                   //  console.log("返回数据",connectway);
820
                   //  console.log("返回数据",connectway);
654
                   //  console.log("返回数据",ordmodel)    
821
                   //  console.log("返回数据",ordmodel)    
655
                   }
822
                   }
672
                     // console.log("返回数据",ordmodel);
839
                     // console.log("返回数据",ordmodel);
673
                     // console.log("返回数据",patientWorktime)
840
                     // console.log("返回数据",patientWorktime)
674
                     this.time = false;
841
                     this.time = false;
842
+                     this.$emit('getOrderModel');
675
                 }
843
                 }
676
             })
844
             })
677
           }
845
           }
692
                  var ordemodel = response.data.data.ordemodel;
860
                  var ordemodel = response.data.data.ordemodel;
693
                 //  console.log("返回数据",ordemodel)
861
                 //  console.log("返回数据",ordemodel)
694
                  this.type = false;
862
                  this.type = false;
863
+                     this.$emit('getOrderModel');
695
               }
864
               }
696
             })
865
             })
697
           }
866
           }
709
             addrotationpic(this.picform).then(response=>{
878
             addrotationpic(this.picform).then(response=>{
710
                if(response.data.state ==1){
879
                if(response.data.state ==1){
711
                  var conrotation  = response.data.data.conrotation;
880
                  var conrotation  = response.data.data.conrotation;
712
-                //  console.log("返回数据",conrotation)
881
+                 this.GetRotationImages();
713
                }
882
                }
714
             })
883
             })
715
          }
884
          }
718
       GetRotationImages(){
887
       GetRotationImages(){
719
         GetRotationImages(this.picform.id).then(response=>{
888
         GetRotationImages(this.picform.id).then(response=>{
720
            if(response.data.state == 1){
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
         var sorts =  this.rotationform.sort;
898
         var sorts =  this.rotationform.sort;
729
         var sort = parseInt(sorts);
899
         var sort = parseInt(sorts);
730
         this.rotationform.sort = sort;
900
         this.rotationform.sort = sort;
901
+        console.log("长度",this.rotationdata.length)
731
         for (let index = 0; index < this.rotationdata.length; index++) {
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
         this.$refs[formName].validate((valid)=>{
907
         this.$refs[formName].validate((valid)=>{
735
           if(valid){
908
           if(valid){
736
             addrotationImage(this.rotationform).then(response=>{
909
             addrotationImage(this.rotationform).then(response=>{
737
                  if(response.data.state == 1){
910
                  if(response.data.state == 1){
738
                    var oldrotation  = response.data.data.oldrotation;
911
                    var oldrotation  = response.data.data.oldrotation;
739
                    this.slideshow = false;
912
                    this.slideshow = false;
740
-                 
913
+                    this.$emit('getOrderModel');
741
                  } 
914
                  } 
742
             })
915
             })
743
           }
916
           }
749
                this.rotationdata.splice(index,1)
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
         created(){
937
         created(){
755
           this.queryConnetion();
938
           this.queryConnetion();
756
           this.GetRotationImages();
939
           this.GetRotationImages();
940
+          this.getArticleType();
757
         },
941
         },
758
 };
942
 };
759
 </script>
943
 </script>
770
    }
954
    }
771
 
955
 
772
    .addrot{
956
    .addrot{
773
-     width: 146px;
774
-     height: 146px;
957
+     width: 100px;
958
+     height: 100px;
775
      border: dashed 1px #409EFF;
959
      border: dashed 1px #409EFF;
776
    }
960
    }
777
 
961
 
778
   .docone{
962
   .docone{
779
-    width: 50px;
780
-    height: 50px;
963
+    width: 30px;
964
+    height: 30px;
781
     // border: solid 1px red;
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
    .doctwo{
970
    .doctwo{
787
-    width: 60px;
971
+    width: 70px;
788
     height: 30px;
972
     height: 30px;
789
     font-size: 14px;
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
 .used {
1009
 .used {
802
   ul {
1010
   ul {
803
     li {
1011
     li {

File diff suppressed because it is too large
+ 960 - 252
src/scrm_pages/site/components/new-feature.vue


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


+ 25 - 8
src/scrm_pages/sms/sms_send.vue View File

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

187
         return false; 
187
         return false; 
188
     } 
188
     } 
189
     return true;
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 View File


BIN
static/images/u308.png View File


BIN
static/images/u309.png View File


BIN
static/images/u310.png View File


BIN
static/images/u311.png View File


+ 3 - 0
static/neditor/neditor.all.js View File

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