Browse Source

bug修改

xiaoming_global 4 years ago
parent
commit
fb967e556e
3 changed files with 801 additions and 265 deletions
  1. 105 5
      src/api/site/site.js
  2. 126 69
      src/scrm_pages/site/components/new-feature.vue
  3. 570 191
      src/scrm_pages/site/preview.vue

+ 105 - 5
src/api/site/site.js View File

@@ -541,9 +541,10 @@ export function addrotationImage(data){
541 541
     })
542 542
 }
543 543
 
544
-export function AddImageslink(data){
544
+export function AddImageslink(id,data){
545
+    console.log("id是多少呢法阿发",id)
545 546
    return request({
546
-       url:"/api/site/addimageslink",
547
+       url:"/api/site/addimageslink?id="+id,
547 548
        method:"Post",
548 549
        data:data,
549 550
    })
@@ -557,9 +558,10 @@ export function getEditImages(params){
557 558
     })
558 559
 }
559 560
 
560
-export function AddMagicNavi(data){
561
+export function AddMagicNavi(id,data){
562
+    console.log("id是什么呢",id)
561 563
    return request({
562
-       url:"/api/site/addmagicnavi",
564
+       url:"/api/site/addmagicnavi?id="+id,
563 565
        method:"Post",
564 566
        data:data,
565 567
    })
@@ -1009,7 +1011,7 @@ export function getEnImagesThree(params){
1009 1011
 }
1010 1012
 
1011 1013
 export function AddMagiclinkData(data){
1012
-    console.log("data是什么",data)
1014
+    console.log("中秋节快乐",data)
1013 1015
     return request({
1014 1016
         url:"/api/site/addmagiclinkdata",
1015 1017
         method:"Post",
@@ -1023,4 +1025,102 @@ export function getMacLinkAddress(params){
1023 1025
         method:"Get",
1024 1026
         params:params,
1025 1027
     })
1028
+}
1029
+
1030
+export function AddMacgicform(id,data){
1031
+    return request({
1032
+        url:"/api/site/addmacgicform?id="+id,
1033
+        method:"Post",
1034
+        data:data,
1035
+    })
1036
+}
1037
+
1038
+export function getMacImagesDetail(id,params){
1039
+   return request({
1040
+       url:"/api/site/getmacimagesdetail?id="+id,
1041
+       method:"Get",
1042
+       params:params,
1043
+   })
1044
+}
1045
+
1046
+export function deleteMacImagesDetail(id,data){
1047
+   return request({
1048
+       url:"/api/site/deletemaciamgesdetail?id="+id,
1049
+       method:"Post",
1050
+       data:data,
1051
+   })
1052
+}
1053
+
1054
+export function UpdateMacform(id,data){
1055
+   return request({
1056
+       url:"/api/site/updatemacform?id="+id,
1057
+       method:"Post",
1058
+       data:data,
1059
+   }) 
1060
+}
1061
+
1062
+export function getEditMacImageDetail(id,params){
1063
+    return request({
1064
+        url:"/api/site/geteditmacimagedetail?id="+id,
1065
+        method:"Get",
1066
+        params:params,
1067
+    })
1068
+}
1069
+
1070
+export function UpdateEditMacform(id,data){
1071
+   return request({
1072
+       url:"/api/site/updateeditmacform?id="+id,
1073
+       method:"Post",
1074
+       data:data,
1075
+   })
1076
+}
1077
+
1078
+export function getLikeMacAddressById(id,params){
1079
+    return request({
1080
+        url:"/api/site/getLikeMacAddressById?id="+id,
1081
+        method:"Get",
1082
+        params:params,
1083
+    })
1084
+}
1085
+
1086
+export function GetArticleName(id,params){
1087
+   return request({
1088
+       url:"/api/site/getarticlename?id="+id,
1089
+       method:"Get",
1090
+       params:params,
1091
+   })
1092
+}
1093
+
1094
+export function GetAllArticelist(params){
1095
+    return request({
1096
+        url:"/api/site/getallarticelist",
1097
+        method:"Get",
1098
+        params:params,
1099
+    })
1100
+}
1101
+
1102
+export function UpdateLinkAddress(id,data){
1103
+    
1104
+   return request({
1105
+       url:"/api/site/updatelinkaddress?id="+id,
1106
+       method:"Post",
1107
+       data:data,
1108
+   })
1109
+}
1110
+
1111
+export function AddMacLinkAddress(data){
1112
+    console.log("data是什么",data)
1113
+   return request({
1114
+       url:"/api/site/addmaclinkaddress",
1115
+       method:"Post",
1116
+       data:data,
1117
+   })
1118
+}
1119
+
1120
+export function GetLinkAddress(id,params){
1121
+   return request({
1122
+       url:"/api/site/getlinkaddress?id="+id,
1123
+       method:"Get",
1124
+       params:params,
1125
+   })
1026 1126
 }

+ 126 - 69
src/scrm_pages/site/components/new-feature.vue View File

@@ -110,14 +110,24 @@
110 110
   <el-form ref="picform" :model="picform" label-width="90px" :rules="rules">
111 111
     <el-form-item label="图片编辑:" required prop="imageUrl">
112 112
       <el-col :span="5">
113
-         <div class="addrot" @click="addpicdialogVisible = true">
113
+         <el-upload
114
+           :data="imageData"
115
+           class="avatar-uploader"
116
+           action="https://upload.qiniup.com"
117
+          :show-file-list="false"
118
+          :on-success="rotationSuccess"
119
+          :before-upload="rotationUpload">
120
+          <img v-if="picform.imageUrl" :src="picform.imageUrl" class="avatar">
121
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
122
+        </el-upload> 
123
+         <!-- <div class="addrot" @click="addpicdialogVisible = true">
114 124
              <div class="addrotone">
115 125
              <i class="el-icon-plus"></i>
116 126
             </div>  
117 127
              <div class="addrotwo">
118 128
                <span>新增图片</span>
119 129
              </div>
120
-        </div>
130
+        </div> -->
121 131
       </el-col>
122 132
       <el-col :span="19" v-show="isImages">   
123 133
           <div class="tpic"> 
@@ -140,7 +150,7 @@
140 150
       <el-input v-model="picform.linkaddress" style="width:300px"></el-input>
141 151
       </el-col>
142 152
       <el-col :span="4">
143
-       <el-button size="medium" @click="addlink()">设置链接</el-button>
153
+       <el-button size="medium" @click="linkVisible = true">设置链接</el-button>
144 154
       </el-col>
145 155
     </el-form-item>
146 156
     
@@ -151,7 +161,7 @@
151 161
   </span>
152 162
 </el-dialog>
153 163
 
154
-   <el-dialog
164
+   <!-- <el-dialog
155 165
      title="添加图片"
156 166
      :visible.sync="addpicdialogVisible"
157 167
      width="30%"
@@ -174,7 +184,7 @@
174 184
     <el-button @click="addpicdialogVisible = false">取 消</el-button>
175 185
     <el-button type="primary" @click="addpicdialogVisible = false">确 定</el-button>
176 186
   </span>
177
-</el-dialog>
187
+</el-dialog> -->
178 188
   
179 189
   <!-- 设置图片链接地址 -->
180 190
   <el-dialog
@@ -655,7 +665,7 @@
655 665
   </el-dialog>
656 666
   <!-- 新增魔方导航 -->
657 667
     <el-dialog
658
-    title="新增魔方导航1"
668
+    title="新增魔方导航"
659 669
     :visible.sync="eight"
660 670
     width="550px"
661 671
     center>
@@ -706,11 +716,11 @@
706 716
     :visible.sync="EditMacDialogVisible"
707 717
     width="30%"
708 718
     center>
709
-    <el-form label-width="90px" ref="editmacform" :model="editmacform">
710
-      <el-form-item label="导航标题:">
719
+    <el-form label-width="90px" ref="editmacform" :model="editmacform" :rules="rules">
720
+      <el-form-item label="导航标题:" required prop="margtitle">
711 721
           <el-input v-model="editmacform.margtitle"></el-input>
712 722
       </el-form-item>
713
-      <el-form-item label="导航图标:">
723
+      <el-form-item label="导航图标:" required prop="margimage">
714 724
         <el-upload
715 725
           :data="rotationData"
716 726
           class="avatar-uploader"
@@ -722,7 +732,7 @@
722 732
           <i v-else class="el-icon-plus avatar-uploader-icon"></i>     
723 733
        </el-upload>
724 734
       </el-form-item>
725
-      <el-form-item label="跳转设置:">
735
+      <el-form-item label="跳转设置:" required="jumpset">
726 736
          <el-radio-group v-model="editmacform.jumpset">
727 737
             <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderOptions" :key="index" @change="selectGender(gender.id)">{{gender.name}}</el-radio>
728 738
           </el-radio-group>
@@ -738,7 +748,7 @@
738 748
     </el-form>
739 749
    <span slot="footer" class="dialog-footer">
740 750
     <el-button @click="EditMacDialogVisible = false">取 消</el-button>
741
-    <el-button type="primary" @click="UpdateEditMacgin('editmacform');EditMacDialogVisible = false">确 定</el-button>
751
+    <el-button type="primary" @click="UpdateEditMacgin('editmacform');">确 定</el-button>
742 752
    </span>
743 753
   </el-dialog>
744 754
 
@@ -808,7 +818,7 @@
808 818
          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
809 819
        </el-upload>
810 820
        </el-form-item>
811
-       <el-form-item label="跳转设置">
821
+       <el-form-item label="跳转设置" required prop="jumpset">
812 822
          <el-radio-group v-model="editmarginform.jumpset">
813 823
             <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderOptions" :key="index" @change="selectGender(gender.id)">{{gender.name}}</el-radio>
814 824
           </el-radio-group>
@@ -824,7 +834,7 @@
824 834
      </el-form>
825 835
     <span slot="footer" class="dialog-footer">
826 836
     <el-button @click="MagicNavigation = false">取 消</el-button>
827
-    <el-button type="primary" @click="AddMagicNavi('editmarginform');MagicNavigation = false">确 定</el-button>
837
+    <el-button type="primary" @click="AddMagicNavi('editmarginform');">确 定</el-button>
828 838
   </span>
829 839
 </el-dialog> 
830 840
 
@@ -833,14 +843,14 @@
833 843
   :visible.sync="magicVisible"
834 844
   width="30%"
835 845
   center>
836
-  <el-form label-width="90px" ref="maclinkform" model="maclinkform">
846
+  <el-form label-width="90px" ref="maclinkform" :model="maclinkform">
837 847
      <el-form-item label="连接类型">
838 848
          <el-radio-group v-model="maclinkform.linkType">
839 849
             <el-radio :label="item.id" :value="item.id" v-for="(item,index) in defineOptions" :key="index" @change="selectItemtwo(item.id)">{{item.name}}</el-radio>
840 850
          </el-radio-group>
841 851
      </el-form-item>  
842 852
        <el-form-item label="链接类型:" v-show="definetwo">
843
-       <el-select v-model="maclinkform.instationlink" placeholder="请选择"
853
+       <el-select v-model="maclinkform.instationlink" placeholder="请选择" clearable
844 854
        @change="changeArticeType">
845 855
         <el-option
846 856
         v-for="item in options"
@@ -851,14 +861,28 @@
851 861
       </el-select>
852 862
      </el-form-item>
853 863
      <el-form-item label="文章分类" v-show="definetwo">
854
-       <el-select v-model="maclinkform.articeType" placeholder="请选择">
855
-        <el-option
856
-        v-for="item in articeTypelist"
857
-        :key="item.id"
858
-        :label="item.name"
859
-        :value="item.id">
860
-       </el-option>
864
+       <el-col :span="8">
865
+         <el-select v-model="maclinkform.articeType" placeholder="请选择" clearable
866
+         @change="GetArticleById">
867
+          <el-option
868
+          v-for="item in articeTypelist"
869
+          :key="item.id"
870
+          :label="item.name"
871
+          :value="item.id">
872
+         </el-option>
873
+       </el-select>
874
+       </el-col>
875
+       <el-col :span="8">
876
+        <el-select v-model="maclinkform.title" placeholder="请选择" clearable>
877
+          <el-option
878
+           v-for="item in articeNamelist"
879
+           :key="item.id"
880
+           :label="item.title"
881
+           :value="item.id">
882
+        </el-option>
861 883
       </el-select>
884
+       </el-col>
885
+      
862 886
      </el-form-item>
863 887
      <el-form-item label="电话号码:" v-show="definethree">
864 888
        <el-input v-model="maclinkform.phone"></el-input>
@@ -869,7 +893,7 @@
869 893
   </el-form>
870 894
   <span slot="footer" class="dialog-footer">
871 895
     <el-button @click="magicVisible = false">取 消</el-button>
872
-    <el-button type="primary" @click="AddMagiclinkData('maclinkform');magicVisible = false">确 定</el-button>
896
+    <el-button type="primary" @click="AddMagiclinkData('maclinkform');">确 定</el-button>
873 897
   </span>
874 898
 </el-dialog>
875 899
 
@@ -967,7 +991,8 @@
967 991
    import { AddRotationChart, saveHispital,addOffices,AddDoctor,AddDoctorInfo,AddImages,AddOfficeEnvironment,getQueryDocInfo,change,
968 992
    getQueryDoCHead,editDoctor,saveDocInfo,deleteDoctor,AddImageslink,getEditImages,AddMagicNavi,getMagicImages,AddMarginChart,
969 993
    deleteRotations,editRotationImages,updateRotionImages,addActiveform,deleteMargin,getEditImagesDetail,UpdateEditMacgin,getArticleType
970
-   ,AddArticeList,getEnImages,EditEnvirImages,AddtwoImages,deleteOfficeById,GetArticleById,GetAllActivity,AddLinkAddress,AddMagiclinkData} from '@/api/site/site'  
994
+   ,AddArticeList,getEnImages,EditEnvirImages,AddtwoImages,deleteOfficeById,GetArticleById,GetAllActivity,AddLinkAddress,AddMagiclinkData,
995
+   getMacLinkAddress} from '@/api/site/site'  
971 996
    import { getToken } from '@/api/qiniu'
972 997
    import { getFileExtension} from '@/utils/tools'
973 998
    import { isIP, isIPv4 } from 'net';
@@ -1046,12 +1071,13 @@ export default {
1046 1071
           defineAddress:"",
1047 1072
        },
1048 1073
        maclinkform:{
1049
-         linkType:"",
1050
-         instationlink:"",
1051
-         articeType:"",
1052
-         phone:"",
1053
-         outstationlink:"",
1054
-         linkaddress:"",
1074
+         linkType:'',
1075
+         instationlink:'',
1076
+         articeType:'',
1077
+         title:'',
1078
+         phone:'',
1079
+         outstationlink:'',
1080
+         linkaddress:'',
1055 1081
        },
1056 1082
        articeTypelist:[],
1057 1083
        acticeNamelist:[],
@@ -1188,6 +1214,7 @@ export default {
1188 1214
          ids:[],
1189 1215
       }, 
1190 1216
       editmarginform:{
1217
+        id:"",
1191 1218
         margtitle:"",
1192 1219
         margImage:"",
1193 1220
         marginaddress:"",
@@ -1200,6 +1227,7 @@ export default {
1200 1227
         ids:[],
1201 1228
       },
1202 1229
       picform:{
1230
+        id:"",
1203 1231
         imageUrl:"",
1204 1232
         sort:"",
1205 1233
         imagelink:"",
@@ -1248,8 +1276,8 @@ export default {
1248 1276
          image: [{required: true,message:"请填写新增名医"}],
1249 1277
          docname: [{required:true,message:"请填写医生姓名"}],
1250 1278
          doc_name:[{required:true,message:"请填写医生姓名"}],
1251
-         docHead: [{required: true,message:"请填写医生头像"}],
1252
-         dochead: [{required: true,message:"请填写医生头像"}],
1279
+         docHead: [{required: true,message:"请上传医生头像"}],
1280
+         dochead: [{required: true,message:"请上传医生头像"}],
1253 1281
          docpositional:[{required:true,message:"请填写医生职位"}],
1254 1282
          doc_postion:[{required:true,message:"请填写医生职位"}],
1255 1283
          docintroduction:[{required:true,message:"请填写医生简介"}],
@@ -1263,7 +1291,9 @@ export default {
1263 1291
          address:[{required:true,message:"请填写链接地址"}],
1264 1292
          number:[{required:true,message:"请填写活动条数"},{validator:checkSortRule}],
1265 1293
          enviroimages:[{required:true,message:"请上传图片"}],
1266
-         marginImages:[{required:true,message:"请添加图片"}]
1294
+         marginImages:[{required:true,message:"请添加图片"}],
1295
+         jumpset:[{required:true,message:"请选择跳转设置"}],
1296
+         margImage:[{required:true,message:"请上传导航图标"}],
1267 1297
       },
1268 1298
     };
1269 1299
   },
@@ -1323,6 +1353,7 @@ export default {
1323 1353
                 var patientLinkaddress =  response.data.data.patientLinkaddress;
1324 1354
                 var address = response.data.data.address;
1325 1355
                 this.picform.linkaddress = address.linkaddress;
1356
+                this.picform.id = address.id;
1326 1357
                 console.log("返回地址是多少",address)
1327 1358
                 console.log("数据返回",patientLinkaddress)
1328 1359
               }
@@ -1334,9 +1365,6 @@ export default {
1334 1365
     OpenCreate(){
1335 1366
        this.$refs.newfeature.Open();
1336 1367
     },
1337
-      addlink(){
1338
-        this.linkVisible = true;
1339
-      },
1340 1368
      //轮播图
1341 1369
      rotationEditImages(){
1342 1370
         this.dialogRotationVisible = true;
@@ -2027,41 +2055,42 @@ export default {
2027 2055
         }
2028 2056
      },
2029 2057
       selectItemtwo(id){
2030
-        alert(id)
2031 2058
        if(id == 1){
2032 2059
          this.definetwo = false;
2033 2060
          this.definethree = false;
2034 2061
          this.definefour = false;
2035
-         this.maclinkform.instationlink = "";
2036
-         this.maclinkform.articeType = "";
2037
-         this.maclinkform.phone = "";
2038
-         this.maclinkform.outstationlink = "";
2062
+         this.maclinkform.instationlink = '';
2063
+         this.maclinkform.articeType = '';
2064
+         
2065
+         this.maclinkform.phone = '';
2066
+         this.maclinkform.outstationlink = '';
2067
+        
2039 2068
        }
2040 2069
 
2041 2070
        if(id==2){
2042 2071
           this.definetwo = true;
2043 2072
           this.definethree = false;
2044 2073
           this.definefour = false;
2045
-          this.maclinkform.phone = "";
2046
-          this.maclinkform.outstationlink = "";
2074
+          this.maclinkform.phone = '';
2075
+          this.maclinkform.outstationlink = '';
2047 2076
        }
2048 2077
 
2049 2078
        if(id==3){
2050 2079
          this.definethree = true;
2051 2080
          this.definetwo = false;
2052 2081
          this.definefour = false;
2053
-         this.maclinkform.instationlink = "";
2054
-         this.maclinkform.articeType = "";
2055
-         this.maclinkform.outstationlink = "";
2082
+         this.maclinkform.instationlink = '';
2083
+         this.maclinkform.articeType = '';
2084
+         this.maclinkform.outstationlink = '';
2056 2085
        }
2057 2086
 
2058 2087
        if(id==4){
2059 2088
          this.definefour = true;
2060 2089
          this.definetwo = false;
2061 2090
          this.definethree = false;
2062
-         this.maclinkform.instationlink = "";
2063
-         this.maclinkform.articeType = "";
2064
-         this.maclinkform.phone = "";
2091
+         this.maclinkform.instationlink = '';
2092
+         this.maclinkform.articeType = '' ;
2093
+         this.maclinkform.phone = '';
2065 2094
        }
2066 2095
      },
2067 2096
         
@@ -2075,7 +2104,7 @@ export default {
2075 2104
          
2076 2105
         this.$refs[formName].validate((valid)=>{
2077 2106
           if(valid){
2078
-             AddImageslink(this.picform).then(response=>{
2107
+             AddImageslink(this.picform.id,this.picform).then(response=>{
2079 2108
                 if(response.data.state ==1){
2080 2109
                   var editpiclink = response.data.data.editpiclink;
2081 2110
                   console.log("数据返回",editpiclink)
@@ -2106,15 +2135,17 @@ export default {
2106 2135
      AddMagicNavi(formName){
2107 2136
         this.$refs[formName].validate((valid)=>{
2108 2137
           if(valid){
2109
-            AddMagicNavi(this.editmarginform).then(response=>{
2138
+            AddMagicNavi(this.editmarginform.id,this.editmarginform).then(response=>{
2110 2139
               if(response.data.state == 1){
2140
+               this.editmarginform.marginaddress = "";
2141
+               this.getMagicImages();
2111 2142
                var editmargin  = response.data.data.editmargin;
2112
-                this.getMagicImages();
2113 2143
                 this.isEmpty = true;
2114 2144
                 this.editmarginform.margtitle = "";
2115 2145
                 this.editmarginform.margImage = "";
2116
-                this.editmarginform.marginaddress = "";
2117 2146
                 this.editmarginform.jumpset = "";
2147
+                this.MagicNavigation = false;
2148
+                
2118 2149
               }
2119 2150
             })
2120 2151
           }
@@ -2153,6 +2184,7 @@ export default {
2153 2184
               this.marginform.sort = "";
2154 2185
               this.marginform.marginImages = [];
2155 2186
               this.marginform.margintTitle = [];
2187
+              this.marginform.ids = [];
2156 2188
               this.isEmpty = false;
2157 2189
              }
2158 2190
           })
@@ -2240,12 +2272,17 @@ export default {
2240 2272
       })
2241 2273
     },
2242 2274
 
2243
-    UpdateEditMacgin(){
2244
-      UpdateEditMacgin(this.editmacform.id,this.editmacform).then(response=>{
2275
+    UpdateEditMacgin(formName){
2276
+      this.$refs[formName].validate((valid)=>{
2277
+        if(valid){
2278
+         UpdateEditMacgin(this.editmacform.id,this.editmacform).then(response=>{
2245 2279
           if(response.data.state ==1){
2246 2280
             var editmargin = response.data.data.editmargin;
2281
+            this.EditMacDialogVisible = false;
2247 2282
             this.getMagicImages();
2248
-          }
2283
+           }
2284
+         })
2285
+        }
2249 2286
       })
2250 2287
     },
2251 2288
 
@@ -2291,48 +2328,67 @@ export default {
2291 2328
         }
2292 2329
         if(id == 2){
2293 2330
           
2294
-          this.maclinkform.articeType = "";
2331
+         
2295 2332
         }
2296 2333
         if(id == 3){
2297 2334
          
2298
-          this.maclinkform.articeType = "";
2335
+          
2299 2336
         }
2300 2337
        if(id == 4){
2301 2338
          
2302
-          this.maclinkform.articeType = "";
2339
+          
2303 2340
         }
2304 2341
        if(id == 5){
2305 2342
           
2306
-          this.maclinkform.articeType = "";
2343
+        
2307 2344
         }
2308 2345
        if(id == 6){
2309 2346
          
2310
-          this.maclinkform.articeType = "";
2347
+          
2311 2348
         }
2312 2349
        if(id == 7){
2313 2350
          
2314
-          this.maclinkform.articeType = "";
2351
+         
2315 2352
         }
2316 2353
      },
2354
+  
2317 2355
      AddMagiclinkData(formName){
2318
-        this.$refs[formName].validate((valid)=>{
2356
+         if(this.maclinkform.instationlink == ""){
2357
+            this.maclinkform.instationlink = 0;
2358
+         }
2319 2359
          var instationlink =  this.maclinkform.instationlink;
2320 2360
          var instationlinks = parseInt(instationlink);
2321 2361
          this.maclinkform.instationlink = instationlinks;
2322
-         console.log("站内链接",this.maclinkform.instationlink)
2323
-          
2324
-      
2362
+        if(this.maclinkform.articeType == ""){
2363
+          this.maclinkform.articeType = 0;
2364
+        }
2325 2365
          var articeType = this.maclinkform.articeType;
2326 2366
          var articeTypes =  parseInt(articeType);
2327 2367
          this.maclinkform.articeType = articeTypes;
2328
-         console.log("站外链接",this.maclinkform.articeType)
2329
-         this.maclinkform.linkaddress = "www.baidu.com";
2330
-          console.log("电话号码是啥",this.maclinkform.phone)
2368
+
2369
+       if(this.maclinkform.title == ""){
2370
+          this.maclinkform.title = 0;
2371
+       }
2372
+       var articeTitle =  this.maclinkform.title;
2373
+       var articeTitle =  parseInt(articeTitle);
2374
+       this.maclinkform.title = articeTitle;
2375
+
2376
+         this.maclinkform.linkaddress = "/articles/createArticle/?id="+this.maclinkform.title;
2377
+        this.$refs[formName].validate((valid)=>{
2331 2378
           if(valid){
2332 2379
             AddMagiclinkData(this.maclinkform).then(response=>{
2333 2380
                 if(response.data.state == 1){
2334 2381
                   var magiclink =  response.data.data.magiclink;
2382
+                  var patientMagiclink  = response.data.data.patientMagiclink;
2383
+                 this.editmarginform.marginaddress = patientMagiclink.linkaddress;
2384
+                 this.editmarginform.id =  patientMagiclink.id
2385
+                  this.magicVisible = false;
2335 2386
                   console.log("链接返回数据",magiclink)
2387
+                  this.maclinkform.articeType = "";
2388
+                  this.maclinkform.instationlink = "";
2389
+                  this.maclinkform.phone = "";
2390
+                  this.maclinkform.outstationlink = "";
2391
+                  this.maclinkform.title = "";
2336 2392
                 }
2337 2393
             })
2338 2394
           }
@@ -2342,6 +2398,7 @@ export default {
2342 2398
        getMacLinkAddress().then(response=>{
2343 2399
           if(response.data.state ==1){
2344 2400
              var magiclink =  response.data.data.magiclink;
2401
+            //  this.editmarginform.marginaddress = magiclink.linkaddress;
2345 2402
              console.log("返回链接数据",magiclink)
2346 2403
           }
2347 2404
        })

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