1.表单功能
2.打点统计
Showing
15 changed files
with
1571 additions
and
116 deletions
This diff is collapsed.
Click to expand it.
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html> | 2 | <html> |
3 | <head> | 3 | |
4 | <meta charset="utf-8"> | 4 | <head> |
5 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> | 5 | <meta charset="utf-8"> |
6 | <title>天宝公众号</title> | 6 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
7 | </head> | 7 | <title>天宝公众号</title> |
8 | <body> | 8 | </head> |
9 | <div id="app"></div> | 9 | |
10 | <!-- built files will be auto injected --> | 10 | <body> |
11 | </body> | 11 | |
12 | <script src="./static/js/weixin-1.1.0.js"></script> | ||
13 | <script src="./static/js/hdp-4.4.0.min.js"></script> | ||
14 | <script src="./static/js/as.js"></script> | ||
15 | <div id="app"></div> | ||
16 | <!-- built files will be auto injected --> | ||
17 | </body> | ||
18 | |||
12 | </html> | 19 | </html> | ... | ... |
... | @@ -9,3 +9,66 @@ export default { | ... | @@ -9,3 +9,66 @@ export default { |
9 | name: 'App' | 9 | name: 'App' |
10 | } | 10 | } |
11 | </script> | 11 | </script> |
12 | |||
13 | |||
14 | |||
15 | <style lang="scss"> | ||
16 | // @import "./styles/common"; | ||
17 | // @import "./styles/vars"; | ||
18 | body { | ||
19 | margin: 0px; | ||
20 | padding: 0px; | ||
21 | // background: @color-primary; | ||
22 | // font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, | ||
23 | // Microsoft YaHei, SimSun, sans-serif; | ||
24 | // font-size: 14px; | ||
25 | // -webkit-font-smoothing: antialiased; | ||
26 | } | ||
27 | |||
28 | #app { | ||
29 | position: absolute; | ||
30 | top: 0px; | ||
31 | bottom: 0px; | ||
32 | width: 100%; | ||
33 | } | ||
34 | |||
35 | .el-submenu [class^="fa"] { | ||
36 | vertical-align: baseline; | ||
37 | margin-right: 10px; | ||
38 | } | ||
39 | |||
40 | .el-menu-item [class^="fa"] { | ||
41 | vertical-align: baseline; | ||
42 | margin-right: 10px; | ||
43 | } | ||
44 | |||
45 | .toolbar { | ||
46 | background: #f2f2f2; | ||
47 | padding: 10px; | ||
48 | margin: 10px 0px; | ||
49 | .el-form-item { | ||
50 | margin-bottom: 10px; | ||
51 | } | ||
52 | } | ||
53 | |||
54 | .fade-enter-active, | ||
55 | .fade-leave-active { | ||
56 | transition: all 0.2s ease; | ||
57 | } | ||
58 | |||
59 | .fade-enter, | ||
60 | .fade-leave-active { | ||
61 | opacity: 0; | ||
62 | } | ||
63 | |||
64 | .avatar-wrap { | ||
65 | display: flex; | ||
66 | justify-content: flex-start; | ||
67 | align-items: center; | ||
68 | .avatar { | ||
69 | width: 40px; | ||
70 | height: 40px; | ||
71 | } | ||
72 | } | ||
73 | |||
74 | </style> | ... | ... |
1 | module.exports = { | 1 | module.exports = { |
2 | testListGet: '/xxx/xxx/list' | ||
3 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
2 | testListGet: '/xxx/xxx/list', | ||
3 | exportTable: exportTable, | ||
4 | } | ||
5 | |||
6 | function exportTable(params) { | ||
7 | let url = 'https://api.k.wxpai.cn/awp/plugins/export/' + params.func + '?id=' + params.appId + '&key=' + params.appKey + '&val=' + params.data; | ||
8 | console.log("url:", url); | ||
9 | window.open(url) | ||
10 | } | ... | ... |
src/common/utils.js
0 → 100644
1 | /** | ||
2 | * 获取当前链接参数 | ||
3 | * @param {*} name | ||
4 | */ | ||
5 | export const getLinkParam = name => { | ||
6 | return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null; | ||
7 | }; | ||
8 | |||
9 | /** | ||
10 | * 去掉字符串两端空格 trim | ||
11 | * @param {string} str | ||
12 | */ | ||
13 | export const trim = str => { | ||
14 | return str.replace(/(^\s*)|(\s*$)/g, ''); | ||
15 | } | ||
16 | |||
17 | /** | ||
18 | * 验证邮箱 | ||
19 | * @param {string} str | ||
20 | */ | ||
21 | export const checkEmail = str => { | ||
22 | let re = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/; | ||
23 | if (re.test(str)) { | ||
24 | return true; | ||
25 | } else { | ||
26 | return false; | ||
27 | } | ||
28 | } | ||
29 | |||
30 | /** | ||
31 | * 验证手机 1开头+10位数 | ||
32 | * @param {string} str | ||
33 | */ | ||
34 | export const checkMobile = str => { | ||
35 | let re = /^1\d{10}$/; | ||
36 | // let re = /^(13[0-9]|14[57]|15[0-9]|17[0-9]|18[0-9])\d{8}$/; //严格模式 | ||
37 | if (re.test(str)) { | ||
38 | return true; | ||
39 | } else { | ||
40 | return false; | ||
41 | } | ||
42 | } | ||
43 | |||
44 | /** | ||
45 | * 获取Uuid | ||
46 | */ | ||
47 | export const uuid = () => { | ||
48 | var s = []; | ||
49 | var hexDigits = "0123456789abcdef"; | ||
50 | for (var i = 0; i < 36; i++) { | ||
51 | s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1); | ||
52 | } | ||
53 | s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010 | ||
54 | s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01 | ||
55 | s[8] = s[13] = s[18] = s[23] = "-"; | ||
56 | |||
57 | var uuid = s.join(""); | ||
58 | return uuid; | ||
59 | } | ||
60 | |||
61 | |||
62 | /** | ||
63 | * 设置cookies | ||
64 | * @param {*} name | ||
65 | * @param {*} value | ||
66 | * @param {*} Days | ||
67 | */ | ||
68 | export const setCookie = (name, value, Days = 0) => { | ||
69 | if (Days <= 0) Days = 30; | ||
70 | var exp = new Date(); | ||
71 | exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000); | ||
72 | document.cookie = name + "=" + encodeURI(value) + ";expires=" + exp.toUTCString(); | ||
73 | } | ||
74 | |||
75 | |||
76 | /** | ||
77 | * 获取cookies | ||
78 | * @param {*} name | ||
79 | * @param {*} value | ||
80 | * @param {*} Days | ||
81 | */ | ||
82 | export const getCookie = (name) => { | ||
83 | var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); | ||
84 | if (arr = document.cookie.match(reg)) { | ||
85 | return decodeURI(arr[2]); | ||
86 | } else { | ||
87 | return ""; | ||
88 | } | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * 删除cookies | ||
93 | * @param {*} name | ||
94 | */ | ||
95 | export const deleteCookie = (name) => { | ||
96 | var exp = new Date(); | ||
97 | exp.setTime(exp.getTime() - 1); | ||
98 | var cval = getCookie(name); | ||
99 | if (cval != null) | ||
100 | document.cookie = name + "=" + cval + ";expires=" + exp.toUTCString(); | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * 判断是否微信客户端 | ||
105 | * @param {*} name | ||
106 | */ | ||
107 | export const isWeiXin = () => { | ||
108 | var ua = window.navigator.userAgent.toLowerCase(); | ||
109 | if (ua.match(/MicroMessenger/i) == 'micromessenger') { | ||
110 | return true; | ||
111 | } else { | ||
112 | return false; | ||
113 | } | ||
114 | } | ||
115 | |||
116 | |||
117 | /** | ||
118 | * 时间戳格式化(yyyy-MM-dd hh:mm:ss) | ||
119 | * @param {*} timestamp | ||
120 | * @param {*} format | ||
121 | */ | ||
122 | export const timestampFormat = (timestamp, format) => { | ||
123 | Date.prototype.Format = function (fmt) { | ||
124 | var o = { | ||
125 | "M+": this.getMonth() + 1, //月份 | ||
126 | "d+": this.getDate(), //日 | ||
127 | "h+": this.getHours(), //小时 | ||
128 | "m+": this.getMinutes(), //分 | ||
129 | "s+": this.getSeconds(), //秒 | ||
130 | "q+": Math.floor((this.getMonth() + 3) / 3), //季度 | ||
131 | "S": this.getMilliseconds() //毫秒 | ||
132 | }; | ||
133 | if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); | ||
134 | for (var k in o) { | ||
135 | if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); | ||
136 | } | ||
137 | return fmt; | ||
138 | } | ||
139 | |||
140 | if (timestamp && timestamp.length == 10) timestamp += "000"; | ||
141 | |||
142 | var date = new Date(); | ||
143 | if (timestamp) date.setTime(timestamp); | ||
144 | if (format == null || format == "") { | ||
145 | format = "yyyy-MM-dd hh:mm:ss"; | ||
146 | } | ||
147 | return date.Format(format); | ||
148 | }; | ||
149 | |||
150 | /** | ||
151 | * 日期转时间戳 | ||
152 | * @param {*} stringTime | ||
153 | */ | ||
154 | export const dateParse = stringTime => { | ||
155 | if (stringTime) { | ||
156 | var date = new Date(stringTime); | ||
157 | } else { | ||
158 | var date = new Date(); | ||
159 | } | ||
160 | return Date.parse(date); | ||
161 | }; | ||
162 | |||
163 | |||
164 | /** | ||
165 | * 生成指定范围内的随机数 | ||
166 | * @param {*} min | ||
167 | * @param {*} max | ||
168 | */ | ||
169 | export const getRandom = (min, max) => { | ||
170 | var c = max - min + 1; | ||
171 | return Math.floor(Math.random() * c + min); | ||
172 | }; | ||
173 | |||
174 | |||
175 | /** | ||
176 | * 日期格式化 | ||
177 | */ | ||
178 | export const formatDate = { | ||
179 | SIGN_REGEXP: /([yMdhsm])(\1*)/g, | ||
180 | DEFAULT_PATTERN: 'yyyy-MM-dd', | ||
181 | padding: function (s, len) { | ||
182 | var len = len - (s + '').length; | ||
183 | for (var i = 0; i < len; i++) { | ||
184 | s = '0' + s; | ||
185 | } | ||
186 | return s; | ||
187 | }, | ||
188 | format: function (date, pattern) { | ||
189 | pattern = pattern || formatDate.DEFAULT_PATTERN; | ||
190 | return pattern.replace(formatDate.SIGN_REGEXP, function ($0) { | ||
191 | switch ($0.charAt(0)) { | ||
192 | case 'y': | ||
193 | return formatDate.padding(date.getFullYear(), $0.length); | ||
194 | case 'M': | ||
195 | return formatDate.padding(date.getMonth() + 1, $0.length); | ||
196 | case 'd': | ||
197 | return formatDate.padding(date.getDate(), $0.length); | ||
198 | case 'w': | ||
199 | return date.getDay() + 1; | ||
200 | case 'h': | ||
201 | return formatDate.padding(date.getHours(), $0.length); | ||
202 | case 'm': | ||
203 | return formatDate.padding(date.getMinutes(), $0.length); | ||
204 | case 's': | ||
205 | return formatDate.padding(date.getSeconds(), $0.length); | ||
206 | } | ||
207 | }); | ||
208 | }, | ||
209 | parse: function (dateString, pattern) { | ||
210 | var matchs1 = pattern.match(formatDate.SIGN_REGEXP); | ||
211 | var matchs2 = dateString.match(/(\d)+/g); | ||
212 | if (matchs1.length == matchs2.length) { | ||
213 | var _date = new Date(1970, 0, 1); | ||
214 | for (var i = 0; i < matchs1.length; i++) { | ||
215 | var _int = parseInt(matchs2[i]); | ||
216 | var sign = matchs1[i]; | ||
217 | switch (sign.charAt(0)) { | ||
218 | case 'y': | ||
219 | _date.setFullYear(_int); | ||
220 | break; | ||
221 | case 'M': | ||
222 | _date.setMonth(_int - 1); | ||
223 | break; | ||
224 | case 'd': | ||
225 | _date.setDate(_int); | ||
226 | break; | ||
227 | case 'h': | ||
228 | _date.setHours(_int); | ||
229 | break; | ||
230 | case 'm': | ||
231 | _date.setMinutes(_int); | ||
232 | break; | ||
233 | case 's': | ||
234 | _date.setSeconds(_int); | ||
235 | break; | ||
236 | } | ||
237 | } | ||
238 | return _date; | ||
239 | } | ||
240 | return null; | ||
241 | } | ||
242 | |||
243 | } |
... | @@ -22,131 +22,213 @@ import Layout from '../views/layout/Layout' | ... | @@ -22,131 +22,213 @@ import Layout from '../views/layout/Layout' |
22 | breadcrumb: false if false, the item will hidden in breadcrumb(default is true) | 22 | breadcrumb: false if false, the item will hidden in breadcrumb(default is true) |
23 | } | 23 | } |
24 | **/ | 24 | **/ |
25 | export const constantRouterMap = [ | 25 | export const constantRouterMap = [{ |
26 | { path: '/login', component: () => import('@/views/login/index'), hidden: true }, | 26 | path: '/login', |
27 | { path: '/404', component: () => import('@/views/404'), hidden: true }, | 27 | component: () => import('@/views/login/index'), |
28 | 28 | hidden: true | |
29 | { | ||
30 | path: '/', | ||
31 | component: Layout, | ||
32 | redirect: '/dashboard', | ||
33 | name: 'Dashboard', | ||
34 | hidden: true, | ||
35 | children: [{ | ||
36 | path: 'dashboard', | ||
37 | component: () => import('@/views/dashboard/index') | ||
38 | }] | ||
39 | }, | 29 | }, |
40 | /* { | ||
41 | path: '/form', | ||
42 | component: Layout, | ||
43 | children: [ | ||
44 | { | ||
45 | path: 'index', | ||
46 | name: 'Form', | ||
47 | component: () => import('@/views/form/index'), | ||
48 | meta: { title: 'Form', icon: 'form' } | ||
49 | } | ||
50 | ] | ||
51 | },*/ | ||
52 | { | 30 | { |
53 | path: '/qrcode', | 31 | path: '/404', |
54 | component: Layout, | 32 | component: () => import('@/views/404'), |
55 | children: [ | 33 | hidden: true |
56 | { | ||
57 | path: 'index', | ||
58 | name: 'Qrcode', | ||
59 | component: () => import('@/views/scene/index'), | ||
60 | meta: { title: '订阅信息', icon: 'form' } | ||
61 | } | ||
62 | ] | ||
63 | }, | 34 | }, |
64 | 35 | ||
36 | // { | ||
37 | // path: '/', | ||
38 | // component: Layout, | ||
39 | // redirect: '/dashboard', | ||
40 | // name: 'Dashboard', | ||
41 | // hidden: true, | ||
42 | // children: [{ | ||
43 | // path: 'dashboard', | ||
44 | // component: () => import('@/views/dashboard/index') | ||
45 | // }] | ||
46 | // }, | ||
47 | /* { | ||
48 | path: '/form', | ||
49 | component: Layout, | ||
50 | children: [ | ||
51 | { | ||
52 | path: 'index', | ||
53 | name: 'Form', | ||
54 | component: () => import('@/views/form/index'), | ||
55 | meta: { title: 'Form', icon: 'form' } | ||
56 | } | ||
57 | ] | ||
58 | },*/ | ||
65 | 59 | ||
66 | 60 | { | |
67 | /*{ | 61 | path: '/', |
68 | path: '/example', | ||
69 | component: Layout, | 62 | component: Layout, |
70 | redirect: '/example/table', | 63 | redirect: '/dictionary/reservation', |
71 | name: 'Example', | 64 | name: 'dictionary', |
72 | meta: { title: 'Example', icon: 'example' }, | 65 | meta: { |
73 | children: [ | 66 | title: '天宝宝典', |
67 | icon: 'nested' | ||
68 | }, | ||
69 | children: [{ | ||
70 | path: '/dictionary/reservation', | ||
71 | name: 'reservation', | ||
72 | component: () => import('@/views/dictionary/reservation'), | ||
73 | meta: { | ||
74 | title: '预约明细', | ||
75 | icon: '' | ||
76 | } | ||
77 | }, | ||
74 | { | 78 | { |
75 | path: 'table', | 79 | path: '/dictionary/pvpage', |
76 | name: 'Table', | 80 | name: 'pvpage', |
77 | component: () => import('@/views/table/index'), | 81 | component: () => import('@/views/dictionary/pvpage'), |
78 | meta: { title: 'Table', icon: 'table' } | 82 | meta: { |
83 | title: '页面访问明细', | ||
84 | icon: '' | ||
85 | } | ||
79 | }, | 86 | }, |
80 | { | 87 | { |
81 | path: 'tree', | 88 | path: '/dictionary/pvproduct', |
82 | name: 'Tree', | 89 | name: 'pvproduct', |
83 | component: () => import('@/views/tree/index'), | 90 | component: () => import('@/views/dictionary/pvproduct'), |
84 | meta: { title: 'Tree', icon: 'tree' } | 91 | meta: { |
85 | } | 92 | title: '产品访问明细', |
93 | icon: '' | ||
94 | } | ||
95 | }, | ||
86 | ] | 96 | ] |
87 | },*/ | 97 | }, |
88 | |||
89 | |||
90 | /* | ||
91 | 98 | ||
92 | { | 99 | { |
93 | path: '/nested', | 100 | path: '/calculator', |
94 | component: Layout, | 101 | component: Layout, |
95 | redirect: '/nested/menu1', | 102 | redirect: '/calculator/pvpage', |
96 | name: 'Nested', | 103 | name: 'dictionary', |
97 | meta: { | 104 | meta: { |
98 | title: 'Nested', | 105 | title: '天宝计算器', |
99 | icon: 'nested' | 106 | icon: 'nested' |
100 | }, | 107 | }, |
101 | children: [ | 108 | children: [ |
102 | { | 109 | { |
103 | path: 'menu1', | 110 | path: '/calculator/pvpage', |
104 | component: () => import('@/views/nested/menu1/index'), // Parent router-view | 111 | name: 'pvpage', |
105 | name: 'Menu1', | 112 | component: () => import('@/views/calculator/pvpage'), |
106 | meta: { title: 'Menu1' }, | 113 | meta: { |
107 | children: [ | 114 | title: '页面访问明细', |
108 | { | 115 | icon: '' |
109 | path: 'menu1-1', | 116 | } |
110 | component: () => import('@/views/nested/menu1/menu1-1'), | ||
111 | name: 'Menu1-1', | ||
112 | meta: { title: 'Menu1-1' } | ||
113 | }, | ||
114 | { | ||
115 | path: 'menu1-2', | ||
116 | component: () => import('@/views/nested/menu1/menu1-2'), | ||
117 | name: 'Menu1-2', | ||
118 | meta: { title: 'Menu1-2' }, | ||
119 | children: [ | ||
120 | { | ||
121 | path: 'menu1-2-1', | ||
122 | component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'), | ||
123 | name: 'Menu1-2-1', | ||
124 | meta: { title: 'Menu1-2-1' } | ||
125 | }, | ||
126 | { | ||
127 | path: 'menu1-2-2', | ||
128 | component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'), | ||
129 | name: 'Menu1-2-2', | ||
130 | meta: { title: 'Menu1-2-2' } | ||
131 | } | ||
132 | ] | ||
133 | }, | ||
134 | { | ||
135 | path: 'menu1-3', | ||
136 | component: () => import('@/views/nested/menu1/menu1-3'), | ||
137 | name: 'Menu1-3', | ||
138 | meta: { title: 'Menu1-3' } | ||
139 | } | ||
140 | ] | ||
141 | }, | 117 | }, |
142 | { | 118 | { |
143 | path: 'menu2', | 119 | path: '/calculator/pvfunc', |
144 | component: () => import('@/views/nested/menu2/index'), | 120 | name: 'pvfunc', |
145 | meta: { title: 'menu2' } | 121 | component: () => import('@/views/calculator/pvfunc'), |
146 | } | 122 | meta: { |
123 | title: '功能访问明细', | ||
124 | icon: '' | ||
125 | } | ||
126 | }, | ||
147 | ] | 127 | ] |
148 | }, | 128 | }, |
149 | */ | 129 | |
130 | { | ||
131 | path: '/qrcode', | ||
132 | component: Layout, | ||
133 | children: [{ | ||
134 | path: 'index', | ||
135 | name: 'Qrcode', | ||
136 | component: () => import('@/views/scene/index'), | ||
137 | meta: { | ||
138 | title: '订阅信息', | ||
139 | icon: 'form' | ||
140 | } | ||
141 | }] | ||
142 | }, | ||
143 | |||
144 | |||
145 | // { | ||
146 | // path: '/example', | ||
147 | // component: Layout, | ||
148 | // redirect: '/example/table', | ||
149 | // name: 'Example', | ||
150 | // meta: { | ||
151 | // title: 'Example', | ||
152 | // icon: 'example' | ||
153 | // }, | ||
154 | // children: [{ | ||
155 | // path: 'table', | ||
156 | // name: 'Table', | ||
157 | // component: () => import('@/views/table/index'), | ||
158 | // meta: { | ||
159 | // title: 'Table', | ||
160 | // icon: 'table' | ||
161 | // } | ||
162 | // }, | ||
163 | // { | ||
164 | // path: 'tree', | ||
165 | // name: 'Tree', | ||
166 | // component: () => import('@/views/tree/index'), | ||
167 | // meta: { | ||
168 | // title: 'Tree', | ||
169 | // icon: 'tree' | ||
170 | // } | ||
171 | // } | ||
172 | // ] | ||
173 | // }, | ||
174 | |||
175 | // { | ||
176 | // path: '/nested', | ||
177 | // component: Layout, | ||
178 | // redirect: '/nested/menu1', | ||
179 | // name: 'Nested', | ||
180 | // meta: { | ||
181 | // title: 'Nested', | ||
182 | // icon: 'nested' | ||
183 | // }, | ||
184 | // children: [ | ||
185 | // { | ||
186 | // path: 'menu1', | ||
187 | // component: () => import('@/views/nested/menu1/index'), // Parent router-view | ||
188 | // name: 'Menu1', | ||
189 | // meta: { title: 'Menu1' }, | ||
190 | // children: [ | ||
191 | // { | ||
192 | // path: 'menu1-1', | ||
193 | // component: () => import('@/views/nested/menu1/menu1-1'), | ||
194 | // name: 'Menu1-1', | ||
195 | // meta: { title: 'Menu1-1' } | ||
196 | // }, | ||
197 | // { | ||
198 | // path: 'menu1-2', | ||
199 | // component: () => import('@/views/nested/menu1/menu1-2'), | ||
200 | // name: 'Menu1-2', | ||
201 | // meta: { title: 'Menu1-2' }, | ||
202 | // children: [ | ||
203 | // { | ||
204 | // path: 'menu1-2-1', | ||
205 | // component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'), | ||
206 | // name: 'Menu1-2-1', | ||
207 | // meta: { title: 'Menu1-2-1' } | ||
208 | // }, | ||
209 | // { | ||
210 | // path: 'menu1-2-2', | ||
211 | // component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'), | ||
212 | // name: 'Menu1-2-2', | ||
213 | // meta: { title: 'Menu1-2-2' } | ||
214 | // } | ||
215 | // ] | ||
216 | // }, | ||
217 | // { | ||
218 | // path: 'menu1-3', | ||
219 | // component: () => import('@/views/nested/menu1/menu1-3'), | ||
220 | // name: 'Menu1-3', | ||
221 | // meta: { title: 'Menu1-3' } | ||
222 | // } | ||
223 | // ] | ||
224 | // }, | ||
225 | // { | ||
226 | // path: 'menu2', | ||
227 | // component: () => import('@/views/nested/menu2/index'), | ||
228 | // meta: { title: 'menu2' } | ||
229 | // } | ||
230 | // ] | ||
231 | // }, | ||
150 | 232 | ||
151 | // { | 233 | // { |
152 | // path: 'external-link', | 234 | // path: 'external-link', |
... | @@ -159,11 +241,17 @@ export const constantRouterMap = [ | ... | @@ -159,11 +241,17 @@ export const constantRouterMap = [ |
159 | // ] | 241 | // ] |
160 | // }, | 242 | // }, |
161 | 243 | ||
162 | { path: '*', redirect: '/404', hidden: true } | 244 | { |
245 | path: '*', | ||
246 | redirect: '/404', | ||
247 | hidden: true | ||
248 | } | ||
163 | ] | 249 | ] |
164 | 250 | ||
165 | export default new Router({ | 251 | export default new Router({ |
166 | // mode: 'history', //后端支持可开 | 252 | // mode: 'history', //后端支持可开 |
167 | scrollBehavior: () => ({ y: 0 }), | 253 | scrollBehavior: () => ({ |
254 | y: 0 | ||
255 | }), | ||
168 | routes: constantRouterMap | 256 | routes: constantRouterMap |
169 | }) | 257 | }) | ... | ... |
src/views/calculator/pvfunc.vue
0 → 100644
1 | |||
2 | <template> | ||
3 | <div class="page-container"> | ||
4 | <div class="tool-wrap"> | ||
5 | <div> | ||
6 | <el-form :inline="true" :model="filters"> | ||
7 | <el-form-item> | ||
8 | <el-input @change="changeHandler()" v-model="filters.mobilePhone" placeholder="请输入使用功能"></el-input> | ||
9 | </el-form-item> | ||
10 | <el-form-item> | ||
11 | <el-date-picker @change="changeHandler()" v-model="filters.date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2"> | ||
12 | </el-date-picker> | ||
13 | </el-form-item> | ||
14 | <el-form-item> | ||
15 | <el-button type="primary" v-on:click="reqQuery">查询</el-button> | ||
16 | </el-form-item> | ||
17 | </el-form> | ||
18 | </div> | ||
19 | <div> | ||
20 | <el-button class="reset-btn" @click="showDialog()">导出数据</el-button> | ||
21 | </div> | ||
22 | </div> | ||
23 | |||
24 | <el-table :data="totalData.reservationList" highlight-current-row v-loading="listLoading" style="width: 100%;"> | ||
25 | <el-table-column prop="func_name" label="使用功能"> | ||
26 | </el-table-column> | ||
27 | <el-table-column prop="hdp_created" :formatter="formatTableDate" label="访问时间"> | ||
28 | </el-table-column> | ||
29 | <el-table-column prop="nickname" label="微信昵称"> | ||
30 | </el-table-column> | ||
31 | <el-table-column label="微信头像"> | ||
32 | <template slot-scope="scope"> | ||
33 | <div class="avatar-wrap"> | ||
34 | <img class="avatar" :src="scope.row.avatar" alt=""> | ||
35 | </div> | ||
36 | </template> | ||
37 | </el-table-column> | ||
38 | <el-table-column prop="openid" label="openid"> | ||
39 | </el-table-column> | ||
40 | |||
41 | </el-table> | ||
42 | |||
43 | <!--工具条--> | ||
44 | <el-col :span="24" class="toolbar"> | ||
45 | <div class="page-tips">总共{{total}}条记录,每页{{pageSize}}条,总共{{pageNum}}页</div> | ||
46 | <el-pagination layout="prev, pager, next,jumper" @current-change="handleCurrentChange" :page-size="pageSize" :total="total" style="float:right;"> | ||
47 | </el-pagination> | ||
48 | </el-col> | ||
49 | |||
50 | <el-dialog class="dialog" center title="导出数据设定" :visible.sync="exportDialogVisible" :close-on-click-modal="false"> | ||
51 | <span class="tips">导出日期</span> | ||
52 | <el-date-picker v-model="exportDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2"> | ||
53 | </el-date-picker> | ||
54 | <div slot="footer" class="dialog-footer"> | ||
55 | <el-button style="width:120px;" @click.native="exportDialogVisible = false">取消</el-button> | ||
56 | <el-button style="width:120px;" type="primary" @click.native="exportHandler()">导出</el-button> | ||
57 | </div> | ||
58 | </el-dialog> | ||
59 | |||
60 | </div> | ||
61 | </template> | ||
62 | |||
63 | <script> | ||
64 | import { Base64 } from "js-base64"; | ||
65 | import { exportTable } from "./../../api/api.js"; | ||
66 | import { formatDate } from "./../../common/utils.js"; | ||
67 | |||
68 | export default { | ||
69 | data() { | ||
70 | return { | ||
71 | exportDate: [ | ||
72 | new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), | ||
73 | new Date().getTime() | ||
74 | ], | ||
75 | exportDialogVisible: false, | ||
76 | listLoading: false, | ||
77 | page: 1, | ||
78 | pageSize: 10, | ||
79 | total: 0, | ||
80 | totalData: { | ||
81 | reservationList: [] | ||
82 | }, | ||
83 | selDate: [ | ||
84 | new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), | ||
85 | new Date() | ||
86 | ], | ||
87 | pickerOptions2: { | ||
88 | disabledDate(time) { | ||
89 | return time.getTime() > Date.now(); | ||
90 | } | ||
91 | }, | ||
92 | filters: { | ||
93 | mobilePhone: "", | ||
94 | date: "" | ||
95 | } | ||
96 | }; | ||
97 | }, | ||
98 | computed: { | ||
99 | pageNum() { | ||
100 | return Math.ceil(this.total / this.pageSize); | ||
101 | }, | ||
102 | startTime() { | ||
103 | let date = this.filters.date; | ||
104 | let result = (date && date[0]) || ""; | ||
105 | if (result) { | ||
106 | result = date[0].getTime(); | ||
107 | } | ||
108 | return result; | ||
109 | }, | ||
110 | endTime() { | ||
111 | let date = this.filters.date; | ||
112 | let result = (date && date[1]) || ""; | ||
113 | if (result) { | ||
114 | result = date[1].getTime() + 1000 * 60 * 60 * 24; | ||
115 | } | ||
116 | return result; | ||
117 | } | ||
118 | }, | ||
119 | methods: { | ||
120 | changeHandler() { | ||
121 | this.reqQuery(); | ||
122 | }, | ||
123 | exportHandler() { | ||
124 | let data = { | ||
125 | start_time: new Date(this.exportDate[0]).getTime(), | ||
126 | end_time: new Date(this.exportDate[1]).getTime() + 1000 * 60 * 60 * 24, | ||
127 | mobile_phone: "", | ||
128 | startIndex: 0, | ||
129 | size: 1000000 | ||
130 | }; | ||
131 | var encoder = HDP.getEncoder(); | ||
132 | var encrypted = encoder.encode(JSON.stringify(data)); | ||
133 | let params = { | ||
134 | appId: "0489fba68acd11e98c527cd30aeb749e", | ||
135 | appKey: "9524a3c59a5d4460bd141a2a93a5db17", | ||
136 | func: "queryStatFuncListAppjqos", | ||
137 | data: encrypted | ||
138 | }; | ||
139 | exportTable(params); | ||
140 | }, | ||
141 | showDialog() { | ||
142 | this.exportDialogVisible = true; | ||
143 | }, | ||
144 | formatTableDate(row, column) { | ||
145 | return formatDate.format(new Date(row.hdp_created), "yyyy-MM-dd hh:mm"); | ||
146 | }, | ||
147 | handleCurrentChange(val) { | ||
148 | this.page = val; | ||
149 | this.reqQuery(); | ||
150 | }, | ||
151 | reqQuery() { | ||
152 | let _this = this; | ||
153 | _this.listLoading = true; | ||
154 | let data = { | ||
155 | startIndex: (this.page - 1) * this.pageSize, | ||
156 | size: this.pageSize, | ||
157 | query: this.filters.mobilePhone, | ||
158 | start_time: this.startTime, | ||
159 | end_time: this.endTime | ||
160 | }; | ||
161 | as.queryFunV2("queryStatFuncListAppjqos", data, res => { | ||
162 | _this.page = 1; | ||
163 | _this.listLoading = false; | ||
164 | if (res) { | ||
165 | let reservationList = res[0]; | ||
166 | let total = res[1][0].total; | ||
167 | _this.total = total; | ||
168 | _this.$set(_this.totalData, "reservationList", reservationList); | ||
169 | } | ||
170 | }); | ||
171 | } | ||
172 | }, | ||
173 | mounted() { | ||
174 | this.reqQuery(); | ||
175 | }, | ||
176 | created() {} | ||
177 | }; | ||
178 | </script> | ||
179 | |||
180 | <style lang="scss" scoped> | ||
181 | .page-container { | ||
182 | padding: 20px; | ||
183 | } | ||
184 | |||
185 | .tool-wrap { | ||
186 | padding: 24px 0; | ||
187 | display: flex; | ||
188 | border-bottom: solid 1px #cccccc; | ||
189 | justify-content: space-between; | ||
190 | } | ||
191 | |||
192 | .toolbar { | ||
193 | display: flex; | ||
194 | justify-content: space-between; | ||
195 | .page-tips { | ||
196 | height: 32px; | ||
197 | line-height: 32px; | ||
198 | color: #333333; | ||
199 | } | ||
200 | } | ||
201 | |||
202 | .dialog { | ||
203 | .tips { | ||
204 | margin-right: 24px; | ||
205 | } | ||
206 | } | ||
207 | </style> |
src/views/calculator/pvpage.vue
0 → 100644
1 | |||
2 | <template> | ||
3 | <div class="page-container"> | ||
4 | <div class="tool-wrap"> | ||
5 | <div> | ||
6 | <el-form :inline="true" :model="filters"> | ||
7 | <el-form-item> | ||
8 | <el-input @change="changeHandler()" v-model="filters.mobilePhone" placeholder="请输入访问页面"></el-input> | ||
9 | </el-form-item> | ||
10 | <el-form-item> | ||
11 | <el-date-picker @change="changeHandler()" v-model="filters.date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2"> | ||
12 | </el-date-picker> | ||
13 | </el-form-item> | ||
14 | <el-form-item> | ||
15 | <el-button type="primary" v-on:click="reqQuery">查询</el-button> | ||
16 | </el-form-item> | ||
17 | </el-form> | ||
18 | </div> | ||
19 | <div> | ||
20 | <el-button class="reset-btn" @click="showDialog()">导出数据</el-button> | ||
21 | </div> | ||
22 | </div> | ||
23 | |||
24 | <el-table :data="totalData.reservationList" highlight-current-row v-loading="listLoading" style="width: 100%;"> | ||
25 | <el-table-column prop="page_name" label="访问页面"> | ||
26 | </el-table-column> | ||
27 | <el-table-column prop="hdp_created" :formatter="formatTableDate" label="访问时间"> | ||
28 | </el-table-column> | ||
29 | <el-table-column prop="nickname" label="微信昵称"> | ||
30 | </el-table-column> | ||
31 | <el-table-column label="微信头像"> | ||
32 | <template slot-scope="scope"> | ||
33 | <div class="avatar-wrap"> | ||
34 | <img class="avatar" :src="scope.row.avatar" alt=""> | ||
35 | </div> | ||
36 | </template> | ||
37 | </el-table-column> | ||
38 | <el-table-column prop="openid" label="openid"> | ||
39 | </el-table-column> | ||
40 | |||
41 | </el-table> | ||
42 | |||
43 | <!--工具条--> | ||
44 | <el-col :span="24" class="toolbar"> | ||
45 | <div class="page-tips">总共{{total}}条记录,每页{{pageSize}}条,总共{{pageNum}}页</div> | ||
46 | <el-pagination layout="prev, pager, next,jumper" @current-change="handleCurrentChange" :page-size="pageSize" :total="total" style="float:right;"> | ||
47 | </el-pagination> | ||
48 | </el-col> | ||
49 | |||
50 | <el-dialog class="dialog" center title="导出数据设定" :visible.sync="exportDialogVisible" :close-on-click-modal="false"> | ||
51 | <span class="tips">导出日期</span> | ||
52 | <el-date-picker v-model="exportDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2"> | ||
53 | </el-date-picker> | ||
54 | <div slot="footer" class="dialog-footer"> | ||
55 | <el-button style="width:120px;" @click.native="exportDialogVisible = false">取消</el-button> | ||
56 | <el-button style="width:120px;" type="primary" @click.native="exportHandler()">导出</el-button> | ||
57 | </div> | ||
58 | </el-dialog> | ||
59 | |||
60 | </div> | ||
61 | </template> | ||
62 | |||
63 | <script> | ||
64 | import { Base64 } from "js-base64"; | ||
65 | import { exportTable } from "./../../api/api.js"; | ||
66 | import { formatDate } from "./../../common/utils.js"; | ||
67 | |||
68 | export default { | ||
69 | data() { | ||
70 | return { | ||
71 | exportDate: [ | ||
72 | new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), | ||
73 | new Date().getTime() | ||
74 | ], | ||
75 | exportDialogVisible: false, | ||
76 | listLoading: false, | ||
77 | page: 1, | ||
78 | pageSize: 10, | ||
79 | total: 0, | ||
80 | totalData: { | ||
81 | reservationList: [] | ||
82 | }, | ||
83 | selDate: [ | ||
84 | new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), | ||
85 | new Date() | ||
86 | ], | ||
87 | pickerOptions2: { | ||
88 | disabledDate(time) { | ||
89 | return time.getTime() > Date.now(); | ||
90 | } | ||
91 | }, | ||
92 | filters: { | ||
93 | mobilePhone: "", | ||
94 | date: "" | ||
95 | } | ||
96 | }; | ||
97 | }, | ||
98 | computed: { | ||
99 | pageNum() { | ||
100 | return Math.ceil(this.total / this.pageSize); | ||
101 | }, | ||
102 | startTime() { | ||
103 | let date = this.filters.date; | ||
104 | let result = (date && date[0]) || ""; | ||
105 | if (result) { | ||
106 | result = date[0].getTime(); | ||
107 | } | ||
108 | return result; | ||
109 | }, | ||
110 | endTime() { | ||
111 | let date = this.filters.date; | ||
112 | let result = (date && date[1]) || ""; | ||
113 | if (result) { | ||
114 | result = date[1].getTime() + 1000 * 60 * 60 * 24; | ||
115 | } | ||
116 | return result; | ||
117 | } | ||
118 | }, | ||
119 | methods: { | ||
120 | changeHandler() { | ||
121 | this.reqQuery(); | ||
122 | }, | ||
123 | exportHandler() { | ||
124 | let data = { | ||
125 | start_time: new Date(this.exportDate[0]).getTime(), | ||
126 | end_time: new Date(this.exportDate[1]).getTime() + 1000 * 60 * 60 * 24, | ||
127 | mobile_phone: "", | ||
128 | startIndex: 0, | ||
129 | size: 1000000 | ||
130 | }; | ||
131 | var encoder = HDP.getEncoder(); | ||
132 | var encrypted = encoder.encode(JSON.stringify(data)); | ||
133 | let params = { | ||
134 | appId: "0489fba68acd11e98c527cd30aeb749e", | ||
135 | appKey: "9524a3c59a5d4460bd141a2a93a5db17", | ||
136 | func: "queryStatPageListAppjqos", | ||
137 | data: encrypted | ||
138 | }; | ||
139 | exportTable(params); | ||
140 | }, | ||
141 | showDialog() { | ||
142 | this.exportDialogVisible = true; | ||
143 | }, | ||
144 | formatTableDate(row, column) { | ||
145 | return formatDate.format(new Date(row.hdp_created), "yyyy-MM-dd hh:mm"); | ||
146 | }, | ||
147 | handleCurrentChange(val) { | ||
148 | this.page = val; | ||
149 | this.reqQuery(); | ||
150 | }, | ||
151 | reqQuery() { | ||
152 | let _this = this; | ||
153 | _this.listLoading = true; | ||
154 | let data = { | ||
155 | startIndex: (this.page - 1) * this.pageSize, | ||
156 | size: this.pageSize, | ||
157 | query: this.filters.mobilePhone, | ||
158 | start_time: this.startTime, | ||
159 | end_time: this.endTime | ||
160 | }; | ||
161 | as.queryFunV2("queryStatPageListAppjqos", data, res => { | ||
162 | _this.page = 1; | ||
163 | _this.listLoading = false; | ||
164 | if (res) { | ||
165 | let reservationList = res[0]; | ||
166 | let total = res[1][0].total; | ||
167 | _this.total = total; | ||
168 | _this.$set(_this.totalData, "reservationList", reservationList); | ||
169 | } | ||
170 | }); | ||
171 | } | ||
172 | }, | ||
173 | mounted() { | ||
174 | this.reqQuery(); | ||
175 | }, | ||
176 | created() {} | ||
177 | }; | ||
178 | </script> | ||
179 | |||
180 | <style lang="scss" scoped> | ||
181 | .page-container { | ||
182 | padding: 20px; | ||
183 | } | ||
184 | |||
185 | .tool-wrap { | ||
186 | padding: 24px 0; | ||
187 | display: flex; | ||
188 | border-bottom: solid 1px #cccccc; | ||
189 | justify-content: space-between; | ||
190 | } | ||
191 | |||
192 | .toolbar { | ||
193 | display: flex; | ||
194 | justify-content: space-between; | ||
195 | .page-tips { | ||
196 | height: 32px; | ||
197 | line-height: 32px; | ||
198 | color: #333333; | ||
199 | } | ||
200 | } | ||
201 | |||
202 | .dialog { | ||
203 | .tips { | ||
204 | margin-right: 24px; | ||
205 | } | ||
206 | } | ||
207 | </style> |
src/views/dictionary/pvpage.vue
0 → 100644
1 | |||
2 | <template> | ||
3 | <div class="page-container"> | ||
4 | <div class="tool-wrap"> | ||
5 | <div> | ||
6 | <el-form :inline="true" :model="filters"> | ||
7 | <el-form-item> | ||
8 | <el-input @change="changeHandler()" v-model="filters.mobilePhone" placeholder="请输入访问页面"></el-input> | ||
9 | </el-form-item> | ||
10 | <el-form-item> | ||
11 | <el-date-picker @change="changeHandler()" v-model="filters.date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2"> | ||
12 | </el-date-picker> | ||
13 | </el-form-item> | ||
14 | <el-form-item> | ||
15 | <el-button type="primary" v-on:click="reqQuery">查询</el-button> | ||
16 | </el-form-item> | ||
17 | </el-form> | ||
18 | </div> | ||
19 | <div> | ||
20 | <el-button class="reset-btn" @click="showDialog()">导出数据</el-button> | ||
21 | </div> | ||
22 | </div> | ||
23 | |||
24 | <el-table :data="totalData.reservationList" highlight-current-row v-loading="listLoading" style="width: 100%;"> | ||
25 | <el-table-column prop="page_name" label="访问页面"> | ||
26 | </el-table-column> | ||
27 | <el-table-column prop="hdp_created" :formatter="formatTableDate" label="访问时间"> | ||
28 | </el-table-column> | ||
29 | <el-table-column prop="nickname" label="微信昵称"> | ||
30 | </el-table-column> | ||
31 | <el-table-column label="微信头像"> | ||
32 | <template slot-scope="scope"> | ||
33 | <div class="avatar-wrap"> | ||
34 | <img class="avatar" :src="scope.row.avatar" alt=""> | ||
35 | </div> | ||
36 | </template> | ||
37 | </el-table-column> | ||
38 | <el-table-column prop="openid" label="openid"> | ||
39 | </el-table-column> | ||
40 | |||
41 | </el-table> | ||
42 | |||
43 | <!--工具条--> | ||
44 | <el-col :span="24" class="toolbar"> | ||
45 | <div class="page-tips">总共{{total}}条记录,每页{{pageSize}}条,总共{{pageNum}}页</div> | ||
46 | <el-pagination layout="prev, pager, next,jumper" @current-change="handleCurrentChange" :page-size="pageSize" :total="total" style="float:right;"> | ||
47 | </el-pagination> | ||
48 | </el-col> | ||
49 | |||
50 | <el-dialog class="dialog" center title="导出数据设定" :visible.sync="exportDialogVisible" :close-on-click-modal="false"> | ||
51 | <span class="tips">导出日期</span> | ||
52 | <el-date-picker v-model="exportDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2"> | ||
53 | </el-date-picker> | ||
54 | <div slot="footer" class="dialog-footer"> | ||
55 | <el-button style="width:120px;" @click.native="exportDialogVisible = false">取消</el-button> | ||
56 | <el-button style="width:120px;" type="primary" @click.native="exportHandler()">导出</el-button> | ||
57 | </div> | ||
58 | </el-dialog> | ||
59 | |||
60 | </div> | ||
61 | </template> | ||
62 | |||
63 | <script> | ||
64 | import { Base64 } from "js-base64"; | ||
65 | import { exportTable } from "./../../api/api.js"; | ||
66 | import { formatDate } from "./../../common/utils.js"; | ||
67 | |||
68 | export default { | ||
69 | data() { | ||
70 | return { | ||
71 | exportDate: [ | ||
72 | new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), | ||
73 | new Date().getTime() | ||
74 | ], | ||
75 | exportDialogVisible: false, | ||
76 | listLoading: false, | ||
77 | page: 1, | ||
78 | pageSize: 10, | ||
79 | total: 0, | ||
80 | totalData: { | ||
81 | reservationList: [] | ||
82 | }, | ||
83 | selDate: [ | ||
84 | new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), | ||
85 | new Date() | ||
86 | ], | ||
87 | pickerOptions2: { | ||
88 | disabledDate(time) { | ||
89 | return time.getTime() > Date.now(); | ||
90 | } | ||
91 | }, | ||
92 | filters: { | ||
93 | mobilePhone: "", | ||
94 | date: "" | ||
95 | } | ||
96 | }; | ||
97 | }, | ||
98 | computed: { | ||
99 | pageNum() { | ||
100 | return Math.ceil(this.total / this.pageSize); | ||
101 | }, | ||
102 | startTime() { | ||
103 | let date = this.filters.date; | ||
104 | let result = (date && date[0]) || ""; | ||
105 | if (result) { | ||
106 | result = date[0].getTime(); | ||
107 | } | ||
108 | return result; | ||
109 | }, | ||
110 | endTime() { | ||
111 | let date = this.filters.date; | ||
112 | let result = (date && date[1]) || ""; | ||
113 | if (result) { | ||
114 | result = date[1].getTime() + 1000 * 60 * 60 * 24; | ||
115 | } | ||
116 | return result; | ||
117 | } | ||
118 | }, | ||
119 | methods: { | ||
120 | changeHandler() { | ||
121 | this.reqQuery(); | ||
122 | }, | ||
123 | exportHandler() { | ||
124 | let data = { | ||
125 | start_time: new Date(this.exportDate[0]).getTime(), | ||
126 | end_time: new Date(this.exportDate[1]).getTime() + 1000 * 60 * 60 * 24, | ||
127 | mobile_phone: "", | ||
128 | startIndex: 0, | ||
129 | size: 1000000 | ||
130 | }; | ||
131 | var encoder = HDP.getEncoder(); | ||
132 | var encrypted = encoder.encode(JSON.stringify(data)); | ||
133 | let params = { | ||
134 | appId: "0489fba68acd11e98c527cd30aeb749e", | ||
135 | appKey: "9524a3c59a5d4460bd141a2a93a5db17", | ||
136 | func: "queryStatPageList", | ||
137 | data: encrypted | ||
138 | }; | ||
139 | exportTable(params); | ||
140 | }, | ||
141 | showDialog() { | ||
142 | this.exportDialogVisible = true; | ||
143 | }, | ||
144 | formatTableDate(row, column) { | ||
145 | return formatDate.format(new Date(row.hdp_created), "yyyy-MM-dd hh:mm"); | ||
146 | }, | ||
147 | handleCurrentChange(val) { | ||
148 | this.page = val; | ||
149 | this.reqQuery(); | ||
150 | }, | ||
151 | reqQuery() { | ||
152 | let _this = this; | ||
153 | _this.listLoading = true; | ||
154 | let data = { | ||
155 | startIndex: (this.page - 1) * this.pageSize, | ||
156 | size: this.pageSize, | ||
157 | mobile_phone: this.filters.mobilePhone, | ||
158 | start_time: this.startTime, | ||
159 | end_time: this.endTime | ||
160 | }; | ||
161 | as.queryFunV2("queryStatPageList", data, res => { | ||
162 | _this.page = 1; | ||
163 | _this.listLoading = false; | ||
164 | if (res) { | ||
165 | let reservationList = res[0]; | ||
166 | let total = res[1][0].total; | ||
167 | _this.total = total; | ||
168 | _this.$set(_this.totalData, "reservationList", reservationList); | ||
169 | } | ||
170 | }); | ||
171 | } | ||
172 | }, | ||
173 | mounted() { | ||
174 | this.reqQuery(); | ||
175 | }, | ||
176 | created() {} | ||
177 | }; | ||
178 | </script> | ||
179 | |||
180 | <style lang="scss" scoped> | ||
181 | .page-container { | ||
182 | padding: 20px; | ||
183 | } | ||
184 | |||
185 | .tool-wrap { | ||
186 | padding: 24px 0; | ||
187 | display: flex; | ||
188 | border-bottom: solid 1px #cccccc; | ||
189 | justify-content: space-between; | ||
190 | } | ||
191 | |||
192 | .toolbar { | ||
193 | display: flex; | ||
194 | justify-content: space-between; | ||
195 | .page-tips { | ||
196 | height: 32px; | ||
197 | line-height: 32px; | ||
198 | color: #333333; | ||
199 | } | ||
200 | } | ||
201 | |||
202 | .dialog { | ||
203 | .tips { | ||
204 | margin-right: 24px; | ||
205 | } | ||
206 | } | ||
207 | </style> |
src/views/dictionary/pvproduct.vue
0 → 100644
1 | |||
2 | <template> | ||
3 | <div class="page-container"> | ||
4 | <div class="tool-wrap"> | ||
5 | <div> | ||
6 | <el-form :inline="true" :model="filters"> | ||
7 | <el-form-item> | ||
8 | <el-input @change="changeHandler()" v-model="filters.mobilePhone" placeholder="请输入访问产品"></el-input> | ||
9 | </el-form-item> | ||
10 | <el-form-item> | ||
11 | <el-date-picker @change="changeHandler()" v-model="filters.date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2"> | ||
12 | </el-date-picker> | ||
13 | </el-form-item> | ||
14 | <el-form-item> | ||
15 | <el-button type="primary" v-on:click="reqQuery">查询</el-button> | ||
16 | </el-form-item> | ||
17 | </el-form> | ||
18 | </div> | ||
19 | <div> | ||
20 | <el-button class="reset-btn" @click="showDialog()">导出数据</el-button> | ||
21 | </div> | ||
22 | </div> | ||
23 | |||
24 | <el-table :data="totalData.reservationList" highlight-current-row v-loading="listLoading" style="width: 100%;"> | ||
25 | <el-table-column prop="product_name" label="访问产品"> | ||
26 | </el-table-column> | ||
27 | <el-table-column prop="hdp_created" :formatter="formatTableDate" label="访问时间"> | ||
28 | </el-table-column> | ||
29 | <el-table-column prop="nickname" label="微信昵称"> | ||
30 | </el-table-column> | ||
31 | <el-table-column label="微信头像"> | ||
32 | <template slot-scope="scope"> | ||
33 | <div class="avatar-wrap"> | ||
34 | <img class="avatar" :src="scope.row.avatar" alt=""> | ||
35 | </div> | ||
36 | </template> | ||
37 | </el-table-column> | ||
38 | <el-table-column prop="openid" label="openid"> | ||
39 | </el-table-column> | ||
40 | |||
41 | </el-table> | ||
42 | |||
43 | <!--工具条--> | ||
44 | <el-col :span="24" class="toolbar"> | ||
45 | <div class="page-tips">总共{{total}}条记录,每页{{pageSize}}条,总共{{pageNum}}页</div> | ||
46 | <el-pagination layout="prev, pager, next,jumper" @current-change="handleCurrentChange" :page-size="pageSize" :total="total" style="float:right;"> | ||
47 | </el-pagination> | ||
48 | </el-col> | ||
49 | |||
50 | <el-dialog class="dialog" center title="导出数据设定" :visible.sync="exportDialogVisible" :close-on-click-modal="false"> | ||
51 | <span class="tips">导出日期</span> | ||
52 | <el-date-picker v-model="exportDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2"> | ||
53 | </el-date-picker> | ||
54 | <div slot="footer" class="dialog-footer"> | ||
55 | <el-button style="width:120px;" @click.native="exportDialogVisible = false">取消</el-button> | ||
56 | <el-button style="width:120px;" type="primary" @click.native="exportHandler()">导出</el-button> | ||
57 | </div> | ||
58 | </el-dialog> | ||
59 | |||
60 | </div> | ||
61 | </template> | ||
62 | |||
63 | <script> | ||
64 | import { Base64 } from "js-base64"; | ||
65 | import { exportTable } from "./../../api/api.js"; | ||
66 | import { formatDate } from "./../../common/utils.js"; | ||
67 | |||
68 | export default { | ||
69 | data() { | ||
70 | return { | ||
71 | exportDate: [ | ||
72 | new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), | ||
73 | new Date().getTime() | ||
74 | ], | ||
75 | exportDialogVisible: false, | ||
76 | listLoading: false, | ||
77 | page: 1, | ||
78 | pageSize: 10, | ||
79 | total: 0, | ||
80 | totalData: { | ||
81 | reservationList: [] | ||
82 | }, | ||
83 | selDate: [ | ||
84 | new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), | ||
85 | new Date() | ||
86 | ], | ||
87 | pickerOptions2: { | ||
88 | disabledDate(time) { | ||
89 | return time.getTime() > Date.now(); | ||
90 | } | ||
91 | }, | ||
92 | filters: { | ||
93 | mobilePhone: "", | ||
94 | date: "" | ||
95 | } | ||
96 | }; | ||
97 | }, | ||
98 | computed: { | ||
99 | pageNum() { | ||
100 | return Math.ceil(this.total / this.pageSize); | ||
101 | }, | ||
102 | startTime() { | ||
103 | let date = this.filters.date; | ||
104 | let result = (date && date[0]) || ""; | ||
105 | if (result) { | ||
106 | result = date[0].getTime(); | ||
107 | } | ||
108 | return result; | ||
109 | }, | ||
110 | endTime() { | ||
111 | let date = this.filters.date; | ||
112 | let result = (date && date[1]) || ""; | ||
113 | if (result) { | ||
114 | result = date[1].getTime() + 1000 * 60 * 60 * 24; | ||
115 | } | ||
116 | return result; | ||
117 | } | ||
118 | }, | ||
119 | methods: { | ||
120 | changeHandler() { | ||
121 | this.reqQuery(); | ||
122 | }, | ||
123 | exportHandler() { | ||
124 | let data = { | ||
125 | start_time: new Date(this.exportDate[0]).getTime(), | ||
126 | end_time: new Date(this.exportDate[1]).getTime() + 1000 * 60 * 60 * 24, | ||
127 | mobile_phone: "", | ||
128 | startIndex: 0, | ||
129 | size: 1000000 | ||
130 | }; | ||
131 | var encoder = HDP.getEncoder(); | ||
132 | var encrypted = encoder.encode(JSON.stringify(data)); | ||
133 | let params = { | ||
134 | appId: "0489fba68acd11e98c527cd30aeb749e", | ||
135 | appKey: "9524a3c59a5d4460bd141a2a93a5db17", | ||
136 | func: "queryStatProductList", | ||
137 | data: encrypted | ||
138 | }; | ||
139 | exportTable(params); | ||
140 | }, | ||
141 | showDialog() { | ||
142 | this.exportDialogVisible = true; | ||
143 | }, | ||
144 | formatTableDate(row, column) { | ||
145 | return formatDate.format(new Date(row.hdp_created), "yyyy-MM-dd hh:mm"); | ||
146 | }, | ||
147 | handleCurrentChange(val) { | ||
148 | this.page = val; | ||
149 | this.reqQuery(); | ||
150 | }, | ||
151 | reqQuery() { | ||
152 | let _this = this; | ||
153 | _this.listLoading = true; | ||
154 | let data = { | ||
155 | startIndex: (this.page - 1) * this.pageSize, | ||
156 | size: this.pageSize, | ||
157 | mobile_phone: this.filters.mobilePhone, | ||
158 | start_time: this.startTime, | ||
159 | end_time: this.endTime | ||
160 | }; | ||
161 | as.queryFunV2("queryStatProductList", data, res => { | ||
162 | _this.page = 1; | ||
163 | _this.listLoading = false; | ||
164 | if (res) { | ||
165 | let reservationList = res[0]; | ||
166 | let total = res[1][0].total; | ||
167 | _this.total = total; | ||
168 | _this.$set(_this.totalData, "reservationList", reservationList); | ||
169 | } | ||
170 | }); | ||
171 | } | ||
172 | }, | ||
173 | mounted() { | ||
174 | this.reqQuery(); | ||
175 | }, | ||
176 | created() {} | ||
177 | }; | ||
178 | </script> | ||
179 | |||
180 | <style lang="scss" scoped> | ||
181 | .page-container { | ||
182 | padding: 20px; | ||
183 | } | ||
184 | |||
185 | .tool-wrap { | ||
186 | padding: 24px 0; | ||
187 | display: flex; | ||
188 | border-bottom: solid 1px #cccccc; | ||
189 | justify-content: space-between; | ||
190 | } | ||
191 | |||
192 | .toolbar { | ||
193 | display: flex; | ||
194 | justify-content: space-between; | ||
195 | .page-tips { | ||
196 | height: 32px; | ||
197 | line-height: 32px; | ||
198 | color: #333333; | ||
199 | } | ||
200 | } | ||
201 | |||
202 | .dialog { | ||
203 | .tips { | ||
204 | margin-right: 24px; | ||
205 | } | ||
206 | } | ||
207 | </style> |
src/views/dictionary/reservation.vue
0 → 100644
1 | <template> | ||
2 | <div class="page-container"> | ||
3 | <div class="tool-wrap"> | ||
4 | <div> | ||
5 | <el-form :inline="true" :model="filters"> | ||
6 | <el-form-item> | ||
7 | <el-input @change="changeHandler()" v-model="filters.mobilePhone" placeholder="请输入手机号"></el-input> | ||
8 | </el-form-item> | ||
9 | <el-form-item> | ||
10 | <el-date-picker @change="changeHandler()" v-model="filters.date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2"> | ||
11 | </el-date-picker> | ||
12 | </el-form-item> | ||
13 | <el-form-item> | ||
14 | <el-button type="primary" v-on:click="reqQuery">查询</el-button> | ||
15 | </el-form-item> | ||
16 | </el-form> | ||
17 | </div> | ||
18 | <div> | ||
19 | <el-button class="reset-btn" @click="showDialog()">导出数据</el-button> | ||
20 | </div> | ||
21 | </div> | ||
22 | |||
23 | <el-table :data="totalData.reservationList" highlight-current-row v-loading="listLoading" style="width: 100%;"> | ||
24 | |||
25 | <el-table-column prop="product_name" label="产品名称"> | ||
26 | </el-table-column> | ||
27 | <el-table-column prop="advisory" label="申请类型"> | ||
28 | </el-table-column> | ||
29 | <el-table-column prop="name" label="姓名"> | ||
30 | </el-table-column> | ||
31 | <el-table-column prop="mobile" label="联系方式"> | ||
32 | </el-table-column> | ||
33 | <el-table-column prop="office" label="单位"> | ||
34 | </el-table-column> | ||
35 | <el-table-column prop="province" label="省份"> | ||
36 | </el-table-column> | ||
37 | <el-table-column prop="hdp_created" :formatter="formatTableDate" label="申请时间"> | ||
38 | </el-table-column> | ||
39 | <el-table-column prop="nickname" label="微信昵称"> | ||
40 | </el-table-column> | ||
41 | <el-table-column label="微信头像"> | ||
42 | <template slot-scope="scope"> | ||
43 | <div class="avatar-wrap"> | ||
44 | <img class="avatar" :src="scope.row.avatar" alt=""> | ||
45 | </div> | ||
46 | </template> | ||
47 | </el-table-column> | ||
48 | <el-table-column prop="openid" label="openid"> | ||
49 | </el-table-column> | ||
50 | |||
51 | </el-table> | ||
52 | |||
53 | <!--工具条--> | ||
54 | <el-col :span="24" class="toolbar"> | ||
55 | <div class="page-tips">总共{{total}}条记录,每页{{pageSize}}条,总共{{pageNum}}页</div> | ||
56 | <el-pagination layout="prev, pager, next,jumper" @current-change="handleCurrentChange" :page-size="pageSize" :total="total" style="float:right;"> | ||
57 | </el-pagination> | ||
58 | </el-col> | ||
59 | |||
60 | <el-dialog class="dialog" center title="导出数据设定" :visible.sync="exportDialogVisible" :close-on-click-modal="false"> | ||
61 | <span class="tips">导出日期</span> | ||
62 | <el-date-picker v-model="exportDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2"> | ||
63 | </el-date-picker> | ||
64 | <div slot="footer" class="dialog-footer"> | ||
65 | <el-button style="width:120px;" @click.native="exportDialogVisible = false">取消</el-button> | ||
66 | <el-button style="width:120px;" type="primary" @click.native="exportHandler()">导出</el-button> | ||
67 | </div> | ||
68 | </el-dialog> | ||
69 | |||
70 | </div> | ||
71 | </template> | ||
72 | |||
73 | <script> | ||
74 | import { Base64 } from "js-base64"; | ||
75 | import { exportTable } from "./../../api/api.js"; | ||
76 | import { formatDate } from "./../../common/utils.js"; | ||
77 | |||
78 | export default { | ||
79 | data() { | ||
80 | return { | ||
81 | exportDate: [ | ||
82 | new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), | ||
83 | new Date().getTime() | ||
84 | ], | ||
85 | exportDialogVisible: false, | ||
86 | listLoading: false, | ||
87 | page: 1, | ||
88 | pageSize: 10, | ||
89 | total: 0, | ||
90 | totalData: { | ||
91 | reservationList: [] | ||
92 | }, | ||
93 | selDate: [ | ||
94 | new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 7), | ||
95 | new Date() | ||
96 | ], | ||
97 | pickerOptions2: { | ||
98 | disabledDate(time) { | ||
99 | return time.getTime() > Date.now(); | ||
100 | } | ||
101 | }, | ||
102 | filters: { | ||
103 | mobilePhone: "", | ||
104 | date: "" | ||
105 | } | ||
106 | }; | ||
107 | }, | ||
108 | computed: { | ||
109 | pageNum() { | ||
110 | return Math.ceil(this.total / this.pageSize); | ||
111 | }, | ||
112 | startTime() { | ||
113 | let date = this.filters.date; | ||
114 | let result = (date && date[0]) || ""; | ||
115 | if (result) { | ||
116 | result = date[0].getTime(); | ||
117 | } | ||
118 | return result; | ||
119 | }, | ||
120 | endTime() { | ||
121 | let date = this.filters.date; | ||
122 | let result = (date && date[1]) || ""; | ||
123 | if (result) { | ||
124 | result = date[1].getTime() + 1000 * 60 * 60 * 24; | ||
125 | } | ||
126 | return result; | ||
127 | } | ||
128 | }, | ||
129 | methods: { | ||
130 | changeHandler() { | ||
131 | this.reqQuery(); | ||
132 | }, | ||
133 | exportHandler() { | ||
134 | let data = { | ||
135 | start_time: new Date(this.exportDate[0]).getTime(), | ||
136 | end_time: new Date(this.exportDate[1]).getTime() + 1000 * 60 * 60 * 24, | ||
137 | mobile_phone: "", | ||
138 | startIndex: 0, | ||
139 | size: 1000000 | ||
140 | }; | ||
141 | var encoder = HDP.getEncoder(); | ||
142 | var encrypted = encoder.encode(JSON.stringify(data)); | ||
143 | let params = { | ||
144 | appId: "0489fba68acd11e98c527cd30aeb749e", | ||
145 | appKey: "9524a3c59a5d4460bd141a2a93a5db17", | ||
146 | func: "queryInquiryList", | ||
147 | data: encrypted | ||
148 | }; | ||
149 | exportTable(params); | ||
150 | }, | ||
151 | showDialog() { | ||
152 | this.exportDialogVisible = true; | ||
153 | }, | ||
154 | formatTableDate(row, column) { | ||
155 | return formatDate.format(new Date(row.hdp_created), "yyyy-MM-dd hh:mm"); | ||
156 | }, | ||
157 | handleCurrentChange(val) { | ||
158 | this.page = val; | ||
159 | this.reqQuery(); | ||
160 | }, | ||
161 | reqQuery() { | ||
162 | let _this = this; | ||
163 | _this.listLoading = true; | ||
164 | let data = { | ||
165 | startIndex: (this.page - 1) * this.pageSize, | ||
166 | size: this.pageSize, | ||
167 | mobile_phone: this.filters.mobilePhone, | ||
168 | start_time: this.startTime, | ||
169 | end_time: this.endTime | ||
170 | }; | ||
171 | as.queryFunV2("queryInquiryList", data, res => { | ||
172 | console.log("queryInquiryList res:", res); | ||
173 | _this.page = 1; | ||
174 | _this.listLoading = false; | ||
175 | if (res) { | ||
176 | let reservationList = res[0]; | ||
177 | let total = res[1][0].total; | ||
178 | _this.total = total; | ||
179 | _this.$set(_this.totalData, "reservationList", reservationList); | ||
180 | } | ||
181 | }); | ||
182 | } | ||
183 | }, | ||
184 | mounted() { | ||
185 | this.reqQuery(); | ||
186 | }, | ||
187 | created() {} | ||
188 | }; | ||
189 | </script> | ||
190 | |||
191 | <style lang="scss" scoped> | ||
192 | .page-container { | ||
193 | padding: 20px; | ||
194 | } | ||
195 | |||
196 | .tool-wrap { | ||
197 | padding: 24px 0; | ||
198 | display: flex; | ||
199 | border-bottom: solid 1px #cccccc; | ||
200 | justify-content: space-between; | ||
201 | } | ||
202 | |||
203 | .toolbar { | ||
204 | display: flex; | ||
205 | justify-content: space-between; | ||
206 | .page-tips { | ||
207 | height: 32px; | ||
208 | line-height: 32px; | ||
209 | color: #333333; | ||
210 | } | ||
211 | } | ||
212 | |||
213 | .dialog { | ||
214 | .tips { | ||
215 | margin-right: 24px; | ||
216 | } | ||
217 | } | ||
218 | </style> |
... | @@ -97,6 +97,7 @@ export default { | ... | @@ -97,6 +97,7 @@ export default { |
97 | .then(() => { | 97 | .then(() => { |
98 | this.loading = false | 98 | this.loading = false |
99 | this.$router.push({ path: this.redirect || '/' }) | 99 | this.$router.push({ path: this.redirect || '/' }) |
100 | // this.$router.push({ path: '/dictionary/pv' }) | ||
100 | }) | 101 | }) |
101 | .catch(() => { | 102 | .catch(() => { |
102 | this.loading = false | 103 | this.loading = false | ... | ... |
static/js/as.js
0 → 100644
This diff is collapsed.
Click to expand it.
static/js/hdp-4.4.0.min.js
0 → 100644
This diff could not be displayed because it is too large.
static/js/weixin-1.1.0.js
0 → 100644
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment