attachmentPC默认不是把上传的附件以列表的形式展现,如果需要列表显示展现,如下修改,使用的时候可以直接赋值到自己的.w中,然后把bind-ref改为自己的关系


<div component="$UI/system/components/justep/attachment/attachmentPC" access="duud" xid="attachmentPC4" bind-ref="$model.mainData.ref(&quot;fFJ&quot;)"> 

<div class="x-attachment-pc" xid="div68"> 

<div class="x-attachment-content x-card-border" xid="div69"> 

<div class="x-doc-process" xid="div70"> 

<div class="progress-bar x-doc-process-bar" role="progressbar" style="width:0%;" xid="progressBar4"/> 
                        </div>

  

<div class="x-attachment-cell x-attachment-item" data-bind="style:{display:$state.get() == 'upload' &amp;&amp; $access.get() % 512 &gt;= 256?'inline-block':'none'}" xid="div14"> 

<div class="x-item-icon x-item-upload" data-bind="visible:$state.get() == 'upload' &amp;&amp; $access.get() % 512 &gt;= 256" xid="div15"/> 
                        </div>

  

<div class="x-attachment-cell x-attachment-item" data-bind="style:{display:$state.get() == 'upload' &amp;&amp; $access.get() % 512 &gt;= 256?'inline-block':'none'}" xid="div16"> 

<div class="x-item-icon x-item-new-tpl" data-bind="visible:$state.get() == 'upload' &amp;&amp; $access.get() % 512 &gt;= 256,click:$model.newFormTemplate.bind($model)" xid="div17"/> 
                        </div>

  

<table class="x-attachment-list table table-hover"> 

<tbody class="x-attachment-cell-tpl" data-bind="foreach:$attachmentItems" xid="div33"> 

<tr> 

<td class="x-attachment-cell x-attachment-item" style="margin-top:0px"> 

<div class="x-item-other x-item-icon" data-bind="click:$model.previewOrRemoveItem.bind($model),style:{backgroundImage:($model.previewPicture.bind($model,$object))()},css:{'x-doc-item-active':$model.$activeDoc.get() == $object}" xid="div35"/> 
                              </td>

  

<td> 

<div class="x-item-name" xid="div81"> 
                                  <a class="btn btn-link" data-bind="enable:($object.fileID.get() &amp;&amp; $model.$access.get() % 4 &gt;= 2),click:$model.previewOrRemoveItem.bind($model,$object),text:$object.docName.get()" xid="a22"/>  
                                  <span class="btn btn-link" data-bind="enable:false,text:$model.getFormatSize($object)" xid="span19"/> 
                                </div>

 
                              </td>

  

<td> 

<div class="x-item-edit" xid="div82"> 
                                  <a class="btn btn-link" data-bind="enable:$model.$access.get() % 1024 &gt;= 512,click:$model.editDoc.bind($model,$object)" xid="a23">编辑</a> 
                                </div>

 
                              </td>

  

<td> 

<div class="x-item-download" xid="div83"> 
                                  <a class="btn btn-link" data-bind="enable:$model.$access.get() % 1024 &gt;= 512,click:$model.showHistory.bind($model,$object)" xid="a24">历史</a> 
                                </div>

 
                              </td>

  

<td> 

<div class="x-item-download" xid="div84"> 
                                  <a class="btn btn-link" data-bind="enable:($object.fileID.get() &amp;&amp; $model.$access.get() % 8 &gt;= 4),click:$model.downloadDoc.bind($model,$object)" xid="a25">下载</a> 
                                </div>

 
                              </td>

  

<td> 

<div class="x-item-delete" xid="div85"> 
                                  <a class="btn btn-link" data-bind="enable:$model.$access.get() % 2048 &gt;= 1024,click:$model.deleteDoc.bind($model,$object)" xid="a26">删除</a> 
                                </div>

 
                              </td>

 
                            </tr>

 
                          </tbody>

 
                        </table>

 
                      </div>

 
                    </div>

 
                  </div>

 

具体展现效果如下
attachmentPC