xiaoming_global hace 5 años
padre
commit
fba8a8973b

+ 7 - 8
config/dev.env.js Ver fichero

@@ -1,13 +1,12 @@
1 1
 module.exports = {
2 2
   NODE_ENV: '"development"',
3 3
   ENV_CONFIG: '"dev"',
4
-  //BASE_API:'"http://api.test1.sgjyun.com"',//'"http://localhost:9534"'
5
-  BASE_API:'"http://localhost:9534"',
6
-
7
-  // SSO_HOST: '"http://testsso.sgjyun.com"',
8
-  // SRCM_HOST: '"http://test1.sgjyun.com"',
9
-  // XT_HOST: '"http://xt.test.sgjyun.com"',
10
-  // MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
11
-  // CDM_HOST: '"http://cdm.test.sgjyun.com"',
4
+  BASE_API:'"http://api.test1.sgjyun.com"',//'"http://localhost:9534"'
5
+  
6
+   SSO_HOST: '"https://testsso.sgjyun.com"',
7
+   SRCM_HOST: '"http://test1.sgjyun.com"',
8
+   XT_HOST: '"http://xt.test.sgjyun.com"',
9
+   MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
10
+   CDM_HOST: '"http://cdm.test.sgjyun.com"',
12 11
 }
13 12
 

+ 1 - 2
config/index.js Ver fichero

@@ -17,8 +17,7 @@ module.exports = {
17 17
     // can be overwritten by process.env.HOST
18 18
     // if you want dev by ip, please set host: '0.0.0.0'
19 19
 
20
-   // host: 'test1.sgjyun.com',
21
-    host:'localhost',
20
+    host: 'test1.sgjyun.com',
22 21
     port: 8090, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
23 22
     // host: 'test1.sgjyun.com',
24 23
     autoOpenBrowser: true,

+ 1 - 1
config/prod.env.js Ver fichero

@@ -4,7 +4,7 @@ module.exports = {
4 4
   // BASE_API: '"http://api.scrm.kuyicloud.com"',
5 5
   BASE_API: '"http://api.test1.sgjyun.com"',
6 6
 
7
-  SSO_HOST: '"http://sso.kuyicloud.com"',
7
+  SSO_HOST: '"https://sso.kuyicloud.com"',
8 8
   SRCM_HOST: '"http://jk.kuyicloud.com"',
9 9
   XT_HOST: '"http://xt.kuyicloud.com"',
10 10
   MIRCO_MALL_HOST: '"http://mall.kuyicloud.com"',

+ 2 - 2
config/sit.env.js Ver fichero

@@ -3,9 +3,9 @@ module.exports = {
3 3
   ENV_CONFIG: '"sit"',
4 4
   BASE_API: '"http://api.test1.sgjyun.com"',
5 5
 
6
-  SSO_HOST: '"http://testsso.sgjyun.com"',
6
+  SSO_HOST: '"https://testsso.sgjyun.com"',
7 7
   SRCM_HOST: '"http://test1.sgjyun.com"',
8 8
   XT_HOST: '"http://xt.test.sgjyun.com"',
9
-  MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
9
+  MIRCO_MALL_HOST: '"htts://mall.test.sgjyun.com"',
10 10
   CDM_HOST: '"http://cdm.test.sgjyun.com"',
11 11
 }

+ 15 - 7
src/api/act/submitinfo.js Ver fichero

@@ -140,21 +140,20 @@ export function deleteArticle (id,data){
140 140
     })
141 141
 }
142 142
 
143
-export function getEditArticle(id,param){
144
-    console.log("params是啥?",param)
143
+export function getEditArticle(id,params){
144
+    console.log("id是什么",id)
145 145
     return request({
146 146
         url:"/api/acticle/getEditArticle?id="+id,
147
-        method:"Get",
148
-        param:param,
147
+        method:"Post",
148
+        params:params,
149 149
     })
150 150
 }
151 151
 
152
-export function getEditVidoInfo(id,param){
153
-    console.log("params是啥?",param)
152
+export function getEditVidoInfo(id,params){
154 153
     return request({
155 154
         url:"/api/acticle/getEditVidoInfo?id="+id,
156 155
         method:"Get",
157
-        param:param,
156
+        params:params,
158 157
     })
159 158
 }
160 159
 
@@ -354,3 +353,12 @@ export function deleteAllArticles(data){
354 353
     })
355 354
 }
356 355
 
356
+export function GetAllCategory(params){
357
+    return request({
358
+        url:"/api/aritcle/getallcategory",
359
+        method:"Get",
360
+        params:params,
361
+    })
362
+}
363
+
364
+

+ 57 - 1
src/api/site/site.js Ver fichero

@@ -362,7 +362,6 @@ export function editOfficeEnviroment(id,data){
362 362
 }
363 363
 
364 364
 export function  SaveOfficeEnvironment(id,data){
365
-    console.log("科室环境我爱你中",id)
366 365
      return request({
367 366
          url:"/api/site/saveofficeenvironment?id="+id,
368 367
          method:"Post",
@@ -516,3 +515,60 @@ export function AddMarginChart(data){
516 515
    })
517 516
 }
518 517
 
518
+export function deleteRotations(id,data){
519
+    console.log("id",id)
520
+   return request({
521
+       url:"/api/site/deleteRotations?id="+id,
522
+       method:"Post",
523
+       data:data,
524
+   })
525
+}
526
+
527
+export function editRotationImages (id,data){
528
+    return request({
529
+        url:"/api/site/editRotationImages?id="+id,
530
+        method:"Post",
531
+        data:data,
532
+    })
533
+}
534
+
535
+export function updateRotionImages (id,data){
536
+   return request({
537
+       url:"/api/site/updaterotaionimages?id="+id,
538
+       method:"Post",
539
+       data:data,
540
+   })
541
+}
542
+
543
+export function editNavigation (id,data){
544
+   return request({
545
+       url:"/api/site/editnavigation?id="+id,
546
+       method:"Post",
547
+       data: data,
548
+   })
549
+}
550
+
551
+export function SaveNavigation (id,data) {
552
+    console.log("id是什么呢",id)
553
+    return request({
554
+        url:"/api/site/savenavigation?id="+id,
555
+        method:"Post",
556
+        data:data,
557
+    })
558
+}
559
+
560
+export function deleteImages(id,data){
561
+    return request({
562
+        url:"/api/site/deletimages?id="+id,
563
+        method:"Post",
564
+        data:data,
565
+    })
566
+}
567
+
568
+export function addHospital(data){
569
+    return request({
570
+        url:"/api/site/addhospital",
571
+        method:"Post",
572
+        data:data,
573
+    })
574
+}

+ 2 - 4
src/main.js Ver fichero

@@ -28,12 +28,10 @@ import Mint from 'mint-ui';
28 28
 Vue.use(Mint);
29 29
 
30 30
 //引入无线滚条
31
-import vuescroll from 'vuescroll'
31
+
32 32
 import { read } from 'fs';
33
-import 'vuescroll/dist/vuescroll.css';
34 33
 import 'swiper/dist/css/swiper.min.css'
35 34
 import BaiduMap from 'vue-baidu-map'
36
-Vue.use(vuescroll)
37 35
 Vue.use(Element, {
38 36
   size: 'medium', // set element-ui default size
39 37
   i18n: (key, value) => i18n.t(key, value)
@@ -56,6 +54,6 @@ new Vue({
56 54
 
57 55
 Vue.prototype.Base64 = require('js-base64').Base64
58 56
 Vue.use(BaiduMap, {
59
-  // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
60 57
   ak: 'YOUR_APP_KEY'
61 58
 })
59
+

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

@@ -49,14 +49,14 @@ export default {
49 49
       meta: { title: 'articlePreview', noCache: true }
50 50
     },
51 51
     {
52
-      path: '/articles/editArticle/:id',
52
+      path: '/articles/editArticle',
53 53
       component: () => import('@/scrm_pages/article/editArticle'),
54 54
       name: 'editArticle',
55 55
       hidden:true,
56 56
       meta: { title: 'editArticle', noCache: true }
57 57
     },
58 58
     {
59
-      path: '/articles/editVido/:id',
59
+      path: '/articles/editVido',
60 60
       component:() => import('@/scrm_pages/article/editVido'),
61 61
       name:'editVido',
62 62
       hidden:true,

+ 25 - 15
src/scrm_pages/article/articleList.vue Ver fichero

@@ -62,7 +62,7 @@
62 62
                   size="mini"
63 63
                   type="primary"
64 64
                   icon="el-icon-edit-outline"
65
-                  @click="editArticles(article.id,article.type)">
65
+                 @click="editArticles(article.id,article.type)">
66 66
                 </el-button>
67 67
               </el-tooltip>
68 68
               <el-tooltip class="item" effect="dark" content="删除" placement="top">
@@ -99,7 +99,7 @@
99 99
 
100 100
 <script>
101 101
   import BreadCrumb from '../components/bread-crumb'
102
-  import { GetAllArticles,deleteArticle,deleteAllArticles} from '@/api/act/submitinfo'
102
+  import { GetAllArticles,deleteArticle,deleteAllArticles,GetAllCategory} from '@/api/act/submitinfo'
103 103
   import PublishedCell from "@/scrm_pages/article/components/published_cell"
104 104
   export default {
105 105
     name: 'commentList',
@@ -148,13 +148,13 @@
148 148
                         this.total = response.data.data.total;
149 149
                         console.log("文章列表",this.articsData)
150 150
                         console.log("total",this.total)
151
-                        this.orgName =  response.data.data.OrgName;
152
-                        console.log("机构姓名",this.orgName)
153
-                     }
154
-                     if(typeof(response.data.data.category != 'undefined')){
155
-                       this.tagOptions = response.data.data.category
156
-                        console.log("分类列表",this.tagOptions)
151
+                        // this.orgName =  response.data.data.OrgName;
152
+                        // console.log("机构姓名",this.orgName)
157 153
                      }
154
+                    //  if(typeof(response.data.data.category != 'undefined')){
155
+                    //    this.tagOptions = response.data.data.category
156
+                    //     console.log("分类列表",this.tagOptions)
157
+                    //  }
158 158
               })
159 159
          },
160 160
          selectsign(id){
@@ -226,18 +226,18 @@
226 226
                return false
227 227
             });
228 228
            },
229
-           editArticles(articleid,articletype){
230
-               console.log("文章id",articleid);
229
+           editArticles(id,articletype){
230
+               console.log("文章id",id);
231 231
                console.log("文章内型",articletype)
232 232
                if(articletype == 1){
233
-                  this.$router.push({path:'/articles/editArticle/'+articleid});
233
+                  this.$router.push({path:"/articles/editArticle/"+id});                                  
234 234
                }
235
-
236
-               if(articletype ==2){
237
-                   this.$router.push({path:'/articles/editVido/'+articleid});
235
+               if(articletype == 2){
236
+                  //  this.$router.push({path:"/articles/editVido/"+id});   
237
+                   this.$router.push({name:'editVido',params: {id:id}})             
238 238
                }
239 239
            },
240
-
240
+          
241 241
           selectProduct(val){
242 242
             var ids =[];
243 243
             for(let i=0,len=this.articsData.length;i<len;i++){
@@ -304,9 +304,19 @@
304 304
                });
305 305
           })
306 306
         },
307
+        GetAllCategory(){
308
+          GetAllCategory().then(response=>{
309
+            if(response.data.state == 1){
310
+             var categorys = response.data.data.categorys;
311
+             this.tagOptions = response.data.data.categorys;
312
+             console.log("标签是什么",categorys)
313
+            }
314
+          })
315
+        },
307 316
     },
308 317
     created(){
309 318
       this.GetAllArticles();
319
+      this.GetAllCategory();
310 320
     },
311 321
 
312 322
      

+ 2 - 2
src/scrm_pages/article/components/CreateArticleForm.vue Ver fichero

@@ -49,8 +49,8 @@
49 49
              type: Array,
50 50
              default: function () {
51 51
              return [];
52
-        }
53
-      }
52
+                 }
53
+              }
54 54
            },
55 55
             data(){
56 56
                 return {

+ 4 - 6
src/scrm_pages/article/createArticle.vue Ver fichero

@@ -7,7 +7,7 @@
7 7
     <div class="app-container">
8 8
     <el-tabs type="border-card">
9 9
       <el-tab-pane label="文章">
10
-        <el-form label-width="100px" class="clearfix" :model="form" ref="arctileform"  :element-loading-text="loadingText" :rules="artilcrules">
10
+        <el-form label-width="100px" class="clearfix" :model="form" ref="form"  :element-loading-text="loadingText" :rules="artilcrules">
11 11
           <el-row>
12 12
             <el-col :span="23">
13 13
                 <el-form-item label="文章标题:" required prop="act_name">
@@ -94,9 +94,9 @@
94 94
           <el-row :span="24">
95 95
             <el-col :span="24">
96 96
                 <el-form-item>
97
-                      <el-button size="small" type="primary" style="width: 100px"  @click="submitForm('arctileform');centerDialogVisible=false">发布</el-button>
98
-                      <el-button size="small" style="width: 100px" @click="preview('arctileform')">预览</el-button>
99
-                      <el-button size="small" style="width: 100px" @click="save('arctileform');centerdraftVisible = false">保存草稿</el-button>
97
+                      <el-button size="small" type="primary" style="width: 100px"  @click="submitForm('form');centerDialogVisible=false">发布</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>
100 100
                   <el-button size="small" style="width: 100px" @click="centercancelVisible = true">取消</el-button>
101 101
                 </el-form-item>
102 102
             </el-col>
@@ -268,9 +268,7 @@
268 268
          centerDialogVisible: false,
269 269
          centerdraftVisible:false,
270 270
          centercancelVisible:false,
271
-         formLabelAlign:true,
272 271
          modlevidel:'',
273
-         filsListArray:[],
274 272
          show:true,
275 273
          shows:false,
276 274
          rules: {

+ 93 - 99
src/scrm_pages/article/editArticle.vue Ver fichero

@@ -1,22 +1,21 @@
1 1
 
2
-
3 2
 <template>
4 3
     <div class="main-contain">
5 4
         <div class="position">
6 5
             <bread-crumb :crumbs='crumbs'></bread-crumb>
7 6
         </div>
8 7
         <div class="app-container">
9
-             <el-form label-width="100px" class="clearfix" :model="form" ref="arctileform"  :element-loading-text="loadingText" :rules="artilcrules">
8
+             <el-form label-width="100px" class="clearfix" :model="arctileform" ref="arctileform"  :rules="rules">
10 9
           <el-row>
11 10
             <el-col :span="23">
12 11
                 <el-form-item label="文章标题:" required prop="title">
13
-                    <el-input v-model="form.title"></el-input>
12
+                    <el-input v-model="arctileform.title"></el-input>
14 13
                 </el-form-item>
15 14
               <el-form-item label="文章内容:" required prop="content">
16 15
                 <keep-alive>
17 16
                   <neditor ref="neditor"
18 17
                            id="editor"
19
-                           v-bind:r_content="form.content"  @content_changed="paragraphContentChanged">
18
+                           v-bind:r_content="arctileform.content"  @content_changed="paragraphContentChanged">
20 19
                   </neditor>
21 20
                 </keep-alive>
22 21
               </el-form-item>
@@ -28,16 +27,14 @@
28 27
                 <el-col :span="3">
29 28
                   <div>
30 29
                     <el-upload
31
-                      v-loading="uploading"
32
-                      :element-loading-text="loadingText"
33 30
                       class="avatar-uploader"
34
-                      :data="uploadData"
31
+                      :data="imageData"
35 32
                       action="https://upload.qiniup.com"
36 33
                       :show-file-list="false"
37 34
                       :on-error="handleAvatarError"
38 35
                       :on-success="handleAvatarSuccess"
39 36
                       :before-upload="beforeAvatarUpload">
40
-                      <img v-if="form.imgs" :src="form.imgs" class="avatar">
37
+                      <img v-if="arctileform.imgs" :src="arctileform.imgs" class="avatar">
41 38
                       <i v-else class="el-icon-plus avatar-uploader-icon"></i>
42 39
                     </el-upload>
43 40
                   </div>
@@ -47,8 +44,6 @@
47 44
                 <el-col :span="3">
48 45
                   <div v-if="picshow">
49 46
                     <el-upload
50
-                      v-loading="uploading"
51
-                      :element-loading-text="loadingText"
52 47
                       class="avatar-uploader"
53 48
                       :data="uploadData"
54 49
                       action="https://upload.qiniup.com"
@@ -66,8 +61,6 @@
66 61
                 <el-col :span="3">
67 62
                   <div v-if="picshow">
68 63
                     <el-upload
69
-                      v-loading="uploading"
70
-                      :element-loading-text="loadingText"
71 64
                       class="avatar-uploader"
72 65
                       :data="uploadData"
73 66
                       action="https://upload.qiniup.com"
@@ -82,7 +75,7 @@
82 75
                 </el-col>
83 76
               </el-form-item>
84 77
                <el-form-item label="所属分类:" prop="class_id">
85
-                 <el-select v-model="form.class_id" placeholder="请先选择文章所属分类"  @change="changeActtype()">
78
+                 <el-select v-model="arctileform.class_id" placeholder="请先选择文章所属分类"  @change="changeActtype()">
86 79
                    <el-option
87 80
                      v-for="item in options"
88 81
                      :key="item.id"
@@ -111,7 +104,6 @@
111 104
            :visible.sync="dialogVisible"
112 105
             width="30%"
113 106
             center>
114
-           <span>这是一段信息</span>
115 107
            <span slot="footer" class="dialog-footer">
116 108
            <el-button @click="gobackList()">返回文章列表</el-button>
117 109
            </span>
@@ -173,12 +165,11 @@
173 165
         editorOption: {},
174 166
         company:"",
175 167
         fileList: [],
176
-        form:{
177
-          class_id:'', 
178
-          content:'',                        
179
-          imgs:'',                
180
-          title:'',                 
181
-          file:'',
168
+        arctileform:{
169
+            title:"",
170
+            content:"",
171
+            imgs:"",
172
+            class_id:"",
182 173
         },
183 174
          picshow:false,
184 175
          acttypes:[],
@@ -191,34 +182,28 @@
191 182
          uploading:false,
192 183
          loadingText:'',
193 184
          uploadData: { token: '', key: '' },
185
+         imageData: { token:'',key:''},
194 186
          uploadFileData:{token:'',key:''},
195 187
          uploadvidoData:{token:'',key:''},
196 188
          centerDialogVisible: false,
197 189
          centerdraftVisible:false,
198 190
          centercancelVisible:false,
199 191
          formLabelAlign:true,
200
-         modlevidel:'',
201
-         filsListArray:[],
202 192
          show:true,
203 193
          shows:false,
204
-         rules: {
205
-            vid_name: [{required: true, message: "视频标题不能为空"},],
206
-            vio_upload: [{required: true,message:"请上传视频"}],
207
-            vid_type: [{required: true,message:"所属分类不能为空"}]
208
-          },
209
-        artilcrules:{
194
+        rules:{
210 195
             title: [{required: true, message: "文章标题不能为空"},],
211 196
             content: [{required: true,message:"文章内容不能为空"}],
212 197
             class_id: [{required: true,message:"所属分类不能为空"}]
213 198
         },
214
-        vidoform:[],
199
+        // vidoform:[],
215 200
         dialogVisible:false,
216 201
         }
217 202
     },
218 203
          methods:{
219 204
              //第一个图片
220 205
       handleAvatarSuccess(res, file) {
221
-       this.form.imgs = this.qiniuDomain + res.url;      
206
+       this.arctileform.imgs = this.qiniuDomain + res.url;      
222 207
       },
223 208
        handleAvatarError(err, file, fileList) {
224 209
             this.$message.error(err);
@@ -226,35 +211,38 @@
226 211
             return false
227 212
       },
228 213
       beforeAvatarUpload(file) {
229
-        const isJPG = file.type === 'image/jpeg';
230
-        const isLt2M = file.size / 1024 / 1024 < 2;
231
-
232
-        if (!isJPG) {
233
-          this.$message.error('上传头像图片只能是 JPG 格式!');
234
-        }
235
-        if (!isLt2M) {
236
-          this.$message.error('上传头像图片大小不能超过 2MB!');
237
-        }
214
+         var fileType = file.type
215
+            const isJPG = fileType.indexOf("image") > -1;
216
+            const isLt2M = file.size / 1024 / 1024 < 2;
217
+            if (!isJPG) {
218
+                this.$message.error("只能上传图片");
219
+                return false;
220
+            }
221
+            if (!isLt2M) {
222
+                this.$message.error("图片大小不能超过 2MB!");
223
+                return false;
224
+         }
238 225
 
239 226
             var date = new Date()
240 227
             var ext = getFileExtension(file.name)
241 228
             var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
242 229
             this.uploading = true;
243
-            this.loadingText = '封面图片上传中'
230
+            // this.loadingText = '封面图片上传中'
244 231
 
245 232
             const _self = this
246 233
             return new Promise((resolve, reject) => {
247 234
                 getToken().then(response => {
248 235
                     const token = response.data.data.uptoken
249
-                    console.log("token是什么?",token)
250
-                    _self._data.uploadData.token = token
251
-                    _self._data.uploadData.key = key
236
+                    console.log("第一张图片token是什么?",token)
237
+                    _self._data.imageData.token = token;
238
+                    _self._data.imageData.key = key;
252 239
                     resolve(true)
253 240
                 }).catch(err => {
254 241
                     reject(false)
255 242
                     
256 243
                 })
257 244
             })
245
+          return isJPG && isLt2M;
258 246
       },
259 247
       //第二个图片
260 248
       handleAvatartwoSuccess(res, file) {
@@ -266,21 +254,22 @@
266 254
             return false
267 255
       },
268 256
       beforeAvatartwoUpload(file) {
269
-        const isJPG = file.type === 'image/jpeg';
270
-        const isLt2M = file.size / 1024 / 1024 < 2;
271
-
272
-        if (!isJPG) {
273
-          this.$message.error('上传头像图片只能是 JPG 格式!');
274
-        }
275
-        if (!isLt2M) {
276
-          this.$message.error('上传头像图片大小不能超过 2MB!');
277
-        }
278
-
257
+         var fileType = file.type
258
+            const isJPG = fileType.indexOf("image") > -1;
259
+            const isLt2M = file.size / 1024 / 1024 < 2;
260
+            if (!isJPG) {
261
+                this.$message.error("只能上传图片");
262
+                return false;
263
+            }
264
+            if (!isLt2M) {
265
+                this.$message.error("图片大小不能超过 2MB!");
266
+                return false;
267
+         }
279 268
             var date = new Date()
280 269
             var ext = getFileExtension(file.name)
281 270
             var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
282 271
             this.uploading = true;
283
-            this.loadingText = '封面图片上传中'
272
+            // this.loadingText = '封面图片上传中'
284 273
 
285 274
             const _self = this
286 275
             return new Promise((resolve, reject) => {
@@ -308,15 +297,17 @@
308 297
             return false
309 298
       },
310 299
       beforeAvatarlastUpload(file) {
311
-        const isJPG = file.type === 'image/jpeg';
312
-        const isLt2M = file.size / 1024 / 1024 < 2;
313
-
314
-        if (!isJPG) {
315
-          this.$message.error('上传头像图片只能是 JPG 格式!');
316
-        }
317
-        if (!isLt2M) {
318
-          this.$message.error('上传头像图片大小不能超过 2MB!');
319
-        }
300
+            var fileType = file.type
301
+            const isJPG = fileType.indexOf("image") > -1;
302
+            const isLt2M = file.size / 1024 / 1024 < 2;
303
+            if (!isJPG) {
304
+                this.$message.error("只能上传图片");
305
+                return false;
306
+            }
307
+            if (!isLt2M) {
308
+                this.$message.error("图片大小不能超过 2MB!");
309
+                return false;
310
+         }
320 311
 
321 312
             var date = new Date()
322 313
             var ext = getFileExtension(file.name)
@@ -336,16 +327,21 @@
336 327
                 })
337 328
             }) 
338 329
         },
339
-        getEditArticle(id){
340
-           getEditArticle(id,this.form).then(response=>{
330
+        getEditArticle(){
331
+            const id = this.$route.params && this.$route.params.id;
332
+            console.log("编辑文章id是什么?",id)
333
+           getEditArticle(id,this.arctileform).then(response=>{
341 334
                  if(response.data.state == 1){
342
-                     var articles = response.data.data.articles;
343
-                     this.form.title = articles.title;
344
-                     this.form.content = articles.content;
345
-                     this.form.imgs = articles.imgs;
346
-                     this.form.class_id = articles.class_id;
335
+                     var articles = response.data.data.articles;                      
336
+                                     
337
+                     console.log("articles是什么",articles)            
338
+                     this.arctileform.title = articles.title;
339
+                     this.arctileform.content = articles.content;
340
+                     this.arctileform.imgs = articles.imgs;
341
+                     console.log("ww",this.arctileform.imgs)
342
+                     this.arctileform.class_id = articles.class_id;
347 343
                      console.log(articles.title)
348
-                     console.log("文章内容",articles)
344
+                    
349 345
                  }
350 346
            });
351 347
         }, 
@@ -361,14 +357,16 @@
361 357
         },
362 358
         
363 359
         UpdataArticleInfo(forName){
364
-              this.form.content = this.$refs.neditor.content;
360
+              this.arctileform.content = this.$refs.neditor.content;
365 361
               const id = this.$route.params && this.$route.params.id;
366
-             console.log("发布文章内容",this.$refs.neditor.content);
362
+             console.log("发布文章内容",this.arctileform.content);
367 363
              console.log("id是多少?",id)
368 364
              this.$refs[forName].validate((valid)=>{
369 365
                  if(valid){
370
-                    UpdataArticleInfo(id,this.form).then(response=>{
366
+                    UpdataArticleInfo(id,this.arctileform).then(response=>{
371 367
                          if(response.data.state == 1){
368
+                          var aritcls = response.data.data.articls;
369
+                          console.log("更新内容是多少",aritcls)
372 370
                              this.dialogVisible = true;      
373 371
                          }
374 372
                     }); 
@@ -377,12 +375,10 @@
377 375
         },
378 376
         saveArticleDraft(forName){
379 377
           const id = this.$route.params && this.$route.params.id;
380
-           this.form.content = this.$refs.neditor.content;
381
-           console.log("id是多少?",id);
382
-           console.log("文章内容",this.$refs.neditor.content);
378
+           this.arctileform.content = this.$refs.neditor.content;
383 379
            this.$refs[forName].validate((valid)=>{
384 380
              if(valid){
385
-               saveArticleDraft(id,this.form).then(response=>{
381
+               saveArticleDraft(id,this.arctileform).then(response=>{
386 382
                   if(response.data.state ==1 ){
387 383
                       this.dialogVisible = true;
388 384
                   }
@@ -393,19 +389,19 @@
393 389
         gobackList(){
394 390
            this.$router.push({path:'/articles/articleList'})
395 391
         },
396
-        preview(forName){
397
-            this.form.act_content = this.$refs.neditor.content;
398
-            const id = this.$route.params && this.$route.params.id; 
399
-            this.$refs[forName].validate((valid)=>{
400
-              if(valid){
401
-                 previewEditArticle(id,this.form).then(response=>{
402
-                   if(response.data.state == 1){
403
-                       this.$router.push("/articles/articleEditPreview")
404
-                   }
405
-                 })
406
-              }
407
-            })
408
-        },
392
+        // preview(forName){
393
+        //     this.form.act_content = this.$refs.neditor.content;
394
+        //     const id = this.$route.params && this.$route.params.id; 
395
+        //     this.$refs[forName].validate((valid)=>{
396
+        //       if(valid){
397
+        //          previewEditArticle(id,this.form).then(response=>{
398
+        //            if(response.data.state == 1){
399
+        //                this.$router.push("/articles/articleEditPreview")
400
+        //            }
401
+        //          })
402
+        //       }
403
+        //     })
404
+        // },
409 405
         select(){
410 406
         this.picshow = false
411 407
         },
@@ -415,28 +411,26 @@
415 411
         //监听图片获取富文本前三张图片
416 412
        paragraphContentChanged: function(content) {
417 413
             var images = [],temp;
418
-            console.log("监听获取的文章内容是什么?",content)
414
+            // console.log("监听获取的文章内容是什么?",content)
419 415
             var patt = /<img[^>]+src=['"]([^'"]+)['"]+/g;
420 416
             while ((temp = patt.exec(content)) != null) {
421 417
             images.push(temp[1]);
422 418
             }                 
423
-             console.log("图片数组",images);
424
-             this.form.imgs = images[0];
419
+            //  console.log("图片数组",images);
420
+             this.arctileform.imgs = images[0];
425 421
              this.imageUrl = images[1];
426 422
              this.imageUrlLast = images [2];           
427 423
         },
428 424
       },
429 425
       created(){
430
-         const id = this.$route.params && this.$route.params.id;
431
-         console.log("id是什么?",id)
432
-          this.getEditArticle(id)
433
-          this.getMenus()
426
+          this.getEditArticle();
427
+          this.getMenus();
434 428
       },
435 429
     }
436 430
 </script>
437 431
 
438 432
 <style scoped>
439
-     .avatar-uploader{
433
+ .avatar-uploader{
440 434
     border: 1px solid #d9d9d9;
441 435
     border-radius: 6px;
442 436
     cursor: pointer;

+ 102 - 169
src/scrm_pages/site/components/add-contact.vue Ver fichero

@@ -39,7 +39,7 @@
39 39
    <el-dialog
40 40
     title="新增轮播图"
41 41
     :visible.sync="slideshow"
42
-    width="550px"
42
+    width="40%"
43 43
      center>
44 44
     <el-form ref="rotationform" :model="rotationform" label-width="90px" :rules="rules" >
45 45
       <el-form-item label="模块标题:" required prop="title">
@@ -60,16 +60,20 @@
60 60
                      <span class="el-upload-list__item-actions">
61 61
                     <span class="el-upload-list__item-delete">
62 62
                     <i class="el-icon-edit-outline" @click="editImages(item.id);editcenterDialogVisible = true"></i>
63
-                    <i class="el-icon-delete" @click="deleteDoctor(item.id,index)"></i>
63
+                    <i class="el-icon-delete" @click="deleteImages(item.id,index)"></i>
64 64
                     </span>
65 65
                     </span>
66 66
                    </div>         
67 67
                 </div>     
68
-                <img src="static/images/u679.png" @click="addVisible = true">   
68
+                <div class="addrot" @click="addVisible = true">
69
+                 <div class="docone">
70
+                  <li class="el-icon-plus"></li>  
71
+                   <div class="doctwo">
72
+                    <span>新增名医</span>
73
+                  </div>
74
+                 </div>  
75
+              </div>
69 76
              </div>
70
-              <!-- <div class="addrot">
71
-
72
-              </div> -->
73 77
       </el-form-item>
74 78
     </el-form>
75 79
     <span slot="footer" class="dialog-footer">
@@ -83,30 +87,31 @@
83 87
   <el-dialog
84 88
     title="新增医院地址"
85 89
     :visible.sync="hostaddress"
86
-    width="550px"
87
-   >
88
-    <el-form ref="hospitalform" :model="hospitalform" label-width="80px">
89
-      <el-form-item label="模块标题: ">
90
+    width="35%"
91
+    center>
92
+    <el-form ref="hospitalform" :model="hospitalform" label-width="90px" :rules="rules">
93
+      <el-form-item label="模块标题:" required prop="title">
90 94
         <el-input v-model="hospitalform.title" ></el-input>
91 95
       </el-form-item>
92
-      <el-form-item label="排序值: ">
96
+      <el-form-item label="排序值:" required prop="sort">
93 97
         <el-input v-model="hospitalform.sort"></el-input>
94
-        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
98
+        <!-- <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p> -->
95 99
       </el-form-item>
96
-      
97
-       <el-form-item label="医院地址:">
98
-         <div id="all">
99
-          <el-input  v-model="hospitalform.address" id="suggestId"></el-input>
100
-        </div>
100
+       <el-form-item label="医院地址:" required prop="address">
101
+         <el-input v-model="hospitalform.address"></el-input>
101 102
        </el-form-item>
102 103
        <el-form-item label="医院地图:">  
103
-        <div id="allmap"></div>
104
+           <baidu-map>
105
+              <bm-overview-map anchor="BMAP_ANCHOR_BOTTOM_RIGHT" :isOpen="true"></bm-overview-map>
106
+              <bm-local-search :keyword="hospitalform.address" :auto-viewport="true" style="display:none" :center="location"  :zoom="zoom"></bm-local-search>
107
+              <bm-view class="map"></bm-view>
108
+         </baidu-map>
104 109
        </el-form-item>
105 110
     
106 111
     </el-form>
107 112
     <span slot="footer" class="dialog-footer">
108
-      <el-button @click="address = false">取 消</el-button>
109
-      <el-button type="primary" @click="address = false">确 定</el-button>
113
+      <el-button @click="hostaddress=false">取 消</el-button>
114
+      <el-button type="primary" @click="addHospital('hospitalform');hostaddress = false">确 定</el-button>
110 115
     </span>
111 116
   </el-dialog>
112 117
 
@@ -116,7 +121,7 @@
116 121
     title="新增联系方式"
117 122
     :visible.sync="contact"
118 123
     width="550px"
119
-    >
124
+    center>
120 125
     <el-form ref="contractform" :model="contractform" label-width="90px" :rules="rules">
121 126
       <el-form-item label="模块标题:" required prop="title">
122 127
         <el-input v-model="contractform.title"></el-input>
@@ -297,8 +302,12 @@
297 302
           :show-file-list="false"
298 303
           :on-success="RotationSuccess"
299 304
           :before-upload="RotationUpload">
300
-          <img v-if="picform.Images" :src="picform.Images" class="avatar">
301
-          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
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>
302 311
       </el-upload>
303 312
       </el-col>
304 313
       <el-col :span="19">
@@ -325,6 +334,7 @@
325 334
        <el-button size="medium" @click="addlink()">设置链接</el-button>
326 335
       </el-col>
327 336
     </el-form-item>
337
+    
328 338
   </el-form>
329 339
   <span slot="footer" class="dialog-footer">
330 340
     <el-button @click="addVisible = false">取 消</el-button>
@@ -339,13 +349,19 @@
339 349
 <script>
340 350
  import { getToken } from '@/api/qiniu'
341 351
  import { getFileExtension} from '@/utils/tools'
342
- import { addRotationUpload,addRideWay,addWorkTime,addconnection,queryConnetion,deleteConnecWay,editConnecWay,
343
- saveConnecform,addContract,addrotationpic,GetRotationImages,addrotationImage} from '@/api/site/site'  
352
+ import { addRotationUpload,addHospital,addRideWay,addWorkTime,addconnection,queryConnetion,deleteConnecWay,editConnecWay,
353
+ saveConnecform,addContract,addrotationpic,GetRotationImages,addrotationImage,deleteImages} from '@/api/site/site'  
344 354
 import { truncateSync } from 'fs';
345 355
 export default {
346 356
   name: "addcontact",
347 357
   data() {
348 358
     return {
359
+       location: {
360
+        lng: 116.404,
361
+        lat: 39.915
362
+      },
363
+      zoom: 12.8,
364
+      keyword:"",
349 365
       show:false,
350 366
       imageUrl:false,
351 367
       dialogshow:false,
@@ -422,7 +438,8 @@ export default {
422 438
         content:[{required:true,message:"请填写乘车方式"}],
423 439
         worktime:[{required:true,message:"请填写工作时间"}],
424 440
         connecway:[{required:true,message:"请选择联系方式"}],
425
-        linkaddress:[{required:true,message:"请填写链接地址"}]
441
+        linkaddress:[{required:true,message:"请填写链接地址"}],
442
+        address:[{required:true,message:"请填写医院地址"}]
426 443
       },
427 444
      addVisible:false,  
428 445
        picform:{
@@ -529,6 +546,23 @@ export default {
529 546
         
530 547
       },
531 548
 
549
+      //新增医院地址
550
+      addHospital(formName){
551
+            var sorts = this.hospitalform.sort
552
+             var sort = parseInt(sorts)
553
+             this.hospitalform.sort = sort
554
+            this.$refs[formName].validate((valid)=>{
555
+            if(valid){
556
+             addHospital(this.hospitalform).then(response=>{
557
+                if(response.data.state ==1){
558
+                  var hosaddress =  response.data.data.hosaddress;
559
+                  console.log('新增医院地址数据',hosaddress);
560
+                }
561
+             })
562
+            }
563
+         })
564
+      },
565
+
532 566
       //新增联系方式
533 567
       addconnection(formName){
534 568
         this.$refs[formName].validate((valid)=>{
@@ -708,127 +742,62 @@ export default {
708 742
             })
709 743
           }
710 744
         })
745
+      },
746
+      deleteImages(id,index){
747
+        deleteImages(id).then(response=>{
748
+           if(response.data.state == 1){
749
+               this.rotationdata.splice(index,1)
750
+           }
751
+        })
711 752
       }
712
-  },
713
-       mounted(){
714
-          this.$nextTick(function () {
715
-                var th = this
716
-                // 创建Map实例
717
-                var map = new BMap.Map("allmap");
718
-                // 初始化地图,设置中心点坐标,
719
-                var point = new BMap.Point(121.160724,31.173277); // 创建点坐标,汉得公司的经纬度坐标
720
-                map.centerAndZoom(point, 15);
721
-                map.enableScrollWheelZoom();
722
-                var ac = new BMap.Autocomplete(    //建立一个自动完成的对象
723
-                    
724
-                    {
725
-                        "input":"suggestId", 
726
-                        "location": map,
727
-                    })
728
-                var myValue
729
-                ac.addEventListener("onconfirm", function (e) {    //鼠标点击下拉列表后的事件
730
-                    var _value = e.item.value;
731
-                    myValue = _value.province + _value.city + _value.district + _value.street + _value.business;
732
-                    this.address_detail = myValue
733
-                    setPlace();
734
-                });
735
-
736
-                function setPlace() {
737
-                    map.clearOverlays();    //清除地图上所有覆盖物
738
-                    function myFun() {
739
-                        th.userlocation = local.getResults().getPoi(0).point;    //获取第一个智能搜索的结果
740
-                        map.centerAndZoom(th.userlocation, 18);
741
-                        map.addOverlay(new BMap.Marker(th.userlocation));    //添加标注
742
-                    }
743
-
744
-                    var local = new BMap.LocalSearch(map, { //智能搜索
745
-                        onSearchComplete: myFun
746
-                    });
747
-                    local.search(myValue);
748
-
749
-                    //测试输出坐标(指的是输入框最后确定地点的经纬度)
750
-                    map.addEventListener("click",function(e){
751
-                        //经度
752
-                        console.log(th.userlocation.lng);
753
-                        //维度
754
-                        console.log(th.userlocation.lat);
755
-
756
-                    })
757
-                }
758
-
759
-            })
760
-        },
761
-        
753
+  },   
762 754
         created(){
763 755
           this.queryConnetion();
764 756
           this.GetRotationImages();
765 757
         },
766
-
767
-       updated(){
768
-          this.$nextTick(function () {
769
-                var th = this
770
-                // 创建Map实例
771
-                var map = new BMap.Map("allmap");
772
-                // 初始化地图,设置中心点坐标,
773
-                var point = new BMap.Point(121.160724,31.173277); // 创建点坐标,汉得公司的经纬度坐标
774
-                map.centerAndZoom(point, 15);
775
-                map.enableScrollWheelZoom();
776
-                var ac = new BMap.Autocomplete(    //建立一个自动完成的对象
777
-                    
778
-                    {
779
-                        "input":"suggestId", 
780
-                        "location": map,
781
-                    })
782
-                   
783
-                var myValue
784
-                ac.addEventListener("onconfirm", function (e) {    //鼠标点击下拉列表后的事件
785
-                    var _value = e.item.value;
786
-                    
787
-                    myValue = _value.province + _value.city + _value.district + _value.street + _value.business;
788
-                    this.address_detail = myValue
789
-                    setPlace();
790
-                });
791
-
792
-                function setPlace() {
793
-                    map.clearOverlays();    //清除地图上所有覆盖物
794
-                    function myFun() {
795
-                        th.userlocation = local.getResults().getPoi(0).point;    //获取第一个智能搜索的结果
796
-                        map.centerAndZoom(th.userlocation, 18);
797
-                        map.addOverlay(new BMap.Marker(th.userlocation));    //添加标注
798
-                    }
799
-
800
-                    var local = new BMap.LocalSearch(map, { //智能搜索
801
-                        onSearchComplete: myFun
802
-                    });
803
-                    local.search(myValue);
804
-
805
-                    //测试输出坐标(指的是输入框最后确定地点的经纬度)
806
-                    map.addEventListener("click",function(e){
807
-                        //经度
808
-                        console.log(th.userlocation.lng);
809
-                        //维度
810
-                        console.log(th.userlocation.lat);
811
-
812
-                    })
813
-                }
814
-
815
-            })
816
-        },
817 758
 };
818 759
 </script>
819 760
 
820 761
 <style rel="stylesheet/scss" lang="scss" scoped>
821
-  #allmap{
822
-        width: 200px;
823
-        height: 200px;
824
-        font-family: "微软雅黑";
825
-        margin-top: 20px;
826
-      //  border:1px solid green;
762
+ 
763
+   .map {
764
+        width: 100%;
765
+        height: 400px;
827 766
     }
828 767
   .tips {
829 768
     font-size: 12px;
830 769
     line-height: 18px;
831 770
    }
771
+
772
+   .addrot{
773
+     width: 146px;
774
+     height: 146px;
775
+     border: dashed 1px #409EFF;
776
+   }
777
+
778
+  .docone{
779
+    width: 50px;
780
+    height: 50px;
781
+    // border: solid 1px red;
782
+    margin-top: 50px;
783
+    margin-left: 50px;
784
+    font-size: 50px;
785
+  }
786
+   .doctwo{
787
+    width: 60px;
788
+    height: 30px;
789
+    font-size: 14px;
790
+  }
791
+
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
+  }
832 801
 .used {
833 802
   ul {
834 803
     li {
@@ -850,41 +819,5 @@ export default {
850 819
       }
851 820
     }
852 821
   }
853
-  
854
-   .avatar-uploader{
855
-      border: 1px dashed #d9d9d9;
856
-      border-radius: 6px;
857
-      cursor: pointer;
858
-      position: relative;
859
-      overflow: hidden;
860
-      width: 100px;
861
-      height: 100px;
862
-     }
863
-  .avatar-uploader{
864
-    border-color: #409EFF;
865
-  }
866
-  .avatar-uploader-icon {
867
-    font-size: 14px;
868
-    color: #8c939d;
869
-    width: 50px;
870
-    height: 50px;
871
-    line-height: 50px;
872
-    margin-left: 25px;
873
-    margin-top: 25px;
874
-    text-align: center;
875
-  }
876
-
877
-   .tpic{
878
-     width:200px;
879
-     height:200px;
880
-     border:solid 1px red;
881
-   }
882
-
883
-  //  .addrot{
884
-  //    width: 146px;
885
-  //    height: 146px;
886
-  //    border: dashed 1px red;
887
-  //  }
888
-  
889 822
 }
890 823
 </style>

+ 16 - 9
src/scrm_pages/site/components/contact-us.vue Ver fichero

@@ -7,10 +7,8 @@
7 7
                      <img src="static/images/a.jpg" style="width:315px;height:200px">
8 8
                  </div>
9 9
               </div>
10
-                <div class="modelone" v-if="item.mode_type == 2">
11
-                 <div>
12
-                    
13
-                 </div>
10
+                <div class="modetwo" v-if="item.mode_type == 2">  
11
+                <div><span>{{item.title}}:&nbsp;&nbsp;{{item.Hosaddress.address}}</span></div> 
14 12
               </div>
15 13
               <div  v-if="item.mode_type == 3">
16 14
                  <div class="modeone">
@@ -19,7 +17,7 @@
19 17
                    <span>{{item.title}}:&nbsp;&nbsp;13318464642</span><br>
20 18
                   </div>
21 19
               </div>
22
-               <div class="modetwo" v-if="item.mode_type == 4">
20
+               <div class="modefour" v-if="item.mode_type == 4">
23 21
                  <div><span>{{item.title}}:&nbsp;&nbsp;{{item.Worktime.worktime}}</span></div>
24 22
               </div>
25 23
                <div class="modethree" v-if="item.mode_type == 5">
@@ -31,7 +29,7 @@
31 29
 </template>
32 30
 
33 31
 <script>
34
-     import { getOrderModel } from '@/api/site/site' 
32
+import { getOrderModel } from '@/api/site/site' 
35 33
 import { fchown } from 'fs';
36 34
     export default {
37 35
         name: "contact-us",
@@ -58,14 +56,15 @@ import { fchown } from 'fs';
58 56
                     console.log("images是什么?",images)              
59 57
                   }
60 58
                   console.log(images)
61
-                  console.log("马文强",ordmodel)
59
+                  console.log("我爱你中国",ordmodel)
62 60
                  }
63 61
              })
64 62
            }
65 63
         },
66 64
         created(){
67 65
            this.getOrderModel();
68
-        },
66
+        },     
67
+       
69 68
     }
70 69
 </script>
71 70
 
@@ -140,8 +139,16 @@ import { fchown } from 'fs';
140 139
     font-size: 14px;
141 140
     margin-bottom: 5px;
142 141
   }
142
+
143
+  .modetwo{
144
+    width: 300px;
145
+    height: 100%;
146
+    /* border: solid 1px red; */
147
+    font-size: 14px;
148
+    margin-bottom: 5px;
149
+  }
143 150
   
144
-   .modetwo{
151
+   .modefour{
145 152
     width: 300px;
146 153
     height: 30px;
147 154
     color: black;

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

@@ -78,8 +78,8 @@
78 78
                     </label>
79 79
                      <span class="el-upload-list__item-actions">
80 80
                     <span class="el-upload-list__item-delete">
81
-                    <i class="el-icon-edit-outline" @click="editImages(item.id);editcenterDialogVisible = true"></i>
82
-                    <i class="el-icon-delete" @click="deleteDoctor(item.id,index)"></i>
81
+                    <i class="el-icon-edit-outline" @click="editRotationImages(item.id);editRotionImages = true"></i>
82
+                    <i class="el-icon-delete" @click="deleteRotations(item.id,index)"></i>
83 83
                     </span>
84 84
                     </span>
85 85
                    </div>         
@@ -98,7 +98,7 @@
98 98
     </el-form>
99 99
     <span slot="footer" class="dialog-footer">
100 100
       <el-button @click="dialogVisible = false">取 消</el-button>
101
-      <el-button type="primary" @click="AddRotationChart('rotationform')">确 定</el-button>
101
+      <el-button type="primary" @click="AddRotationChart('rotationform');OpenCreate()">确 定</el-button>
102 102
     </span>
103 103
   </el-dialog>
104 104
 
@@ -146,6 +146,7 @@
146 146
        <el-button size="medium" @click="addlink()" v-show="selectone">设置链接</el-button>
147 147
       </el-col>
148 148
     </el-form-item>
149
+    
149 150
   </el-form>
150 151
   <span slot="footer" class="dialog-footer">
151 152
     <el-button @click="addpicVisible = false">取 消</el-button>
@@ -232,7 +233,7 @@
232 233
     title="新增科室介绍"
233 234
     :visible.sync="three"
234 235
     width="50%"
235
-    :before-close="handleClose">
236
+    center>
236 237
     <el-form ref="administform" :model="administform" label-width="90px" :rules="rules">
237 238
       <el-form-item label="模块标题:" required prop="title">
238 239
         <el-input v-model="administform.title"></el-input>
@@ -471,7 +472,7 @@
471 472
            v-if="!disabled"
472 473
            class="el-upload-list__item-delete"
473 474
          >
474
-         <i class="el-icon-edit-outline"></i>
475
+         <!-- <i class="el-icon-edit-outline"></i> -->
475 476
           </span> 
476 477
          <span
477 478
            v-if="!disabled"
@@ -680,12 +681,101 @@
680 681
   </span>
681 682
 </el-dialog>
682 683
 
684
+<!-- 编辑轮播图 -->
685
+ <el-dialog
686
+  title="编辑轮播图"
687
+  :visible.sync="editRotionImages"
688
+  width="35%"
689
+  center>
690
+  <el-form label-width="90px" ref="editrotationform" :model="editrotationform" :rules="rules">
691
+      <el-form-item label="图片编辑:">
692
+        <el-upload
693
+          :data="rotationdata"
694
+          class="avatar-uploader"
695
+          action="https://upload.qiniup.com"
696
+          :show-file-list="false"
697
+          :on-success="rotationAvatarSuccess"
698
+          :before-upload="rotationAvatarUpload">
699
+          <img v-if="editrotationform.images" :src="editrotationform.images" class="avatar">
700
+          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
701
+        </el-upload>
702
+      </el-form-item>
703
+      <el-form-item label="排序值:" required prop="sort">
704
+          <el-input v-model="editrotationform.sort"></el-input> 
705
+      </el-form-item>
706
+      <el-form-item label="图片链接:">
707
+          <el-radio-group v-model="editrotationform.piclink">
708
+           <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderOptions" :key="index" @change="select(gender.id)">{{gender.name}}</el-radio>
709
+        </el-radio-group>
710
+      </el-form-item>
711
+       <el-form-item label="链接地址:" required prop="linkaddress">
712
+        <el-col :span="15">
713
+          <el-input v-model="editrotationform.linkaddress" v-show="selectone" style="width:300px"></el-input>
714
+        </el-col>
715
+        <el-col :span="4">
716
+          <el-button size="medium"  v-show="selectone" @click="rotationVisible = true">设置链接</el-button>
717
+        </el-col>
718
+    </el-form-item>
719
+  </el-form>
720
+  <span slot="footer" class="dialog-footer">
721
+    <el-button @click="editRotionImages = false">取 消</el-button>
722
+    <el-button type="primary" @click="updateRotionImages('editrotationform');editRotionImages = false">确 定</el-button>
723
+  </span>
724
+</el-dialog>
725
+
726
+
727
+<!-- 设置轮播图链接地址 -->
728
+<el-dialog
729
+  title="设置链接地址"
730
+  :visible.sync="rotationVisible"
731
+  width="30%"
732
+  :before-close="handleClose"
733
+  center>
734
+  <el-form label-width="90px">
735
+     <el-form-item label="连接类型">
736
+         <el-radio-group v-model="form.gender">
737
+            <el-radio :label="item.id" :value="item.id" v-for="(item,index) in defineOptions" :key="index" @change="selectItem(item.id)">{{item.name}}</el-radio>
738
+         </el-radio-group>
739
+     </el-form-item>  
740
+       <el-form-item label="链接类型:" v-show="definetwo">
741
+       <el-select v-model="value" placeholder="请选择">
742
+        <el-option
743
+        v-for="item in options"
744
+        :key="item.value"
745
+        :label="item.label"
746
+        :value="item.value">
747
+       </el-option>
748
+      </el-select>
749
+     </el-form-item>
750
+     <el-form-item label="文章分类" v-show="definetwo">
751
+       <el-select v-model="value" placeholder="请选择">
752
+        <el-option
753
+        v-for="item in options"
754
+        :key="item.value"
755
+        :label="item.label"
756
+        :value="item.value">
757
+       </el-option>
758
+      </el-select>
759
+     </el-form-item>
760
+     <el-form-item label="电话号码:" v-show="definethree">
761
+       <el-input></el-input>
762
+     </el-form-item>
763
+     <el-form-item label="站外链接:" v-show="definefour">
764
+       <el-input></el-input>
765
+     </el-form-item>
766
+  </el-form>
767
+  <span slot="footer" class="dialog-footer">
768
+    <el-button @click="rotationVisible = false">取 消</el-button>
769
+    <el-button type="primary" @click="rotationVisible = false">确 定</el-button>
770
+  </span>
771
+</el-dialog>
683 772
 </div>
684 773
 </template>
685 774
 
686 775
 <script>
687 776
    import { AddRotationChart, saveHispital,addOffices,AddDoctor,AddDoctorInfo,AddOfficeEnvironment,getQueryDocInfo,change,
688
-   getQueryDoCHead,editDoctor,saveDocInfo,deleteDoctor,AddImageslink,getEditImages,AddMagicNavi,getMagicImages,AddMarginChart} from '@/api/site/site'  
777
+   getQueryDoCHead,editDoctor,saveDocInfo,deleteDoctor,AddImageslink,getEditImages,AddMagicNavi,getMagicImages,AddMarginChart,
778
+   deleteRotations,editRotationImages,updateRotionImages} from '@/api/site/site'  
689 779
    import { getToken } from '@/api/qiniu'
690 780
    import { getFileExtension} from '@/utils/tools'
691 781
    import { isIP } from 'net';
@@ -695,8 +785,8 @@
695 785
    import 'quill/dist/quill.snow.css'
696 786
    import 'quill/dist/quill.bubble.css'
697 787
    import { constants } from 'crypto';
698
-import { fail } from 'assert';
699
-import { get } from 'http';
788
+   import { fail } from 'assert';
789
+   import { get } from 'http';
700 790
 export default {
701 791
   name: "newfeature",
702 792
   components:{
@@ -735,6 +825,7 @@ export default {
735 825
        definethree:false,
736 826
        definefour:false,
737 827
        selectone:true,
828
+       rotationVisible:false,
738 829
        docnames:[],
739 830
        radio: '1',
740 831
        radiotwo:'2',
@@ -771,6 +862,7 @@ export default {
771 862
       addpicVisible:false,
772 863
       MagicNavigation:false,
773 864
       magicVisible:false,
865
+      editRotionImages:false,
774 866
       radio: '1',
775 867
       two: false,
776 868
       three: false,
@@ -805,7 +897,6 @@ export default {
805 897
         image:"",
806 898
       },
807 899
       docform:[],
808
-      
809 900
       hispitalform:{
810 901
         title:"",
811 902
         sort:"",
@@ -866,6 +957,13 @@ export default {
866 957
         linkaddress:"",
867 958
       },
868 959
 
960
+      editrotationform:{
961
+          images:"",
962
+          sort:"",
963
+          piclink:"",
964
+          linkaddress:"",
965
+      },
966
+
869 967
        rules: {
870 968
          title: [{required: true, message: "请填写模块标题",},],
871 969
          sort: [{required: true,message:"请填写排序值"}],
@@ -885,12 +983,16 @@ export default {
885 983
          docimages:[{required:true,message:"请填写新增名医"}],
886 984
          linkaddress:[{required:true,message:"请填写链接地址"}],
887 985
          imageUrl:[{required:true,message:"请填写图片编辑"}],
888
-         margtitle:[{required:true,message:"请填写导航标题"}]
986
+         margtitle:[{required:true,message:"请填写导航标题"}],
987
+         address:[{required:true,message:"请填写链接地址"}]
889 988
       },
890 989
     };
891 990
   },
892 991
   // 医院介绍模块
893 992
   methods:{  
993
+    OpenCreate(){
994
+       this.$refs.newfeature.Open();
995
+    },
894 996
       addlink(){
895 997
         this.linkVisible = true;
896 998
       },
@@ -1143,6 +1245,41 @@ export default {
1143 1245
           return isJPG && isLt2M;
1144 1246
       },
1145 1247
 
1248
+      rotationAvatarSuccess(res,file){
1249
+         this.editrotationform.images = this.qiniuDomain + res.url;
1250
+      },
1251
+      rotationAvatarUpload(file){
1252
+            var fileType = file.type
1253
+            const isJPG = fileType.indexOf("image") > -1;
1254
+            const isLt2M = file.size / 1024 / 1024 < 2;
1255
+            if (!isJPG) {
1256
+                this.$message.error("只能上传图片");
1257
+                return false;
1258
+            }
1259
+            if (!isLt2M) {
1260
+                this.$message.error("图片大小不能超过 2MB!");
1261
+                return false;
1262
+         }
1263
+      
1264
+         var date = new Date()
1265
+            var ext = getFileExtension(file.name)
1266
+            var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;       
1267
+            this.loadingText = '封面图片上传中'
1268
+            const _self = this
1269
+            return new Promise((resolve, reject) => {
1270
+                getToken().then(response => {
1271
+                    const token= response.data.data.uptoken
1272
+                    console.log("导航头像token是什么?",token)
1273
+                    _self._data.rotationdata.token = token;
1274
+                    _self._data.rotationdata.key = key;
1275
+                    resolve(true)
1276
+                }).catch(err => {
1277
+                    reject(false)                    
1278
+                })
1279
+            })
1280
+          return isJPG && isLt2M;
1281
+      },
1282
+
1146 1283
       //新增轮播图
1147 1284
       AddRotationChart(formName){
1148 1285
             var sorts =  this.rotationform.sort;
@@ -1164,6 +1301,9 @@ export default {
1164 1301
             }
1165 1302
           })  
1166 1303
       },
1304
+      OpenCreate(){
1305
+        
1306
+      },
1167 1307
 
1168 1308
     //医院介绍
1169 1309
      saveHispital(formName){
@@ -1176,7 +1316,7 @@ export default {
1176 1316
                     var hospital = response.data.data.hospital;
1177 1317
                     //console.log("返回数据",hospital)
1178 1318
                      this.$message.success("添加医院介绍成功");  
1179
-                     this.two = false;                       
1319
+                     this.two = false;                
1180 1320
                   }
1181 1321
              })
1182 1322
           }
@@ -1422,6 +1562,7 @@ export default {
1422 1562
                 if(response.data.state ==1){
1423 1563
                   var editpiclink = response.data.data.editpiclink;
1424 1564
                   console.log("数据返回",editpiclink)
1565
+                  this.getEditImages();
1425 1566
                 }
1426 1567
              })
1427 1568
           }
@@ -1478,7 +1619,49 @@ export default {
1478 1619
           })
1479 1620
         }
1480 1621
       })
1481
-  },
1622
+    },
1623
+
1624
+    deleteRotations(id,index){
1625
+       this.$confirm('确认要删除该组件吗?删除后该组件将无法恢复','删除提示!',{
1626
+          dangerouslyUseHTMLString:true,
1627
+             confirmButtonText: '确定',
1628
+             cancelButtonText: '取消',
1629
+             type: 'warning'
1630
+       }).then(()=>{
1631
+         deleteRotations(id).then(response=>{
1632
+             if(response.data.state == 1){
1633
+               this.rotationdata.splice(index,1)
1634
+             }
1635
+         })
1636
+       })
1637
+    },
1638
+
1639
+    editRotationImages(id){
1640
+      editRotationImages(id).then(response=>{
1641
+          if(response.data.state == 1){
1642
+           var editpiclink = response.data.data.editpiclink;
1643
+           this.editrotationform = response.data.data.editpiclink;
1644
+           console.log("这是什么",editpiclink)
1645
+          }
1646
+      })
1647
+    },
1648
+    updateRotionImages(formName){
1649
+       var sorts = this.editrotationform.sort;
1650
+          var sort = parseInt(sorts);
1651
+          this.editrotationform.sort = sort;
1652
+       this.$refs[formName].validate((valid)=>{
1653
+         if(valid){
1654
+          updateRotionImages(this.editrotationform.id,this.editrotationform).then(response=>{
1655
+                 if(response.data.state == 1){
1656
+                   var editpiclink =  response.data.data.editpiclink;
1657
+                   console.log("返回数据",editpiclink)
1658
+                   this.getEditImages();
1659
+                   
1660
+                 }
1661
+          })
1662
+         }
1663
+       })
1664
+    }
1482 1665
   },  
1483 1666
    created(){
1484 1667
      this.getQueryDocInfo();

+ 342 - 65
src/scrm_pages/site/preview.vue Ver fichero

@@ -421,7 +421,7 @@
421 421
 
422 422
                <!-- 编辑乘车方式 -->
423 423
                 <el-dialog
424
-                   title="提示"
424
+                   title="编辑乘车方式"
425 425
                    :visible.sync="dialogVisiblefive"
426 426
                    width="30%"
427 427
                   >
@@ -528,6 +528,105 @@
528 528
                   <el-button type="primary" @click="linkVisible = false">确 定</el-button>
529 529
                   </span>
530 530
                 </el-dialog>
531
+
532
+                <!-- 编辑导航 -->
533
+                <el-dialog
534
+                  title="编辑导航"
535
+                  :visible.sync="editNavigationVisible"
536
+                  width="30%"
537
+                 center>
538
+                 <el-form label-width="130px" ref="editNavigationform" :model="editNavigationform" :rules="rules">
539
+                    <el-form-item label="导航标题:" required prop="navtitle">
540
+                      <el-input v-model="editNavigationform.navtitle"></el-input>
541
+                    </el-form-item>
542
+                    <el-form-item label="导航图标选中:" required="checkImages">
543
+                       <el-upload
544
+                       :data="editcheckdata"
545
+                        class="avatar-uploader"
546
+                        action="https://upload.qiniup.com"
547
+                        :show-file-list="false"
548
+                        :on-success="editNaviAvatarSuccess"
549
+                        :before-upload="editNaviAvatarUpload">
550
+                        <img v-if="editNavigationform.navimages" :src="editNavigationform.navimages" class="avatar">
551
+                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
552
+                       </el-upload> 
553
+                    </el-form-item>
554
+                    <el-form-item label="导航图标未选中:">
555
+                       <el-upload
556
+                        :data="editcheckdata"
557
+                        class="avatar-uploader"
558
+                        action="https://upload.qiniup.com"
559
+                        :show-file-list="false"
560
+                        :on-success="editNaviAvatarSuccessone"
561
+                        :before-upload="editNaviAvatarUploadone">
562
+                        <img v-if="editNavigationform.noCheckImages" :src="editNavigationform.noCheckImages" class="avatar">
563
+                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
564
+                       </el-upload> 
565
+                    </el-form-item>
566
+                    <el-form-item label="跳转设置:">
567
+                        <el-radio-group v-model="editNavigationform.jumpset">
568
+                          <el-radio :label="gender.id" :value="gender.id" v-for="(gender, index) in genderOptions" :key="index" @change="selectGender(gender.id)">{{gender.name}}</el-radio>
569
+                       </el-radio-group>
570
+                    </el-form-item>
571
+                     <el-form-item>
572
+                      <el-col :span="18" >
573
+                        <el-input   v-show="define" v-model="editNavigationform.navaddress"></el-input> 
574
+                     </el-col>
575
+                    <el-col :span="4">
576
+                        <el-button size="medium" @click="dialogVisible=true"  v-show="define">设置链接</el-button>
577
+                    </el-col>
578
+                    </el-form-item>
579
+                 </el-form>
580
+                 <span slot="footer" class="dialog-footer">
581
+                <el-button @click="editNavigationVisible = false">取 消</el-button>
582
+                 <el-button type="primary" @click="SaveNavigation('editNavigationform');">确 定</el-button>
583
+                 </span>
584
+               </el-dialog>
585
+
586
+              <el-dialog
587
+                title="设置链接"
588
+                :visible.sync="dialogVisible"
589
+                 width="30%"
590
+                center>
591
+               <el-form>
592
+                    <el-form-item label="链接类型:" ref="linkform" :model="linkform">
593
+                        <el-radio-group v-model="navigationform.gender">
594
+                          <el-radio :label="item.id" :value="item.id" v-for="(item,index) in defineOptions" :key="index" @change="selectItem(item.id)">{{item.name}}</el-radio>
595
+                        </el-radio-group>
596
+                    </el-form-item>
597
+                    <el-form-item label="链接类型:" v-show="definetwo">
598
+                       <el-select v-model="linkform.linktype" placeholder="请选择">
599
+                       <el-option
600
+                         v-for="item in option"
601
+                         :key="item.value"
602
+                         :label="item.label"
603
+                         :value="item.value">
604
+                      </el-option>
605
+                     </el-select>
606
+                    </el-form-item>
607
+                     <el-form-item label="活动类型:" v-show="definetwo">
608
+                       <el-select v-model="linkform.actitype" placeholder="请选择">
609
+                       <el-option
610
+                         v-for="item in options"
611
+                         :key="item.value"
612
+                         :label="item.label"
613
+                         :value="item.value">
614
+                      </el-option>
615
+                     </el-select>
616
+                    </el-form-item>
617
+                    <el-form-item label="电话号码:" v-show="definethree">
618
+                      <el-input style="width:400px"></el-input>
619
+                    </el-form-item>
620
+                    <el-form-item label="站外链接:"  v-show="definefour">
621
+                      <el-input style="width:400px"></el-input>
622
+                    </el-form-item>
623
+                  </el-form>
624
+               <span slot="footer" class="dialog-footer">
625
+               <el-button @click="dialogVisible = false">取 消</el-button>
626
+               <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
627
+                </span>
628
+               </el-dialog>
629
+
531 630
               
532 631
               <!-- 手机模拟页面 -->
533 632
                <el-col :span="10">
@@ -537,8 +636,8 @@
537 636
                    <div class="wifi"></div>
538 637
                    <div class="dian"></div>
539 638
                    <div class="scroll" v-show="show">
540
-                     <div class="swiper-container swiper-no-swiping" id="swiper1">
541
-                      <div class="swiper-wrapper" id="wrapper1">   
639
+                     <div class="swiper-container swiper-no-swiping swiperone">
640
+                      <div class="swiper-wrapper">   
542 641
                          <div v-for="item in this.patientModels" :key="item.id" v-show="modelshowtwo">
543 642
                            <!-- 轮播图 -->
544 643
                              <div v-if="item.mode_type == 1" class="modeone">                                                                 
@@ -593,33 +692,53 @@
593 692
                             <div class="more" @click="more()">查看更多</div>
594 693
                             <div class="logo"><img src="static\images\u216.png"></div>
595 694
                             <div class="swiperimages">
596
-                            <div class="swiper-container" id="swipertwo">
597
-                            <div class="swiper-wrapper" id="wrapper2">
598
-                            <div class="swiper-slide"  v-for="it in keEnvironmentImages" :key="it.id">
599
-                             <img :src="it" style="width:150px;height:140px;border-radius:5px;"/>
600
-                           </div>
601
-                           </div>
602
-                           </div>
695
+                               <div class="swiper-container swiperthree" >
696
+                                 <div class="swiper-wrapper" id="wrappertwo" >
697
+                                    <div class="swiper-slide"  v-for="it in keEnvironmentImages" :key="it.id">
698
+                                      <img :src="it" style="width:150px;height:140px;border-radius:5px;"/>
699
+                                     </div>
700
+                                </div>
701
+                              </div>
603 702
                             </div>
703
+                          
604 704
                            </div>
605 705
 
606 706
                            <!-- 魔方导航 -->
607 707
                            <div v-if="item.mode_type== 8" class="modeeight">
608
-                              {{item.title}}     
708
+                              <!-- {{item.title}}      -->
709
+                              <div class="mac">
710
+                                 <div class="macone">
711
+                                   <div class="picone"><img src="static/images/u289.png"></div>
712
+                                   <div class="pictwo"><span>微商城</span></div>
713
+                                 </div>
714
+                                 <div class="mactwo">
715
+                                   <div class="picone"><img src="static/images/u289.png"></div>
716
+                                   <div class="pictwo"><span>肾科资讯</span></div>
717
+                                 </div>
718
+                                 <div class="macthree">
719
+                                   <div class="picone"><img src="static/images/u289.png"></div>
720
+                                   <div class="pictwo"><span>在线客服</span></div>
721
+                                 </div>
722
+                                 <div class="macfour">
723
+                                   <div class="picone"><img src="static/images/u289.png"></div>
724
+                                   <div class="pictwo"><span>肾友故事</span></div>
725
+                                 </div>
726
+                              </div>
609 727
                            </div>
610 728
                           
611 729
                           <div class="box"></div>
730
+                                               
612 731
                          </div>  
613
-                          <contact-us  v-show="modelshow"></contact-us>                              
732
+                          <contact-us  v-show="modelshow"></contact-us>  
614 733
                       </div>         
615 734
                      </div>
616 735
                    </div>  
617 736
                       <!-- 医院介绍详情页-->                
618 737
                       <div class="xiangqing"  v-show="shows" v-html="hospitalform.introduction"></div> 
619 738
                       <!-- 科室介绍详情页 -->                        
620
-                       <div class="xiangqing" v-html="officeform.introduction" v-show="keshow"></div> 
739
+                       <!-- <div class="xiangqing" v-html="officeform.introduction" v-show="keshow"></div>  -->
621 740
                         <!--编辑名医介绍  -->
622
-                        <div class="xiangqing" v-show="docshow">
741
+                        <!-- <div class="xiangqing" v-show="docshow">
623 742
                           <div class="docone" v-for="item in this.editdocfrom" :key="item">
624 743
                              <div class="doctwo">
625 744
                                <img :src="item.dochead" style="width:80px;height:80px">
@@ -631,7 +750,7 @@
631 750
                                 <span class="docsix" v-html="item.docintroduction"></span>
632 751
                              </div>
633 752
                           </div>
634
-                        </div>
753
+                        </div> -->
635 754
                          
636 755
                        <!--返回首页-->
637 756
                      <div class="reback" v-show="showback">
@@ -648,7 +767,7 @@
648 767
                            <img src="static/images/u378.png">
649 768
                         </div>
650 769
                         <div class="reindextwo">
651
-                            <span>顶部</span>
770
+                            <span @click="returntop()">顶部</span>
652 771
                         </div>
653 772
                      </div>
654 773
                       
@@ -684,7 +803,7 @@
684 803
                           <span>{{item.navtitle}}</span>
685 804
                        </div>
686 805
                        <div class="navifour">
687
-                          <span class="el-icon-edit-outline"></span>
806
+                          <span class="el-icon-edit-outline" @click="editNavigationVisible = true;editNavigation(item.id);"></span>
688 807
                        </div>
689 808
                        <div class="navifive">
690 809
                           <span class="el-icon-delete" @click="deleteNavigation(item.id,index)"></span>
@@ -779,7 +898,7 @@ import 'mint-ui/lib/style.css';
779 898
 import {GetUserdModel,eidtmodel,editRideWay,SaveWorkTime,saverideway,editHospital,SaveHospital,editOffice,editDoc,
780 899
 deleteModleById,SaveOffice,editImages,saveDocInfo,deleteDoctor,SaveDocdata,editOfficeEnviroment,SaveOfficeEnvironment,
781 900
 getQueryNewModel,getHospital,getHospitaldata,hispitalmore,officemore,docmore,addNavigation,getNavigationList,
782
-AddShareInfo,getShareInfo,deleteNavigation,deletemodle } from '@/api/site/site'  
901
+AddShareInfo,getShareInfo,deleteNavigation,deletemodle,editNavigation,SaveNavigation } from '@/api/site/site'  
783 902
 import { IncomingMessage } from 'http';
784 903
 import { isIP, isIPv4 } from 'net';
785 904
 import Swiper from "swiper";
@@ -834,6 +953,7 @@ export default {
834 953
       dialogVisiblefour:false,
835 954
       dialogVisiblefive:false,
836 955
       hosipitalVisible:false,
956
+      dialogVisible:false,
837 957
       officeVisible:false,
838 958
       docVisible:false,
839 959
       comshow:false,
@@ -851,6 +971,7 @@ export default {
851 971
        disabled:true,
852 972
        showback:false,
853 973
        showindex:false,
974
+       editNavigationVisible:false,
854 975
       ellipsis:'',
855 976
       docnames:[],
856 977
        options: [{
@@ -894,12 +1015,6 @@ export default {
894 1015
             background: 'red',
895 1016
           }
896 1017
         },
897
-        rules: {
898
-          title: [{required: true, message: "请填写模块标题",},],
899
-          sort: [{required: true,message:"请填写排序值"}],       
900
-          worktime:[{required:true,message:"请填写工作时间"}],
901
-          rideway:[{required:true,message:"请填写乘车方式"}]   
902
-      },
903 1018
         keEnvironmentImages:[],
904 1019
         qiniuDomain: 'https://images.shengws.com/',
905 1020
         rotationData: { token:'',key: '' },
@@ -907,6 +1022,7 @@ export default {
907 1022
         doctorData:{ token:'',key:'' },
908 1023
         navigationData:{ token:'',key:''},
909 1024
         sharedata:{ token:'',key:''},
1025
+        editcheckdata: { token:'',key:''},
910 1026
       officeform:{
911 1027
         title:"",
912 1028
         sort:"",
@@ -1018,6 +1134,13 @@ export default {
1018 1134
         phone:"",
1019 1135
         offsitelink:"",
1020 1136
       },  
1137
+      editNavigationform:{
1138
+         navtitle:"",
1139
+         navimages:"",
1140
+         noCheckImages:"",
1141
+         jumpset:"",
1142
+         navaddress:"",
1143
+      },
1021 1144
       
1022 1145
        rules: {
1023 1146
          title: [{required: true, message: "请填写模块标题",},],
@@ -1036,6 +1159,10 @@ export default {
1036 1159
          docimages:[{required:true,message:"请填写新增名医"}],
1037 1160
          navtitle:[{required:true,message:"请填写导航标题"}],
1038 1161
          navigationImages:[{required:true,message:"请填写导航图标"}],  
1162
+         worktime:[{required:true,message:"请填写工作时间"}],
1163
+         rideway:[{required:true,message:"请填写乘车方式"}],
1164
+         navigatitle:[{required:true,message:"请填写导航标题"}],
1165
+         checkImages:[{required:true,message:"请填写导航图标选中"}],
1039 1166
       },
1040 1167
         keData: { token: '' ,key: ''},
1041 1168
         navigationdata:[],
@@ -1066,13 +1193,14 @@ export default {
1066 1193
                 }   
1067 1194
                 var  strs =  str.join(",")
1068 1195
                 var ss = strs.split(",")
1196
+
1069 1197
                 this.rotatationImages = ss;
1070 1198
                 for(let i = 0; i<this.patientModels.length;i++){
1071 1199
                   if(this.patientModels[i].OfficeEnviroment.keimages !=""){
1072 1200
                      images.push(this.patientModels[i].OfficeEnviroment.keimages);
1073 1201
                   }       
1074 1202
                 }
1075
-                var imgs =  str.join(",")
1203
+                var imgs =  images.join(",")
1076 1204
                 var imgss = imgs.split(",")
1077 1205
                 this.keEnvironmentImages = imgss;
1078 1206
                 console.log("keimages是什么",imgss);
@@ -1247,6 +1375,82 @@ export default {
1247 1375
             })
1248 1376
           return isJPG && isLt2M;
1249 1377
       },
1378
+
1379
+      editNaviAvatarSuccess(res,file){
1380
+          this.editNavigationform.navimages = this.qiniuDomain + res.url;
1381
+      },
1382
+      editNaviAvatarUpload(file){
1383
+          var fileType = file.type
1384
+            const isJPG = fileType.indexOf("image") > -1;
1385
+            const isLt2M = file.size / 1024 / 1024 < 2;
1386
+            if (!isJPG) {
1387
+                this.$message.error("只能上传图片");
1388
+                return false;
1389
+            }
1390
+            if (!isLt2M) {
1391
+                this.$message.error("图片大小不能超过 2MB!");
1392
+                return false;
1393
+         }
1394
+      
1395
+         var date = new Date()
1396
+            var ext = getFileExtension(file.name)
1397
+            var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
1398
+            this.uploading = true;
1399
+            this.loadingText = '封面图片上传中'
1400
+
1401
+            const _self = this
1402
+            return new Promise((resolve, reject) => {
1403
+                getToken().then(response => {
1404
+                    const token= response.data.data.uptoken
1405
+                    console.log("医生头像token是什么?",token)
1406
+                    _self._data.editcheckdata.token = token;
1407
+                    _self._data.editcheckdata.key = key;
1408
+                    resolve(true)
1409
+                }).catch(err => {
1410
+                    reject(false)
1411
+                    this.uploading = false;
1412
+                })
1413
+            })
1414
+          return isJPG && isLt2M;
1415
+      },
1416
+        editNaviAvatarSuccessone(res,file){
1417
+          this.editNavigationform.noCheckImages = this.qiniuDomain + res.url;
1418
+      },
1419
+      editNaviAvatarUploadone(file){
1420
+           var fileType = file.type
1421
+            const isJPG = fileType.indexOf("image") > -1;
1422
+            const isLt2M = file.size / 1024 / 1024 < 2;
1423
+            if (!isJPG) {
1424
+                this.$message.error("只能上传图片");
1425
+                return false;
1426
+            }
1427
+            if (!isLt2M) {
1428
+                this.$message.error("图片大小不能超过 2MB!");
1429
+                return false;
1430
+         }
1431
+      
1432
+         var date = new Date()
1433
+            var ext = getFileExtension(file.name)
1434
+            var key = date.getFullYear() + (date.getMonth() + 1) + date.getDate() + date.getHours()  + date.getMinutes()  + date.getSeconds()  +'_o_' + file.uid + '.' + ext;
1435
+            this.uploading = true;
1436
+            this.loadingText = '封面图片上传中'
1437
+
1438
+            const _self = this
1439
+            return new Promise((resolve, reject) => {
1440
+                getToken().then(response => {
1441
+                    const token= response.data.data.uptoken
1442
+                    console.log("医生头像token是什么?",token)
1443
+                    _self._data.editcheckdata.token = token;
1444
+                    _self._data.editcheckdata.key = key;
1445
+                    resolve(true)
1446
+                }).catch(err => {
1447
+                    reject(false)
1448
+                    this.uploading = false;
1449
+                })
1450
+            })
1451
+          return isJPG && isLt2M;
1452
+      },
1453
+
1250 1454
       //添加轮播图
1251 1455
       addRotationUpload(formName){
1252 1456
         this.$refs[formName].validate((valid)=>{
@@ -1550,7 +1754,10 @@ export default {
1550 1754
        this.$refs[formName].validate((valid)=>{
1551 1755
          if(valid){
1552 1756
            SaveOfficeEnvironment(this.keform.id,this.keform).then(response=>{
1553
-             
1757
+               if(response.data.state == 1){
1758
+                  var navigation = response.data.data.navigation;
1759
+                  console.log("返回数据",navigation);
1760
+               }
1554 1761
            })
1555 1762
          }
1556 1763
        })
@@ -1723,9 +1930,6 @@ export default {
1723 1930
         width: 100,
1724 1931
         height: 100, // 高度
1725 1932
         text: '56663159' // 二维码内容
1726
-        // render: 'canvas' // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
1727
-        // background: '#f0f'
1728
-        // foreground: '#ff0'
1729 1933
       })
1730 1934
       console.log(qrcode)
1731 1935
     },
@@ -1772,6 +1976,31 @@ export default {
1772 1976
         }).catch(e=>{});
1773 1977
       }).catch(e=>{});
1774 1978
     },
1979
+   
1980
+    editNavigation(id){
1981
+       editNavigation(id).then(response=>{
1982
+           if(response.data.state==1){
1983
+            var navigation = response.data.data.navigation;
1984
+             this.editNavigationform = response.data.data.navigation;
1985
+            console.log("返回的导航数据",navigation);
1986
+           }
1987
+       })
1988
+    },
1989
+    SaveNavigation(formName){
1990
+       this.$refs[formName].validate((valid)=>{
1991
+         if(valid){
1992
+            SaveNavigation(this.editNavigationform.id,this.editNavigationform).then(response=>{
1993
+                 if(response.data.state == 1){
1994
+                  var navigation = response.data.data.navigation;
1995
+                  this.editNavigationVisible = false;
1996
+                  console.log("更新的数据",navigation);
1997
+                   this.getNavigationList();
1998
+                 } 
1999
+            })
2000
+         }
2001
+       })
2002
+    },
2003
+
1775 2004
     changbutton(){
1776 2005
        var content = document.getElementById('edit').innerHTML;
1777 2006
        if(content == "编辑"){
@@ -1784,7 +2013,10 @@ export default {
1784 2013
           this.disabled = true;
1785 2014
           this.shareshow = false;
1786 2015
            AddShareInfo(this.shareform).then(response=>{
1787
-
2016
+              if(response.data.state == 1){
2017
+                var share = response.data.data.share;
2018
+                console.log("数据返回",share);
2019
+              }
1788 2020
           })
1789 2021
        }
1790 2022
     },
@@ -1797,17 +2029,23 @@ export default {
1797 2029
             console.log("返回分享数据",share)
1798 2030
           }
1799 2031
       })
2032
+    },
2033
+
2034
+    returntop(){
2035
+      alert("aaa");
1800 2036
     }
1801 2037
 
1802
-   
1803 2038
   },
1804 2039
   created(){
1805 2040
     this.GetUserdModel();
1806 2041
     this.getQueryNewModel();
1807
-    this.getHospitaldata();
1808 2042
     this.getHospital();
1809 2043
     this.getNavigationList();
1810 2044
     this.getShareInfo();
2045
+    this.getHospitaldata();
2046
+    },
2047
+    beforeUpdate(){
2048
+    
1811 2049
     },
1812 2050
     updated(){
1813 2051
        let obj = document.getElementById('content');
@@ -1830,7 +2068,7 @@ export default {
1830 2068
       },
1831 2069
     mounted(){
1832 2070
       this.qrcode();
1833
-      var swiper = new Swiper('#swiper1', {
2071
+      var swiper = new Swiper('.swiperone', {
1834 2072
           direction: 'vertical',
1835 2073
          slidesPerView: "auto",
1836 2074
          spaceBetween:5,
@@ -1843,28 +2081,30 @@ export default {
1843 2081
             el: '.swiper-pagination',
1844 2082
            clickable: true,
1845 2083
             },
1846
-          });      
1847
-          
1848
-           var mySwiper = new Swiper('#swipertwo', {
1849
-                direction:"horizontal",
1850
-                loop: true, // 循环播放,
1851
-                spaceBetween:10,
1852
-                autoplay:true,
1853
-                loopAdditionalSlides:10,
1854
-                slidesPerView: 'auto', // 设置slider容器能够同时显示的slides数量
1855
-                centeredSlides: true, // active slide 居中
1856
-                observer:true,//动态加载图片
1857
-                observeParents:false,
1858
-                pagination: {
1859
-                    el: '.swiper-pagination',
1860
-                },
1861
-            });
2084
+          });    
2085
+       
2086
+         var swiper = new Swiper('.swiperthree', {
2087
+          direction: 'vertical',
2088
+          slidesPerView: "auto",
2089
+          autoplay: true,
2090
+          loop:true,
2091
+          spaceBetween:5,
2092
+          loopAdditionalSlides:10,
2093
+          centeredSlides: false, // active slide 居中
2094
+          observer:true,//动态加载图片
2095
+          observeParents:true,
2096
+          paginationClickable: true,
2097
+          pagination: {
2098
+             el: '.swiper-pagination',
2099
+             clickable: true,
2100
+            },
2101
+        });      
1862 2102
     },
1863 2103
 }
1864 2104
 </script>
1865 2105
 
1866 2106
 <style rel="stylesheet/scss" lang="scss" scoped>
1867
-     
2107
+ 
1868 2108
      .done{
1869 2109
         width: 80px;
1870 2110
        height: 20px;
@@ -2198,13 +2438,13 @@ export default {
2198 2438
 
2199 2439
     .modetwo{
2200 2440
       width: 320px;
2201
-      height: 220px;
2441
+      height: 230px;
2202 2442
       /* border: solid 1px red;   */
2203 2443
       /* background-color: red; */
2204 2444
     }
2205 2445
     .modethree{
2206 2446
        width: 320px;
2207
-      height: 220px;
2447
+      height: 230px;
2208 2448
       /* border: solid 1px blue;   */
2209 2449
       /* background-color: blue; */
2210 2450
     }
@@ -2223,31 +2463,67 @@ export default {
2223 2463
 
2224 2464
     .modeeight{
2225 2465
       width: 320px;
2226
-      height: 200px;
2466
+      height: 160px;
2227 2467
       // border: solid 1px red;
2228 2468
     }
2229 2469
 
2230 2470
      .mac{
2231 2471
        position: absolute;
2232 2472
        width: 300px;
2233
-       height: 100px;
2234
-       border:solid 1px red;
2473
+       height: 70px;
2474
+      //  border:solid 1px red;
2235 2475
        margin-left: 5px;
2236
-       margin-top: 5px;
2237 2476
     }   
2238
-    #mactwo{
2477
+    .mactwo{
2478
+      position: absolute;
2479
+      width: 60px;
2480
+      height: 70px;
2481
+      // border: solid 1px red;
2482
+      left: 80px;
2483
+    }
2484
+
2485
+    .macthree{
2486
+      position: absolute;
2487
+      width: 60px;
2488
+      height: 70px;
2489
+      // border: solid 1px red;
2490
+      left: 155px;
2491
+    }
2239 2492
 
2493
+    .macfour{
2494
+      position: absolute;
2495
+      width: 60px;
2496
+      height: 70px;
2497
+      // border: solid 1px red;
2498
+      left: 230px;
2240 2499
     }
2241 2500
 
2242 2501
     .macone{
2243 2502
       position: absolute;
2244
-      width: 50px;
2245
-      height: 90px;
2246
-      border: solid 1px red;
2247
-      top: 5px;
2503
+      width: 60px;
2504
+      height: 70px;
2505
+      // border: solid 1px red;  
2248 2506
       left: 5px;
2249 2507
     }
2250 2508
 
2509
+    .picone{
2510
+      width: 45px;
2511
+      height: 45px;
2512
+      // border: solid 1px red;
2513
+      margin-left: 8px;
2514
+      margin-top: 5px;
2515
+    }
2516
+
2517
+    .pictwo{
2518
+      width:60px;
2519
+      height: 20px;
2520
+      // border: solid 1px red;
2521
+      margin-top: 2px;
2522
+      font-size: 14px;
2523
+      text-align: center;
2524
+    }
2525
+   
2526
+
2251 2527
      .logo{
2252 2528
        position: absolute;
2253 2529
        margin-left: 280px;
@@ -2291,10 +2567,10 @@ export default {
2291 2567
    }
2292 2568
 
2293 2569
     .zzcontent{
2294
-     overflow: hidden;
2570
+      overflow: hidden;
2295 2571
      text-overflow: ellipsis;
2296 2572
      display: -webkit-box;
2297
-     -webkit-line-clamp: 6;
2573
+     -webkit-line-clamp: 5;
2298 2574
      -webkit-box-orient: vertical   
2299 2575
    }
2300 2576
 
@@ -2425,15 +2701,16 @@ export default {
2425 2701
       -webkit-box-orient: vertical   
2426 2702
    }   
2427 2703
 
2428
-     #wrapper2{
2704
+     #wrappertwo{
2429 2705
      width: 50%;
2430 2706
    }
2431 2707
 
2432 2708
    .swiperimages{
2433 2709
      width: 320px;
2434 2710
      height: 150;
2435
-     /* border: solid 1px red; */
2711
+    //  border: solid 1px red; 
2436 2712
      margin-top: 20px;
2713
+     overflow: hidden;
2437 2714
    }
2438 2715
 
2439 2716
    .navigationone{

+ 8 - 8
src/xt_permission.js Ver fichero

@@ -10,14 +10,14 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
10 10
 
11 11
 router.beforeEach((to, from, next) => {
12 12
   // 线上注释
13
-  if (store.getters.permission_routers === undefined) {
14
-    store.dispatch('xt_GenerateRoutes', []).then(() => {
15
-      next()
16
-    })
17
-  } else {
18
-    next()
19
-  }
20
-   return
13
+  // if (store.getters.permission_routers === undefined) {
14
+  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
15
+  //     next()
16
+  //   })
17
+  // } else {
18
+  //   next()
19
+  // }
20
+  //  return
21 21
   // 线上注释
22 22
 
23 23
   NProgress.start()