liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<!--
 * @Description: 
 * @version: 
 * @Author: chen jing wu
 * @Date: 2023-12-04 10:55:42
 * @LastEditors: chen jing wu
 * @LastEditTime: 2023-12-07 10:41:07
-->
<template>
    <!-- <div style="height: 300px;">
        
    </div> -->
    
    <lightning-card title="随货同行单批量下载">
      <div slot="actions">
        <lightning-input data-id="search" variant="brand" class="slds-m-left_x-small" style="width:150px;display: inline-block;" type="search"></lightning-input>
        <lightning-button class="slds-m-left_x-small" label="搜索" title="搜索" onclick={search} style="display: inline-block;"></lightning-button>
        <lightning-button 
            variant="brand" 
            label="批量下载" 
            title="批量下载" 
            icon-name="utility:download" 
            class="slds-m-left_x-small"
            onclick={downloadFiles}
        ></lightning-button>
      </div>
        
        <table aria-multiselectable="true" class="slds-table slds-table_bordered slds-table_fixed-layout slds-table_resizable-cols" role="grid" aria-label="Example advanced table of Opportunities in actionable mode">
            <thead>
                <tr class="slds-line-height_reset">
                    <th class="slds-text-align_right slds-cell_action-mode" scope="col" style="width:3.25rem">
                        <span id="column-group-header" class="slds-assistive-text">Choose a row</span>
                        <div class="slds-th__action slds-th__action_form">
                          <div class="slds-checkbox">
                            <lightning-input class="options" type="checkbox" onchange={allSelect}></lightning-input>
                            <!-- <input type="checkbox" name="options" id="checkbox-unique-id-297" value="checkbox-unique-id-297" tabindex="0" aria-labelledby="check-select-all-label column-group-header" /> -->
                          </div>
                        </div>
                      </th>
                    
                    <!-- <th aria-sort="none" class="slds-is-resizable slds-is-sortable slds-cell_action-mode" scope="col">
                        <div class="slds-grid slds-grid_vertical-align-center slds-has-flexi-truncate">
                            <span class="slds-truncate" title="Name">标题</span>
                        </div>
                        <div class="slds-resizable">
                            <input type="range" aria-label="Account Name column width" class="slds-resizable__input slds-assistive-text" id="cell-resize-handle-541" max="1000" min="20" tabindex="0" />
                            <span class="slds-resizable__handle">
                              <span class="slds-resizable__divider"></span>
                            </span>
                          </div>
                    </th> -->
                    <th style="width:600px;" aria-sort="none" class="slds-is-resizable slds-is-sortable slds-cell_action-mode" scope="col">
                        <a class="slds-th__action slds-text-link_reset" href="#" role="button" tabindex="0">
                          <span class="slds-assistive-text">Sort by: </span>
                          <div class="slds-grid slds-grid_vertical-align-center slds-has-flexi-truncate">
                            <span class="slds-truncate">标题</span>
                            <span class="slds-icon_container slds-icon-utility-arrowdown">
                              <svg class="slds-icon slds-icon-text-default slds-is-sortable__icon " aria-hidden="true">
                                <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#arrowdown"></use>
                              </svg>
                            </span>
                          </div>
                        </a>
                        <div class="slds-resizable">
                          <input type="range" aria-label="Name column width" class="slds-resizable__input slds-assistive-text" id="cell-resize-handle-540" max="1000" min="20" tabindex="0" />
                          <span class="slds-resizable__handle">
                            <span class="slds-resizable__divider"></span>
                          </span>
                        </div>
                      </th>
                      <th aria-sort="none" class="slds-is-resizable slds-is-sortable slds-cell_action-mode" scope="col">
                        <a class="slds-th__action slds-text-link_reset" href="#" role="button" tabindex="0">
                          <span class="slds-assistive-text">Sort by: </span>
                          <div class="slds-grid slds-grid_vertical-align-center slds-has-flexi-truncate">
                            <span class="slds-truncate" >作者</span>
                            <span class="slds-icon_container slds-icon-utility-arrowdown">
                              <svg class="slds-icon slds-icon-text-default slds-is-sortable__icon " aria-hidden="true">
                                <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#arrowdown"></use>
                              </svg>
                            </span>
                          </div>
                        </a>
                        <div class="slds-resizable">
                          <input type="range" aria-label="Name column width" class="slds-resizable__input slds-assistive-text" id="cell-resize-handle-542" max="1000" min="20" tabindex="0" />
                          <span class="slds-resizable__handle">
                            <span class="slds-resizable__divider"></span>
                          </span>
                        </div>
                      </th>
                      <th aria-sort="none" class="slds-is-resizable slds-is-sortable slds-cell_action-mode" scope="col">
                        <a class="slds-th__action slds-text-link_reset" href="#" role="button" tabindex="0">
                          <span class="slds-assistive-text">Sort by: </span>
                          <div class="slds-grid slds-grid_vertical-align-center slds-has-flexi-truncate">
                            <span class="slds-truncate" >最后修改时间</span>
                            <span class="slds-icon_container slds-icon-utility-arrowdown">
                              <svg class="slds-icon slds-icon-text-default slds-is-sortable__icon " aria-hidden="true">
                                <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#arrowdown"></use>
                              </svg>
                            </span>
                          </div>
                        </a>
                        <div class="slds-resizable">
                          <input type="range" aria-label="Name column width" class="slds-resizable__input slds-assistive-text" id="cell-resize-handle-541" max="1000" min="20" tabindex="0" />
                          <span class="slds-resizable__handle">
                            <span class="slds-resizable__divider"></span>
                          </span>
                        </div>
                      </th>
                    <!-- <th aria-sort="none" class="slds-is-resizable slds-is-sortable slds-cell_action-mode" scope="col">
                        <div class="slds-grid slds-grid_vertical-align-center slds-has-flexi-truncate">
                            <span class="slds-truncate" title="Name">作者</span>
                        </div>
                    </th>
                    <th aria-sort="none" class="slds-is-resizable slds-is-sortable slds-cell_action-mode" scope="col">
                        <div class="slds-grid slds-grid_vertical-align-center slds-has-flexi-truncate">
                            <span class="slds-truncate" title="Name">最后修改时间</span>
                        </div>
                    </th> -->
                  </tr>
            </thead>
            <tbody>
                <template for:each={files} for:item="file" for:index="i">
                        <tr key={file.con.Id} aria-selected="false" class="slds-hint-parent">
                            <td class="slds-text-align_right slds-cell_action-mode" role="gridcell">
                                <div class="slds-checkbox">
                                    <lightning-input name={i} class="options" type="checkbox" value={file.isSelect} onchange={setSelect}></lightning-input>
                                  <!-- <input class="options" type="checkbox" name="options" data-id={files.data.Id} value="checkbox-01" tabindex="0" aria-labelledby="check-button-label-01 column-group-header" /> -->
                                  <!-- <label class="slds-checkbox__label" for="checkbox-01" id="check-button-label-01">
                                    <span class="slds-checkbox_faux"></span>
                                    <span class="slds-form-element__label slds-assistive-text">Select item 1</span>
                                  </label> -->
                                </div>
                              </td>
                            <td class="slds-cell_action-mode" role="gridcell">
                                <div class="slds-truncate">
                                    <c-lex-lightning-link link-name={file.con.Title} link-id={file.con.Id}></c-lex-lightning-link>
                                </div> 
                            </td>
                            <td class="slds-cell_action-mode" role="gridcell">
                                <div class="slds-truncate">
                                    <c-lex-lightning-link link-name={file.con.Owner.Name} link-id={file.con.OwnerId}></c-lex-lightning-link>
                                </div> 
                            </td>
                            <td class="slds-cell_action-mode" role="gridcell">
                                <div class="slds-truncate">
                                    <lightning-formatted-date-time value={file.con.LastModifiedDate}></lightning-formatted-date-time>
                                </div> 
                            </td>
                        </tr>
                </template>
            </tbody>
        </table>
        <div style="height: 20px;"></div>
        <a style="padding-left: 600px;padding-right: 15px;" onclick={cancel}>上一页</a>
        <a onclick={next}>下一页</a>
        <!-- <lightning-button 
            variant="brand" 
            label="批量下载" 
            title="批量下载" 
            icon-name="utility:download" 
            class="slds-m-left_x-small"
            slot="actions"
            onclick={downloadFiles}
        ></lightning-button>
        <lightning-datatable
                key-field="Id"
                data={files.data}
                columns={columns}>
        </lightning-datatable> -->
    </lightning-card>
</template>