binxie
2024-01-20 e0de9222da210f9c8eb1a9f5400f936a14923e11
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
<template>
    <lightning-card title="要批准的项目" icon-name="standard:approval">
        <lightning-button slot="actions" label="刷新" icon-name="utility:refresh" variant="brand"
            alternative-text="Refresh" class="slds-m-left_xx-small" title="Refresh" onclick={reloadrecords}>
        </lightning-button>
        <template if:true={wrapperListtrue}>
            <lightning-button slot="actions" variant="brand" label="批准" title="批准" disabled={enable_app_rej}
                icon-name="action:approval" class="slds-m-left_x-small" onclick={handleconformClick}></lightning-button>
            <lightning-button slot="actions" variant="brand" label="拒绝" title="拒绝" disabled={enable_app_rej}
                icon-name="action:reject" class="slds-m-left_x-small" onclick={handleconformClick}></lightning-button>
        </template>
        <template if:true={wrapperListtrue} style="width: 100%">
            <div style="height:15rem"> 
                <lightning-datatable key-field="workItemId" onsave={handleSave} data={wrapperList} columns={columns}
                    draft-values={draftValues} sorted-by={sortBy} sorted-direction={sortDirection}
                    onsort={handleSortdata} onrowaction={handleRowAction} onrowselection={enablebuttons}
                    enable-infinite-loading={showinfiniteLoadingSpinner} onloadmore={loadMoreData} style="width: 100%" min-column-width="70">
                </lightning-datatable>
            </div>
        </template>
        <template if:false={wrapperListtrue}>
            <div style="height:15rem;font-size: 12px;">
                <br /><br /><br /><br />
                <center>现在,没有需要您注意的批准请求。</center>
                <br /><br /><br /><br />
            </div>
        </template>
        <div if:true={showLoadingSpinner}>
            <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner>
        </div>
        <p slot="footer">
            <lightning-formatted-text value={footertext}></lightning-formatted-text>
        </p>
<!--         <c-confirmation-dialog title='Confirmation' message='Do you want to proceed?' confirm-label='Yes'
            cancel-label='No' visible={isDialogVisible} original-message={originalMessage} name="confirmModal"
            onclick={handleconformClick}>
        </c-confirmation-dialog> -->
        <div if:true = {isDialogVisible}>
            <section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open slds-modal_large" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1"  >
            <div class="slds-modal__container" style="width: 30%;">
              <div class ="form-group" style=" display: inline-block;margin-bottom: 15px;"></div>
              <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-10" style="padding-bottom: 15px;">
                    评论:
                    <lightning-input type="text" value={comment} onchange={afterChange}></lightning-input>
              </div>
              <footer class="slds-modal__footer" style="display: felx;">
                <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" variant="brand"  style=" font-size:small;width: 10%;" onclick={saveDialog}>确认</button>
                <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" variant="brand"  style=" font-size:small;width: 10%;" onclick={closeDialog}>关闭</button>
              </footer>
            </div>
          </section>
          <div class="slds-backdrop slds-backdrop_open"></div>
        </div>
        <template if:true={bShowModal}>
            <section aria-describedby="modal-content-id-1" aria-labelledby="modal-heading-01" aria-modal="true"
                class="slds-modal slds-fade-in-open" role="dialog" tabindex="-1">
                <div class="slds-modal__container">
                    <!-- modal header start -->
                    <header class="slds-modal__header">
                        <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
                            onclick={closeModal} title="Close">
                            <lightning-icon alternative-text="close" icon-name="utility:close" size="small"
                                variant="inverse"></lightning-icon>
                            <span class="slds-assistive-text">Close</span>
                        </button>
                        <h2 class="slds-text-heading_medium slds-hyphenate" id="modal-heading-01">Submitter Comments
                        </h2>
                    </header>
                    <!-- modal body start -->
                    <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
                        <p> 
                            <lightning-formatted-text value={icomments}></lightning-formatted-text>
                        </p>
                    </div>
                    <!-- modal footer start-->
                    <footer class="slds-modal__footer">
                        <button class="slds-button slds-button_neutral" onclick={closeModal}>Close</button>
                    </footer>
                </div>
            </section>
            <div class="slds-backdrop slds-backdrop_open"></div>
        </template>
    </lightning-card>
 
</template>