<!--
|
* @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>
|