xiaoming_global hace 5 años
padre
commit
da8e97cfd6

+ 8 - 0
src/api/site/site.js Ver fichero

@@ -572,3 +572,11 @@ export function addHospital(data){
572 572
         data:data,
573 573
     })
574 574
 }
575
+
576
+export function addActiveform(data){
577
+    return request({
578
+        url:"/api/site/addactive",
579
+        method:"Post",
580
+        data:data,
581
+    })
582
+}

+ 1 - 1
src/router/modules/article.js Ver fichero

@@ -49,7 +49,7 @@ export default {
49 49
       meta: { title: 'articlePreview', noCache: true }
50 50
     },
51 51
     {
52
-      path: '/articles/editArticle',
52
+      path: '/articles/editArticle/:id',
53 53
       component: () => import('@/scrm_pages/article/editArticle'),
54 54
       name: 'editArticle',
55 55
       hidden:true,

+ 0 - 1
src/scrm_pages/article/articleList.vue Ver fichero

@@ -82,7 +82,6 @@
82 82
         </div>
83 83
       </div>
84 84
 
85
-
86 85
           <el-pagination
87 86
             @size-change="handleSizeChange"
88 87
             @current-change="handleCurrentChange"

+ 33 - 12
src/scrm_pages/site/components/new-feature.vue Ver fichero

@@ -528,23 +528,23 @@
528 528
     title="新增活动列表"
529 529
     :visible.sync="seven"
530 530
     width="550px"
531
-    :before-close="handleClose">
532
-    <el-form ref="form" :model="form" label-width="100px">
533
-      <el-form-item label="模块标题: ">
534
-        <el-input v-model="form.name"></el-input>
531
+    center>
532
+    <el-form ref="form" :model="activeform" label-width="120px" rules="rules">
533
+      <el-form-item label="模块标题: " prop required="title">
534
+        <el-input v-model="activeform.title"></el-input>
535 535
       </el-form-item>
536
-      <el-form-item label="排序值: ">
537
-        <el-input v-model="form.name"></el-input>
536
+      <el-form-item label="排序值: " required prop="sort">
537
+        <el-input v-model="activeform.sort"></el-input>
538 538
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
539 539
       </el-form-item>
540 540
      
541
-      <el-form-item label="首页展示条数: ">
542
-        <el-input v-model="form.name"></el-input>
541
+      <el-form-item label="首页展示条数: " required prop="number">
542
+        <el-input v-model="activeform.number"></el-input>
543 543
       </el-form-item>
544 544
     </el-form>
545 545
     <span slot="footer" class="dialog-footer">
546 546
       <el-button @click="seven = false">取 消</el-button>
547
-      <el-button type="primary" @click="seven = false">确 定</el-button>
547
+      <el-button type="primary" @click="addActiveform('activeform');seven = false">确 定</el-button>
548 548
     </span>
549 549
   </el-dialog>
550 550
   <!-- 新增魔方导航 -->
@@ -775,7 +775,7 @@
775 775
 <script>
776 776
    import { AddRotationChart, saveHispital,addOffices,AddDoctor,AddDoctorInfo,AddOfficeEnvironment,getQueryDocInfo,change,
777 777
    getQueryDoCHead,editDoctor,saveDocInfo,deleteDoctor,AddImageslink,getEditImages,AddMagicNavi,getMagicImages,AddMarginChart,
778
-   deleteRotations,editRotationImages,updateRotionImages} from '@/api/site/site'  
778
+   deleteRotations,editRotationImages,updateRotionImages,addActiveform} from '@/api/site/site'  
779 779
    import { getToken } from '@/api/qiniu'
780 780
    import { getFileExtension} from '@/utils/tools'
781 781
    import { isIP } from 'net';
@@ -963,6 +963,11 @@ export default {
963 963
           piclink:"",
964 964
           linkaddress:"",
965 965
       },
966
+      activeform:{
967
+         title:"",
968
+         sort:"",
969
+         number:"",
970
+      },
966 971
 
967 972
        rules: {
968 973
          title: [{required: true, message: "请填写模块标题",},],
@@ -984,7 +989,8 @@ export default {
984 989
          linkaddress:[{required:true,message:"请填写链接地址"}],
985 990
          imageUrl:[{required:true,message:"请填写图片编辑"}],
986 991
          margtitle:[{required:true,message:"请填写导航标题"}],
987
-         address:[{required:true,message:"请填写链接地址"}]
992
+         address:[{required:true,message:"请填写链接地址"}],
993
+         number:[{required:true,message:"请填写活动条数"}]
988 994
       },
989 995
     };
990 996
   },
@@ -1646,7 +1652,7 @@ export default {
1646 1652
       })
1647 1653
     },
1648 1654
     updateRotionImages(formName){
1649
-       var sorts = this.editrotationform.sort;
1655
+         var sorts = this.editrotationform.sort;
1650 1656
           var sort = parseInt(sorts);
1651 1657
           this.editrotationform.sort = sort;
1652 1658
        this.$refs[formName].validate((valid)=>{
@@ -1661,6 +1667,21 @@ export default {
1661 1667
           })
1662 1668
          }
1663 1669
        })
1670
+    },
1671
+    addActiveform(formName){
1672
+      var sorts = this.addActiveform.sort;
1673
+      var sort =  parseInt(sorts);
1674
+      this.addActiveform.sort = sort;
1675
+      var numbers = his.addActiveform.number;
1676
+      var number = parseInt(numbers);
1677
+      this.addActiveform.number = number;
1678
+     this.$refs[formName].validate((valid)=>{
1679
+       if(valid){
1680
+          addActiveform(this.addActiveform).then(response=>{
1681
+             
1682
+          });
1683
+       }
1684
+     })
1664 1685
     }
1665 1686
   },  
1666 1687
    created(){