Browse Source

权限更改

xiaoming_global 5 years ago
parent
commit
50793483be

+ 2 - 2
config/dev.env.js View File

1
 module.exports = {
1
 module.exports = {
2
   NODE_ENV: '"development"',
2
   NODE_ENV: '"development"',
3
   ENV_CONFIG: '"dev"',
3
   ENV_CONFIG: '"dev"',
4
-  BASE_API:'"http://api.test1.sgjyun.com"',//'"http://localhost:9534"'
5
-  // BASE_API: '"http://localhost:9534"'
4
+  // BASE_API:'"http://api.test1.sgjyun.com"',//'"http://localhost:9534"'
5
+   BASE_API: '"http://localhost:9534"'
6
   // BASE_API:'"http://api.scrm.kuyicloud.com"',//'"http://localhost:9534"'
6
   // BASE_API:'"http://api.scrm.kuyicloud.com"',//'"http://localhost:9534"'
7
   // BASE_API:'"http://localhost:9536"',
7
   // BASE_API:'"http://localhost:9536"',
8
 
8
 

+ 2 - 2
config/index.js View File

16
     // can be overwritten by process.env.HOST
16
     // can be overwritten by process.env.HOST
17
     // if you want dev by ip, please set host: '0.0.0.0'
17
     // if you want dev by ip, please set host: '0.0.0.0'
18
 
18
 
19
-    host: "test1.sgjyun.com",
19
+    // host: "test1.sgjyun.com",
20
     //  host: 'microweb.kuyicloud.com',
20
     //  host: 'microweb.kuyicloud.com',
21
-    // host: "localhost",
21
+     host: "localhost",
22
     // host: 'jk.kuyicloud.com',
22
     // host: 'jk.kuyicloud.com',
23
     port: 8090, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
23
     port: 8090, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
24
     // host: 'test1.sgjyun.com',
24
     // host: 'test1.sgjyun.com',

+ 26 - 23
src/api/org/orginfo.js View File

1
 import request from '@/utils/request'
1
 import request from '@/utils/request'
2
 
2
 
3
-export function GetOrgInfo(){
4
-    return request({
5
-        url:'/api/orginfo/getinfo',
6
-        method:'get',
7
-    })
3
+export function GetOrgInfo(params) {
4
+  console.log('params是什么', params)
5
+  return request({
6
+    url: '/api/orginfo/getinfo',
7
+    method: 'get',
8
+    params: params
9
+  })
8
 }
10
 }
9
 
11
 
10
-export function SaveOrgGallery(data){
11
-    return request({
12
-        url:'/api/orginfo/savegallery',
13
-        method:'Post',
14
-        data:data,
15
-    })
12
+export function SaveOrgGallery(data) {
13
+  return request({
14
+    url: '/api/orginfo/savegallery',
15
+    method: 'Post',
16
+    data: data
17
+  })
16
 }
18
 }
17
 
19
 
18
-export function EditOrgInfo(data){
19
-    return request({
20
-        url:'/api/orginfo/edit',
21
-        method:'Post',
22
-        data:data,
23
-    })
20
+export function EditOrgInfo(data) {
21
+  console.log('data是设么', data)
22
+  return request({
23
+    url: '/api/orginfo/edit',
24
+    method: 'Post',
25
+    data: data
26
+  })
24
 }
27
 }
25
 
28
 
26
-export function DeleteOrgGallery(id){
27
-    return request({
28
-        url:'/api/orginfo/deletegallery',
29
-        method:'delete',
30
-        params:{id:id},
31
-    })
29
+export function DeleteOrgGallery(id) {
30
+  return request({
31
+    url: '/api/orginfo/deletegallery',
32
+    method: 'delete',
33
+    params: { id: id }
34
+  })
32
 }
35
 }

+ 0 - 1
src/api/qiniu.js View File

1
 import request from '@/utils/request'
1
 import request from '@/utils/request'
2
 
2
 
3
 export function getToken() {
3
 export function getToken() {
4
-  console.log("加地址")
5
   return request({
4
   return request({
6
     url: '/api/qiniu/uptoken', // 假地址 自行替换
5
     url: '/api/qiniu/uptoken', // 假地址 自行替换
7
     method: 'get'
6
     method: 'get'

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

328
             this.GetDistrict(id);
328
             this.GetDistrict(id);
329
         },
329
         },
330
         GetProvince:function(id) {  
330
         GetProvince:function(id) {  
331
+            
331
             GetDistrictsByUpid({id:id}).then(response=>{
332
             GetDistrictsByUpid({id:id}).then(response=>{
332
                 var res = response.data;
333
                 var res = response.data;
333
                 if (res.state===1) {
334
                 if (res.state===1) {

+ 157 - 157
src/scrm_pages/members/members.vue View File

258
 </template>
258
 </template>
259
 
259
 
260
 <script>
260
 <script>
261
-import { GetMembers, DeleteMembers } from "@/api/member/member";
262
-import BreadCrumb from "../components/bread-crumb";
263
-import { uParseTime } from "@/utils/tools";
264
-import CreateMemberForm from "./components/CreateMemberForm";
265
-import EditMemberForm from "./components/EditMemberForm";
266
-import EditMemberTagsForm from "./components/EditMemberTagsForm";
267
-import AddMembersTagsForm from "./components/AddMembersTagsForm";
268
-import EditMemberCardForm from "./components/EditMemberCardForm";
261
+import { GetMembers, DeleteMembers } from '@/api/member/member'
262
+import BreadCrumb from '../components/bread-crumb'
263
+import { uParseTime } from '@/utils/tools'
264
+import CreateMemberForm from './components/CreateMemberForm'
265
+import EditMemberForm from './components/EditMemberForm'
266
+import EditMemberTagsForm from './components/EditMemberTagsForm'
267
+import AddMembersTagsForm from './components/AddMembersTagsForm'
268
+import EditMemberCardForm from './components/EditMemberCardForm'
269
 export default {
269
 export default {
270
-  name: "commentList",
270
+  name: 'commentList',
271
   components: {
271
   components: {
272
     BreadCrumb,
272
     BreadCrumb,
273
     CreateMemberForm,
273
     CreateMemberForm,
279
   data() {
279
   data() {
280
     return {
280
     return {
281
       crumbs: [
281
       crumbs: [
282
-        { path: false, name: "会员管理" },
283
-        { path: false, name: "会员列表" }
282
+        { path: false, name: '会员管理' },
283
+        { path: false, name: '会员列表' }
284
       ],
284
       ],
285
-      time: "",
286
-      vip: "https://images.shengws.com/member-ship-card-vip.png",
285
+      time: '',
286
+      vip: 'https://images.shengws.com/member-ship-card-vip.png',
287
       checkAllStatus: false,
287
       checkAllStatus: false,
288
       active: true,
288
       active: true,
289
       levelType: 0,
289
       levelType: 0,
296
       membersData: [],
296
       membersData: [],
297
       illnessOptions: [],
297
       illnessOptions: [],
298
       memberData: {
298
       memberData: {
299
-        name: "",
300
-        mobile: "",
299
+        name: '',
300
+        mobile: '',
301
         gender: 0,
301
         gender: 0,
302
-        birthday: "",
302
+        birthday: '',
303
         city: [],
303
         city: [],
304
         province_id: 0,
304
         province_id: 0,
305
         city_id: 0,
305
         city_id: 0,
306
         district_id: 0,
306
         district_id: 0,
307
         illness: [],
307
         illness: [],
308
-        ill_date: "",
309
-        treat_type: "",
308
+        ill_date: '',
309
+        treat_type: '',
310
         tags: [],
310
         tags: [],
311
-        remark: "",
312
-        avatar: "",
311
+        remark: '',
312
+        avatar: '',
313
         id: 0,
313
         id: 0,
314
         ids: []
314
         ids: []
315
       },
315
       },
316
       cardFormData: {
316
       cardFormData: {
317
         id: 0,
317
         id: 0,
318
-        card_id: ""
318
+        card_id: ''
319
       },
319
       },
320
       selectedMembers: [],
320
       selectedMembers: [],
321
       memberIndex: -1,
321
       memberIndex: -1,
323
       listQuery: {
323
       listQuery: {
324
         page: 1,
324
         page: 1,
325
         limit: 10,
325
         limit: 10,
326
-        search: "",
327
-        start_time: "",
328
-        end_time: "",
326
+        search: '',
327
+        start_time: '',
328
+        end_time: '',
329
         source: 0,
329
         source: 0,
330
         tag: 0,
330
         tag: 0,
331
         level: 0,
331
         level: 0,
332
         init: 1
332
         init: 1
333
       }
333
       }
334
-    };
334
+    }
335
   },
335
   },
336
   methods: {
336
   methods: {
337
     GetMembers() {
337
     GetMembers() {
338
       GetMembers(this.listQuery)
338
       GetMembers(this.listQuery)
339
         .then(response => {
339
         .then(response => {
340
-          var res = response.data;
341
-          console.log("res是谁?", res);
340
+          var res = response.data
341
+          console.log('res是谁?', res)
342
           if (res.state == 1) {
342
           if (res.state == 1) {
343
-            this.membersData = res.data.members;
344
-            console.log("会员管理的数据", this.membersData);
345
-            this.total = res.data.total;
346
-            if (typeof res.data.cards != "undefined") {
347
-              this.levelCards = res.data.cards;
343
+            this.membersData = res.data.members
344
+            console.log('会员管理的数据', this.membersData)
345
+            this.total = res.data.total
346
+            if (typeof res.data.cards !== 'undefined') {
347
+              this.levelCards = res.data.cards
348
             }
348
             }
349
-            if (typeof res.data.tags != "undefined") {
350
-              this.tagOptions = res.data.tags;
349
+            if (typeof res.data.tags !== 'undefined') {
350
+              this.tagOptions = res.data.tags
351
             }
351
             }
352
-            if (typeof res.data.illness != "undefined") {
353
-              this.illnessOptions = res.data.illness;
352
+            if (typeof res.data.illness !== 'undefined') {
353
+              this.illnessOptions = res.data.illness
354
             }
354
             }
355
-            this.listQuery.init = 0;
355
+            this.listQuery.init = 0
356
           } else {
356
           } else {
357
-            this.$message.error(res.msg);
357
+            this.$message.error(res.msg)
358
           }
358
           }
359
         })
359
         })
360
-        .catch(e => {});
360
+        .catch(e => {})
361
     },
361
     },
362
     openSendMessage() {
362
     openSendMessage() {
363
       if (this.selectedMembers.length == 0) {
363
       if (this.selectedMembers.length == 0) {
364
-        this.$message.error("请选择会员");
365
-        return false;
364
+        this.$message.error('请选择会员')
365
+        return false
366
       }
366
       }
367
-      var targets = [];
367
+      var targets = []
368
       for (const index in this.selectedMembers) {
368
       for (const index in this.selectedMembers) {
369
         if (this.selectedMembers[index].mobile.length > 0) {
369
         if (this.selectedMembers[index].mobile.length > 0) {
370
           targets.push({
370
           targets.push({
372
             name: this.selectedMembers[index].name,
372
             name: this.selectedMembers[index].name,
373
             name: this.selectedMembers[index].name,
373
             name: this.selectedMembers[index].name,
374
             mobile: this.selectedMembers[index].mobile
374
             mobile: this.selectedMembers[index].mobile
375
-          });
375
+          })
376
         }
376
         }
377
       }
377
       }
378
       if (targets.length == 0) {
378
       if (targets.length == 0) {
379
-        this.$message.error("由于所选的全部会员里,均无手机号,无法发送短信");
380
-        return false;
379
+        this.$message.error('由于所选的全部会员里,均无手机号,无法发送短信')
380
+        return false
381
       }
381
       }
382
-      this.$store.dispatch("SMSSetTargets", targets);
383
-      this.$router.push({ path: "/sms/send" });
382
+      this.$store.dispatch('SMSSetTargets', targets)
383
+      this.$router.push({ path: '/sms/send' })
384
     },
384
     },
385
     openAddMembersTags() {
385
     openAddMembersTags() {
386
       if (this.selectedMembers.length == 0) {
386
       if (this.selectedMembers.length == 0) {
387
-        this.$message.error("请选择要添加标签的会员");
388
-        return false;
387
+        this.$message.error('请选择要添加标签的会员')
388
+        return false
389
       }
389
       }
390
 
390
 
391
-      this.memberData.tags = [];
392
-      this.memberData.ids = [];
391
+      this.memberData.tags = []
392
+      this.memberData.ids = []
393
       for (const index in this.selectedMembers) {
393
       for (const index in this.selectedMembers) {
394
-        this.memberData.ids.push(this.selectedMembers[index].id);
394
+        this.memberData.ids.push(this.selectedMembers[index].id)
395
       }
395
       }
396
-      this.$refs.addMembersTagsForm.open();
396
+      this.$refs.addMembersTagsForm.open()
397
     },
397
     },
398
     openDeleteMembers() {
398
     openDeleteMembers() {
399
       if (this.selectedMembers.length == 0) {
399
       if (this.selectedMembers.length == 0) {
400
-        this.$message.error("请选择要删除的会员");
401
-        return false;
400
+        this.$message.error('请选择要删除的会员')
401
+        return false
402
       }
402
       }
403
 
403
 
404
       this.$confirm(
404
       this.$confirm(
405
-        "确认要删除所选的会员吗?<br>删除后,会员信息将无法恢复",
406
-        "删除提示",
405
+        '确认要删除所选的会员吗?<br>删除后,会员信息将无法恢复',
406
+        '删除提示',
407
         {
407
         {
408
           dangerouslyUseHTMLString: true,
408
           dangerouslyUseHTMLString: true,
409
-          confirmButtonText: "确定",
410
-          cancelButtonText: "取消",
411
-          type: "warning"
409
+          confirmButtonText: '确定',
410
+          cancelButtonText: '取消',
411
+          type: 'warning'
412
         }
412
         }
413
       )
413
       )
414
         .then(() => {
414
         .then(() => {
415
-          var ids = [];
416
-          var idMap = {};
415
+          var ids = []
416
+          var idMap = {}
417
           for (const index in this.selectedMembers) {
417
           for (const index in this.selectedMembers) {
418
-            ids.push(this.selectedMembers[index].id);
418
+            ids.push(this.selectedMembers[index].id)
419
             idMap[this.selectedMembers[index].id] = this.selectedMembers[
419
             idMap[this.selectedMembers[index].id] = this.selectedMembers[
420
               index
420
               index
421
-            ].id;
421
+            ].id
422
           }
422
           }
423
           DeleteMembers({ ids: ids })
423
           DeleteMembers({ ids: ids })
424
             .then(response => {
424
             .then(response => {
425
-              var res = response.data;
425
+              var res = response.data
426
               if (res.state === 1) {
426
               if (res.state === 1) {
427
-                var membersDataLength = this.membersData.length;
427
+                var membersDataLength = this.membersData.length
428
                 for (let index = membersDataLength - 1; index >= 0; index--) {
428
                 for (let index = membersDataLength - 1; index >= 0; index--) {
429
                   if (this.membersData[index].id in idMap) {
429
                   if (this.membersData[index].id in idMap) {
430
-                    this.membersData.splice(index, 1);
430
+                    this.membersData.splice(index, 1)
431
                   }
431
                   }
432
                 }
432
                 }
433
-                this.$message.success("删除会员成功");
433
+                this.$message.success('删除会员成功')
434
               } else {
434
               } else {
435
-                this.$message.error(res.msg);
435
+                this.$message.error(res.msg)
436
               }
436
               }
437
             })
437
             })
438
-            .catch(e => {});
438
+            .catch(e => {})
439
         })
439
         })
440
         .catch(() => {
440
         .catch(() => {
441
-          return false;
442
-        });
441
+          return false
442
+        })
443
     },
443
     },
444
     openDelete(row, index) {
444
     openDelete(row, index) {
445
       this.$confirm(
445
       this.$confirm(
446
-        "确认要删除该会员吗?<br>删除后,该会员信息将无法恢复",
447
-        "删除提示",
446
+        '确认要删除该会员吗?<br>删除后,该会员信息将无法恢复',
447
+        '删除提示',
448
         {
448
         {
449
           dangerouslyUseHTMLString: true,
449
           dangerouslyUseHTMLString: true,
450
-          confirmButtonText: "确定",
451
-          cancelButtonText: "取消",
452
-          type: "warning"
450
+          confirmButtonText: '确定',
451
+          cancelButtonText: '取消',
452
+          type: 'warning'
453
         }
453
         }
454
       )
454
       )
455
         .then(() => {
455
         .then(() => {
456
-          var ids = [];
457
-          ids.push(row.id);
456
+          var ids = []
457
+          ids.push(row.id)
458
           DeleteMembers({ ids: ids })
458
           DeleteMembers({ ids: ids })
459
             .then(response => {
459
             .then(response => {
460
-              var res = response.data;
460
+              var res = response.data
461
               if (res.state === 1) {
461
               if (res.state === 1) {
462
-                this.membersData.splice(index, 1);
463
-                this.$message.success("删除会员成功");
462
+                this.membersData.splice(index, 1)
463
+                this.$message.success('删除会员成功')
464
               } else {
464
               } else {
465
-                this.$message.error(res.msg);
465
+                this.$message.error(res.msg)
466
               }
466
               }
467
             })
467
             })
468
-            .catch(e => {});
468
+            .catch(e => {})
469
         })
469
         })
470
         .catch(() => {
470
         .catch(() => {
471
-          return false;
472
-        });
471
+          return false
472
+        })
473
     },
473
     },
474
     openCard(row, index) {
474
     openCard(row, index) {
475
-      this.cardFormData.id = row.id;
476
-      this.cardFormData.card_id = "";
477
-      this.memberIndex = index;
475
+      this.cardFormData.id = row.id
476
+      this.cardFormData.card_id = ''
477
+      this.memberIndex = index
478
       if (row.user_card && row.user_card.card) {
478
       if (row.user_card && row.user_card.card) {
479
-        this.cardFormData.card_id = row.user_card.card_id;
479
+        this.cardFormData.card_id = row.user_card.card_id
480
       }
480
       }
481
-      this.$refs.editMemberCardForm.open();
481
+      this.$refs.editMemberCardForm.open()
482
     },
482
     },
483
     openTags(row, index) {
483
     openTags(row, index) {
484
-      this.memberData.tags = [];
485
-      this.memberData.id = row.id;
486
-      let tags = row.tags;
484
+      this.memberData.tags = []
485
+      this.memberData.id = row.id
486
+      const tags = row.tags
487
       for (const index in tags) {
487
       for (const index in tags) {
488
-        this.memberData.tags.push(tags[index].id);
488
+        this.memberData.tags.push(tags[index].id)
489
       }
489
       }
490
 
490
 
491
-      this.memberIndex = index;
492
-      this.$refs.editMemberTagsForm.open();
491
+      this.memberIndex = index
492
+      this.$refs.editMemberTagsForm.open()
493
     },
493
     },
494
     openEdit(row, index) {
494
     openEdit(row, index) {
495
-      this.memberData.tags = [];
496
-      this.memberData.illness = [];
497
-      this.memberData.city = [];
498
-      this.memberData.birthday = "";
499
-      this.memberData.ill_date = "";
500
-      this.memberData.treat_type = "";
495
+      this.memberData.tags = []
496
+      this.memberData.illness = []
497
+      this.memberData.city = []
498
+      this.memberData.birthday = ''
499
+      this.memberData.ill_date = ''
500
+      this.memberData.treat_type = ''
501
       for (const key in this.memberData) {
501
       for (const key in this.memberData) {
502
-        if (key === "illness" && row.illness) {
503
-          let illness = row.illness;
502
+        if (key === 'illness' && row.illness) {
503
+          const illness = row.illness
504
           for (const index in illness) {
504
           for (const index in illness) {
505
-            this.memberData.illness.push(illness[index].illness_id);
505
+            this.memberData.illness.push(illness[index].illness_id)
506
           }
506
           }
507
-        } else if (key === "tags" && row.tags) {
508
-          let tags = row.tags;
507
+        } else if (key === 'tags' && row.tags) {
508
+          const tags = row.tags
509
           for (const index in tags) {
509
           for (const index in tags) {
510
-            this.memberData.tags.push(tags[index].id);
510
+            this.memberData.tags.push(tags[index].id)
511
           }
511
           }
512
-        } else if (key === "treat_type" && row.treat_type > 0) {
513
-          this.memberData.treat_type = row.treat_type;
514
-        } else if (key === "city") {
512
+        } else if (key === 'treat_type' && row.treat_type > 0) {
513
+          this.memberData.treat_type = row.treat_type
514
+        } else if (key === 'city') {
515
           if (row.province_id > 0) {
515
           if (row.province_id > 0) {
516
-            this.memberData.city.push(row.province_id);
517
-            this.memberData.city.push(row.city_id);
518
-            this.memberData.city.push(row.district_id);
516
+            this.memberData.city.push(row.province_id)
517
+            this.memberData.city.push(row.city_id)
518
+            this.memberData.city.push(row.district_id)
519
           }
519
           }
520
-        } else if (key === "birthday" && row.birthday != 0) {
521
-          this.memberData.birthday = uParseTime(row.birthday, "{y}-{m}-{d}");
522
-        } else if (key === "ill_date" && row.ill_date != 0) {
523
-          this.memberData.ill_date = uParseTime(row.ill_date, "{y}-{m}-{d}");
520
+        } else if (key === 'birthday' && row.birthday != 0) {
521
+          this.memberData.birthday = uParseTime(row.birthday, '{y}-{m}-{d}')
522
+        } else if (key === 'ill_date' && row.ill_date != 0) {
523
+          this.memberData.ill_date = uParseTime(row.ill_date, '{y}-{m}-{d}')
524
         } else if (key in row) {
524
         } else if (key in row) {
525
-          this.memberData[key] = row[key];
525
+          this.memberData[key] = row[key]
526
         }
526
         }
527
       }
527
       }
528
       // this.memberData = row;
528
       // this.memberData = row;
529
-      this.memberIndex = index;
530
-      this.$refs.editMemberForm.open();
529
+      this.memberIndex = index
530
+      this.$refs.editMemberForm.open()
531
     },
531
     },
532
     openCreate() {
532
     openCreate() {
533
-      this.$refs.createMemberForm.open();
533
+      this.$refs.createMemberForm.open()
534
     },
534
     },
535
     memberAvatar(row) {
535
     memberAvatar(row) {
536
       if (
536
       if (
537
-        typeof row.avatar == "undefined" ||
537
+        typeof row.avatar === 'undefined' ||
538
         !row.avatar ||
538
         !row.avatar ||
539
         row.avatar.length == 0
539
         row.avatar.length == 0
540
       ) {
540
       ) {
541
         if (row.gender == 2) {
541
         if (row.gender == 2) {
542
-          return "https://images.shengws.com/201809182128222.png";
542
+          return 'https://images.shengws.com/201809182128222.png'
543
         } else {
543
         } else {
544
-          return "https://images.shengws.com/201809182128111.png";
544
+          return 'https://images.shengws.com/201809182128111.png'
545
         }
545
         }
546
       } else {
546
       } else {
547
-        return row.avatar;
547
+        return row.avatar
548
       }
548
       }
549
     },
549
     },
550
     memberLevel(row) {
550
     memberLevel(row) {
551
       if (row.user_card && row.user_card.card) {
551
       if (row.user_card && row.user_card.card) {
552
-        return row.user_card.card.card_name;
552
+        return row.user_card.card.card_name
553
       } else {
553
       } else {
554
-        return "普通会员";
554
+        return '普通会员'
555
       }
555
       }
556
     },
556
     },
557
     memberCreateTime(time) {
557
     memberCreateTime(time) {
558
-      return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
558
+      return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
559
     },
559
     },
560
     memberSource(source) {
560
     memberSource(source) {
561
       if (source in this.sourceOptions) {
561
       if (source in this.sourceOptions) {
562
-        return this.sourceOptions[source].name;
562
+        return this.sourceOptions[source].name
563
       } else {
563
       } else {
564
-        return "--";
564
+        return '--'
565
       }
565
       }
566
     },
566
     },
567
     changeCheck() {
567
     changeCheck() {
568
-      this.$refs.multipleTable.clearSelection();
568
+      this.$refs.multipleTable.clearSelection()
569
       if (this.checkAllStatus) {
569
       if (this.checkAllStatus) {
570
-        this.$refs.multipleTable.toggleAllSelection();
570
+        this.$refs.multipleTable.toggleAllSelection()
571
       }
571
       }
572
     },
572
     },
573
     handleSelectionChange(val) {
573
     handleSelectionChange(val) {
574
-      this.selectedMembers = val;
574
+      this.selectedMembers = val
575
     },
575
     },
576
     cellStyleName({ row, column, rowIndex, columnIndex }) {
576
     cellStyleName({ row, column, rowIndex, columnIndex }) {
577
       if (columnIndex === 1) {
577
       if (columnIndex === 1) {
578
-        return "member-name-box";
578
+        return 'member-name-box'
579
       }
579
       }
580
-      return "";
580
+      return ''
581
     },
581
     },
582
     selectSource(id) {
582
     selectSource(id) {
583
-      this.listQuery.source = id;
584
-      this.sourceType = id;
585
-      this.GetMembers();
583
+      this.listQuery.source = id
584
+      this.sourceType = id
585
+      this.GetMembers()
586
     },
586
     },
587
     selectLevel(id) {
587
     selectLevel(id) {
588
-      this.listQuery.level = id;
589
-      this.levelType = id;
590
-      this.GetMembers();
588
+      this.listQuery.level = id
589
+      this.levelType = id
590
+      this.GetMembers()
591
     },
591
     },
592
     selectTag(id) {
592
     selectTag(id) {
593
-      this.listQuery.tag = id;
594
-      this.tagType = id;
595
-      this.GetMembers();
593
+      this.listQuery.tag = id
594
+      this.tagType = id
595
+      this.GetMembers()
596
     },
596
     },
597
     changeKey() {
597
     changeKey() {
598
-      this.GetMembers();
598
+      this.GetMembers()
599
     },
599
     },
600
     changeTime() {
600
     changeTime() {
601
-      this.GetMembers();
601
+      this.GetMembers()
602
     },
602
     },
603
     handleSizeChange(limit) {
603
     handleSizeChange(limit) {
604
-      this.listQuery.limit = limit;
605
-      this.GetMembers();
604
+      this.listQuery.limit = limit
605
+      this.GetMembers()
606
     },
606
     },
607
     handleCurrentChange(page) {
607
     handleCurrentChange(page) {
608
-      this.listQuery.page = page;
609
-      this.GetMembers();
608
+      this.listQuery.page = page
609
+      this.GetMembers()
610
     }
610
     }
611
   },
611
   },
612
   created() {
612
   created() {
613
-    this.sourceOptions = this.$store.getters.members.sources;
614
-    console.log("来源方式", this.sourceOptions);
615
-    this.treatTypeOptions = this.$store.getters.members.treat_type;
616
-    this.GetMembers();
613
+    this.sourceOptions = this.$store.getters.members.sources
614
+    console.log('来源方式', this.sourceOptions)
615
+    this.treatTypeOptions = this.$store.getters.members.treat_type
616
+    this.GetMembers()
617
   }
617
   }
618
-};
618
+}
619
 </script>
619
 </script>
620
 
620
 
621
 <style scoped>
621
 <style scoped>

+ 260 - 255
src/scrm_pages/org/orginfo.vue View File

208
 </template>
208
 </template>
209
 
209
 
210
 <script>
210
 <script>
211
-import { getToken } from "@/api/qiniu";
211
+import { getToken } from '@/api/qiniu';
212
 import {
212
 import {
213
   GetOrgInfo,
213
   GetOrgInfo,
214
   SaveOrgGallery,
214
   SaveOrgGallery,
215
   DeleteOrgGallery,
215
   DeleteOrgGallery,
216
   EditOrgInfo
216
   EditOrgInfo
217
-} from "@/api/org/orginfo";
218
-import { GetDistrictsByUpid } from "@/api/district";
219
-import { getFileExtension } from "@/utils/tools";
220
-import Neditor from "@/components/Neditor";
221
-import BreadCrumb from "@/scrm_pages/components/bread-crumb";
217
+} from '@/api/org/orginfo';
218
+import { GetDistrictsByUpid } from '@/api/district';
219
+import { getFileExtension } from '@/utils/tools';
220
+import Neditor from '@/components/Neditor';
221
+import BreadCrumb from '@/scrm_pages/components/bread-crumb';
222
 export default {
222
 export default {
223
-  name: "orginfo",
223
+  name: 'orginfo',
224
   data() {
224
   data() {
225
     return {
225
     return {
226
-      crumbs: [{ path: false, name: "机构信息" }],
227
-      qiniuDomain: "https://images.shengws.com/",
226
+      crumbs: [{ path: false, name: '机构信息' }],
227
+      qiniuDomain: 'https://images.shengws.com/',
228
       formloading: false,
228
       formloading: false,
229
       uploading: false,
229
       uploading: false,
230
       guploading: false,
230
       guploading: false,
231
       formsubmit: false,
231
       formsubmit: false,
232
-      loadingText: "",
232
+      loadingText: '',
233
       illnessList: [],
233
       illnessList: [],
234
       fileList: [],
234
       fileList: [],
235
       provinces: [],
235
       provinces: [],
238
       orgtypes: [],
238
       orgtypes: [],
239
       orgtypesMap: {},
239
       orgtypesMap: {},
240
       childtypes: [],
240
       childtypes: [],
241
-      uploadData: { token: "", key: "" },
241
+      uploadData: { token: '', key: '' },
242
       operatingStateOptions: [
242
       operatingStateOptions: [
243
-        { value: 1, label: "正常营业" },
244
-        { value: 2, label: "暂未营业" }
243
+        { value: 1, label: '正常营业' },
244
+        { value: 2, label: '暂未营业' }
245
       ],
245
       ],
246
       weekOptions: [
246
       weekOptions: [
247
-        "星期一",
248
-        "星期二",
249
-        "星期三",
250
-        "星期四",
251
-        "星期五",
252
-        "星期六",
253
-        "星期天"
247
+        '星期一',
248
+        '星期二',
249
+        '星期三',
250
+        '星期四',
251
+        '星期五',
252
+        '星期六',
253
+        '星期天'
254
       ],
254
       ],
255
       shangOptions: [
255
       shangOptions: [
256
-        "1:00",
257
-        "2:00",
258
-        "3:00",
259
-        "4:00",
260
-        "5:00",
261
-        "6:00",
262
-        "7:00",
263
-        "8:00",
264
-        "9:00",
265
-        "10:00",
266
-        "11:00",
267
-        "12:00"
256
+        '1:00',
257
+        '2:00',
258
+        '3:00',
259
+        '4:00',
260
+        '5:00',
261
+        '6:00',
262
+        '7:00',
263
+        '8:00',
264
+        '9:00',
265
+        '10:00',
266
+        '11:00',
267
+        '12:00'
268
       ],
268
       ],
269
       xiaOptions: [
269
       xiaOptions: [
270
-        "13:00",
271
-        "14:00",
272
-        "15:00",
273
-        "16:00",
274
-        "17:00",
275
-        "18:00",
276
-        "19:00",
277
-        "20:00",
278
-        "21:00",
279
-        "22:00",
280
-        "23:00",
281
-        "24:00"
270
+        '13:00',
271
+        '14:00',
272
+        '15:00',
273
+        '16:00',
274
+        '17:00',
275
+        '18:00',
276
+        '19:00',
277
+        '20:00',
278
+        '21:00',
279
+        '22:00',
280
+        '23:00',
281
+        '24:00'
282
       ],
282
       ],
283
       illnessOptions: [],
283
       illnessOptions: [],
284
       form: {
284
       form: {
285
-        org_name: "",
286
-        contact_name: "",
287
-        org_introduction: "",
288
-        org_logo: "",
289
-        province: "",
290
-        city: "",
291
-        district: "",
292
-        address: "",
293
-        parent_type: "",
294
-        child_type: "",
295
-        org_type: "",
296
-        telephone: "",
297
-        operating_state: "",
298
-        business_week: "",
285
+        org_name: '',
286
+        contact_name: '',
287
+        org_introduction: '',
288
+        org_logo: '',
289
+        province: '',
290
+        city: '',
291
+        district: '',
292
+        address: '',
293
+        parent_type: '',
294
+        child_type: '',
295
+        org_type: '',
296
+        telephone: '',
297
+        operating_state: '',
298
+        business_week: '',
299
         business_week_select: [],
299
         business_week_select: [],
300
-        business_time_shange: "",
301
-        business_time_xia: "",
302
-        business_time: "",
303
-        illness: "",
300
+        business_time_shange: '',
301
+        business_time_xia: '',
302
+        business_time: '',
303
+        illness: '',
304
         illness_list: [],
304
         illness_list: [],
305
         org_gallery: []
305
         org_gallery: []
306
       },
306
       },
307
       myConfig: {
307
       myConfig: {
308
         // 如果需要上传功能,找后端小伙伴要服务器接口地址
308
         // 如果需要上传功能,找后端小伙伴要服务器接口地址
309
-        serverUrl: "/api/web/upload/ueditor",
309
+        serverUrl: '/api/web/upload/ueditor',
310
         // 你的UEditor资源存放的路径,相对于打包后的index.html
310
         // 你的UEditor资源存放的路径,相对于打包后的index.html
311
-        UEDITOR_HOME_URL: "/NEditor/",
311
+        UEDITOR_HOME_URL: '/NEditor/',
312
         // 编辑器不自动被内容撑高
312
         // 编辑器不自动被内容撑高
313
         autoHeightEnabled: false,
313
         autoHeightEnabled: false,
314
         // 初始容器高度
314
         // 初始容器高度
315
         initialFrameHeight: 240,
315
         initialFrameHeight: 240,
316
         // 初始容器宽度
316
         // 初始容器宽度
317
-        initialFrameWidth: "100%",
317
+        initialFrameWidth: '100%',
318
         // 关闭自动保存
318
         // 关闭自动保存
319
         enableAutoSave: false
319
         enableAutoSave: false
320
       }
320
       }
321
-    };
321
+    }
322
   },
322
   },
323
   components: {
323
   components: {
324
     Neditor,
324
     Neditor,
326
   },
326
   },
327
   computed: {},
327
   computed: {},
328
   created() {
328
   created() {
329
-    this.formloading = true;
330
-    this.loadingText = "加载中...";
331
-    this.GetOrgInfo();
329
+    this.formloading = true
330
+    this.loadingText = '加载中...';
331
+    this.GetOrgInfo()
332
   },
332
   },
333
   methods: {
333
   methods: {
334
     handleChangeIllness(values) {
334
     handleChangeIllness(values) {
335
-      this.form.illness = values.join(",");
335
+      this.form.illness = values.join(',')
336
     },
336
     },
337
     handleChangeWeek(values) {
337
     handleChangeWeek(values) {
338
-      var selectweek = [];
338
+      var selectweek = []
339
       for (const index in values) {
339
       for (const index in values) {
340
         var item = {
340
         var item = {
341
           id: this.weekOptions.indexOf(values[index]),
341
           id: this.weekOptions.indexOf(values[index]),
342
           name: values[index]
342
           name: values[index]
343
-        };
344
-        selectweek.push(item);
343
+        }
344
+        selectweek.push(item)
345
       }
345
       }
346
 
346
 
347
       if (selectweek.length == 0) {
347
       if (selectweek.length == 0) {
348
-        this.form.business_week = "";
348
+        this.form.business_week = '';
349
       } else if (selectweek.length == 1) {
349
       } else if (selectweek.length == 1) {
350
-        this.form.business_week = selectweek[0];
350
+        this.form.business_week = selectweek[0]
351
       } else {
351
       } else {
352
         selectweek = selectweek.sort(function(a, b) {
352
         selectweek = selectweek.sort(function(a, b) {
353
-          return a.id - b.id;
354
-        });
355
-        var blen = selectweek.length;
353
+          return a.id - b.id
354
+        })
355
+        var blen = selectweek.length
356
         if (blen == selectweek[blen - 1].id - selectweek[0].id + 1) {
356
         if (blen == selectweek[blen - 1].id - selectweek[0].id + 1) {
357
           this.form.business_week =
357
           this.form.business_week =
358
-            selectweek[0]["name"] + " — " + selectweek[blen - 1]["name"];
358
+            selectweek[0]['name'] + ' — ' + selectweek[blen - 1]['name']
359
         } else {
359
         } else {
360
-          var tem = [];
360
+          var tem = []
361
           for (const index in selectweek) {
361
           for (const index in selectweek) {
362
-            tem.push(selectweek[index].name);
362
+            tem.push(selectweek[index].name)
363
           }
363
           }
364
-          this.form.business_week = tem.join("、");
364
+          this.form.business_week = tem.join('、')
365
         }
365
         }
366
       }
366
       }
367
     },
367
     },
371
         this.form.business_time_xia.length > 0
371
         this.form.business_time_xia.length > 0
372
       ) {
372
       ) {
373
         this.form.business_time =
373
         this.form.business_time =
374
-          "上午" +
374
+          '上午' +
375
           this.form.business_time_shange +
375
           this.form.business_time_shange +
376
-          "—下午" +
377
-          this.form.business_time_xia;
376
+          '—下午' +
377
+          this.form.business_time_xia
378
       } else if (this.form.business_time_shange.length > 0) {
378
       } else if (this.form.business_time_shange.length > 0) {
379
-        this.form.business_time = "上午" + this.form.business_time_shange;
379
+        this.form.business_time = '上午' + this.form.business_time_shange
380
       } else if (this.form.business_time_xia.length > 0) {
380
       } else if (this.form.business_time_xia.length > 0) {
381
-        this.form.business_time = "下午" + this.form.business_time_xia;
381
+        this.form.business_time = '下午' + this.form.business_time_xia
382
       } else {
382
       } else {
383
-        this.form.business_time = "";
383
+        this.form.business_time = '';
384
       }
384
       }
385
     },
385
     },
386
     handleAvatarError(err, file, fileList) {
386
     handleAvatarError(err, file, fileList) {
387
-      this.$message.error(err);
388
-      this.uploading = false;
389
-      return false;
387
+      this.$message.error(err)
388
+      this.uploading = false
389
+      return false
390
     },
390
     },
391
     handleAvatarSuccess(res, file) {
391
     handleAvatarSuccess(res, file) {
392
-      this.form.org_logo = this.qiniuDomain + res.url;
393
-      this.uploading = false;
392
+      this.form.org_logo = this.qiniuDomain + res.url
393
+      this.uploading = false
394
     },
394
     },
395
     beforeAvatarUpload(file) {
395
     beforeAvatarUpload(file) {
396
-      var fileType = file.type;
397
-      const isJPG = fileType.indexOf("image") > -1;
398
-      const isLt2M = file.size / 1024 / 1024 < 2;
396
+      var fileType = file.type
397
+      const isJPG = fileType.indexOf('image') > -1
398
+      const isLt2M = file.size / 1024 / 1024 < 2
399
 
399
 
400
       if (!isJPG) {
400
       if (!isJPG) {
401
-        this.$message.error("只能上传图片");
402
-        return false;
401
+        this.$message.error('只能上传图片')
402
+        return false
403
       }
403
       }
404
       if (!isLt2M) {
404
       if (!isLt2M) {
405
-        this.$message.error("上传头像图片大小不能超过 2MB!");
406
-        return false;
405
+        this.$message.error('上传头像图片大小不能超过 2MB!')
406
+        return false
407
       }
407
       }
408
 
408
 
409
-      var date = new Date();
410
-      var ext = getFileExtension(file.name);
409
+      var date = new Date()
410
+      var ext = getFileExtension(file.name)
411
       var key =
411
       var key =
412
-        "" +
412
+        '' +
413
         date.getFullYear() +
413
         date.getFullYear() +
414
         (date.getMonth() + 1) +
414
         (date.getMonth() + 1) +
415
         date.getDate() +
415
         date.getDate() +
416
         date.getHours() +
416
         date.getHours() +
417
         date.getMinutes() +
417
         date.getMinutes() +
418
         date.getSeconds() +
418
         date.getSeconds() +
419
-        "_o_" +
419
+        '_o_' +
420
         file.uid +
420
         file.uid +
421
-        "." +
422
-        ext;
423
-      this.uploading = true;
424
-      this.loadingText = "机构头像上传中";
421
+        '.' +
422
+        ext
423
+      this.uploading = true
424
+      this.loadingText = '机构头像上传中';
425
 
425
 
426
-      const _self = this;
426
+      const _self = this
427
       return new Promise((resolve, reject) => {
427
       return new Promise((resolve, reject) => {
428
         getToken()
428
         getToken()
429
           .then(response => {
429
           .then(response => {
430
-            const token = response.data.data.uptoken;
431
-            _self._data.uploadData.token = token;
432
-            _self._data.uploadData.key = key;
433
-            resolve(true);
430
+            const token = response.data.data.uptoken
431
+            _self._data.uploadData.token = token
432
+            _self._data.uploadData.key = key
433
+            resolve(true)
434
           })
434
           })
435
           .catch(err => {
435
           .catch(err => {
436
-            reject(false);
437
-            this.uploading = false;
438
-          });
439
-      });
436
+            reject(false)
437
+            this.uploading = false
438
+          })
439
+      })
440
     },
440
     },
441
     handleGalleryError(err, file, fileList) {
441
     handleGalleryError(err, file, fileList) {
442
-      this.$message.error(err);
443
-      this.guploading = false;
444
-      return false;
442
+      this.$message.error(err)
443
+      this.guploading = false
444
+      return false
445
     },
445
     },
446
     handleGallerySuccess(res, file) {
446
     handleGallerySuccess(res, file) {
447
-      var data = { type: 1, url: this.qiniuDomain + res.url };
447
+      var data = { type: 1, url: this.qiniuDomain + res.url }
448
       SaveOrgGallery(data)
448
       SaveOrgGallery(data)
449
         .then(response => {
449
         .then(response => {
450
-          var res = response.data;
450
+          var res = response.data
451
           if (res.state == 1) {
451
           if (res.state == 1) {
452
-            this.$message.success("上传成功");
452
+            this.$message.success('上传成功')
453
           } else {
453
           } else {
454
-            this.$message.error("上传失败");
454
+            this.$message.error('上传失败')
455
           }
455
           }
456
         })
456
         })
457
-        .catch(e => {});
458
-      this.guploading = false;
457
+        .catch(e => {})
458
+      this.guploading = false
459
     },
459
     },
460
     beforeGalleryUpload(file) {
460
     beforeGalleryUpload(file) {
461
-      var fileType = file.type;
462
-      const isJPG = fileType.indexOf("image") > -1;
463
-      const isLt100M = file.size / 1024 / 1024 < 100;
461
+      var fileType = file.type
462
+      const isJPG = fileType.indexOf('image') > -1
463
+      const isLt100M = file.size / 1024 / 1024 < 100
464
 
464
 
465
       if (!isJPG) {
465
       if (!isJPG) {
466
-        this.$message.error("只能上传图片");
467
-        return false;
466
+        this.$message.error('只能上传图片')
467
+        return false
468
       }
468
       }
469
       if (!isLt100M) {
469
       if (!isLt100M) {
470
-        this.$message.error("上传图片大小不能超过 100MB!");
471
-        return false;
470
+        this.$message.error('上传图片大小不能超过 100MB!')
471
+        return false
472
       }
472
       }
473
 
473
 
474
-      var date = new Date();
475
-      var ext = getFileExtension(file.name);
474
+      var date = new Date()
475
+      var ext = getFileExtension(file.name)
476
       var key =
476
       var key =
477
-        "" +
477
+        '' +
478
         date.getFullYear() +
478
         date.getFullYear() +
479
         (date.getMonth() + 1) +
479
         (date.getMonth() + 1) +
480
         date.getDate() +
480
         date.getDate() +
481
         date.getHours() +
481
         date.getHours() +
482
         date.getMinutes() +
482
         date.getMinutes() +
483
         date.getSeconds() +
483
         date.getSeconds() +
484
-        "_g_" +
484
+        '_g_' +
485
         file.uid +
485
         file.uid +
486
-        "." +
487
-        ext;
488
-      this.guploading = true;
489
-      this.loadingText = "机构图册上传中";
486
+        '.' +
487
+        ext
488
+      this.guploading = true
489
+      this.loadingText = '机构图册上传中';
490
 
490
 
491
-      const _self = this;
491
+      const _self = this
492
       return new Promise((resolve, reject) => {
492
       return new Promise((resolve, reject) => {
493
         getToken()
493
         getToken()
494
           .then(response => {
494
           .then(response => {
495
-            const token = response.data.data.uptoken;
496
-            _self._data.uploadData.token = token;
497
-            _self._data.uploadData.key = key;
498
-            resolve(true);
495
+            const token = response.data.data.uptoken
496
+            _self._data.uploadData.token = token
497
+            _self._data.uploadData.key = key
498
+            resolve(true)
499
           })
499
           })
500
           .catch(err => {
500
           .catch(err => {
501
-            reject(false);
502
-            this.guploading = false;
503
-          });
504
-      });
501
+            reject(false)
502
+            this.guploading = false
503
+          })
504
+      })
505
     },
505
     },
506
 
506
 
507
     handleRemove(file, fileList) {
507
     handleRemove(file, fileList) {
508
       DeleteOrgGallery(file.id)
508
       DeleteOrgGallery(file.id)
509
         .then(response => {
509
         .then(response => {
510
-          var res = response.data;
510
+          var res = response.data
511
           if (res.state == 1) {
511
           if (res.state == 1) {
512
-            this.$message.success("删除成功");
512
+            this.$message.success('删除成功')
513
           } else {
513
           } else {
514
-            this.$message.error("删除失败");
514
+            this.$message.error('删除失败')
515
           }
515
           }
516
         })
516
         })
517
-        .catch(e => {});
518
-      console.log("handleRemove", file, fileList);
517
+        .catch(e => {})
518
+      console.log('handleRemove', file, fileList)
519
     },
519
     },
520
     GetOrgInfo() {
520
     GetOrgInfo() {
521
       GetOrgInfo()
521
       GetOrgInfo()
522
         .then(response => {
522
         .then(response => {
523
-          var res = response.data;
523
+          var res = response.data
524
+          console.log('res是什么', res)
524
           if (res.state === 1) {
525
           if (res.state === 1) {
525
-            this.form.org_name = res.data.orginfo.org_name;
526
-            this.form.contact_name = res.data.orginfo.contact_name;
527
-            this.form.org_introduction = res.data.orginfo.org_introduction;
528
-            this.form.org_logo = res.data.orginfo.org_logo;
529
-            this.form.province = res.data.orginfo.province;
530
-            this.form.city = res.data.orginfo.city;
531
-            this.form.district = res.data.orginfo.district;
532
-            this.form.address = res.data.orginfo.address;
533
-            this.form.org_type = res.data.orginfo.org_type;
534
-            this.form.telephone = res.data.orginfo.telephone;
535
-            this.form.operating_state = res.data.orginfo.operating_state;
536
-            this.form.business_week = res.data.orginfo.business_week;
537
-            this.form.business_week_select = [];
538
-            this.form.business_time = res.data.orginfo.business_time;
539
-            this.form.business_time_shange = "";
540
-            this.form.business_time_xia = "";
541
-            this.form.illness = res.data.orginfo.illness;
542
-            this.form.illness_list = [];
543
-            this.form.org_gallery = res.data.orginfo.org_gallery;
544
-            this.fileList = [];
526
+            this.form.org_name = res.data.orginfo.org_name
527
+            this.form.contact_name = res.data.orginfo.contact_name
528
+            this.form.org_introduction = res.data.orginfo.org_introduction
529
+            this.form.org_logo = res.data.orginfo.org_logo
530
+            this.form.province = res.data.orginfo.province
531
+            this.form.city = res.data.orginfo.city
532
+            this.form.district = res.data.orginfo.district
533
+            this.form.address = res.data.orginfo.address
534
+            this.form.org_type = res.data.orginfo.org_type
535
+            console.log('机构类型', res.data.orginfo.org_type)
536
+            this.form.telephone = res.data.orginfo.telephone
537
+            this.form.operating_state = res.data.orginfo.operating_state
538
+            this.form.business_week = res.data.orginfo.business_week
539
+            this.form.business_week_select = []
540
+            this.form.business_time = res.data.orginfo.business_time
541
+            this.form.business_time_shange = '';
542
+            this.form.business_time_xia = '';
543
+            this.form.illness = res.data.orginfo.illness
544
+            this.form.illness_list = []
545
+            this.form.org_gallery = res.data.orginfo.org_gallery
546
+            this.fileList = []
545
             for (const index in this.form.org_gallery) {
547
             for (const index in this.form.org_gallery) {
546
               var image = {
548
               var image = {
547
                 id: this.form.org_gallery[index].id,
549
                 id: this.form.org_gallery[index].id,
550
                   this.form.org_gallery[index].type == 1
552
                   this.form.org_gallery[index].type == 1
551
                     ? this.form.org_gallery[index].url
553
                     ? this.form.org_gallery[index].url
552
                     : this.form.org_gallery[index].url +
554
                     : this.form.org_gallery[index].url +
553
-                      "?vframe/jpg/offset/0/w/100/h/100"
554
-              };
555
-              this.fileList.push(image);
555
+                      '?vframe/jpg/offset/0/w/100/h/100'
556
+              }
557
+              this.fileList.push(image)
556
             }
558
             }
557
 
559
 
558
-            var illness = res.data.orginfo.illness.split(",");
560
+            var illness = res.data.orginfo.illness.split(',')
559
             for (const index in illness) {
561
             for (const index in illness) {
560
-              var iid = parseInt(illness[index]);
562
+              var iid = parseInt(illness[index])
561
               if (isNaN(iid) || iid <= 0) {
563
               if (isNaN(iid) || iid <= 0) {
562
-                continue;
564
+                continue
563
               }
565
               }
564
-              this.form.illness_list.push(iid);
566
+              this.form.illness_list.push(iid)
565
             }
567
             }
566
-            var business_week = this.form.business_week;
567
-            var business_week_tem = business_week.split(" — ");
568
+            var business_week = this.form.business_week
569
+            var business_week_tem = business_week.split(' — ')
568
             if (business_week_tem.length == 2) {
570
             if (business_week_tem.length == 2) {
569
-              var fromIndex = this.weekOptions.indexOf(business_week_tem[0]);
570
-              var toIndex = this.weekOptions.indexOf(business_week_tem[1]);
571
+              var fromIndex = this.weekOptions.indexOf(business_week_tem[0])
572
+              var toIndex = this.weekOptions.indexOf(business_week_tem[1])
571
               if (fromIndex >= 0 && toIndex >= 0) {
573
               if (fromIndex >= 0 && toIndex >= 0) {
572
                 for (const index in this.weekOptions) {
574
                 for (const index in this.weekOptions) {
573
                   if (index >= fromIndex && index <= toIndex) {
575
                   if (index >= fromIndex && index <= toIndex) {
574
                     this.form.business_week_select.push(
576
                     this.form.business_week_select.push(
575
                       this.weekOptions[index]
577
                       this.weekOptions[index]
576
-                    );
578
+                    )
577
                   }
579
                   }
578
                 }
580
                 }
579
               }
581
               }
580
             } else {
582
             } else {
581
-              business_week_tem = business_week.split("、");
583
+              business_week_tem = business_week.split('、')
582
               for (const index in business_week_tem) {
584
               for (const index in business_week_tem) {
583
                 if (business_week_tem[index].length > 0) {
585
                 if (business_week_tem[index].length > 0) {
584
-                  this.form.business_week_select.push(business_week_tem[index]);
586
+                  this.form.business_week_select.push(business_week_tem[index])
585
                 }
587
                 }
586
               }
588
               }
587
             }
589
             }
588
-            var business_time = this.form.business_time;
589
-            var business_time_tem = business_time.split("—");
590
+            var business_time = this.form.business_time
591
+            var business_time_tem = business_time.split('—')
592
+            // eslint-disable-next-line eqeqeq
590
             if (business_time_tem.length == 2) {
593
             if (business_time_tem.length == 2) {
591
               this.form.business_time_shange = business_time_tem[0].substring(
594
               this.form.business_time_shange = business_time_tem[0].substring(
592
                 2
595
                 2
593
-              );
594
-              this.form.business_time_xia = business_time_tem[1].substring(2);
596
+              )
597
+              this.form.business_time_xia = business_time_tem[1].substring(2)
595
             } else {
598
             } else {
596
-              var selectTime = business_time_tem[0].substring(2);
599
+              var selectTime = business_time_tem[0].substring(2)
597
               if (this.shangOptions.indexOf(selectTime) > -1) {
600
               if (this.shangOptions.indexOf(selectTime) > -1) {
598
-                this.form.business_time_shange = selectTime;
601
+                this.form.business_time_shange = selectTime
599
               } else if (this.xiaOptions.indexOf(selectTime) > -1) {
602
               } else if (this.xiaOptions.indexOf(selectTime) > -1) {
600
-                this.form.business_time_xia = selectTime;
603
+                this.form.business_time_xia = selectTime
601
               }
604
               }
602
             }
605
             }
603
 
606
 
604
-            this.provinces = res.data.provinces;
605
-            this.citys = res.data.citys ? res.data.citys : [];
606
-            this.districts = res.data.districts ? res.data.districts : [];
607
+            this.provinces = res.data.provinces
608
+            console.log('省', res.data.provinces)
609
+            this.citys = res.data.citys ? res.data.citys : []
610
+            this.districts = res.data.districts ? res.data.districts : []
607
 
611
 
608
             this.orgtypes = [];
612
             this.orgtypes = [];
609
-            (this.orgtypesMap = {}), (this.childtypes = []);
610
-            var orgtypes = res.data.orgtypes;
613
+            (this.orgtypesMap = {}), (this.childtypes = [])
614
+            var orgtypes = res.data.orgtypes
615
+            console.log('orgtypes', orgtypes)
611
             for (const index in orgtypes) {
616
             for (const index in orgtypes) {
612
               if (orgtypes[index].pid > 0) {
617
               if (orgtypes[index].pid > 0) {
613
                 if (!(orgtypes[index].pid in this.orgtypesMap)) {
618
                 if (!(orgtypes[index].pid in this.orgtypesMap)) {
614
-                  this.orgtypesMap[orgtypes[index].pid] = [];
619
+                  this.orgtypesMap[orgtypes[index].pid] = []
615
                 }
620
                 }
616
-                this.orgtypesMap[orgtypes[index].pid].push(orgtypes[index]);
621
+                this.orgtypesMap[orgtypes[index].pid].push(orgtypes[index])
617
                 if (orgtypes[index].id == this.form.org_type) {
622
                 if (orgtypes[index].id == this.form.org_type) {
618
-                  this.form.child_type = orgtypes[index].id;
619
-                  this.form.parent_type = orgtypes[index].pid;
623
+                  this.form.child_type = orgtypes[index].id
624
+                  this.form.parent_type = orgtypes[index].pid
620
                 }
625
                 }
621
               } else {
626
               } else {
622
-                this.orgtypes.push(orgtypes[index]);
627
+                this.orgtypes.push(orgtypes[index])
623
                 if (orgtypes[index].id == this.form.org_type) {
628
                 if (orgtypes[index].id == this.form.org_type) {
624
-                  this.form.parent_type = orgtypes[index].id;
629
+                  this.form.parent_type = orgtypes[index].id
625
                 }
630
                 }
626
               }
631
               }
627
             }
632
             }
628
             if (this.form.parent_type in this.orgtypesMap) {
633
             if (this.form.parent_type in this.orgtypesMap) {
629
-              this.childtypes = this.orgtypesMap[this.form.parent_type];
634
+              this.childtypes = this.orgtypesMap[this.form.parent_type]
630
             } else {
635
             } else {
631
-              this.childtypes = [];
636
+              this.childtypes = []
632
             }
637
             }
633
-            this.illnessOptions = res.data.illness ? res.data.illness : [];
634
-            this.formloading = false;
638
+            this.illnessOptions = res.data.illness ? res.data.illness : []
639
+            this.formloading = false
635
           } else {
640
           } else {
636
-            this.$message.error(resp.msg);
641
+            this.$message.error(resp.msg)
637
           }
642
           }
638
         })
643
         })
639
-        .catch(e => {});
644
+        .catch(e => {})
640
     },
645
     },
641
     myTrim(x) {
646
     myTrim(x) {
642
-      return x.replace(/^\s+|\s+$/gm, "");
647
+      return x.replace(/^\s+|\s+$/gm, '')
643
     },
648
     },
644
     changeProvince(id) {
649
     changeProvince(id) {
645
-      this.citys = [];
646
-      this.districts = [];
647
-      this.form.city = "";
648
-      this.form.district = "";
649
-      var upid = parseInt(id);
650
+      this.citys = []
651
+      this.districts = []
652
+      this.form.city = '';
653
+      this.form.district = '';
654
+      var upid = parseInt(id)
650
       if (isNaN(upid) || upid <= 0) {
655
       if (isNaN(upid) || upid <= 0) {
651
-        return false;
656
+        return false
652
       }
657
       }
653
       GetDistrictsByUpid({ id: upid })
658
       GetDistrictsByUpid({ id: upid })
654
         .then(response => {
659
         .then(response => {
655
-          var res = response.data;
660
+          var res = response.data
656
           if (res.state === 1) {
661
           if (res.state === 1) {
657
-            this.citys = res.data.citys ? res.data.citys : [];
662
+            this.citys = res.data.citys ? res.data.citys : []
658
           }
663
           }
659
         })
664
         })
660
-        .catch(e => {});
665
+        .catch(e => {})
661
     },
666
     },
662
     changeCity(id) {
667
     changeCity(id) {
663
-      this.districts = [];
664
-      this.form.district = "";
665
-      var upid = parseInt(id);
668
+      this.districts = []
669
+      this.form.district = '';
670
+      var upid = parseInt(id)
666
       if (isNaN(upid) || upid <= 0) {
671
       if (isNaN(upid) || upid <= 0) {
667
-        return false;
672
+        return false
668
       }
673
       }
669
       GetDistrictsByUpid({ id: upid })
674
       GetDistrictsByUpid({ id: upid })
670
         .then(response => {
675
         .then(response => {
671
-          var res = response.data;
676
+          var res = response.data
672
           if (res.state === 1) {
677
           if (res.state === 1) {
673
-            this.districts = res.data.citys ? res.data.citys : [];
678
+            this.districts = res.data.citys ? res.data.citys : []
674
           }
679
           }
675
         })
680
         })
676
-        .catch(e => {});
681
+        .catch(e => {})
677
     },
682
     },
678
     changeParentType(id) {
683
     changeParentType(id) {
679
-      id = parseInt(id);
680
-      this.childtypes = [];
681
-      this.form.child_type = "";
682
-      this.form.org_type = 0;
684
+      id = parseInt(id)
685
+      this.childtypes = []
686
+      this.form.child_type = '';
687
+      this.form.org_type = 0
683
 
688
 
684
       if (isNaN(id) || id <= 0) {
689
       if (isNaN(id) || id <= 0) {
685
-        return false;
690
+        return false
686
       }
691
       }
687
       if (id in this.orgtypesMap) {
692
       if (id in this.orgtypesMap) {
688
-        this.childtypes = this.orgtypesMap[id];
693
+        this.childtypes = this.orgtypesMap[id]
689
       } else {
694
       } else {
690
-        this.childtypes = [];
695
+        this.childtypes = []
691
       }
696
       }
692
 
697
 
693
-      this.form.org_type = id;
698
+      this.form.org_type = id
694
     },
699
     },
695
     changeChildType(id) {
700
     changeChildType(id) {
696
-      this.form.org_type = id;
701
+      this.form.org_type = id
697
     },
702
     },
698
     submitForm() {
703
     submitForm() {
699
-      this.form.org_introduction = this.$refs.neditor.content;
700
-      this.formloading = true;
701
-      this.formsubmit = true;
702
-      this.loadingText = "正在保存...";
704
+      this.form.org_introduction = this.$refs.neditor.content
705
+      this.formloading = true
706
+      this.formsubmit = true
707
+      this.loadingText = '正在保存...';
703
       EditOrgInfo(this.form)
708
       EditOrgInfo(this.form)
704
         .then(response => {
709
         .then(response => {
705
-          var res = response.data;
710
+          var res = response.data
706
           if (res.state == 1) {
711
           if (res.state == 1) {
707
-            this.$store.dispatch("ModifyOrgInfo", {
712
+            this.$store.dispatch('ModifyOrgInfo', {
708
               org_name: this.form.org_name,
713
               org_name: this.form.org_name,
709
               contact_name: this.form.org_name
714
               contact_name: this.form.org_name
710
-            });
715
+            })
711
 
716
 
712
-            this.$message.success("修改成功");
717
+            this.$message.success('修改成功')
713
           } else {
718
           } else {
714
-            this.$message.error(res.msg);
719
+            this.$message.error(res.msg)
715
           }
720
           }
716
 
721
 
717
-          this.formloading = false;
718
-          this.formsubmit = false;
722
+          this.formloading = false
723
+          this.formsubmit = false
719
         })
724
         })
720
         .catch(e => {
725
         .catch(e => {
721
-          this.formloading = false;
722
-          this.formsubmit = false;
723
-        });
726
+          this.formloading = false
727
+          this.formsubmit = false
728
+        })
724
     }
729
     }
725
   }
730
   }
726
-};
731
+}
727
 </script>
732
 </script>
728
 
733
 
729
 <style rel="stylesheet/scss" >
734
 <style rel="stylesheet/scss" >

+ 1 - 1
src/scrm_pages/role/EditPerview.vue View File

64
       var resp = rs.data
64
       var resp = rs.data
65
       if (resp.state === 1) {
65
       if (resp.state === 1) {
66
         this.purviews.push(...resp.data.purviews)
66
         this.purviews.push(...resp.data.purviews)
67
-
67
+        console.log('是什么东西啊', resp.data.purviews)
68
         // 初始化默认选中项
68
         // 初始化默认选中项
69
         var role_purview_ids = resp.data.role_purview_ids
69
         var role_purview_ids = resp.data.role_purview_ids
70
         // role_purview_ids = '48,49,50'
70
         // role_purview_ids = '48,49,50'

+ 3 - 2
src/scrm_pages/site/components/new-feature.vue View File

933
          {id:2,name:'无'},
933
          {id:2,name:'无'},
934
        ],
934
        ],
935
       defineOptions:[
935
       defineOptions:[
936
-        {id:1,name:'无'},
936
+        // {id:1,name:'无'},
937
         {id:2,name:'站内链接'},
937
         {id:2,name:'站内链接'},
938
         {id:3,name:'电话'},
938
         {id:3,name:'电话'},
939
         {id:4,name:'站外链接'},
939
         {id:4,name:'站外链接'},
2409
  };
2409
  };
2410
 </script>
2410
 </script>
2411
 
2411
 
2412
-<style rel="stylesheet/scss" lang="scss" scoped>
2412
+<style rel="stylesheet/scss" lang="scss">
2413
+
2413
      .tpic{
2414
      .tpic{
2414
        margin-left: 50px;
2415
        margin-left: 50px;
2415
      }
2416
      }

+ 3 - 3
src/scrm_pages/site/index.vue View File

60
       crumbs: [{ path: false, name: "微网站" }],
60
       crumbs: [{ path: false, name: "微网站" }],
61
       codeImg: require("../../assets/home/wei.jpg"),
61
       codeImg: require("../../assets/home/wei.jpg"),
62
       usreOrgID: "",
62
       usreOrgID: "",
63
-      //  url:"http://microweb.kuyicloud.com/#/microHome?orgid="+this.$store.getters.xt_user.org_id,
64
-       url: "http://jk.test.sgjyun.com/#/microHome?orgid=" +  this.$store.getters.xt_user.org_id
63
+     // url:"http://microweb.kuyicloud.com/#/microHome?orgid="+this.$store.getters.xt_user.org_id,
64
+      url: "http://jk.test.sgjyun.com/#/microHome?orgid=" +  this.$store.getters.xt_user.org_id
65
     };
65
     };
66
   },
66
   },
67
   methods: {
67
   methods: {
69
       let qrcode = new QRCode("qrcode", {
69
       let qrcode = new QRCode("qrcode", {
70
         width: 100,
70
         width: 100,
71
         height: 100, // 高度
71
         height: 100, // 高度
72
-        // text: 'http://microweb.kuyicloud.com/#/microHome?orgid='+this.$store.getters.xt_user.org_id // 二维码内容
72
+       //  text: 'http://microweb.kuyicloud.com/#/microHome?orgid='+this.$store.getters.xt_user.org_id // 二维码内容
73
          text:"http://jk.test.sgjyun.com/#/microHome?orgid=" + this.$store.getters.xt_user.org_id // 二维码内容
73
          text:"http://jk.test.sgjyun.com/#/microHome?orgid=" + this.$store.getters.xt_user.org_id // 二维码内容
74
         // render: 'canvas' // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
74
         // render: 'canvas' // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
75
         // background: '#f0f'
75
         // background: '#f0f'

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


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

140
                 var resp = rs.data
140
                 var resp = rs.data
141
                 if (resp.state == 1) {
141
                 if (resp.state == 1) {
142
                     this.tags = resp.data.tags;
142
                     this.tags = resp.data.tags;
143
-                    // console.log("this.tags是什么",this.tags)
143
+                    console.log("this.tags是什么",this.tags)
144
                     this.sms_content = resp.data.default_content
144
                     this.sms_content = resp.data.default_content
145
 
145
 
146
                 } else {
146
                 } else {
201
             }
201
             }
202
         },
202
         },
203
         cancelSelectTagAction: function(tag) {
203
         cancelSelectTagAction: function(tag) {
204
-            for (let index = 0; index < this.selecting_tags.length; index++) {
205
-                if (this.selecting_tags[index].id == tag.id) {
206
-                    this.selecting_tags.splice(index, 1)
207
-                    this.getTagCustomerCount()
208
-                    break
209
-                }
210
-            }
204
+            console.log("tag是什么",tag)
205
+            // for (let index = 0; index < this.selecting_tags.length; index++) {
206
+            //     if (this.selecting_tags[index].id == tag.id) {
207
+            //         this.selecting_tags.splice(index, 1)
208
+            //         this.getTagCustomerCount()
209
+            //         break
210
+            //     }
211
+            // }
212
+            this.tags.splice(this.tags.indexOf(tag),1)
211
         },
213
         },
212
 
214
 
213
         isSMSContentValid: function() {
215
         isSMSContentValid: function() {

+ 1 - 0
src/scrm_pages/systemsetting/components/EditStaffForm.vue View File

234
           },    
234
           },    
235
           
235
           
236
           SaveStaffInfo(forname){
236
           SaveStaffInfo(forname){
237
+            this.form.content = this.$refs.neditor.content;
237
              this.$refs[forname].validate((valid)=>{
238
              this.$refs[forname].validate((valid)=>{
238
                  if(valid){
239
                  if(valid){
239
                     SaveStaffInfo(this.form.id,this.form).then(response=>{
240
                     SaveStaffInfo(this.form.id,this.form).then(response=>{

+ 9 - 9
src/xt_permission.js View File

5
 
5
 
6
 NProgress.configure({ showSpinner: false })// NProgress Configuration
6
 NProgress.configure({ showSpinner: false })// NProgress Configuration
7
 
7
 
8
-const loginWhiteList = ['/token/verify', '/401', '/404', "/activity/preview"] // 登录验证白名单
8
+const loginWhiteList = ['/token/verify', '/401', '/404', '/activity/preview'] // 登录验证白名单
9
 const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名单
9
 const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名单
10
 
10
 
11
 router.beforeEach((to, from, next) => {
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
   NProgress.start()
23
   NProgress.start()