DmitrMakeev
commited on
Commit
•
606423d
1
Parent(s):
9b7de56
Update data_gc_tab.html
Browse files- data_gc_tab.html +318 -412
data_gc_tab.html
CHANGED
@@ -5,423 +5,329 @@
|
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
<title>WhatsCRM - Автопилот + Tilda + Бизон 365 + GetCurse</title>
|
7 |
|
8 |
-
|
9 |
-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
10 |
-
<script src="https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js"></script>
|
11 |
-
<script
|
12 |
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
|
13 |
-
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
|
19 |
-
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
<link href="https://unpkg.com/[email protected]/dist/css/tabulator.min.css" rel="stylesheet">
|
30 |
-
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/js/tabulator.min.js"></script>
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
35 |
<style>
|
36 |
-
body {
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
}
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
}
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
}
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
transition: width 0.3s ease;
|
146 |
-
}
|
147 |
-
|
148 |
-
.swal-button-custom {
|
149 |
-
background-color: #4CAF50;
|
150 |
-
font-size: 16px;
|
151 |
-
padding: 10px 20px;
|
152 |
-
}
|
153 |
-
|
154 |
-
.swal-title-custom {
|
155 |
-
font-size: 24px;
|
156 |
-
color: #333;
|
157 |
-
}
|
158 |
-
|
159 |
-
.swal-content-custom {
|
160 |
-
font-size: 16px;
|
161 |
-
color: #666;
|
162 |
-
}
|
163 |
-
|
164 |
-
</style>
|
165 |
</head>
|
166 |
-
|
167 |
<body>
|
168 |
-
<
|
169 |
<h1>WhatsCRM - Автопилот + Tilda + Бизон 365 + GetCurse</h1>
|
170 |
-
</
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
<
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
<
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
<
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
<
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
}
|
289 |
-
}
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
if (chatId.startsWith('@')) {
|
340 |
-
chatId = chatId.substring(1); // Удаление символа @ в начале
|
341 |
-
}
|
342 |
-
return `<a href="https://t.me/${chatId}" target="_blank">${chatId}</a>`;
|
343 |
-
}},
|
344 |
-
|
345 |
-
{title:"Вебинары-присутствовал", field:"web_st", formatter:"star", formatterParams:{stars:7}, hozAlign:"center", width:70},
|
346 |
-
{title:"Вебинары-досмотрел до конца", field:"b_fin", formatter:function(cell, formatterParams, onRendered){
|
347 |
-
var value = cell.getValue();
|
348 |
-
var icon;
|
349 |
-
if (value === 'True') {
|
350 |
-
icon = ' <img src="https://i.ibb.co/9sqNhYz/4-2.png" width="98" height="14" />'; // Иконка для активного статуса
|
351 |
-
} else {
|
352 |
-
icon = ''; // Пустая строка для неактивного статуса или если значение не определено
|
353 |
-
}
|
354 |
-
return icon;
|
355 |
-
}},
|
356 |
-
|
357 |
-
{title:"Прогрес по воронке", field:"fin_prog", formatter:"progress", formatterParams:{color:["#ff0000", "orange", "#00dd00"]}, sorter:"number", width:100},
|
358 |
-
{title:"pr1", field:"pr1"},
|
359 |
-
{title:"pr2", field:"pr2"},
|
360 |
-
{title:"pr3", field:"pr3"},
|
361 |
-
{title:"Канал трафика", field:"pr4"},
|
362 |
-
{title:"Дата", field:"pr5"},
|
363 |
-
{title:"Ключ PR", field:"key_pr"},
|
364 |
-
{title:"Канал", field:"canal"},
|
365 |
-
{title:"Дата", field:"data_t", width:150}
|
366 |
-
],
|
367 |
-
});
|
368 |
-
|
369 |
-
|
370 |
-
var fieldEl = document.getElementById("filter-field");
|
371 |
-
var typeEl = document.getElementById("filter-type");
|
372 |
-
var valueEl = document.getElementById("filter-value");
|
373 |
-
var fieldEl2 = document.getElementById("filter-field2");
|
374 |
-
var valueEl2 = document.getElementById("filter-value2");
|
375 |
-
|
376 |
-
function updateFilter() {
|
377 |
-
var filterVal1 = fieldEl.value;
|
378 |
-
var typeVal1 = typeEl.value;
|
379 |
-
var valueVal1 = valueEl.value;
|
380 |
-
|
381 |
-
var filterVal2 = fieldEl2.value;
|
382 |
-
var valueVal2 = valueEl2.value;
|
383 |
-
|
384 |
-
if (filterVal1 && filterVal2) {
|
385 |
-
table.setFilter([
|
386 |
-
{ field: filterVal1, type: typeVal1, value: valueVal1 },
|
387 |
-
{ field: filterVal2, type: "=", value: valueVal2 }
|
388 |
-
]);
|
389 |
}
|
390 |
-
}
|
391 |
-
|
392 |
-
document.getElementById("filter-field").addEventListener("change", updateFilter);
|
393 |
-
document.getElementById("filter-type").addEventListener("change", updateFilter);
|
394 |
-
document.getElementById("filter-value").addEventListener("keyup", updateFilter);
|
395 |
-
document.getElementById("filter-field2").addEventListener("change", updateFilter);
|
396 |
-
document.getElementById("filter-value2").addEventListener("keyup", updateFilter);
|
397 |
-
|
398 |
-
document.getElementById("filter-clear").addEventListener("click", function() {
|
399 |
-
fieldEl.value = "";
|
400 |
-
typeEl.value = "=";
|
401 |
-
valueEl.value = "";
|
402 |
-
fieldEl2.value = "";
|
403 |
-
valueEl2.value = "";
|
404 |
-
table.clearFilter();
|
405 |
});
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
}
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
|
|
|
|
|
|
|
|
425 |
</body>
|
426 |
-
|
427 |
-
</html>
|
|
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
<title>WhatsCRM - Автопилот + Tilda + Бизон 365 + GetCurse</title>
|
7 |
|
8 |
+
<!-- Подключение библиотек -->
|
9 |
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
10 |
+
<script src="https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js"></script>
|
11 |
+
<script src="https://vk.com/js/api/openapi.js?169"></script>
|
12 |
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
|
13 |
+
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
14 |
+
<link href="https://unpkg.com/[email protected]/dist/css/tabulator.min.css" rel="stylesheet">
|
15 |
+
<script src="https://unpkg.com/[email protected]/dist/js/tabulator.min.js"></script>
|
16 |
+
|
17 |
+
<!-- Стили -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
<style>
|
19 |
+
body {
|
20 |
+
font-family: Arial, sans-serif;
|
21 |
+
text-align: center;
|
22 |
+
background-color: #f0f0f0;
|
23 |
+
margin: 0;
|
24 |
+
padding: 0;
|
25 |
+
}
|
26 |
+
h1 {
|
27 |
+
background-color: #4CAF50;
|
28 |
+
color: white;
|
29 |
+
padding: 20px;
|
30 |
+
margin: 0;
|
31 |
+
border-bottom: 2px solid #388E3C;
|
32 |
+
font-size: 28px;
|
33 |
+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
34 |
+
}
|
35 |
+
button, #filter-clear, #download-json, #take-for-yourself {
|
36 |
+
color: white;
|
37 |
+
background-color: #4CAF50;
|
38 |
+
border: none;
|
39 |
+
cursor: pointer;
|
40 |
+
padding: 10px 20px;
|
41 |
+
font-size: 16px;
|
42 |
+
border-radius: 5px;
|
43 |
+
margin: 5px;
|
44 |
+
transition: background-color 0.3s ease;
|
45 |
+
}
|
46 |
+
button:hover, #filter-clear:hover, #download-json:hover, #take-for-yourself:hover {
|
47 |
+
background-color: #388E3C;
|
48 |
+
}
|
49 |
+
select, input {
|
50 |
+
padding: 10px;
|
51 |
+
font-size: 16px;
|
52 |
+
margin: 5px;
|
53 |
+
border-radius: 5px;
|
54 |
+
border: 1px solid #ccc;
|
55 |
+
background-color: #f0f0f0;
|
56 |
+
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
57 |
+
}
|
58 |
+
select:focus, input:focus {
|
59 |
+
border-color: #4CAF50;
|
60 |
+
box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
|
61 |
+
}
|
62 |
+
#filter-field option, #filter-type option, #filter-field2 option {
|
63 |
+
background-color: #f0f0f0;
|
64 |
+
color: #333;
|
65 |
+
}
|
66 |
+
#mediaContainer {
|
67 |
+
margin-top: 20px;
|
68 |
+
display: flex;
|
69 |
+
justify-content: center;
|
70 |
+
align-items: center;
|
71 |
+
flex-direction: column;
|
72 |
+
max-width: 100%;
|
73 |
+
height: auto;
|
74 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
75 |
+
border-radius: 10px;
|
76 |
+
padding: 20px;
|
77 |
+
background-color: white;
|
78 |
+
}
|
79 |
+
#mediaContainer img, #mediaContainer video {
|
80 |
+
max-width: 100%;
|
81 |
+
height: auto;
|
82 |
+
object-fit: contain;
|
83 |
+
border-radius: 10px;
|
84 |
+
}
|
85 |
+
#imageUrl {
|
86 |
+
margin-top: 20px;
|
87 |
+
font-size: 16px;
|
88 |
+
color: #333;
|
89 |
+
cursor: pointer;
|
90 |
+
text-decoration: underline;
|
91 |
+
transition: color 0.3s ease;
|
92 |
+
}
|
93 |
+
#imageUrl:hover {
|
94 |
+
color: #4CAF50;
|
95 |
+
}
|
96 |
+
#progressBarContainer {
|
97 |
+
width: 80%;
|
98 |
+
margin: 20px auto;
|
99 |
+
background-color: #ddd;
|
100 |
+
border-radius: 13px;
|
101 |
+
padding: 3px;
|
102 |
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
|
103 |
+
}
|
104 |
+
#progressBar {
|
105 |
+
width: 0%;
|
106 |
+
height: 20px;
|
107 |
+
background-color: #4CAF50;
|
108 |
+
border-radius: 10px;
|
109 |
+
text-align: center;
|
110 |
+
line-height: 20px;
|
111 |
+
color: white;
|
112 |
+
transition: width 0.3s ease;
|
113 |
+
}
|
114 |
+
.swal-button-custom {
|
115 |
+
background-color: #4CAF50;
|
116 |
+
font-size: 16px;
|
117 |
+
padding: 10px 20px;
|
118 |
+
}
|
119 |
+
.swal-title-custom {
|
120 |
+
font-size: 24px;
|
121 |
+
color: #333;
|
122 |
+
}
|
123 |
+
.swal-content-custom {
|
124 |
+
font-size: 16px;
|
125 |
+
color: #666;
|
126 |
+
}
|
127 |
+
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
</head>
|
|
|
129 |
<body>
|
130 |
+
<header>
|
131 |
<h1>WhatsCRM - Автопилот + Tilda + Бизон 365 + GetCurse</h1>
|
132 |
+
</header>
|
133 |
+
|
134 |
+
<main>
|
135 |
+
<div>
|
136 |
+
<select id="filter-field">
|
137 |
+
<option value="">Выберите поле</option>
|
138 |
+
<option value="id">Номер в списке</option>
|
139 |
+
<option value="name">Имя</option>
|
140 |
+
<option value="phone">WhatsApp</option>
|
141 |
+
<option value="email">Email</option>
|
142 |
+
<option value="b_mess">Реплики</option>
|
143 |
+
<option value="curator">Куратор</option>
|
144 |
+
<option value="shop_st">Статус покупки</option>
|
145 |
+
<option value="ad_url">Ссылка на пользователя в GC</option>
|
146 |
+
<option value="vk_id">Ссылка на VK</option>
|
147 |
+
<option value="chat_id">Ссылка на Tg</option>
|
148 |
+
<option value="ws_stop">Статус подписки</option>
|
149 |
+
<option value="web_st">Вебинары</option>
|
150 |
+
<option value="fin_prog">Прогресс по воронке</option>
|
151 |
+
<option value="pr1">pr1</option>
|
152 |
+
<option value="pr2">pr2</option>
|
153 |
+
<option value="pr3">pr3</option>
|
154 |
+
<option value="pr4">Канал трафика</option>
|
155 |
+
<option value="pr5">Дата</option>
|
156 |
+
<option value="key_pr">Ключ PR</option>
|
157 |
+
<option value="canal">Канал</option>
|
158 |
+
<option value="data_t">Дата</option>
|
159 |
+
</select>
|
160 |
+
|
161 |
+
<select id="filter-type">
|
162 |
+
<option value="=">=</option>
|
163 |
+
<option value="<"><</option>
|
164 |
+
<option value="<="><=</option>
|
165 |
+
<option value=">">></option>
|
166 |
+
<option value=">=">>=</option>
|
167 |
+
<option value="!=">!=</option>
|
168 |
+
<option value="like">like</option>
|
169 |
+
</select>
|
170 |
+
|
171 |
+
<input id="filter-value" type="text" placeholder="Значение фильтра">
|
172 |
+
|
173 |
+
<select id="filter-field2">
|
174 |
+
<option value="">Выберите поле</option>
|
175 |
+
<option value="id">Номер в списке</option>
|
176 |
+
<option value="name">Имя</option>
|
177 |
+
<option value="phone">WhatsApp</option>
|
178 |
+
<option value="email">Email</option>
|
179 |
+
<option value="b_mess">Реплики</option>
|
180 |
+
<option value="curator">Куратор</option>
|
181 |
+
<option value="shop_st">Статус покупки</option>
|
182 |
+
<option value="ad_url">Ссылка на пользователя в GC</option>
|
183 |
+
<option value="vk_id">Ссылка на VK</option>
|
184 |
+
<option value="chat_id">Ссылка на Tg</option>
|
185 |
+
<option value="ws_stop">Статус подписки</option>
|
186 |
+
<option value="web_st">Вебинары</option>
|
187 |
+
<option value="fin_prog">Прогресс по воронке</option>
|
188 |
+
<option value="pr1">pr1</option>
|
189 |
+
<option value="pr2">pr2</option>
|
190 |
+
<option value="pr3">pr3</option>
|
191 |
+
<option value="pr4">Канал трафика</option>
|
192 |
+
<option value="pr5">Дата</option>
|
193 |
+
<option value="key_pr">Ключ PR</option>
|
194 |
+
<option value="canal">Канал</option>
|
195 |
+
<option value="data_t">Дата</option>
|
196 |
+
</select>
|
197 |
+
|
198 |
+
<input id="filter-value2" type="text" placeholder="Значение фильтра 2">
|
199 |
+
|
200 |
+
<button id="filter-clear">Очистить фильтр</button>
|
201 |
+
<button id="download-json">Скачать JSON</button>
|
202 |
+
<button id="take-for-yourself">Возьми для себя</button>
|
203 |
+
</div>
|
204 |
+
|
205 |
+
<div id="mediaContainer">
|
206 |
+
<!-- Место для изображения или видео -->
|
207 |
+
<div id="mediaWrapper">
|
208 |
+
<!-- Изображение по умолчанию -->
|
209 |
+
<img id="media" src="" alt="Media" style="display: none;">
|
210 |
+
<!-- Видео по умолчанию -->
|
211 |
+
<video id="mediaVideo" controls style="display: none;">
|
212 |
+
<source id="mediaSource" src="" type="video/mp4">
|
213 |
+
Ваш браузер не поддерживает видео.
|
214 |
+
</video>
|
215 |
+
</div>
|
216 |
+
<div id="imageUrl"></div>
|
217 |
+
</div>
|
218 |
+
|
219 |
+
<div id="progressBarContainer">
|
220 |
+
<div id="progressBar">0%</div>
|
221 |
+
</div>
|
222 |
+
|
223 |
+
<!-- Таблица данных -->
|
224 |
+
<div id="data-table"></div>
|
225 |
+
</main>
|
226 |
+
|
227 |
+
<script>
|
228 |
+
$(document).ready(function() {
|
229 |
+
let data = [];
|
230 |
+
let table = new Tabulator("#data-table", {
|
231 |
+
data: data,
|
232 |
+
layout: "fitColumns",
|
233 |
+
columns: [
|
234 |
+
{ title: "ID", field: "id" },
|
235 |
+
{ title: "Имя", field: "name" },
|
236 |
+
{ title: "WhatsApp", field: "phone" },
|
237 |
+
{ title: "Email", field: "email" },
|
238 |
+
{ title: "Реплики", field: "b_mess" },
|
239 |
+
{ title: "Куратор", field: "curator" },
|
240 |
+
{ title: "Статус покупки", field: "shop_st" },
|
241 |
+
{ title: "Ссылка на пользователя в GC", field: "ad_url" },
|
242 |
+
{ title: "Ссылка на VK", field: "vk_id" },
|
243 |
+
{ title: "Ссылка на Tg", field: "chat_id" },
|
244 |
+
{ title: "Статус подписки", field: "ws_stop" },
|
245 |
+
{ title: "Вебинары", field: "web_st" },
|
246 |
+
{ title: "Прогресс по воронке", field: "fin_prog" },
|
247 |
+
{ title: "pr1", field: "pr1" },
|
248 |
+
{ title: "pr2", field: "pr2" },
|
249 |
+
{ title: "pr3", field: "pr3" },
|
250 |
+
{ title: "Канал трафика", field: "pr4" },
|
251 |
+
{ title: "Дата", field: "pr5" },
|
252 |
+
{ title: "Ключ PR", field: "key_pr" },
|
253 |
+
{ title: "Канал", field: "canal" },
|
254 |
+
{ title: "Дата", field: "data_t" }
|
255 |
+
]
|
256 |
+
});
|
257 |
+
|
258 |
+
// Обработка клика на кнопке "Очистить фильтр"
|
259 |
+
$('#filter-clear').click(function() {
|
260 |
+
$('#filter-field').val('');
|
261 |
+
$('#filter-type').val('=');
|
262 |
+
$('#filter-value').val('');
|
263 |
+
$('#filter-field2').val('');
|
264 |
+
$('#filter-value2').val('');
|
265 |
+
});
|
266 |
+
|
267 |
+
// Обработка клика на кнопке "Скачать JSON"
|
268 |
+
$('#download-json').click(function() {
|
269 |
+
let jsonData = JSON.stringify(data, null, 2);
|
270 |
+
let blob = new Blob([jsonData], { type: "application/json" });
|
271 |
+
let url = URL.createObjectURL(blob);
|
272 |
+
let a = document.createElement('a');
|
273 |
+
a.href = url;
|
274 |
+
a.download = 'data.json';
|
275 |
+
a.click();
|
276 |
+
URL.revokeObjectURL(url);
|
277 |
+
});
|
278 |
+
|
279 |
+
// Обработка клика на кнопке "Возьми для себя"
|
280 |
+
$('#take-for-yourself').click(function() {
|
281 |
+
Swal.fire({
|
282 |
+
title: 'Вы уверены?',
|
283 |
+
text: 'Вы собираетесь забрать эти данные для себя!',
|
284 |
+
icon: 'warning',
|
285 |
+
showCancelButton: true,
|
286 |
+
confirmButtonText: 'Да, забрать',
|
287 |
+
cancelButtonText: 'Отмена',
|
288 |
+
customClass: {
|
289 |
+
confirmButton: 'swal-button-custom',
|
290 |
+
title: 'swal-title-custom',
|
291 |
+
content: 'swal-content-custom',
|
292 |
+
}
|
293 |
+
}).then((result) => {
|
294 |
+
if (result.isConfirmed) {
|
295 |
+
// Логика для кнопки "Возьми для себя"
|
296 |
+
Swal.fire(
|
297 |
+
'Выполнено!',
|
298 |
+
'Данные забраны для себя.',
|
299 |
+
'success'
|
300 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
});
|
303 |
+
});
|
304 |
+
|
305 |
+
// Пример функции для обновления прогресс-бара
|
306 |
+
function updateProgressBar(percentage) {
|
307 |
+
$('#progressBar').css('width', percentage + '%').text(percentage + '%');
|
308 |
+
}
|
309 |
+
|
310 |
+
// Обновляем прогресс-бар на 50% как пример
|
311 |
+
updateProgressBar(50);
|
312 |
+
|
313 |
+
// Пример загрузки изображения
|
314 |
+
$('#imageUrl').click(function() {
|
315 |
+
let imageUrl = prompt('Введите URL изображения');
|
316 |
+
if (imageUrl) {
|
317 |
+
$('#media').attr('src', imageUrl).show();
|
318 |
+
$('#mediaVideo').hide();
|
319 |
+
$('#imageUrl').text(imageUrl);
|
320 |
}
|
321 |
+
});
|
322 |
+
|
323 |
+
// Пример загрузки видео
|
324 |
+
function loadVideo(videoUrl) {
|
325 |
+
$('#mediaVideo').show();
|
326 |
+
$('#media').hide();
|
327 |
+
$('#mediaSource').attr('src', videoUrl);
|
328 |
+
$('#mediaVideo')[0].load();
|
329 |
+
}
|
330 |
+
});
|
331 |
+
</script>
|
332 |
</body>
|
333 |
+
</html>
|
|