Browse Source

Merge branch 'master' of http://git.shengws.com/zhangbj/scrm-vue

zhengchengwu 5 years ago
parent
commit
891475ee98

+ 223 - 4
package-lock.json View File

@@ -1876,6 +1876,14 @@
1876 1876
         }
1877 1877
       }
1878 1878
     },
1879
+    "can-promise": {
1880
+      "version": "0.0.1",
1881
+      "resolved": "https://registry.npmjs.org/can-promise/-/can-promise-0.0.1.tgz",
1882
+      "integrity": "sha512-gzVrHyyrvgt0YpDm7pn04MQt8gjh0ZAhN4ZDyCRtGl6YnuuK6b4aiUTD7G52r9l4YNmxfTtEscb92vxtAlL6XQ==",
1883
+      "requires": {
1884
+        "window-or-global": "^1.0.1"
1885
+      }
1886
+    },
1879 1887
     "caniuse-api": {
1880 1888
       "version": "1.6.1",
1881 1889
       "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz",
@@ -3326,6 +3334,11 @@
3326 3334
         "randombytes": "^2.0.0"
3327 3335
       }
3328 3336
     },
3337
+    "dijkstrajs": {
3338
+      "version": "1.0.1",
3339
+      "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.1.tgz",
3340
+      "integrity": "sha1-082BIh4+pAdCz83lVtTpnpjdxxs="
3341
+    },
3329 3342
     "dir-glob": {
3330 3343
       "version": "2.2.2",
3331 3344
       "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz",
@@ -3537,7 +3550,6 @@
3537 3550
       "version": "1.4.1",
3538 3551
       "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
3539 3552
       "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
3540
-      "dev": true,
3541 3553
       "requires": {
3542 3554
         "once": "^1.4.0"
3543 3555
       }
@@ -7163,6 +7175,14 @@
7163 7175
         "pify": "^3.0.0"
7164 7176
       }
7165 7177
     },
7178
+    "map-age-cleaner": {
7179
+      "version": "0.1.3",
7180
+      "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
7181
+      "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
7182
+      "requires": {
7183
+        "p-defer": "^1.0.0"
7184
+      }
7185
+    },
7166 7186
     "map-cache": {
7167 7187
       "version": "0.2.2",
7168 7188
       "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
@@ -7536,6 +7556,11 @@
7536 7556
       "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
7537 7557
       "dev": true
7538 7558
     },
7559
+    "nice-try": {
7560
+      "version": "1.0.5",
7561
+      "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
7562
+      "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
7563
+    },
7539 7564
     "no-case": {
7540 7565
       "version": "2.3.2",
7541 7566
       "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz",
@@ -8003,7 +8028,6 @@
8003 8028
       "version": "1.4.0",
8004 8029
       "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
8005 8030
       "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
8006
-      "dev": true,
8007 8031
       "requires": {
8008 8032
         "wrappy": "1"
8009 8033
       }
@@ -8166,11 +8190,21 @@
8166 8190
         "os-tmpdir": "^1.0.0"
8167 8191
       }
8168 8192
     },
8193
+    "p-defer": {
8194
+      "version": "1.0.0",
8195
+      "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
8196
+      "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww="
8197
+    },
8169 8198
     "p-finally": {
8170 8199
       "version": "1.0.0",
8171 8200
       "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
8172 8201
       "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
8173 8202
     },
8203
+    "p-is-promise": {
8204
+      "version": "2.1.0",
8205
+      "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz",
8206
+      "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg=="
8207
+    },
8174 8208
     "p-limit": {
8175 8209
       "version": "1.3.0",
8176 8210
       "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
@@ -8444,6 +8478,11 @@
8444 8478
       "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==",
8445 8479
       "dev": true
8446 8480
     },
8481
+    "pngjs": {
8482
+      "version": "3.4.0",
8483
+      "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz",
8484
+      "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w=="
8485
+    },
8447 8486
     "portfinder": {
8448 8487
       "version": "1.0.13",
8449 8488
       "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz",
@@ -11226,6 +11265,182 @@
11226 11265
       "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
11227 11266
       "dev": true
11228 11267
     },
11268
+    "qrcode": {
11269
+      "version": "1.3.3",
11270
+      "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.3.3.tgz",
11271
+      "integrity": "sha512-SH7V13AcJusH3GT8bMNOGz4w0L+LjcpNOU/NiOgtBhT/5DoWeZE6D5ntMJnJ84AMkoaM4kjJJoHoh9g++8lWFg==",
11272
+      "requires": {
11273
+        "can-promise": "0.0.1",
11274
+        "dijkstrajs": "^1.0.1",
11275
+        "isarray": "^2.0.1",
11276
+        "pngjs": "^3.3.0",
11277
+        "yargs": "^12.0.5"
11278
+      },
11279
+      "dependencies": {
11280
+        "camelcase": {
11281
+          "version": "5.3.1",
11282
+          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
11283
+          "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
11284
+        },
11285
+        "cross-spawn": {
11286
+          "version": "6.0.5",
11287
+          "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
11288
+          "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
11289
+          "requires": {
11290
+            "nice-try": "^1.0.4",
11291
+            "path-key": "^2.0.1",
11292
+            "semver": "^5.5.0",
11293
+            "shebang-command": "^1.2.0",
11294
+            "which": "^1.2.9"
11295
+          }
11296
+        },
11297
+        "execa": {
11298
+          "version": "1.0.0",
11299
+          "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
11300
+          "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
11301
+          "requires": {
11302
+            "cross-spawn": "^6.0.0",
11303
+            "get-stream": "^4.0.0",
11304
+            "is-stream": "^1.1.0",
11305
+            "npm-run-path": "^2.0.0",
11306
+            "p-finally": "^1.0.0",
11307
+            "signal-exit": "^3.0.0",
11308
+            "strip-eof": "^1.0.0"
11309
+          }
11310
+        },
11311
+        "find-up": {
11312
+          "version": "3.0.0",
11313
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
11314
+          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
11315
+          "requires": {
11316
+            "locate-path": "^3.0.0"
11317
+          }
11318
+        },
11319
+        "get-stream": {
11320
+          "version": "4.1.0",
11321
+          "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
11322
+          "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
11323
+          "requires": {
11324
+            "pump": "^3.0.0"
11325
+          }
11326
+        },
11327
+        "invert-kv": {
11328
+          "version": "2.0.0",
11329
+          "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
11330
+          "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA=="
11331
+        },
11332
+        "isarray": {
11333
+          "version": "2.0.4",
11334
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.4.tgz",
11335
+          "integrity": "sha512-GMxXOiUirWg1xTKRipM0Ek07rX+ubx4nNVElTJdNLYmNO/2YrDkgJGw9CljXn+r4EWiDQg/8lsRdHyg2PJuUaA=="
11336
+        },
11337
+        "lcid": {
11338
+          "version": "2.0.0",
11339
+          "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
11340
+          "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
11341
+          "requires": {
11342
+            "invert-kv": "^2.0.0"
11343
+          }
11344
+        },
11345
+        "locate-path": {
11346
+          "version": "3.0.0",
11347
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
11348
+          "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
11349
+          "requires": {
11350
+            "p-locate": "^3.0.0",
11351
+            "path-exists": "^3.0.0"
11352
+          }
11353
+        },
11354
+        "mem": {
11355
+          "version": "4.3.0",
11356
+          "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
11357
+          "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
11358
+          "requires": {
11359
+            "map-age-cleaner": "^0.1.1",
11360
+            "mimic-fn": "^2.0.0",
11361
+            "p-is-promise": "^2.0.0"
11362
+          }
11363
+        },
11364
+        "mimic-fn": {
11365
+          "version": "2.1.0",
11366
+          "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
11367
+          "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
11368
+        },
11369
+        "os-locale": {
11370
+          "version": "3.1.0",
11371
+          "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
11372
+          "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
11373
+          "requires": {
11374
+            "execa": "^1.0.0",
11375
+            "lcid": "^2.0.0",
11376
+            "mem": "^4.0.0"
11377
+          }
11378
+        },
11379
+        "p-limit": {
11380
+          "version": "2.2.0",
11381
+          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
11382
+          "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
11383
+          "requires": {
11384
+            "p-try": "^2.0.0"
11385
+          }
11386
+        },
11387
+        "p-locate": {
11388
+          "version": "3.0.0",
11389
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
11390
+          "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
11391
+          "requires": {
11392
+            "p-limit": "^2.0.0"
11393
+          }
11394
+        },
11395
+        "p-try": {
11396
+          "version": "2.2.0",
11397
+          "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
11398
+          "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
11399
+        },
11400
+        "pump": {
11401
+          "version": "3.0.0",
11402
+          "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
11403
+          "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
11404
+          "requires": {
11405
+            "end-of-stream": "^1.1.0",
11406
+            "once": "^1.3.1"
11407
+          }
11408
+        },
11409
+        "semver": {
11410
+          "version": "5.7.0",
11411
+          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
11412
+          "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA=="
11413
+        },
11414
+        "yargs": {
11415
+          "version": "12.0.5",
11416
+          "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz",
11417
+          "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==",
11418
+          "requires": {
11419
+            "cliui": "^4.0.0",
11420
+            "decamelize": "^1.2.0",
11421
+            "find-up": "^3.0.0",
11422
+            "get-caller-file": "^1.0.1",
11423
+            "os-locale": "^3.0.0",
11424
+            "require-directory": "^2.1.1",
11425
+            "require-main-filename": "^1.0.1",
11426
+            "set-blocking": "^2.0.0",
11427
+            "string-width": "^2.0.0",
11428
+            "which-module": "^2.0.0",
11429
+            "y18n": "^3.2.1 || ^4.0.0",
11430
+            "yargs-parser": "^11.1.1"
11431
+          }
11432
+        },
11433
+        "yargs-parser": {
11434
+          "version": "11.1.1",
11435
+          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz",
11436
+          "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
11437
+          "requires": {
11438
+            "camelcase": "^5.0.0",
11439
+            "decamelize": "^1.2.0"
11440
+          }
11441
+        }
11442
+      }
11443
+    },
11229 11444
     "qrcodejs2": {
11230 11445
       "version": "0.0.2",
11231 11446
       "resolved": "https://registry.npmjs.org/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
@@ -14823,6 +15038,11 @@
14823 15038
         "string-width": "^1.0.2 || 2"
14824 15039
       }
14825 15040
     },
15041
+    "window-or-global": {
15042
+      "version": "1.0.1",
15043
+      "resolved": "https://registry.npmjs.org/window-or-global/-/window-or-global-1.0.1.tgz",
15044
+      "integrity": "sha1-2+RboqKRqrxW1iz2bEW3+jIpRt4="
15045
+    },
14826 15046
     "window-size": {
14827 15047
       "version": "0.1.0",
14828 15048
       "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
@@ -14889,8 +15109,7 @@
14889 15109
     "wrappy": {
14890 15110
       "version": "1.0.2",
14891 15111
       "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
14892
-      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
14893
-      "dev": true
15112
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
14894 15113
     },
14895 15114
     "write": {
14896 15115
       "version": "0.2.1",

+ 1 - 0
package.json View File

@@ -54,6 +54,7 @@
54 54
     "normalize.css": "7.0.0",
55 55
     "nprogress": "0.2.0",
56 56
     "print-js": "^1.0.50",
57
+    "qrcode": "^1.3.3",
57 58
     "qrcodejs2": "0.0.2",
58 59
     "screenfull": "4.2.0",
59 60
     "serve-static": "1.13.2",

+ 30 - 0
src/api/activity/activity.js View File

@@ -54,4 +54,34 @@ export function fetchActivitySignupUsers(activity_id, keyword, page) {
54 54
       page: page,
55 55
     }
56 56
   })
57
+}
58
+
59
+export function deleteActivity(activity_id) {
60
+  return request({
61
+    url: "/api/activity/delete",
62
+    method: "post",
63
+    params: {
64
+      id: activity_id,
65
+    }
66
+  })
67
+}
68
+
69
+export function publishActivity(activity_id) {
70
+  return request({
71
+    url: "/api/activity/publish",
72
+    method: "post",
73
+    params: {
74
+      id: activity_id,
75
+    }
76
+  })
77
+}
78
+
79
+export function getActivityShareInfo(activity_id) {
80
+  return request({
81
+    url: "/api/activity/shareinfo",
82
+    method: "get",
83
+    params: {
84
+      id: activity_id,
85
+    }
86
+  })
57 87
 }

+ 1 - 0
src/lang/en.js View File

@@ -119,6 +119,7 @@ export default {
119 119
     activityDetail: "activity detail",
120 120
     activityShare: "activity share",
121 121
     activityPreview: "activity preview",
122
+    activitySignupList: "activity sign up list",
122 123
   },
123 124
   navbar: {
124 125
     logOut: 'Log Out',

+ 1 - 0
src/lang/zh.js View File

@@ -168,6 +168,7 @@ export default {
168 168
     activityDetail: "活动详情",
169 169
     activityShare: "活动分享",
170 170
     activityPreview: "活动预览",
171
+    activitySignupList: "报名列表",
171 172
   },
172 173
   navbar: {
173 174
     logOut: '退出登录',

+ 5 - 0
src/router/index.js View File

@@ -68,6 +68,11 @@ var _constant_router_map = [{
68 68
       noCache: true
69 69
     }
70 70
   }]
71
+},
72
+{
73
+  path: '/activity/preview',
74
+  component: () => import('@/scrm_pages/marketing_tool/activity_preview'),
75
+  hidden: true
71 76
 }
72 77
   // service
73 78
 ]

+ 15 - 4
src/router/modules/marketing_tool.js View File

@@ -61,14 +61,25 @@ export default {
61 61
         noCache: true,
62 62
       }
63 63
     },
64
+    // {
65
+    //   path: "/activity/preview",
66
+    //   hidden: true,
67
+    //   is_menu: false,
68
+    //   component: () => import("@/scrm_pages/marketing_tool/activity_preview"),
69
+    //   name: "activityPreview",
70
+    //   meta: {
71
+    //     title: "activityPreview",
72
+    //     noCache: true,
73
+    //   }
74
+    // },
64 75
     {
65
-      path: "/activity/preview",
76
+      path: "/activity/signupusers",
66 77
       hidden: true,
67 78
       is_menu: false,
68
-      component: () => import("@/scrm_pages/marketing_tool/activity_preview"),
69
-      name: "activityPreview",
79
+      component: () => import("@/scrm_pages/marketing_tool/activity_signup_users"),
80
+      name: "activitySignupList",
70 81
       meta: {
71
-        title: "activityPreview",
82
+        title: "activitySignupList",
72 83
         noCache: true,
73 84
       }
74 85
     },

+ 23 - 6
src/scrm_pages/marketing_tool/activity_detail.vue View File

@@ -10,13 +10,15 @@
10 10
                 </div>
11 11
                 <div class="title-panel">
12 12
                     <p class="title">
13
-                        <router-link :to="activity_url">{{ title }}</router-link>
13
+                        <!-- <router-link v-if="activity != null && activity.status == 4" :to="activity_url" target="_blank">{{ title }}</router-link>
14
+                        <router-link v-else :to="activity_url">{{ title }}</router-link> -->
15
+                        <router-link :to="activity_url" target="_blank">{{ title }}</router-link>
14 16
                     </p>
15 17
                     <p class="date">活动日期:{{ activity_time }}</p>
16 18
                 </div>
17 19
                 <div class="action-panel">
18 20
                     <el-button type="primary" v-if="show_share_btn" @click="$router.push({ path: '/activity/share', query: { id: activity_id } })">再次分享</el-button>
19
-                    <el-button type="primary" v-if="show_publish_btn">发布</el-button>
21
+                    <el-button type="primary" v-if="show_publish_btn" @click="publishActivity" :loading="publishing">发布</el-button>
20 22
                 </div>
21 23
             </div>
22 24
             <div class="times-statistics">
@@ -41,9 +43,7 @@
41 43
                     <el-button type="primary" icon="el-icon-search" :loading="loading_search" @click="fetchSignupUsers">搜索</el-button>
42 44
                 </div>
43 45
                 <div class="all-btn">
44
-                    <router-link to="/">
45
-                        <el-button type="primary">查看全部</el-button>
46
-                    </router-link>
46
+                    <el-button type="primary" @click="$router.push({ path: '/activity/signupusers', query: { id: activity_id } })">查看全部</el-button>
47 47
                 </div>
48 48
             </div>
49 49
             <div class="signup-table-panel">
@@ -64,7 +64,7 @@
64 64
 
65 65
 <script>
66 66
 import BreadCrumb from "@/scrm_pages/components/bread-crumb"
67
-import { fetchActivityDetailViewData, fetchActivitySignupUsers } from "@/api/activity/activity"
67
+import { fetchActivityDetailViewData, fetchActivitySignupUsers, publishActivity } from "@/api/activity/activity"
68 68
 import { parseTime } from "@/utils"
69 69
 
70 70
 export default {
@@ -86,6 +86,7 @@ export default {
86 86
             signup_users: [],
87 87
 
88 88
             loading_search: false,
89
+            publishing: false,
89 90
         }
90 91
     },
91 92
     computed: {
@@ -149,6 +150,22 @@ export default {
149 150
                 this.loading_search = false
150 151
                 this.$message.error(err)
151 152
             })
153
+        },
154
+        publishActivity: function() {
155
+            this.publishing = true
156
+            publishActivity(this.activity_id).then(rs => {
157
+                this.publishing = false
158
+                var resp = rs.data
159
+                if (resp.state == 1) {
160
+                    this.activity.status = 1
161
+                } else {
162
+                    this.$message.error(resp.msg)
163
+                } 
164
+
165
+            }).catch(rs => {
166
+                this.publishing = false
167
+                this.$message.error(err)
168
+            })
152 169
         }
153 170
     },
154 171
 }

+ 22 - 3
src/scrm_pages/marketing_tool/activity_list.vue View File

@@ -34,8 +34,10 @@
34 34
       <div>
35 35
         <template v-for="(activity, index) in activities">
36 36
           <published-cell v-if="activity.status == 1 || activity.status == 4" :key="index" :activity="activity"></published-cell>
37
-          <unapproved-cell v-else-if="activity.status == 3" :key="index" :activity="activity"></unapproved-cell>
38
-          <drafts-cell v-else-if="activity.status == 2" :key="index" :activity="activity"></drafts-cell>
37
+
38
+          <unapproved-cell v-else-if="activity.status == 3" :key="index" :activity="activity" @delete="deleteActivity(activity.id, index)"></unapproved-cell>
39
+
40
+          <drafts-cell v-else-if="activity.status == 2" :key="index" :activity="activity" @delete="deleteActivity(activity.id, index)"></drafts-cell>
39 41
         </template>
40 42
       </div>
41 43
       <div class="cell clearfix" style="padding-top: 15px;">
@@ -50,7 +52,7 @@ import BreadCrumb from "@/scrm_pages/components/bread-crumb"
50 52
 import PublishedCell from "@/scrm_pages/marketing_tool/components/published_cell"
51 53
 import UnapprovedCell from "@/scrm_pages/marketing_tool/components/unapproved_cell"
52 54
 import DraftsCell from "@/scrm_pages/marketing_tool/components/drafts_cell"
53
-import { fetchActivities } from "@/api/activity/activity"
55
+import { fetchActivities, deleteActivity } from "@/api/activity/activity"
54 56
 
55 57
 export default {
56 58
   name: "ActivityList",
@@ -102,6 +104,23 @@ export default {
102 104
         this.$message.error(err)
103 105
       })
104 106
     },
107
+
108
+    deleteActivity(id, index) {
109
+      this.loading_activities = true
110
+      deleteActivity(id).then(rs => {
111
+        this.loading_activities = false
112
+        var resp = rs.data
113
+        if (resp.state == 1) {
114
+          this.activities.splice(index, 1)
115
+        } else {
116
+          this.$message.error(resp.msg)
117
+        }
118
+      }).catch(err => {
119
+        this.loading_activities = false
120
+        this.$message.error(err)
121
+        return err
122
+      })
123
+    }
105 124
   },
106 125
 };
107 126
 </script>

+ 313 - 2
src/scrm_pages/marketing_tool/activity_preview.vue View File

@@ -1,14 +1,325 @@
1 1
 <template>
2
-    <div></div>
2
+<div style="background-color: #f6f8f9;">
3
+    <div class="main">
4
+        <div class="border title-panel">
5
+            <img :src="activity.poster_photo"/>
6
+            <div class="text">
7
+                <p class="title">{{ activity.title }}</p>
8
+                <p class="subtitle">{{ activity.subtitle }}</p>
9
+            </div>
10
+        </div>
11
+        <div class="org-info border">
12
+            <div class="logo">
13
+                <img :src="org.logo" />
14
+            </div>
15
+            <div class="info">
16
+                <p class="name">{{ org.name }}</p>
17
+                <p class="address">{{ activity.address }}</p>
18
+            </div>
19
+            <div class="arrow">
20
+                <img src="@/assets/img/sa_52.png" />
21
+            </div>
22
+        </div>
23
+        <div class="simple-cell border">
24
+            <div class="icon">
25
+                <img src="@/assets/img/sa_21.png" />
26
+            </div>
27
+            <div class="text">
28
+                <p>{{ parseTime(activity.start_time, "{y}-{m}-{d} {h}:{i}") }}</p>
29
+            </div>
30
+            <div class="arrow-panel">
31
+                <img src="@/assets/img/sa_52.png" />
32
+            </div>
33
+        </div>
34
+        <div class="simple-cell border" v-if="activity.phone_number.length > 0">
35
+            <div class="icon">
36
+                <img src="@/assets/img/sa_24.png" />
37
+            </div>
38
+            <div class="text">
39
+                <p>{{ activity.phone_number }}</p>
40
+            </div>
41
+            <div class="arrow-panel">
42
+                <img src="@/assets/img/sa_52.png" />
43
+            </div>
44
+        </div>
45
+        <div class="simple-cell border" v-if="activity.limit_num > 0">
46
+            <div class="title">
47
+                <p>活动名额</p>
48
+            </div>
49
+            <div class="detail">
50
+                <p>{{ activity.limit_num + "人" }}</p>
51
+            </div>
52
+        </div>
53
+
54
+        <div class="large-text-cell border" v-if="sign_up_notice.length > 0">
55
+            <div class="title">
56
+                <img src="@/assets/img/sa_25.png" />
57
+                <span>报名须知</span>
58
+            </div>
59
+            <p class="content" v-html="sign_up_notice">
60
+            </p>
61
+        </div>
62
+
63
+        <div class="large-text-cell border" v-if="activity_paragraph.title.length > 0">
64
+            <div class="title">
65
+                <img src="@/assets/img/sa_26.png" />
66
+                <span>{{ activity_paragraph.title }}</span>
67
+            </div>
68
+            <p class="content" v-html="activity_paragraph.content">
69
+            </p>
70
+        </div>
71
+
72
+        <div class="signup-fake-btn">
73
+            立即报名
74
+        </div>
75
+    </div>
76
+</div> 
3 77
 </template>
4 78
 
5 79
 <script>
80
+import { fetchActivity } from "@/api/activity/activity"
81
+import { parseTime } from "@/utils"
82
+
6 83
 export default {
7 84
     name: "ActivityPreview",
85
+    data() {
86
+        return {
87
+            activity_id: 0,
88
+
89
+            activity: {
90
+                id: 0,
91
+                poster_photo: "",
92
+                title: "",
93
+                subtitle: "",
94
+                address: "",
95
+                limit_num: 0,
96
+                sign_up_deadline: 0,
97
+                start_time: 0,
98
+                phone_number: "",
99
+                sign_up_notice: "",
100
+            },
101
+            activity_paragraph: {
102
+                title: "",
103
+                content: "",
104
+            },
105
+            org: {
106
+                name: "",
107
+                logo: "",
108
+            }
109
+        }
110
+    },
111
+    computed: {
112
+        sign_up_notice: function() {
113
+            return this.activity.sign_up_notice.replace(/\n/g, "<br/>")
114
+        }
115
+    },
116
+    mounted() {
117
+        this.activity_id = this.$route.query.id
118
+
119
+        fetchActivity(this.activity_id).then(rs => {
120
+            var resp = rs.data
121
+            if (resp.state == 1) {
122
+                // console.log(resp.data)
123
+                var activity = resp.data.activity
124
+                this.activity.id = activity.id
125
+                this.activity.poster_photo = activity.poster_photo
126
+                this.activity.title = activity.title
127
+                this.activity.subtitle = activity.subtitle
128
+                this.activity.address = activity.address
129
+                this.activity.limit_num = activity.limit_num
130
+                this.activity.sign_up_deadline = activity.sign_up_deadline * 1000
131
+                this.activity.start_time = activity.start_time * 1000
132
+                this.activity.phone_number = activity.phone_number
133
+                this.activity.sign_up_notice = activity.sign_up_notice
134
+
135
+                var paragraph = resp.data.paragraph
136
+                this.activity_paragraph.title = paragraph.title
137
+                this.activity_paragraph.content = paragraph.content
138
+
139
+                this.org.name = resp.data.org.name
140
+                this.org.logo = resp.data.org.logo
141
+
142
+            } else {
143
+                this.$message.error(resp.msg)
144
+            }
145
+
146
+        }).catch(err => {
147
+            this.$message.error(err)
148
+        })
149
+    },
150
+    methods: {
151
+        parseTime,
152
+    }
8 153
 }
9 154
 </script>
10 155
 
11
-<style scoped>
156
+<style lang="scss" scoped>
157
+.main {
158
+    width: 750px;
159
+    margin: 0 auto;
160
+    padding: 14px 30px 0 30px;
161
+
162
+    .title-panel {
163
+        background-color: white;
164
+
165
+        img {
166
+            width: 100%;
167
+            height: auto;
168
+        }
169
+        .text {
170
+            padding: 12px 15px 16px 20px;
171
+
172
+            .title {
173
+                font-size: 18px;
174
+                color: #485b6d;
175
+                font-weight: bold;
176
+                line-height: 32px;
177
+            }
178
+            .subtitle {
179
+                margin-top: 4px;
180
+                color: #a6a6a6;
181
+                font-size: 14px;
182
+            }
183
+        }
184
+    }
185
+
186
+    .org-info {
187
+        padding: 26px 20px;
188
+        position: relative;
189
+        display: flex;
190
+        -webkit-box-align: center;
191
+        align-items: center;
192
+        margin-top: 15px;
193
+        background-color: white;
12 194
 
195
+        .logo {
196
+            img {
197
+                width: 40px;
198
+                height: 40px;
199
+                border-radius: 20px;
200
+                object-fit: cover;
201
+                object-position: center;
202
+            }
203
+        }
204
+
205
+        .info {
206
+            flex: 1;
207
+            padding-left: 23px;
208
+            color: #485b6d;
209
+
210
+            .name {
211
+                font-size: 16px;
212
+                line-height: 22px;
213
+            }
214
+            .address {
215
+                font-size: 14px;
216
+                line-height: 20px;
217
+            }
218
+        }
219
+        
220
+        .arrow {
221
+            width: 20px;
222
+            position: relative;
223
+            img {
224
+                width: 8px;
225
+                float: right;
226
+            }
227
+        }
228
+    }
229
+
230
+    .simple-cell {
231
+        background-color: white;
232
+        padding: 20px 20px;
233
+        margin-top: 15px;
234
+        position: relative;
235
+        display: flex;
236
+        -webkit-box-align: center;
237
+        align-items: center;
238
+
239
+        .icon {
240
+            img {
241
+                width: 20px;
242
+                height: auto;//20px;
243
+                vertical-align: middle;
244
+            }
245
+        }
246
+        .text {
247
+            flex: 1;
248
+            padding-left: 17px;
249
+            color: #485b6d;
250
+            line-height: 20px;
251
+        }
252
+        .arrow-panel {
253
+            width: 20px;
254
+            position: relative;
255
+
256
+            img {
257
+                width: 8px;
258
+                float: right;
259
+                vertical-align: middle;
260
+            }
261
+        }
262
+
263
+        .title {
264
+            p {
265
+                color: #485b6d;
266
+            }
267
+        }
268
+        .detail {
269
+            flex: 1;
270
+            padding-left: 23px;
271
+            color: #485b6d;
272
+
273
+            p {
274
+                color: #485b6d;
275
+                float: right;
276
+                text-align: right;
277
+            }
278
+        }
279
+    }
280
+
281
+    .large-text-cell {
282
+        background-color: white;
283
+        padding: 20px 20px;
284
+        position: relative;
285
+        -webkit-box-align: center;
286
+        align-items: center;
287
+        margin-top: 15px;
288
+
289
+        .title {
290
+            color: #485b6d;
291
+            line-height: 18px;
292
+            height: 18px;
293
+
294
+            img {
295
+                margin-right: 11px;
296
+                float: left;
297
+            }
298
+        }
299
+        .content {
300
+            color: #a8b3ba;
301
+            margin: 10px 0 0 0;
302
+            font-size: 14px;
303
+            line-height: 20px;
304
+        }
305
+    }
306
+
307
+    .signup-fake-btn {
308
+        background: #58a1ed;
309
+        color: #fff;
310
+        height: 50px;
311
+        line-height: 50px;
312
+        text-align: center;
313
+        width: 100%;
314
+        margin-top: 100px;
315
+        font-size: 16px;
316
+    }
317
+}
13 318
 </style>
14 319
 
320
+<style scoped>
321
+.border {
322
+    border: solid 1px #dee2e5;
323
+    border-radius: 4px;
324
+}
325
+</style>

+ 215 - 2
src/scrm_pages/marketing_tool/activity_share.vue View File

@@ -1,14 +1,227 @@
1 1
 <template>
2
-    <div></div>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+            <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        </div>
6
+        <div class="app-container" style="padding: 0 6px 20px; background-color: #f6f8f9;">
7
+            <div class="wx-share-panel">
8
+                <div class="text-panel">
9
+                    <p class="title">微信分享</p>
10
+                    <p class="desc">以微信方式推送给客户,该方式可以监测活动的展现及参与次数</p>
11
+                </div>
12
+                <div class="qrcode-panel">
13
+                    <div class="qrcode">
14
+                        <img :src="qr_img" :style="{ opacity: qr_img.length > 0 ? 1 : 0 }" />
15
+                    </div>
16
+                    <div class="btn">
17
+                        <el-button type="primary" @click="previewAction">新窗口预览</el-button>
18
+                    </div>
19
+                </div>
20
+            </div>
21
+            <div class="sms-share-panel">
22
+                <div class="text-panel">
23
+                    <p class="title">短信分享</p>
24
+                    <p class="desc">以短信方式推送给客户</p>
25
+                </div>
26
+                <div class="btn-panel">
27
+                    <el-button type="primary">短信推送</el-button>
28
+                </div>
29
+            </div>
30
+            <div class="link-share-panel">
31
+                <div>
32
+                    <p class="title">网页链接</p>
33
+                    <p class="desc">可以直接分享以下链接到相应媒体(邮件、QQ、微博等),或者嵌入到微信公众号菜单</p>
34
+                </div>
35
+                <div class="input-line">
36
+                    <div class="input">
37
+                        <el-input readonly v-model="short_url"></el-input>
38
+                    </div>
39
+                    <el-button type="primary" @click="copyAction">复制链接</el-button>
40
+                </div>
41
+            </div>
42
+        </div>
43
+    </div>
3 44
 </template>
4 45
 
5 46
 <script>
47
+import BreadCrumb from "@/scrm_pages/components/bread-crumb"
48
+import QRCode from "qrcode"
49
+import { getActivityShareInfo } from "@/api/activity/activity"
50
+
6 51
 export default {
7 52
     name: "ActivityShare",
53
+    components: {
54
+        BreadCrumb,
55
+    },
56
+    data() {
57
+        return {
58
+            crumbs: [
59
+                { path: false, name: "活动详情" },
60
+                { path: false, name: "活动分享" },
61
+            ],
62
+
63
+            activity_id: 0,
64
+            short_url: "",
65
+            qr_img: "",
66
+        }
67
+    },
68
+    mounted() {
69
+        this.activity_id = this.$route.query.id
70
+
71
+        getActivityShareInfo(this.activity_id).then(rs => {
72
+            var resp = rs.data
73
+            if (resp.state == 1) {
74
+                this.short_url = resp.data.url
75
+
76
+                var opts = {
77
+                    errorCorrectionLevel: "H",
78
+                    type: "image/png"
79
+                };
80
+                var that = this;
81
+                QRCode.toDataURL(this.short_url, opts, function(err, qr_url) {
82
+                    if (err) {
83
+                        console.log(err);
84
+                    } else {
85
+                        that.qr_img = qr_url;
86
+                    }
87
+                });
88
+
89
+            } else {
90
+                this.$message.error(resp.msg)
91
+            }
92
+        }).catch(err => {
93
+            this.$message.error(err)
94
+        })
95
+
96
+    },
97
+    methods: {
98
+        previewAction: function () {
99
+            // var new_page = this.$router.resolve({ 
100
+            //     path: '/activity/preview',
101
+            //     query: {
102
+            //         id: this.activity_id,
103
+            //     }   
104
+            // })
105
+            // window.open(new_page.href, '_blank');
106
+            window.open(this.short_url, "_blank")
107
+        },
108
+        copyAction: function() {
109
+            var input = document.createElement("input");
110
+            input.value = this.short_url;
111
+            document.body.appendChild(input);
112
+            input.select();
113
+            document.execCommand("Copy");
114
+            document.body.removeChild(input);
115
+
116
+            this.$message.success("已复制链接")
117
+        }
118
+    },
8 119
 }
9 120
 </script>
10 121
 
11
-<style scoped>
122
+<style lang="scss" scoped>
123
+.wx-share-panel {
124
+    box-shadow: 0 0 1px #dee2e5;
125
+    padding: 25px 35px;
126
+    display: flex;
127
+    background-color: white;
128
+
129
+    .text-panel {
130
+        flex: 1;
131
+
132
+        .title {
133
+            font-size: 16px;
134
+            color: #485b6d;
135
+            font-weight: bold;
136
+            height: 40px;
137
+            display: -webkit-box;
138
+            -webkit-box-orient: vertical;
139
+            -webkit-line-clamp: 2;
140
+            overflow: hidden;
141
+        }
142
+        .desc {
143
+            color: #7b8a97;
144
+            font-size: 14px;
145
+        }
146
+    }
147
+    .qrcode-panel {
148
+        text-align: right;
149
+
150
+        .qrcode {
151
+            text-align: center;
12 152
 
153
+            img {
154
+                width: 120px;
155
+                height: 120px;
156
+            }
157
+        }
158
+
159
+        .btn {
160
+            text-align: center;
161
+        }
162
+    }
163
+}
164
+
165
+.sms-share-panel {
166
+    box-shadow: 0 0 1px #dee2e5;
167
+    padding: 25px 35px;
168
+    display: flex;
169
+    margin-top: 20px;
170
+    background-color: white;
171
+
172
+    .text-panel {
173
+        flex: 1;
174
+
175
+        .title {
176
+            font-size: 16px;
177
+            color: #485b6d;
178
+            font-weight: bold;
179
+            height: 40px;
180
+            display: -webkit-box;
181
+            -webkit-box-orient: vertical;
182
+            -webkit-line-clamp: 2;
183
+            overflow: hidden;
184
+        }
185
+        .desc {
186
+            color: #7b8a97;
187
+            font-size: 14px;
188
+        }
189
+    }
190
+    .btn-panel {
191
+        text-align: right;
192
+        padding-right: 4px;
193
+    }
194
+}
195
+
196
+.link-share-panel {
197
+    box-shadow: 0 0 1px #dee2e5;
198
+    padding: 25px 35px;
199
+    // display: flex;
200
+    margin-top: 20px;
201
+    background-color: white;
202
+
203
+    .title {
204
+        font-size: 16px;
205
+        color: #485b6d;
206
+        font-weight: bold;
207
+        height: 40px;
208
+        display: -webkit-box;
209
+        -webkit-box-orient: vertical;
210
+        -webkit-line-clamp: 2;
211
+        overflow: hidden;
212
+    }
213
+    .desc {
214
+        color: #7b8a97;
215
+        font-size: 14px;
216
+    }
217
+    .input-line {
218
+        margin-top: 20px;
219
+
220
+        .input {
221
+            display: inline-block;
222
+            width: 400px;
223
+        }
224
+    }
225
+}
13 226
 </style>
14 227
 

+ 107 - 0
src/scrm_pages/marketing_tool/activity_signup_users.vue View File

@@ -0,0 +1,107 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+            <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        </div>
6
+        <div class="app-container" style="padding-top: 0; background-color: #f6f8f9;">
7
+            <div style="display: flex;">
8
+                <div style="flex: 1;">
9
+                    <router-link to="/activity/list">
10
+                        <el-button type="primary">返回列表</el-button>
11
+                    </router-link>
12
+                </div>
13
+                <el-button type="primary" @click="printAction">导出</el-button>
14
+            </div>
15
+            <div style="margin-top: 10px;" id="table-panel">
16
+                <el-table id="table" border :data="signup_users" empty-text="暂无人报名">
17
+                    <el-table-column label="报名号" align="center" prop="id"></el-table-column>
18
+                    <el-table-column label="手机号" align="center" prop="mobile"></el-table-column>
19
+                    <el-table-column label="客户姓名" align="center" prop="real_name"></el-table-column>
20
+                    <el-table-column label="报名时间" align="center">
21
+                        <template slot-scope="scope">
22
+                            <span>{{ parseTime(scope.row.ctime, "{y}-{m}-{d} {h}:{i}") }}</span>
23
+                        </template>
24
+                    </el-table-column>
25
+                </el-table>
26
+            </div>
27
+            <div style="margin-top: 10px;">
28
+                <el-pagination :total="total" :current-page.sync="current_page" :page-size="10" layout="total, prev, pager, next" @current-change="getActivities()"></el-pagination>
29
+            </div>
30
+            <div id="print-table" style="width:960px; display: none;">
31
+                <el-table border :data="signup_users" empty-text="暂无人报名">
32
+                    <el-table-column label="报名号" align="center" prop="id"></el-table-column>
33
+                    <el-table-column label="手机号" align="center" prop="mobile"></el-table-column>
34
+                    <el-table-column label="客户姓名" align="center" prop="real_name"></el-table-column>
35
+                    <el-table-column label="报名时间" align="center">
36
+                        <template slot-scope="scope">
37
+                            <span>{{ parseTime(scope.row.ctime, "{y}-{m}-{d} {h}:{i}") }}</span>
38
+                        </template>
39
+                    </el-table-column>
40
+                </el-table>
41
+            </div>
42
+        </div>
43
+    </div>
44
+</template>
45
+
46
+<script>
47
+import BreadCrumb from "@/scrm_pages/components/bread-crumb"
48
+import { fetchActivitySignupUsers } from "@/api/activity/activity"
49
+import { parseTime } from "@/utils"
50
+import printJS from "print-js"
51
+
52
+export default {
53
+    name: "ActivitySignupUsers",
54
+    components: {
55
+        BreadCrumb,
56
+    },
57
+    data() {
58
+        return {
59
+            crumbs: [
60
+                { path: false, name: "活动详情" },
61
+                { path: false, name: "报名列表" },
62
+            ],
63
+
64
+            activity_id: 0,
65
+
66
+            signup_users: [],
67
+            loading_search: false,
68
+            total: 0,
69
+            current_page: 1,
70
+        }
71
+    },
72
+    mounted() {
73
+        this.activity_id = this.$route.query.id
74
+
75
+        this.fetchSignupUsers()
76
+    },
77
+    methods: {
78
+        parseTime,
79
+        fetchSignupUsers: function() {
80
+            this.loading_search = true
81
+            fetchActivitySignupUsers(this.activity_id, "", this.current_page).then(rs => {
82
+                this.loading_search = false
83
+                var resp = rs.data
84
+                if (resp.state == 1) {
85
+                    this.signup_users = resp.data.users
86
+                    this.total = resp.data.total
87
+                } else {
88
+                    this.$message.error(resp.msg)
89
+                }
90
+            }).catch(err => {
91
+                this.loading_search = false
92
+                this.$message.error(err)
93
+            })
94
+        },
95
+        printAction: function() {
96
+            printJS({
97
+                printable: 'table',
98
+                type: "html",
99
+                scanStyles: false,
100
+                css: ['https://unpkg.com/element-ui/lib/theme-chalk/index.css'],
101
+                // maxWidth: 960,
102
+            })
103
+        },
104
+    },
105
+}
106
+</script>
107
+

+ 6 - 1
src/scrm_pages/marketing_tool/components/drafts_cell.vue View File

@@ -13,7 +13,7 @@
13 13
             </h3>
14 14
             <div class="operation">
15 15
                 <el-button type="primary" size="small" icon="el-icon-edit-outline" @click="$router.push({ path: '/activity/modify', query: {id: activity.id} })">编辑</el-button>
16
-                <el-button type="danger" size="small" icon="el-icon-delete">删除</el-button>
16
+                <el-button type="danger" size="small" icon="el-icon-delete" @click="deleteActivity">删除</el-button>
17 17
             </div>
18 18
         </div>
19 19
     </div>
@@ -39,6 +39,11 @@ export default {
39 39
             return "/activity?id=" + this.activity.id
40 40
         }
41 41
     },
42
+    methods: {
43
+        deleteActivity() {
44
+            this.$emit("delete")
45
+        }
46
+    }
42 47
 }
43 48
 </script>
44 49
 

+ 11 - 3
src/scrm_pages/marketing_tool/components/edit_activity_edit_form.vue View File

@@ -95,7 +95,7 @@
95 95
             <div class="submit-button-panel">
96 96
                 <el-button style="padding: 10px 30px;" type="primary" @click="publishAction" :loading="publishing_activity" :disabled="saving_activity || saving_before_preview_activity">发 布</el-button>
97 97
                 <el-button style="color: #409eff; border-color: #409eff; padding: 10px 30px;" @click="saveAction" :loading="saving_activity" :disabled="publishing_activity || saving_before_preview_activity">保存草稿</el-button>
98
-                <el-button style="color: #409eff; border-color: #409eff; padding: 10px 30px;" :loading="saving_before_preview_activity" :disabled="publishing_activity || saving_activity">预 览</el-button>
98
+                <el-button style="color: #409eff; border-color: #409eff; padding: 10px 30px;" @click="previewAction" :loading="saving_before_preview_activity" :disabled="publishing_activity || saving_activity">预 览</el-button>
99 99
             </div>
100 100
         </div>
101 101
     </div>
@@ -234,8 +234,15 @@ export default {
234 234
         },
235 235
         previewAction: function() {
236 236
             this.saving_before_preview_activity = true
237
+            var t = this
237 238
             this.submitActivity(false, function() {
238
-                this.$router.push({ path: "/activity/preview", query: { id: this.activity.id } })
239
+                var new_page = t.$router.resolve({ 
240
+                    path: '/activity/preview',
241
+                    query: {
242
+                        id: t.activity.id,
243
+                    }   
244
+                })
245
+                window.open(new_page.href, '_blank');
239 246
             })
240 247
         },
241 248
         submitActivity: function(is_publish, successCallBack) {
@@ -274,6 +281,7 @@ export default {
274 281
                     this.saving_before_preview_activity = false
275 282
 
276 283
                 }).catch(err => {
284
+                    console.log('------  ' + err)
277 285
                     this.$message.error(err)
278 286
                     this.saving_activity = false
279 287
                     this.publishing_activity = false
@@ -281,12 +289,12 @@ export default {
281 289
                 })
282 290
 
283 291
             }).catch(err => {
292
+                console.log('asdada  ' + err)
284 293
                 this.$message.error(err)
285 294
                 this.saving_activity = false
286 295
                 this.publishing_activity = false
287 296
                 this.saving_before_preview_activity = false
288 297
             })
289
-            
290 298
         },
291 299
         validActivityInfo: function() {
292 300
             return new Promise((resolve, reject) => {

+ 6 - 1
src/scrm_pages/marketing_tool/components/unapproved_cell.vue View File

@@ -14,7 +14,7 @@
14 14
             </div>
15 15
             <div class="operation">
16 16
                 <el-button type="primary" size="small" icon="el-icon-edit-outline" @click="$router.push({ path: '/activity/modify', query: {id: activity.id} })">编辑</el-button>
17
-                <el-button type="danger" size="small" icon="el-icon-delete">删除</el-button>
17
+                <el-button type="danger" size="small" icon="el-icon-delete" @click="deleteActivity">删除</el-button>
18 18
             </div>
19 19
         </div>
20 20
         <div class="activity-time-panel">
@@ -45,6 +45,11 @@ export default {
45 45
             return parseTime(this.activity.start_time, "{y}-{m}-{d} {h}:{i}")
46 46
         },
47 47
     },
48
+    methods: {
49
+        deleteActivity() {
50
+            this.$emit("delete")
51
+        }
52
+    }
48 53
 }
49 54
 </script>
50 55
 

+ 286 - 0
src/scrm_pages/site/components/add-contact.vue View File

@@ -0,0 +1,286 @@
1
+<template>
2
+    <div>
3
+         <div class="feature ">
4
+            <ul >
5
+                <li @click="slideshow = true">
6
+                    <span>
7
+                        <img :src="new1" alt="">
8
+                        <p>轮播图</p>  
9
+                    </span>
10
+                </li>
11
+                <li @click="address = true">
12
+                    <span>
13
+                        <img :src="new1" alt="">
14
+                        <p>医院地址</p>  
15
+                    </span>
16
+                </li>
17
+                <li @click="contact = true">
18
+                    <span>
19
+                        <img :src="new1" alt="">
20
+                        <p>联系方式</p>  
21
+                    </span>
22
+                </li>
23
+                <li @click="time = true">
24
+                    <span>
25
+                        <img :src="new1" alt="">
26
+                        <p>工作时间</p>  
27
+                    </span>
28
+                </li>
29
+                <li @click="type = true">
30
+                    <span>
31
+                        <img :src="new1" alt="">
32
+                        <p>乘车方式</p>  
33
+                    </span>
34
+                </li>
35
+            </ul>
36
+         </div>
37
+<!-- 轮播图 -->
38
+<el-dialog
39
+    title="新增轮播图"
40
+    :visible.sync="slideshow"
41
+    width="550px"
42
+    :before-close="handleClose">
43
+    <el-form ref="form" :model="form" label-width="80px">
44
+      <el-form-item label="模块标题: ">
45
+        <el-input v-model="form.name"></el-input>
46
+      </el-form-item>
47
+      <el-form-item label="排序值: ">
48
+        <el-input v-model="form.name"></el-input>
49
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
50
+      </el-form-item>
51
+      <el-form-item label="添加图片: ">
52
+        <el-upload
53
+          action="https://jsonplaceholder.typicode.com/posts/"
54
+          list-type="picture-card"
55
+          :on-preview="handlePictureCardPreview"
56
+          :on-remove="handleRemove">
57
+          <i class="el-icon-plus"></i>
58
+        </el-upload>
59
+      </el-form-item>
60
+    </el-form>
61
+    <span slot="footer" class="dialog-footer">
62
+      <el-button @click="slideshow = false">取 消</el-button>
63
+      <el-button type="primary" @click="slideshow = false">确 定</el-button>
64
+    </span>
65
+  </el-dialog>
66
+
67
+  <!-- 医院地址 -->
68
+  <el-dialog
69
+    title="新增轮播图"
70
+    :visible.sync="address"
71
+    width="550px"
72
+    :before-close="handleClose">
73
+    <el-form ref="form" :model="form" label-width="80px">
74
+      <el-form-item label="模块标题: ">
75
+        <el-input v-model="form.name"></el-input>
76
+      </el-form-item>
77
+      <el-form-item label="排序值: ">
78
+        <el-input v-model="form.name"></el-input>
79
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
80
+      </el-form-item>
81
+      <el-form-item label="医院地址: ">
82
+        <el-input v-model="form.name"></el-input>
83
+      </el-form-item>
84
+      <el-form-item label="医院地图: ">
85
+
86
+      </el-form-item>
87
+    </el-form>
88
+    <span slot="footer" class="dialog-footer">
89
+      <el-button @click="address = false">取 消</el-button>
90
+      <el-button type="primary" @click="address = false">确 定</el-button>
91
+    </span>
92
+  </el-dialog>
93
+
94
+<!-- 新增联系方式 -->
95
+<el-dialog
96
+    title="新增联系方式"
97
+    :visible.sync="contact"
98
+    width="550px"
99
+    :before-close="handleClose">
100
+    <el-form ref="form" :model="form" label-width="80px">
101
+      <el-form-item label="模块标题: ">
102
+        <el-input v-model="form.name"></el-input>
103
+      </el-form-item>
104
+      <el-form-item label="排序值: ">
105
+        <el-input v-model="form.name"></el-input>
106
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
107
+      </el-form-item>
108
+      <el-form-item label="联系方式: ">
109
+        <div class="used">
110
+             <ul>
111
+                 <li>
112
+                    <span class="name">医院电话</span>
113
+                    <span class="icon"> 
114
+                        <i class="el-icon-edit-outline" @click="addLink = true"></i>
115
+                        <i class="el-icon-delete" @click="deleteList = true"></i>
116
+                    </span>
117
+                 </li>
118
+                 <li>
119
+                    <span class="name">微信号</span>
120
+                    <span class="icon"> 
121
+                        <i class="el-icon-edit-outline" @click="addLink = true"></i>
122
+                        <i class="el-icon-delete" @click="deleteList = true"></i>
123
+                    </span>
124
+                 </li>
125
+             </ul>
126
+        </div>
127
+      </el-form-item>
128
+    </el-form>
129
+    <span slot="footer" class="dialog-footer">
130
+      <el-button @click="addLink = true">添加联系方式</el-button>      
131
+      <el-button @click="contact = false">取 消</el-button>
132
+      <el-button type="primary" @click="contact = false">确 定</el-button>
133
+    </span>
134
+  </el-dialog>
135
+
136
+
137
+  <!-- 确定删除组件 -->
138
+    <el-dialog
139
+        title="删除提示"
140
+        :visible.sync="deleteList"
141
+        width="550px"
142
+        :before-close="handleClose">
143
+        <span>确认要删除该组件吗?删除后,该组件将无法恢复</span>
144
+        <span slot="footer" class="dialog-footer">
145
+            <el-button @click="deleteList = false">取 消</el-button>
146
+            <el-button type="primary" @click="deleteList = false">确 定</el-button>
147
+        </span>
148
+    </el-dialog>
149
+  <!-- 新增联系方式 -->
150
+  <el-dialog
151
+    title="新增联系方式"
152
+    :visible.sync="addLink"
153
+    width="550px"
154
+    :before-close="handleClose">
155
+    <el-form ref="form" :model="form" label-width="80px">
156
+        <el-form-item label="标题:">
157
+            <el-input v-model="form.name"></el-input>
158
+        </el-form-item>
159
+        <el-form-item label="联系方式:">
160
+            <el-radio-group v-model="form.resource">
161
+            <el-radio label="电话"></el-radio>
162
+            <el-radio label="非电话"></el-radio>
163
+            </el-radio-group>
164
+        </el-form-item>
165
+        <el-form-item label="内容:">
166
+            <el-input v-model="form.name"></el-input>
167
+        </el-form-item>
168
+    </el-form>
169
+    <span slot="footer" class="dialog-footer">
170
+        <el-button @click="addLink = false">取 消</el-button>
171
+        <el-button type="primary" @click="addLink = false">确 定</el-button>
172
+    </span>
173
+  </el-dialog>
174
+
175
+ <!-- 工作时间 -->
176
+ <el-dialog
177
+    title="新增工作时间"
178
+    :visible.sync="time"
179
+    width="550px"
180
+    :before-close="handleClose">
181
+    <el-form ref="form" :model="form" label-width="80px">
182
+      <el-form-item label="模块标题: ">
183
+        <el-input v-model="form.name"></el-input>
184
+      </el-form-item>
185
+      <el-form-item label="排序值: ">
186
+        <el-input v-model="form.name"></el-input>
187
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
188
+      </el-form-item>
189
+      <el-form-item label="工作时间: ">
190
+        <el-input
191
+          type="textarea"
192
+          :rows="6"
193
+          placeholder="请输入内容"
194
+          v-model="textarea">
195
+        </el-input>
196
+      </el-form-item>
197
+    </el-form>
198
+    <span slot="footer" class="dialog-footer">
199
+      <el-button @click="time = false">取 消</el-button>
200
+      <el-button type="primary" @click="time = false">确 定</el-button>
201
+    </span>
202
+  </el-dialog>
203
+
204
+  <!-- 新增乘车方式 -->
205
+ <el-dialog
206
+    title="新增乘车方式"
207
+    :visible.sync="type"
208
+    width="550px"
209
+    :before-close="handleClose">
210
+    <el-form ref="form" :model="form" label-width="80px">
211
+      <el-form-item label="模块标题: ">
212
+        <el-input v-model="form.name"></el-input>
213
+      </el-form-item>
214
+      <el-form-item label="排序值: ">
215
+        <el-input v-model="form.name"></el-input>
216
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
217
+      </el-form-item>
218
+      <el-form-item label="乘车方式: ">
219
+        <el-input
220
+          type="textarea"
221
+          :rows="6"
222
+          placeholder="请输入内容"
223
+          v-model="textarea">
224
+        </el-input>
225
+      </el-form-item>
226
+    </el-form>
227
+    <span slot="footer" class="dialog-footer">
228
+      <el-button @click="type = false">取 消</el-button>
229
+      <el-button type="primary" @click="type = false">确 定</el-button>
230
+    </span>
231
+  </el-dialog>
232
+
233
+
234
+    </div>
235
+</template>
236
+
237
+
238
+<script>
239
+export default {
240
+  name: "addcontact",
241
+  data() {
242
+    return {
243
+      slideshow:false,
244
+      address:false,
245
+      contact:false,
246
+      addLink:false,
247
+      time:false,
248
+      type:false,
249
+      new1: require("../../../assets/preview/new-1.png"),
250
+      form: {
251
+        name: ""
252
+      }
253
+    };
254
+  }
255
+};
256
+</script>
257
+
258
+<style rel="stylesheet/scss" lang="scss" scoped>
259
+
260
+.tips {
261
+  font-size: 12px;
262
+  line-height: 18px;
263
+}
264
+.used {
265
+  ul {
266
+    li {
267
+      height: 44px;
268
+      line-height: 44px;
269
+      font-size: 14px;
270
+      display: flex;
271
+      color: #606266;      
272
+      align-items: center;
273
+      justify-content: space-between;
274
+      border: 1px solid #e4e7ed;
275
+      padding: 0 10px;
276
+      margin-bottom: 10px;
277
+      border-radius: 4px;
278
+      i {
279
+        font-size: 19px;
280
+        margin: 0 6px;
281
+        cursor: pointer;
282
+      }
283
+    }
284
+  }
285
+}
286
+</style>

+ 14 - 0
src/scrm_pages/site/components/contact-used.vue View File

@@ -0,0 +1,14 @@
1
+<template>
2
+    
3
+</template>
4
+
5
+
6
+<script>
7
+export default {
8
+    name:'contactused'
9
+}
10
+</script>
11
+
12
+<style rel="stylesheet/scss" lang="scss" scoped>
13
+
14
+</style>

+ 312 - 90
src/scrm_pages/site/components/new-feature.vue View File

@@ -1,107 +1,329 @@
1 1
 <template>
2
-<div class="feature">
3
-    <ul >
4
-        <li>
2
+<div class="feature-box">
3
+  <div class="feature ">
4
+      <ul >
5
+          <li @click="dialogVisible = true">
6
+              <span>
7
+                <img :src="new1" alt="">
8
+                <p>轮播图</p>  
9
+              </span>
10
+          </li>
11
+          <li @click="two = true">
5 12
             <span>
6
-              <img :src="new1" alt="">
7
-              <p>轮播图</p>  
8
-            </span>
9
-        </li>
10
-         <li>
11
-           <span>
12
-              <img :src="new1" alt="">
13
-              <p>轮播图</p>  
14
-            </span>  
15
-        </li>
16
-         <li>
17
-           <span>
18
-              <img :src="new1" alt="">
19
-              <p>轮播图</p>  
20
-            </span>  
21
-        </li>
22
-         <li>
23
-           <span>
24
-              <img :src="new1" alt="">
25
-              <p>轮播图</p>  
26
-            </span>  
27
-        </li>
28
-         <li>
29
-           <span>
30
-              <img :src="new1" alt="">
31
-              <p class="title">轮播图</p>  
32
-            </span>  
33
-        </li>
34
-    </ul>
35
-    <!-- <el-row :gutter="21" type="flex"  justify="space-around">
36
-        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>轮播图</p></div></el-col>
37
-        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>医院介绍</p></div></el-col>
38
-        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>科室介绍</p></div></el-col>
39
-    </el-row>
40
-    <el-row :gutter="21" type="flex"  justify="space-around">
41
-        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>轮播图</p></div></el-col>
42
-        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>医院介绍</p></div></el-col>
43
-        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>科室介绍</p></div></el-col>
44
-    </el-row>
45
-    <el-row :gutter="21" type="flex"  justify="space-around">
46
-        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>轮播图</p></div></el-col>
47
-        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>医院介绍</p></div></el-col>
48
-        <el-col :span="5"><div class="grid-content "><img :src="new1" alt=""><p>科室介绍</p></div></el-col>
49
-    </el-row> -->
50
-</div>    
51
-</template>
13
+                <img :src="new1" alt="">
14
+                <p>医院介绍</p>  
15
+              </span>  
16
+          </li>
17
+          <li @click="three = true">
18
+            <span>
19
+                <img :src="new1" alt="">
20
+                <p>科室介绍</p>  
21
+              </span>  
22
+          </li>
23
+          <li @click="four = true">
24
+            <span>
25
+                <img :src="new1" alt="">
26
+                <p>名医介绍</p>  
27
+              </span>  
28
+          </li>
29
+          <li @click="five = true">
30
+            <span>
31
+                <img :src="new1" alt="">
32
+                <p class="title">科室环境</p>  
33
+              </span>  
34
+          </li>
35
+          <li @click="six = true">
36
+            <span>
37
+                <img :src="new1" alt="">
38
+                <p class="title">文章列表</p>  
39
+              </span>  
40
+          </li>
41
+          <li @click="seven = true">
42
+            <span>
43
+                <img :src="new1" alt="">
44
+                <p class="title">活动列表</p>  
45
+              </span>  
46
+          </li>
47
+          <li @click="eight = true">
48
+            <span>
49
+                <img :src="new1" alt="">
50
+                <p class="title">魔方导航</p>  
51
+              </span>  
52
+          </li>
53
+      </ul>
54
+  </div>    
55
+  <div class="clear"></div>
56
+
57
+  <!-- 新增轮播图 -->
58
+  <el-dialog
59
+    title="新增轮播图"
60
+    :visible.sync="dialogVisible"
61
+    width="550px"
62
+    :before-close="handleClose">
63
+    <el-form ref="form" :model="form" label-width="80px">
64
+      <el-form-item label="模块标题: ">
65
+        <el-input v-model="form.name"></el-input>
66
+      </el-form-item>
67
+      <el-form-item label="排序值: ">
68
+        <el-input v-model="form.name"></el-input>
69
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
70
+      </el-form-item>
71
+      <el-form-item label="添加图片: ">
72
+        <el-upload
73
+          action="https://jsonplaceholder.typicode.com/posts/"
74
+          list-type="picture-card"
75
+          :on-preview="handlePictureCardPreview"
76
+          :on-remove="handleRemove">
77
+          <i class="el-icon-plus"></i>
78
+        </el-upload>
79
+      </el-form-item>
80
+    </el-form>
81
+    <span slot="footer" class="dialog-footer">
82
+      <el-button @click="dialogVisible = false">取 消</el-button>
83
+      <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
84
+    </span>
85
+  </el-dialog>
86
+  <!-- 新增医院介绍 -->
87
+  <el-dialog
88
+    title="新增医院介绍"
89
+    :visible.sync="two"
90
+    width="550px"
91
+    :before-close="handleClose">
92
+    <el-form ref="form" :model="form" label-width="80px">
93
+      <el-form-item label="模块标题: ">
94
+        <el-input v-model="form.name"></el-input>
95
+      </el-form-item>
96
+      <el-form-item label="排序值: ">
97
+        <el-input v-model="form.name"></el-input>
98
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
99
+      </el-form-item>
100
+      <el-form-item label="医院介绍: ">
101
+        <el-input
102
+          type="textarea"
103
+          :rows="6"
104
+          placeholder="请输入内容"
105
+          v-model="textarea">
106
+        </el-input>
107
+      </el-form-item>
108
+    </el-form>
109
+    <span slot="footer" class="dialog-footer">
110
+      <el-button @click="two = false">取 消</el-button>
111
+      <el-button type="primary" @click="two = false">确 定</el-button>
112
+    </span>
113
+  </el-dialog>
114
+  <!-- 新增科室介绍 -->
115
+  <el-dialog
116
+    title="新增科室介绍"
117
+    :visible.sync="three"
118
+    width="550px"
119
+    :before-close="handleClose">
120
+    <el-form ref="form" :model="form" label-width="80px">
121
+      <el-form-item label="模块标题: ">
122
+        <el-input v-model="form.name"></el-input>
123
+      </el-form-item>
124
+      <el-form-item label="排序值: ">
125
+        <el-input v-model="form.name"></el-input>
126
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
127
+      </el-form-item>
128
+      <el-form-item label="科室介绍: ">
129
+        <el-input
130
+          type="textarea"
131
+          :rows="6"
132
+          placeholder="请输入内容"
133
+          v-model="textarea">
134
+        </el-input>
135
+      </el-form-item>
136
+    </el-form>
137
+    <span slot="footer" class="dialog-footer">
138
+      <el-button @click="three = false">取 消</el-button>
139
+      <el-button type="primary" @click="three = false">确 定</el-button>
140
+    </span>
141
+  </el-dialog>
142
+
143
+  <!-- 新增名医介绍 -->
144
+  <el-dialog
145
+    title="新增名医介绍"
146
+    :visible.sync="four"
147
+    width="550px"
148
+    :before-close="handleClose">
149
+    <el-form ref="form" :model="form" label-width="80px">
150
+      <el-form-item label="模块标题: ">
151
+        <el-input v-model="form.name"></el-input>
152
+      </el-form-item>
153
+      <el-form-item label="排序值: ">
154
+        <el-input v-model="form.name"></el-input>
155
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
156
+      </el-form-item>
157
+      <el-form-item label="新增名医: ">
158
+        <el-upload
159
+          action="https://jsonplaceholder.typicode.com/posts/"
160
+          list-type="picture-card"
161
+          :on-preview="handlePictureCardPreview"
162
+          :on-remove="handleRemove">
163
+          <i class="el-icon-plus"></i>
164
+        </el-upload>
165
+      </el-form-item>
166
+    </el-form>
167
+    <span slot="footer" class="dialog-footer">
168
+      <el-button @click="four = false">取 消</el-button>
169
+      <el-button type="primary" @click="four = false">确 定</el-button>
170
+    </span>
171
+  </el-dialog>
172
+  <!-- 新增科室环境 -->
173
+   <el-dialog
174
+    title="新增科室环境"
175
+    :visible.sync="five"
176
+    width="550px"
177
+    :before-close="handleClose">
178
+    <el-form ref="form" :model="form" label-width="100px">
179
+      <el-form-item label="模块标题: ">
180
+        <el-input v-model="form.name"></el-input>
181
+      </el-form-item>
182
+      <el-form-item label="排序值: ">
183
+        <el-input v-model="form.name"></el-input>
184
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
185
+      </el-form-item>
186
+      <el-form-item label="新增科室环境: ">
187
+        <el-upload
188
+          action="https://jsonplaceholder.typicode.com/posts/"
189
+          list-type="picture-card"
190
+          :on-preview="handlePictureCardPreview"
191
+          :on-remove="handleRemove">
192
+          <i class="el-icon-plus"></i>
193
+        </el-upload>
194
+      </el-form-item>
195
+    </el-form>
196
+    <span slot="footer" class="dialog-footer">
197
+      <el-button @click="five = false">取 消</el-button>
198
+      <el-button type="primary" @click="five = false">确 定</el-button>
199
+    </span>
200
+  </el-dialog>
201
+  <!-- 新增文章列表 -->
202
+  <el-dialog
203
+    title="新增文章列表"
204
+    :visible.sync="six"
205
+    width="550px"
206
+    :before-close="handleClose">
207
+    <el-form ref="form" :model="form" label-width="100px">
208
+      <el-form-item label="模块标题: ">
209
+        <el-input v-model="form.name"></el-input>
210
+      </el-form-item>
211
+      <el-form-item label="排序值: ">
212
+        <el-input v-model="form.name"></el-input>
213
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
214
+      </el-form-item>
215
+      <el-form-item label="文章分类: ">
216
+        <el-select v-model="form.region" placeholder="请选择活动区域" style="width:49%;float:left;">
217
+          <el-option label="区域一" value="shanghai"></el-option>
218
+          <el-option label="区域二" value="beijing"></el-option>
219
+        </el-select>
220
+        <el-select v-model="form.region" placeholder="请选择活动区域" style="width:49%;float:right;">
221
+          <el-option label="区域一" value="shanghai"></el-option>
222
+          <el-option label="区域二" value="beijing"></el-option>
223
+        </el-select>
224
+      </el-form-item>
225
+      <el-form-item label="首页展示条数: ">
226
+        <el-input v-model="form.name"></el-input>
227
+      </el-form-item>
228
+    </el-form>
229
+    <span slot="footer" class="dialog-footer">
230
+      <el-button @click="six = false">取 消</el-button>
231
+      <el-button type="primary" @click="six = false">确 定</el-button>
232
+    </span>
233
+  </el-dialog>
234
+  <!-- 新增活动列表 -->
235
+   <el-dialog
236
+    title="新增活动列表"
237
+    :visible.sync="seven"
238
+    width="550px"
239
+    :before-close="handleClose">
240
+    <el-form ref="form" :model="form" label-width="100px">
241
+      <el-form-item label="模块标题: ">
242
+        <el-input v-model="form.name"></el-input>
243
+      </el-form-item>
244
+      <el-form-item label="排序值: ">
245
+        <el-input v-model="form.name"></el-input>
246
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
247
+      </el-form-item>
248
+     
249
+      <el-form-item label="首页展示条数: ">
250
+        <el-input v-model="form.name"></el-input>
251
+      </el-form-item>
252
+    </el-form>
253
+    <span slot="footer" class="dialog-footer">
254
+      <el-button @click="seven = false">取 消</el-button>
255
+      <el-button type="primary" @click="seven = false">确 定</el-button>
256
+    </span>
257
+  </el-dialog>
258
+  <!-- 新增魔方导航 -->
259
+  <el-dialog
260
+    title="新增魔方导航"
261
+    :visible.sync="eight"
262
+    width="550px"
263
+    :before-close="handleClose">
264
+    <el-form ref="form" :model="form" label-width="100px">
265
+      <el-form-item label="模块标题: ">
266
+        <el-input v-model="form.name"></el-input>
267
+      </el-form-item>
268
+      <el-form-item label="排序值: ">
269
+        <el-input v-model="form.name"></el-input>
270
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
271
+      </el-form-item>
272
+      <el-form-item label="新增科室环境: ">
273
+        <el-upload
274
+          action="https://jsonplaceholder.typicode.com/posts/"
275
+          list-type="picture-card"
276
+          :on-preview="handlePictureCardPreview"
277
+          :on-remove="handleRemove">
278
+          <i class="el-icon-plus"></i>
279
+        </el-upload>
280
+      </el-form-item>
281
+    </el-form>
282
+    <span slot="footer" class="dialog-footer">
283
+      <el-button @click="eight = false">取 消</el-button>
284
+      <el-button type="primary" @click="eight = false">确 定</el-button>
285
+    </span>
286
+  </el-dialog>
52 287
 
53 288
 
289
+</div>
290
+</template>
291
+
54 292
 <script>
55 293
 export default {
56 294
   name: "newfeature",
57 295
   data() {
58 296
     return {
59
-      new1: require("../../../assets/preview/new-1.png")
297
+      new1: require("../../../assets/preview/new-1.png"),
298
+      dialogVisible: false,
299
+      two: false,
300
+      three: false,
301
+      four: false,
302
+      five: false,
303
+      six: false,
304
+      seven: false,
305
+      eight: false,
306
+      form: {
307
+        name: ""
308
+      }
60 309
     };
61 310
   }
62 311
 };
63 312
 </script>
64 313
 
65 314
 <style rel="stylesheet/scss" lang="scss" scoped>
66
-.feature {
67
-  ul {
68
-    border: 1px solid #eaeefb;
69
-    float: left;
70
-    width: 100%;
71
-    li {
72
-      width: 33.3%;
73
-      float: left;
74
-      text-align: center;
75
-      height: 120px;
76
-      color: #666;
77
-      font-size: 13px;
78
-      border-right: 1px solid #eee;
79
-      border-bottom: 1px solid #eee;
80
-      margin-right: -1px;
81
-      margin-bottom: -1px;
82
-      span {
83
-        vertical-align: middle;
84
-        display: flex;
85
-        flex-direction: column;
86
-        align-items: center;
87
-        justify-content: center;
88
-        height: 120px;
89
-        img {
90
-          display: inline-block;
91
-          font-size: 32px;
92
-          margin-bottom: 15px;
93
-          color: #606266;
94
-          transition: color 0.15s linear;
95
-          vertical-align: middle;
96
-        }
97
-        .title {
98
-          display: inline-block;
99
-          padding: 0 3px;
100
-          height: 30px;
101
-          vertical-align: middle;
102
-        }
103
-      }
104
-    }
105
-  }
315
+
316
+.clearfix {
317
+  clear: both;
318
+}
319
+
320
+.el-upload--picture-card {
321
+  width: 80px !important;
322
+  height: 80px !important;
323
+  line-height: 80px !important;
324
+}
325
+.tips {
326
+  font-size: 12px;
327
+  line-height: 18px;
106 328
 }
107 329
 </style>

+ 361 - 0
src/scrm_pages/site/components/used-list.vue View File

@@ -0,0 +1,361 @@
1
+<template>
2
+<div>
3
+    <div class="used">
4
+        <ul>
5
+            <li>
6
+                <span class="name">轮播图</span>
7
+                <span class="icon"> 
8
+                    <i class="el-icon-edit-outline" @click="dialogVisible = true"></i>
9
+                    <i class="el-icon-delete" @click="deleteList = true"></i>
10
+                </span>
11
+            </li>
12
+            <li>
13
+                <span class="name">魔方导航</span>
14
+                <span class="icon"> 
15
+                    <i class="el-icon-edit-outline" @click="eight = true"></i>
16
+                    <i class="el-icon-delete" @click="deleteList = true"></i>
17
+                </span>
18
+            </li>
19
+            <li>
20
+                <span class="name">医院介绍</span>
21
+                <span class="icon"> 
22
+                    <i class="el-icon-edit-outline" @click="two = true"></i>
23
+                    <i class="el-icon-delete" @click="deleteList = true"></i>
24
+                </span>
25
+            </li>
26
+            <li>
27
+                <span class="name">科室介绍</span>
28
+                <span class="icon"> 
29
+                    <i class="el-icon-edit-outline" @click="three = true"></i>
30
+                    <i class="el-icon-delete" @click="deleteList = true"></i>
31
+                </span>
32
+            </li>
33
+            <li>
34
+                <span class="name">名医介绍</span>
35
+                <span class="icon"> 
36
+                    <i class="el-icon-edit-outline" @click="four = true"></i>
37
+                    <i class="el-icon-delete" @click="deleteList = true"></i>
38
+                </span>
39
+            </li>
40
+            <li>
41
+                <span class="name">科室环境</span>
42
+                <span class="icon"> 
43
+                    <i class="el-icon-edit-outline" @click="five = true"></i>
44
+                    <i class="el-icon-delete" @click="deleteList = true"></i>
45
+                </span>
46
+            </li>
47
+            <li>
48
+                <span class="name">文章列表</span>
49
+                <span class="icon"> 
50
+                    <i class="el-icon-edit-outline" @click="six = true"></i>
51
+                    <i class="el-icon-delete" @click="deleteList = true"></i>
52
+                </span>
53
+            </li>
54
+            <li>
55
+                <span class="name">活动列表</span> 
56
+                <span class="icon"> 
57
+                    <i class="el-icon-edit-outline" @click="seven = true"></i>
58
+                    <i class="el-icon-delete" @click="deleteList = true"></i>
59
+                </span>
60
+            </li>
61
+        </ul>
62
+    </div>
63
+
64
+<!-- 确定删除组件 -->
65
+    <el-dialog
66
+        title="删除提示"
67
+        :visible.sync="deleteList"
68
+        width="550px"
69
+        :before-close="handleClose">
70
+        <span>确认要删除该组件吗?删除后,该组件将无法恢复</span>
71
+        <span slot="footer" class="dialog-footer">
72
+            <el-button @click="deleteList = false">取 消</el-button>
73
+            <el-button type="primary" @click="deleteList = false">确 定</el-button>
74
+        </span>
75
+    </el-dialog>
76
+
77
+
78
+  <!-- 新增轮播图 -->
79
+  <el-dialog
80
+    title="新增轮播图"
81
+    :visible.sync="dialogVisible"
82
+    width="550px"
83
+    :before-close="handleClose">
84
+    <el-form ref="form" :model="form" label-width="80px">
85
+      <el-form-item label="模块标题: ">
86
+        <el-input v-model="form.name"></el-input>
87
+      </el-form-item>
88
+      <el-form-item label="排序值: ">
89
+        <el-input v-model="form.name"></el-input>
90
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
91
+      </el-form-item>
92
+      <el-form-item label="添加图片: ">
93
+        <el-upload
94
+          action="https://jsonplaceholder.typicode.com/posts/"
95
+          list-type="picture-card"
96
+          :on-preview="handlePictureCardPreview"
97
+          :on-remove="handleRemove">
98
+          <i class="el-icon-plus"></i>
99
+        </el-upload>
100
+      </el-form-item>
101
+    </el-form>
102
+    <span slot="footer" class="dialog-footer">
103
+      <el-button @click="dialogVisible = false">取 消</el-button>
104
+      <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
105
+    </span>
106
+  </el-dialog>
107
+  <!-- 新增医院介绍 -->
108
+  <el-dialog
109
+    title="新增医院介绍"
110
+    :visible.sync="two"
111
+    width="550px"
112
+    :before-close="handleClose">
113
+    <el-form ref="form" :model="form" label-width="80px">
114
+      <el-form-item label="模块标题: ">
115
+        <el-input v-model="form.name"></el-input>
116
+      </el-form-item>
117
+      <el-form-item label="排序值: ">
118
+        <el-input v-model="form.name"></el-input>
119
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
120
+      </el-form-item>
121
+      <el-form-item label="医院介绍: ">
122
+          <el-input
123
+          type="textarea"
124
+          :rows="6"
125
+          placeholder="请输入内容"
126
+          v-model="textarea">
127
+        </el-input>
128
+      </el-form-item>
129
+    </el-form>
130
+    <span slot="footer" class="dialog-footer">
131
+      <el-button @click="two = false">取 消</el-button>
132
+      <el-button type="primary" @click="two = false">确 定</el-button>
133
+    </span>
134
+  </el-dialog>
135
+  <!-- 新增科室介绍 -->
136
+  <el-dialog
137
+    title="新增科室介绍"
138
+    :visible.sync="three"
139
+    width="550px"
140
+    :before-close="handleClose">
141
+    <el-form ref="form" :model="form" label-width="80px">
142
+      <el-form-item label="模块标题: ">
143
+        <el-input v-model="form.name"></el-input>
144
+      </el-form-item>
145
+      <el-form-item label="排序值: ">
146
+        <el-input v-model="form.name"></el-input>
147
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
148
+      </el-form-item>
149
+      <el-form-item label="科室介绍: ">
150
+           <el-input
151
+          type="textarea"
152
+          :rows="6"
153
+          placeholder="请输入内容"
154
+          v-model="textarea">
155
+        </el-input>
156
+      </el-form-item>
157
+    </el-form>
158
+    <span slot="footer" class="dialog-footer">
159
+      <el-button @click="three = false">取 消</el-button>
160
+      <el-button type="primary" @click="three = false">确 定</el-button>
161
+    </span>
162
+  </el-dialog>
163
+
164
+  <!-- 新增名医介绍 -->
165
+  <el-dialog
166
+    title="新增名医介绍"
167
+    :visible.sync="four"
168
+    width="550px"
169
+    :before-close="handleClose">
170
+    <el-form ref="form" :model="form" label-width="80px">
171
+      <el-form-item label="模块标题: ">
172
+        <el-input v-model="form.name"></el-input>
173
+      </el-form-item>
174
+      <el-form-item label="排序值: ">
175
+        <el-input v-model="form.name"></el-input>
176
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
177
+      </el-form-item>
178
+      <el-form-item label="新增名医: ">
179
+        <el-upload
180
+          action="https://jsonplaceholder.typicode.com/posts/"
181
+          list-type="picture-card"
182
+          :on-preview="handlePictureCardPreview"
183
+          :on-remove="handleRemove">
184
+          <i class="el-icon-plus"></i>
185
+        </el-upload>
186
+      </el-form-item>
187
+    </el-form>
188
+    <span slot="footer" class="dialog-footer">
189
+      <el-button @click="four = false">取 消</el-button>
190
+      <el-button type="primary" @click="four = false">确 定</el-button>
191
+    </span>
192
+  </el-dialog>
193
+
194
+  <!-- 新增科室环境 -->
195
+   <el-dialog
196
+    title="新增科室环境"
197
+    :visible.sync="five"
198
+    width="550px"
199
+    :before-close="handleClose">
200
+    <el-form ref="form" :model="form" label-width="100px">
201
+      <el-form-item label="模块标题: ">
202
+        <el-input v-model="form.name"></el-input>
203
+      </el-form-item>
204
+      <el-form-item label="排序值: ">
205
+        <el-input v-model="form.name"></el-input>
206
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
207
+      </el-form-item>
208
+      <el-form-item label="新增科室环境: ">
209
+        <el-upload
210
+          action="https://jsonplaceholder.typicode.com/posts/"
211
+          list-type="picture-card"
212
+          :on-preview="handlePictureCardPreview"
213
+          :on-remove="handleRemove">
214
+          <i class="el-icon-plus"></i>
215
+        </el-upload>
216
+      </el-form-item>
217
+    </el-form>
218
+    <span slot="footer" class="dialog-footer">
219
+      <el-button @click="five = false">取 消</el-button>
220
+      <el-button type="primary" @click="five = false">确 定</el-button>
221
+    </span>
222
+  </el-dialog>
223
+
224
+  <!-- 新增文章列表 -->
225
+  <el-dialog
226
+    title="新增文章列表"
227
+    :visible.sync="six"
228
+    width="550px"
229
+    :before-close="handleClose">
230
+    <el-form ref="form" :model="form" label-width="100px">
231
+      <el-form-item label="模块标题: ">
232
+        <el-input v-model="form.name"></el-input>
233
+      </el-form-item>
234
+      <el-form-item label="排序值: ">
235
+        <el-input v-model="form.name"></el-input>
236
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
237
+      </el-form-item>
238
+      <el-form-item label="文章分类: ">
239
+        <el-select v-model="form.region" placeholder="请选择活动区域" style="width:49%;float:left;">
240
+          <el-option label="区域一" value="shanghai"></el-option>
241
+          <el-option label="区域二" value="beijing"></el-option>
242
+        </el-select>
243
+        <el-select v-model="form.region" placeholder="请选择活动区域" style="width:49%;float:right;">
244
+          <el-option label="区域一" value="shanghai"></el-option>
245
+          <el-option label="区域二" value="beijing"></el-option>
246
+        </el-select>
247
+      </el-form-item>
248
+      <el-form-item label="首页展示条数: ">
249
+        <el-input v-model="form.name"></el-input>
250
+      </el-form-item>
251
+    </el-form>
252
+    <span slot="footer" class="dialog-footer">
253
+      <el-button @click="six = false">取 消</el-button>
254
+      <el-button type="primary" @click="six = false">确 定</el-button>
255
+    </span>
256
+  </el-dialog>
257
+
258
+  <!-- 新增活动列表 -->
259
+   <el-dialog
260
+    title="新增活动列表"
261
+    :visible.sync="seven"
262
+    width="550px"
263
+    :before-close="handleClose">
264
+    <el-form ref="form" :model="form" label-width="100px">
265
+      <el-form-item label="模块标题: ">
266
+        <el-input v-model="form.name"></el-input>
267
+      </el-form-item>
268
+      <el-form-item label="排序值: ">
269
+        <el-input v-model="form.name"></el-input>
270
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
271
+      </el-form-item>
272
+     
273
+      <el-form-item label="首页展示条数: ">
274
+        <el-input v-model="form.name"></el-input>
275
+      </el-form-item>
276
+    </el-form>
277
+    <span slot="footer" class="dialog-footer">
278
+      <el-button @click="seven = false">取 消</el-button>
279
+      <el-button type="primary" @click="seven = false">确 定</el-button>
280
+    </span>
281
+  </el-dialog>
282
+
283
+  <!-- 新增魔方导航 -->
284
+  <el-dialog
285
+    title="新增魔方导航"
286
+    :visible.sync="eight"
287
+    width="550px"
288
+    :before-close="handleClose">
289
+    <el-form ref="form" :model="form" label-width="100px">
290
+      <el-form-item label="模块标题: ">
291
+        <el-input v-model="form.name"></el-input>
292
+      </el-form-item>
293
+      <el-form-item label="排序值: ">
294
+        <el-input v-model="form.name"></el-input>
295
+        <p class="tips">请输入1-99的整数,数值越小,模块排序越靠前</p>
296
+      </el-form-item>
297
+      <el-form-item label="新增科室环境: ">
298
+        <el-upload
299
+          action="https://jsonplaceholder.typicode.com/posts/"
300
+          list-type="picture-card"
301
+          :on-preview="handlePictureCardPreview"
302
+          :on-remove="handleRemove">
303
+          <i class="el-icon-plus"></i>
304
+        </el-upload>
305
+      </el-form-item>
306
+    </el-form>
307
+    <span slot="footer" class="dialog-footer">
308
+      <el-button @click="eight = false">取 消</el-button>
309
+      <el-button type="primary" @click="eight = false">确 定</el-button>
310
+    </span>
311
+  </el-dialog>
312
+
313
+
314
+</div>
315
+
316
+</template>
317
+
318
+
319
+<script>
320
+export default {
321
+  name: "usedlist",
322
+  data() {
323
+    return {
324
+      deleteList: false,
325
+      two: false,
326
+      three: false,
327
+      four: false,
328
+      five: false,
329
+      six: false,
330
+      seven: false,
331
+      eight: false,
332
+      dialogVisible: false,      
333
+      form: {
334
+        name: ""
335
+      }
336
+    };
337
+  }
338
+};
339
+</script>
340
+
341
+<style rel="stylesheet/scss" lang="scss" scoped>
342
+.used {
343
+  ul {
344
+    li {
345
+      height: 44px;
346
+      line-height: 44px;
347
+      font-size: 14px;
348
+      display: flex;
349
+      color: #606266;      
350
+      align-items: center;
351
+      justify-content: space-between;
352
+      border-bottom: 1px solid #e4e7ed;
353
+      i {
354
+        font-size: 19px;
355
+        margin: 0 6px;
356
+        cursor: pointer;
357
+      }
358
+    }
359
+  }
360
+}
361
+</style>

+ 7 - 3
src/scrm_pages/site/preview.vue View File

@@ -12,14 +12,14 @@
12 12
                                  <new-feature> </new-feature>
13 13
                             </el-tab-pane>
14 14
                             <el-tab-pane label="已使用" name="second">
15
-
15
+                                 <used-list></used-list>
16 16
                             </el-tab-pane>
17 17
                         </el-tabs>
18 18
                     </el-tab-pane>
19 19
                     <el-tab-pane label="联系我们">
20 20
                         <el-tabs v-model="activeName" @tab-click="handleClick">
21 21
                             <el-tab-pane label="新增模块" name="three">
22
-
22
+                                <add-contact></add-contact>
23 23
                             </el-tab-pane>
24 24
                             <el-tab-pane label="已使用" name="four">
25 25
                                 
@@ -36,11 +36,15 @@
36 36
 <script> 
37 37
 import BreadCrumb from "../components/bread-crumb";
38 38
 import NewFeature from "./components/new-feature";
39
+import UsedList from "./components/used-list";
40
+import AddContact from "./components/add-contact";
39 41
 export default {
40 42
   name: "preview",
41 43
   components: {
42 44
     BreadCrumb,
43
-    NewFeature
45
+    NewFeature,
46
+    UsedList,
47
+    AddContact
44 48
   },
45 49
   data() {
46 50
     return {

+ 44 - 0
src/styles/index.scss View File

@@ -499,3 +499,47 @@ code {
499 499
   color: #C0C4CC;
500 500
   padding: 0 3px;
501 501
 }
502
+
503
+// 微网站-新增模块
504
+.feature {
505
+  ul {
506
+    border: 1px solid #eaeefb;
507
+    float: left;
508
+    width: 100%;
509
+    li {
510
+      width: 33.3%;
511
+      float: left;
512
+      text-align: center;
513
+      height: 120px;
514
+      color: #666;
515
+      font-size: 13px;
516
+      border-right: 1px solid #eee;
517
+      border-bottom: 1px solid #eee;
518
+      margin-right: -1px;
519
+      margin-bottom: -1px;
520
+      span {
521
+        vertical-align: middle;
522
+        display: flex;
523
+        flex-direction: column;
524
+        align-items: center;
525
+        justify-content: center;
526
+        height: 120px;
527
+        cursor: pointer;
528
+        img {
529
+          display: inline-block;
530
+          font-size: 32px;
531
+          margin-bottom: 15px;
532
+          color: #606266;
533
+          transition: color 0.15s linear;
534
+          vertical-align: middle;
535
+        }
536
+        .title {
537
+          display: inline-block;
538
+          padding: 0 3px;
539
+          height: 30px;
540
+          vertical-align: middle;
541
+        }
542
+      }
543
+    }
544
+  }
545
+}

+ 1 - 1
src/xt_permission.js View File

@@ -5,7 +5,7 @@ import 'nprogress/nprogress.css'// progress bar style
5 5
 
6 6
 NProgress.configure({ showSpinner: false })// NProgress Configuration
7 7
 
8
-const loginWhiteList = ['/token/verify', '/401', '/404'] // 登录验证白名单
8
+const loginWhiteList = ['/token/verify', '/401', '/404', "/activity/preview"] // 登录验证白名单
9 9
 const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名单
10 10
 
11 11
 router.beforeEach((to, from, next) => {