xiaoming_global 5 years ago
parent
commit
da8e97cfd6

+ 8 - 0
src/api/site/site.js View File

572
         data:data,
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 View File

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

+ 0 - 1
src/scrm_pages/article/articleList.vue View File

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

+ 33 - 12
src/scrm_pages/site/components/new-feature.vue View File

528
     title="新增活动列表"
528
     title="新增活动列表"
529
     :visible.sync="seven"
529
     :visible.sync="seven"
530
     width="550px"
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
       </el-form-item>
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
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
538
         <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
539
       </el-form-item>
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
       </el-form-item>
543
       </el-form-item>
544
     </el-form>
544
     </el-form>
545
     <span slot="footer" class="dialog-footer">
545
     <span slot="footer" class="dialog-footer">
546
       <el-button @click="seven = false">取 消</el-button>
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
     </span>
548
     </span>
549
   </el-dialog>
549
   </el-dialog>
550
   <!-- 新增魔方导航 -->
550
   <!-- 新增魔方导航 -->
775
 <script>
775
 <script>
776
    import { AddRotationChart, saveHispital,addOffices,AddDoctor,AddDoctorInfo,AddOfficeEnvironment,getQueryDocInfo,change,
776
    import { AddRotationChart, saveHispital,addOffices,AddDoctor,AddDoctorInfo,AddOfficeEnvironment,getQueryDocInfo,change,
777
    getQueryDoCHead,editDoctor,saveDocInfo,deleteDoctor,AddImageslink,getEditImages,AddMagicNavi,getMagicImages,AddMarginChart,
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
    import { getToken } from '@/api/qiniu'
779
    import { getToken } from '@/api/qiniu'
780
    import { getFileExtension} from '@/utils/tools'
780
    import { getFileExtension} from '@/utils/tools'
781
    import { isIP } from 'net';
781
    import { isIP } from 'net';
963
           piclink:"",
963
           piclink:"",
964
           linkaddress:"",
964
           linkaddress:"",
965
       },
965
       },
966
+      activeform:{
967
+         title:"",
968
+         sort:"",
969
+         number:"",
970
+      },
966
 
971
 
967
        rules: {
972
        rules: {
968
          title: [{required: true, message: "请填写模块标题",},],
973
          title: [{required: true, message: "请填写模块标题",},],
984
          linkaddress:[{required:true,message:"请填写链接地址"}],
989
          linkaddress:[{required:true,message:"请填写链接地址"}],
985
          imageUrl:[{required:true,message:"请填写图片编辑"}],
990
          imageUrl:[{required:true,message:"请填写图片编辑"}],
986
          margtitle:[{required:true,message:"请填写导航标题"}],
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
       })
1652
       })
1647
     },
1653
     },
1648
     updateRotionImages(formName){
1654
     updateRotionImages(formName){
1649
-       var sorts = this.editrotationform.sort;
1655
+         var sorts = this.editrotationform.sort;
1650
           var sort = parseInt(sorts);
1656
           var sort = parseInt(sorts);
1651
           this.editrotationform.sort = sort;
1657
           this.editrotationform.sort = sort;
1652
        this.$refs[formName].validate((valid)=>{
1658
        this.$refs[formName].validate((valid)=>{
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
    created(){
1687
    created(){