ts-glitter 13.3.5 → 13.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-blog.js +2 -7
- package/lowcode/backend-manager/bg-blog.ts +8 -13
- package/lowcode/backend-manager/bg-graph-api.js +6 -11
- package/lowcode/backend-manager/bg-graph-api.ts +14 -20
- package/lowcode/backend-manager/bg-line.js +526 -1002
- package/lowcode/backend-manager/bg-line.ts +1815 -2354
- package/lowcode/backend-manager/bg-notify.js +392 -746
- package/lowcode/backend-manager/bg-notify.ts +436 -835
- package/lowcode/backend-manager/bg-project.js +176 -293
- package/lowcode/backend-manager/bg-project.ts +214 -344
- package/lowcode/backend-manager/bg-recommend.js +39 -148
- package/lowcode/backend-manager/bg-recommend.ts +43 -162
- package/lowcode/backend-manager/bg-sns.js +489 -814
- package/lowcode/backend-manager/bg-sns.ts +1876 -2238
- package/lowcode/backend-manager/bg-widget.js +301 -171
- package/lowcode/backend-manager/bg-widget.ts +324 -193
- package/lowcode/cms-plugin/ai-points.js +84 -67
- package/lowcode/cms-plugin/ai-points.ts +280 -247
- package/lowcode/cms-plugin/auto-reply.js +6 -7
- package/lowcode/cms-plugin/auto-reply.ts +6 -7
- package/lowcode/cms-plugin/data-analyze.js +5 -6
- package/lowcode/cms-plugin/data-analyze.ts +5 -6
- package/lowcode/cms-plugin/form-setting.js +122 -220
- package/lowcode/cms-plugin/form-setting.ts +124 -240
- package/lowcode/cms-plugin/line-auto-reply.js +17 -18
- package/lowcode/cms-plugin/line-auto-reply.ts +29 -36
- package/lowcode/cms-plugin/member-group-list.js +5 -2
- package/lowcode/cms-plugin/member-group-list.ts +5 -2
- package/lowcode/cms-plugin/member-type-list.js +36 -84
- package/lowcode/cms-plugin/member-type-list.ts +39 -92
- package/lowcode/cms-plugin/menus-setting.js +8 -73
- package/lowcode/cms-plugin/menus-setting.ts +8 -78
- package/lowcode/cms-plugin/permission-setting.js +73 -106
- package/lowcode/cms-plugin/permission-setting.ts +236 -278
- package/lowcode/cms-plugin/shopping-collections.js +95 -137
- package/lowcode/cms-plugin/shopping-collections.ts +103 -147
- package/lowcode/cms-plugin/shopping-discount-setting.js +310 -416
- package/lowcode/cms-plugin/shopping-discount-setting.ts +1269 -1386
- package/lowcode/cms-plugin/shopping-finance-setting.js +1 -0
- package/lowcode/cms-plugin/shopping-finance-setting.ts +1 -0
- package/lowcode/cms-plugin/shopping-order-manager.js +742 -973
- package/lowcode/cms-plugin/shopping-order-manager.ts +1928 -2164
- package/lowcode/cms-plugin/shopping-order-return.js +147 -267
- package/lowcode/cms-plugin/shopping-order-return.ts +154 -292
- package/lowcode/cms-plugin/shopping-product-setting.js +6 -2
- package/lowcode/cms-plugin/shopping-product-setting.ts +8 -4
- package/lowcode/cms-plugin/shopping-product-stock.js +12 -92
- package/lowcode/cms-plugin/shopping-product-stock.ts +14 -94
- package/lowcode/cms-plugin/shopping-product-text.js +0 -3
- package/lowcode/cms-plugin/shopping-product-text.ts +0 -3
- package/lowcode/cms-plugin/shopping-rebate.js +95 -151
- package/lowcode/cms-plugin/shopping-rebate.ts +101 -159
- package/lowcode/cms-plugin/sms-points.js +83 -67
- package/lowcode/cms-plugin/sms-points.ts +281 -241
- package/lowcode/cms-plugin/sns-auto-reply.js +18 -18
- package/lowcode/cms-plugin/sns-auto-reply.ts +34 -40
- package/lowcode/cms-plugin/user-list.js +71 -90
- package/lowcode/cms-plugin/user-list.ts +76 -95
- package/lowcode/cms-plugin/web-config-setting.js +61 -111
- package/lowcode/cms-plugin/web-config-setting.ts +65 -124
- package/lowcode/css/editor.css +5 -2
- package/lowcode/glitter-base/route/shopping.js +1 -1
- package/lowcode/glitter-base/route/shopping.ts +19 -19
- package/lowcode/jspage/editor.js +1 -1
- package/lowcode/jspage/editor.ts +1 -1
- package/lowcode/jspage/main.js +4 -0
- package/lowcode/jspage/main.ts +4 -0
- package/package.json +1 -2
- package/src/api-public/controllers/ai-chat.js.map +5 -1
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/chat.js.map +1 -1
- package/src/api-public/controllers/fb-message.js.map +1 -1
- package/src/api-public/controllers/index.js.map +1 -1
- package/src/api-public/controllers/line-message.js.map +1 -1
- package/src/api-public/controllers/rebate.js.map +1 -1
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/chat.js +3 -3
- package/src/api-public/services/chat.js.map +1 -1
- package/src/api-public/services/chat.ts +2 -3
- package/src/api-public/services/fb-message.js.map +5 -1
- package/src/api-public/services/filter-protect-data.js.map +1 -1
- package/src/api-public/services/line-message.js.map +1 -1
- package/src/api-public/services/monitor.js.map +1 -1
- package/src/api-public/services/notify.js.map +1 -1
- package/src/api-public/services/rebate.js.map +1 -1
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/share-permission.js.map +1 -1
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/user.js +67 -66
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +212 -182
- package/src/helper/glitter-util.js.map +1 -1
- package/src/modules/firebase.d.ts +1 -0
- package/src/modules/firebase.js +1 -1
- package/src/modules/firebase.js.map +1 -1
|
@@ -61,7 +61,6 @@ export class UserList {
|
|
|
61
61
|
let vmi: any = undefined;
|
|
62
62
|
|
|
63
63
|
function getDatalist() {
|
|
64
|
-
// ok
|
|
65
64
|
return vm.dataList.map((dd: any) => {
|
|
66
65
|
return [
|
|
67
66
|
{
|
|
@@ -71,12 +70,10 @@ export class UserList {
|
|
|
71
70
|
{
|
|
72
71
|
key: '電子信箱',
|
|
73
72
|
value: `<span class="fs-7">${dd.userData.email}</span>`,
|
|
74
|
-
width: 25,
|
|
75
73
|
},
|
|
76
74
|
{
|
|
77
75
|
key: '訂單',
|
|
78
76
|
value: `<span class="fs-7">${dd.checkout_count} 筆</span>`,
|
|
79
|
-
width: 7,
|
|
80
77
|
},
|
|
81
78
|
{
|
|
82
79
|
key: '會員等級',
|
|
@@ -89,7 +86,6 @@ export class UserList {
|
|
|
89
86
|
{
|
|
90
87
|
key: '上次登入時間',
|
|
91
88
|
value: `<span class="fs-7">${glitter.ut.dateFormat(new Date(dd.online_time), 'yyyy-MM-dd hh:mm')}</span>`,
|
|
92
|
-
width: 15,
|
|
93
89
|
},
|
|
94
90
|
{
|
|
95
91
|
key: '用戶狀態',
|
|
@@ -100,8 +96,6 @@ export class UserList {
|
|
|
100
96
|
return html`<div class="badge bg-danger fs-7" style="max-height:34px;">已停用</div>`;
|
|
101
97
|
}
|
|
102
98
|
})(),
|
|
103
|
-
width: 8,
|
|
104
|
-
position: 'text-center',
|
|
105
99
|
},
|
|
106
100
|
];
|
|
107
101
|
});
|
|
@@ -306,7 +300,6 @@ export class UserList {
|
|
|
306
300
|
},
|
|
307
301
|
});
|
|
308
302
|
},
|
|
309
|
-
option: false,
|
|
310
303
|
},
|
|
311
304
|
],
|
|
312
305
|
});
|
|
@@ -366,7 +359,6 @@ export class UserList {
|
|
|
366
359
|
let vmi: any = undefined;
|
|
367
360
|
|
|
368
361
|
function getDatalist() {
|
|
369
|
-
// ok
|
|
370
362
|
return vm.dataList.map((dd: any) => {
|
|
371
363
|
return [
|
|
372
364
|
{
|
|
@@ -376,12 +368,10 @@ export class UserList {
|
|
|
376
368
|
{
|
|
377
369
|
key: '電子信箱',
|
|
378
370
|
value: `<span class="fs-7">${dd.userData.email}</span>`,
|
|
379
|
-
width: 25,
|
|
380
371
|
},
|
|
381
372
|
{
|
|
382
373
|
key: '訂單',
|
|
383
374
|
value: `<span class="fs-7">${dd.checkout_count} 筆</span>`,
|
|
384
|
-
width: 7,
|
|
385
375
|
},
|
|
386
376
|
{
|
|
387
377
|
key: '會員等級',
|
|
@@ -394,7 +384,6 @@ export class UserList {
|
|
|
394
384
|
{
|
|
395
385
|
key: '上次登入時間',
|
|
396
386
|
value: `<span class="fs-7">${glitter.ut.dateFormat(new Date(dd.online_time), 'yyyy-MM-dd hh:mm')}</span>`,
|
|
397
|
-
width: 15,
|
|
398
387
|
},
|
|
399
388
|
{
|
|
400
389
|
key: '用戶狀態',
|
|
@@ -405,8 +394,6 @@ export class UserList {
|
|
|
405
394
|
return html`<div class="badge bg-danger fs-7" style="max-height:34px;">已停用</div>`;
|
|
406
395
|
}
|
|
407
396
|
})(),
|
|
408
|
-
width: 8,
|
|
409
|
-
position: 'text-center',
|
|
410
397
|
},
|
|
411
398
|
];
|
|
412
399
|
});
|
|
@@ -539,7 +526,6 @@ export class UserList {
|
|
|
539
526
|
},
|
|
540
527
|
});
|
|
541
528
|
},
|
|
542
|
-
option: false,
|
|
543
529
|
},
|
|
544
530
|
],
|
|
545
531
|
});
|
|
@@ -683,12 +669,10 @@ export class UserList {
|
|
|
683
669
|
{
|
|
684
670
|
key: '訂單編號',
|
|
685
671
|
value: html` <div style="overflow: hidden;white-space: normal;color: #4D86DB;word-break: break-all;">${dd.orderData.orderID}</div>`,
|
|
686
|
-
width: 25,
|
|
687
672
|
},
|
|
688
673
|
{
|
|
689
674
|
key: '訂單日期',
|
|
690
675
|
value: html` <div style="overflow: hidden;white-space: normal;word-break: break-all;">${gvc.glitter.ut.dateFormat(new Date(dd.created_time), 'yyyy-MM-dd hh:mm')}</div>`,
|
|
691
|
-
width: 25,
|
|
692
676
|
},
|
|
693
677
|
{
|
|
694
678
|
key: '總金額',
|
|
@@ -717,7 +701,6 @@ export class UserList {
|
|
|
717
701
|
gvc.notifyDataChange(vm.id);
|
|
718
702
|
})
|
|
719
703
|
),
|
|
720
|
-
width: 10,
|
|
721
704
|
},
|
|
722
705
|
];
|
|
723
706
|
});
|
|
@@ -738,7 +721,6 @@ export class UserList {
|
|
|
738
721
|
}
|
|
739
722
|
return gvc.glitter.ut.dateFormat(new Date(dd.deadline), 'yyyy-MM-dd hh:mm');
|
|
740
723
|
})(),
|
|
741
|
-
width: 20,
|
|
742
724
|
},
|
|
743
725
|
{ key: '購物金項目', value: dd.note ?? '' },
|
|
744
726
|
{
|
|
@@ -749,7 +731,6 @@ export class UserList {
|
|
|
749
731
|
}
|
|
750
732
|
return html`<span class="tx_700 text-danger">- ${dd.origin * -1}</span>`;
|
|
751
733
|
})(),
|
|
752
|
-
width: 10,
|
|
753
734
|
},
|
|
754
735
|
{
|
|
755
736
|
key: '此筆可使用餘額',
|
|
@@ -1037,7 +1018,6 @@ export class UserList {
|
|
|
1037
1018
|
}
|
|
1038
1019
|
return text;
|
|
1039
1020
|
})(),
|
|
1040
|
-
width: 55,
|
|
1041
1021
|
},
|
|
1042
1022
|
{
|
|
1043
1023
|
key: '有效期限',
|
|
@@ -1159,7 +1139,7 @@ export class UserList {
|
|
|
1159
1139
|
bind: id,
|
|
1160
1140
|
view: () => {
|
|
1161
1141
|
const limit = 10;
|
|
1162
|
-
return new Promise(async (resolve
|
|
1142
|
+
return new Promise(async (resolve) => {
|
|
1163
1143
|
const h = BgWidget.tableV3({
|
|
1164
1144
|
gvc: gvc,
|
|
1165
1145
|
getData: (vd) => {
|
|
@@ -1657,12 +1637,10 @@ export class UserList {
|
|
|
1657
1637
|
{
|
|
1658
1638
|
key: '用戶信箱',
|
|
1659
1639
|
value: `<span class="fs-7">${dd.userData.email}</span>`,
|
|
1660
|
-
width: 40,
|
|
1661
1640
|
},
|
|
1662
1641
|
{
|
|
1663
1642
|
key: '上次登入時間',
|
|
1664
1643
|
value: `<span class="fs-7">${glitter.ut.dateFormat(new Date(dd.online_time), 'yyyy-MM-dd hh:mm')}</span>`,
|
|
1665
|
-
width: 25,
|
|
1666
1644
|
},
|
|
1667
1645
|
{
|
|
1668
1646
|
key: '用戶狀態',
|
|
@@ -1704,80 +1682,83 @@ export class UserList {
|
|
|
1704
1682
|
自訂資料
|
|
1705
1683
|
</button>
|
|
1706
1684
|
</div>
|
|
1707
|
-
${BgWidget.
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
rowClick: (data, index) => {
|
|
1734
|
-
if (type === 'select') {
|
|
1735
|
-
vm.dataList[index].checked = !vm.dataList[index].checked;
|
|
1736
|
-
vmi.data = getDatalist();
|
|
1737
|
-
vmi.callback();
|
|
1738
|
-
callback(
|
|
1739
|
-
vm.dataList.filter((dd: any) => {
|
|
1740
|
-
return dd.checked;
|
|
1741
|
-
})
|
|
1742
|
-
);
|
|
1743
|
-
} else {
|
|
1744
|
-
vm.data = vm.dataList[index];
|
|
1745
|
-
vm.type = 'replace';
|
|
1746
|
-
}
|
|
1747
|
-
},
|
|
1748
|
-
filter: [
|
|
1749
|
-
{
|
|
1750
|
-
name: '批量移除',
|
|
1751
|
-
event: (checkedData) => {
|
|
1752
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
1753
|
-
dialog.checkYesOrNot({
|
|
1754
|
-
text: '是否確認刪除所選項目?',
|
|
1755
|
-
callback: (response) => {
|
|
1756
|
-
if (response) {
|
|
1757
|
-
dialog.dataLoading({ visible: true });
|
|
1758
|
-
ApiUser.deleteUser({
|
|
1759
|
-
id: checkedData
|
|
1760
|
-
.map((dd: any) => {
|
|
1761
|
-
return dd.id;
|
|
1762
|
-
})
|
|
1763
|
-
.join(`,`),
|
|
1764
|
-
}).then((res) => {
|
|
1765
|
-
dialog.dataLoading({ visible: false });
|
|
1766
|
-
if (res.result) {
|
|
1767
|
-
vm.dataList = undefined;
|
|
1768
|
-
gvc.notifyDataChange(id);
|
|
1769
|
-
} else {
|
|
1770
|
-
dialog.errorMessage({ text: '刪除失敗' });
|
|
1771
|
-
}
|
|
1772
|
-
});
|
|
1773
|
-
}
|
|
1774
|
-
},
|
|
1685
|
+
${BgWidget.mainCard(
|
|
1686
|
+
[
|
|
1687
|
+
BgWidget.searchPlace(
|
|
1688
|
+
gvc.event((e, event) => {
|
|
1689
|
+
vm.query = e.value;
|
|
1690
|
+
gvc.notifyDataChange(id);
|
|
1691
|
+
}),
|
|
1692
|
+
vm.query || '',
|
|
1693
|
+
'搜尋所有用戶'
|
|
1694
|
+
),
|
|
1695
|
+
BgWidget.tableV3({
|
|
1696
|
+
gvc: gvc,
|
|
1697
|
+
getData: (vd) => {
|
|
1698
|
+
vmi = vd;
|
|
1699
|
+
const limit = 20;
|
|
1700
|
+
ApiUser.getUserList({
|
|
1701
|
+
page: vmi.page - 1,
|
|
1702
|
+
limit: limit,
|
|
1703
|
+
search: vm.query || undefined,
|
|
1704
|
+
}).then((data) => {
|
|
1705
|
+
vm.dataList = data.response.data;
|
|
1706
|
+
vmi.pageSize = Math.ceil(data.response.total / limit);
|
|
1707
|
+
vmi.originalData = vm.dataList;
|
|
1708
|
+
vmi.tableData = getDatalist();
|
|
1709
|
+
vmi.loading = false;
|
|
1710
|
+
vmi.callback();
|
|
1775
1711
|
});
|
|
1776
1712
|
},
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1713
|
+
rowClick: (data, index) => {
|
|
1714
|
+
if (type === 'select') {
|
|
1715
|
+
vm.dataList[index].checked = !vm.dataList[index].checked;
|
|
1716
|
+
vmi.data = getDatalist();
|
|
1717
|
+
vmi.callback();
|
|
1718
|
+
callback(
|
|
1719
|
+
vm.dataList.filter((dd: any) => {
|
|
1720
|
+
return dd.checked;
|
|
1721
|
+
})
|
|
1722
|
+
);
|
|
1723
|
+
} else {
|
|
1724
|
+
vm.data = vm.dataList[index];
|
|
1725
|
+
vm.type = 'replace';
|
|
1726
|
+
}
|
|
1727
|
+
},
|
|
1728
|
+
filter: [
|
|
1729
|
+
{
|
|
1730
|
+
name: '批量移除',
|
|
1731
|
+
event: (checkedData) => {
|
|
1732
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
1733
|
+
dialog.checkYesOrNot({
|
|
1734
|
+
text: '是否確認刪除所選項目?',
|
|
1735
|
+
callback: (response) => {
|
|
1736
|
+
if (response) {
|
|
1737
|
+
dialog.dataLoading({ visible: true });
|
|
1738
|
+
ApiUser.deleteUser({
|
|
1739
|
+
id: checkedData
|
|
1740
|
+
.map((dd: any) => {
|
|
1741
|
+
return dd.id;
|
|
1742
|
+
})
|
|
1743
|
+
.join(`,`),
|
|
1744
|
+
}).then((res) => {
|
|
1745
|
+
dialog.dataLoading({ visible: false });
|
|
1746
|
+
if (res.result) {
|
|
1747
|
+
vm.dataList = undefined;
|
|
1748
|
+
gvc.notifyDataChange(id);
|
|
1749
|
+
} else {
|
|
1750
|
+
dialog.errorMessage({ text: '刪除失敗' });
|
|
1751
|
+
}
|
|
1752
|
+
});
|
|
1753
|
+
}
|
|
1754
|
+
},
|
|
1755
|
+
});
|
|
1756
|
+
},
|
|
1757
|
+
},
|
|
1758
|
+
],
|
|
1759
|
+
}),
|
|
1760
|
+
].join('')
|
|
1761
|
+
)}
|
|
1781
1762
|
`,
|
|
1782
1763
|
undefined,
|
|
1783
1764
|
'padding: 0 !important; margin: 0 !important;'
|
|
@@ -20,39 +20,6 @@ export class WebConfigSetting {
|
|
|
20
20
|
function getDatalist() {
|
|
21
21
|
return vm.dataList.map((dd) => {
|
|
22
22
|
return [
|
|
23
|
-
{
|
|
24
|
-
key: EditorElem.checkBoxOnly({
|
|
25
|
-
gvc: gvc,
|
|
26
|
-
def: !vm.dataList.find((dd) => {
|
|
27
|
-
return !dd.checked;
|
|
28
|
-
}),
|
|
29
|
-
callback: (result) => {
|
|
30
|
-
vm.dataList.map((dd) => {
|
|
31
|
-
dd.checked = result;
|
|
32
|
-
});
|
|
33
|
-
vmi.data = getDatalist();
|
|
34
|
-
vmi.callback();
|
|
35
|
-
gvc.notifyDataChange(filterID);
|
|
36
|
-
callback(vm.dataList.filter((dd) => {
|
|
37
|
-
return dd.checked;
|
|
38
|
-
}));
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
value: EditorElem.checkBoxOnly({
|
|
42
|
-
gvc: gvc,
|
|
43
|
-
def: dd.checked,
|
|
44
|
-
callback: (result) => {
|
|
45
|
-
dd.checked = result;
|
|
46
|
-
vmi.data = getDatalist();
|
|
47
|
-
vmi.callback();
|
|
48
|
-
gvc.notifyDataChange(filterID);
|
|
49
|
-
callback(vm.dataList.filter((dd) => {
|
|
50
|
-
return dd.checked;
|
|
51
|
-
}));
|
|
52
|
-
},
|
|
53
|
-
style: 'height:25px;',
|
|
54
|
-
}),
|
|
55
|
-
},
|
|
56
23
|
{
|
|
57
24
|
key: '配置檔標題',
|
|
58
25
|
value: html `<span class="fs-7">${dd.content.form_title}</span>`,
|
|
@@ -82,88 +49,71 @@ export class WebConfigSetting {
|
|
|
82
49
|
vm.type = 'add';
|
|
83
50
|
}))}
|
|
84
51
|
</div>
|
|
85
|
-
${BgWidget.container(BgWidget.mainCard(
|
|
86
|
-
gvc
|
|
87
|
-
getData: (vd) => {
|
|
88
|
-
vmi = vd;
|
|
89
|
-
ApiPost.getManagerPost({
|
|
90
|
-
page: vmi.page - 1,
|
|
91
|
-
limit: 20,
|
|
92
|
-
type: WebConfigSetting.tag,
|
|
93
|
-
search: vm.query ? [`form_title-|>${vm.query}`] : [],
|
|
94
|
-
}).then((data) => {
|
|
95
|
-
vmi.pageSize = Math.ceil(data.response.total / 20);
|
|
96
|
-
vm.dataList = data.response.data;
|
|
97
|
-
vmi.data = getDatalist();
|
|
98
|
-
vmi.loading = false;
|
|
99
|
-
vmi.callback();
|
|
100
|
-
});
|
|
101
|
-
},
|
|
102
|
-
rowClick: (data, index) => {
|
|
103
|
-
vm.data = vm.dataList[index];
|
|
104
|
-
vm.type = 'replace';
|
|
105
|
-
},
|
|
106
|
-
filter: html `
|
|
107
|
-
${BgWidget.searchPlace(gvc.event((e, event) => {
|
|
52
|
+
${BgWidget.container(BgWidget.mainCard([
|
|
53
|
+
BgWidget.searchPlace(gvc.event((e, event) => {
|
|
108
54
|
vm.query = e.value;
|
|
109
55
|
gvc.notifyDataChange(vm.id);
|
|
110
|
-
}), vm.query || '', '搜尋所有表單')
|
|
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
|
-
|
|
56
|
+
}), vm.query || '', '搜尋所有表單'),
|
|
57
|
+
BgWidget.tableV3({
|
|
58
|
+
gvc: gvc,
|
|
59
|
+
getData: (vd) => {
|
|
60
|
+
vmi = vd;
|
|
61
|
+
const limit = 20;
|
|
62
|
+
ApiPost.getManagerPost({
|
|
63
|
+
page: vmi.page - 1,
|
|
64
|
+
limit: limit,
|
|
65
|
+
type: WebConfigSetting.tag,
|
|
66
|
+
search: vm.query ? [`form_title-|>${vm.query}`] : [],
|
|
67
|
+
}).then((data) => {
|
|
68
|
+
vm.dataList = data.response.data;
|
|
69
|
+
vmi.pageSize = Math.ceil(data.response.total / limit);
|
|
70
|
+
vmi.originalData = vm.dataList;
|
|
71
|
+
vmi.tableData = getDatalist();
|
|
72
|
+
vmi.loading = false;
|
|
73
|
+
vmi.callback();
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
rowClick: (data, index) => {
|
|
77
|
+
vm.data = vm.dataList[index];
|
|
78
|
+
vm.type = 'replace';
|
|
79
|
+
},
|
|
80
|
+
filter: [
|
|
81
|
+
{
|
|
82
|
+
name: '批量移除',
|
|
83
|
+
event: () => {
|
|
84
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
85
|
+
dialog.checkYesOrNot({
|
|
86
|
+
text: '是否確認刪除所選項目?',
|
|
87
|
+
callback: (response) => {
|
|
88
|
+
if (response) {
|
|
89
|
+
dialog.dataLoading({ visible: true });
|
|
90
|
+
ApiPost.delete({
|
|
91
|
+
id: vm.dataList
|
|
92
|
+
.filter((dd) => {
|
|
93
|
+
return dd.checked;
|
|
94
|
+
})
|
|
95
|
+
.map((dd) => {
|
|
96
|
+
return dd.id;
|
|
97
|
+
})
|
|
98
|
+
.join(`,`),
|
|
99
|
+
}).then((res) => {
|
|
100
|
+
dialog.dataLoading({ visible: false });
|
|
101
|
+
if (res.result) {
|
|
102
|
+
vm.dataList = undefined;
|
|
103
|
+
gvc.notifyDataChange(vm.id);
|
|
145
104
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
class: `d-flex align-items-center p-2 py-3 ${!vm.dataList ||
|
|
155
|
-
!vm.dataList.find((dd) => {
|
|
156
|
-
return dd.checked;
|
|
157
|
-
})
|
|
158
|
-
? `d-none`
|
|
159
|
-
: ``}`,
|
|
160
|
-
style: ``,
|
|
161
|
-
};
|
|
105
|
+
else {
|
|
106
|
+
dialog.errorMessage({ text: '刪除失敗' });
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
},
|
|
162
113
|
},
|
|
163
|
-
|
|
164
|
-
})
|
|
165
|
-
|
|
166
|
-
})))}
|
|
114
|
+
],
|
|
115
|
+
}),
|
|
116
|
+
].join('')))}
|
|
167
117
|
`, BgWidget.getContainerWidth());
|
|
168
118
|
}
|
|
169
119
|
else if (vm.type == 'add') {
|