选择关联文档组件
根据V5业务需要,进行V5关联文档选择的界面:

构造函数

cmp.accDoc

cmp.accDoc
(
  • id
  • options
)

参数:

名称类型标识描述
id String 必选

实例化组件的唯一ID标识,可选

options Object 必选

配置参数

名称类型标识描述
[fillbackData] Number 可选

符合V5数据格式的协同或文档数据,JSON对象格式

[callback] Number 可选

选中的数据点击确定返回给开发者的数据

[closeCallback] Function 可选

点击取消的回调函数

示例:

文件导入路径:
M3App端
 <link rel="stylesheet" href="http://cmp/v/css/cmp.css"></link>
 <link rel="stylesheet" href="http://cmp/v/css/cmp-listView.css"></link>
 <link rel="stylesheet" href="http://cmp/v/css/cmp-picker.css"></link>
 <link rel="stylesheet" href="http://cmp/v/css/cmp-search.css"></link>
 <link rel="stylesheet" href="http://cmp/v/css/cmp-accDoc.css"></link>
 <script  src="http://cmp/v1.0.0/js/cordova/__CMPSHELL_PLATFORM__/cordova.js"></script>
 <script  src="http://cmp/v1.0.0/js/cordova/cordova-plugins.js"></script>
 <script  src="http://cmp/v/js/cmp.js"></script>
 <script  src="http://cmp/v/js/cmp-listView.js"></script>
 <script  src="http://cmp/v/js/cmp-imgCache.js"></script>
 <script  src="http://cmp/v/js/cmp-picker.js"></script>
 <script  src="http://cmp/v/js/cmp-dtPicker.js"></script>
 <script  src="http://cmp/v/js/cmp-search.js"></script>
 <script  src="http://cmp/v/js/cmp-accDoc.js"></script>
 <script  src="http://cmp/v/js/cmp-v5.js"></script>
 <script src="http://commons.v5.cmp/v/widget/SeeyonAttachment.s3js"></script>
 ===========================================================================================
 微协同端:
 <link rel="stylesheet" href="/seeyon/m3/cmp/css/cmp.css"/>
 <link rel="stylesheet" href="/seeyon/m3/cmp/css/cmp-listView.css"/>
 <link rel="stylesheet" href="/seeyon/m3/cmp/css/cmp-accDoc.css"/>
 <link rel="stylesheet" href="/seeyon/m3/cmp/css/cmp-search.css"></link>
 <link rel="stylesheet" href="/seeyon/m3/cmp/css/cmp-accDoc.css"></link>
 <script  src="/seeyon/m3/cmp/js/cmp.js"></script>
 <script  src="/seeyon/m3/cmp/js/cmp-listView.js"></script>
 <script  src="/seeyon/m3/cmp/js/cmp-imgCache.js"></script>
 <script  src="/seeyon/m3/cmp/js/cmp-picker.js"></script>
 <script  src="/seeyon/m3/cmp/js/cmp-dtPicker.js"></script>
 <script  src="/seeyon/m3/cmp/js/cmp-search.js"></script>
 <script  src="/seeyon/m3/cmp/js/cmp-accDoc.js"></script>
 <script  src="/seeyon/m3/cmp/js/cmp-v5.js"></script>
 <script src="/seeyon/m3/apps/v5/commons/widget/SeeyonAttachment.s3js"></script>
 =========================================================================================
 调用组件
<script>
    var accDoc = cmp.accDoc("accDoc_Id",{
                  fillbackData: null,//符合V5数据格式的协同或文档数据,JSON对象格式
                  callback:function(result){
                     //返回的数据格式是A8服务器的文档的数据格式,请使用手机远程调试在浏览器的控制面板查看数据格式
                      result = cmp.parseJSON(result);
                      for(var i = 0;i< result.length; i ++){
                         console.log(cmp.parseJSON(result[i]));
                      }
                  },
                  closeCallback:function(){
                      //do something with closeCallback
                  }
    });
</script>

图例:

Top