详表中attachment组件,上传文件后,复制这条记录,但复制的那条记录中的attachment组件中不显示文件,也不能查看。查看数据库,发现fXBFJ的text字段中一个是[{"docID":"C7CD062815800001C6591EA018DC121E","docName":"001.jpg","size":"716806","docPath":"/defaultDocNameSpace","fileID":"36-defaultDocNameSpace","time":"2017-12-18T11:40:03.040Z"}],另一个是 [{"docID":"C7CD062815800001C6591EA018DC121E","docName":"GGD配铜排 001.jpg","size":"716806","docPath":"/defaultDocNameSpace","fileID":""}],没有"fileID"和"time"数据。 使用下面代码复制: Model.prototype.copyItemClick = function(event){ var ddata = this.comp("detailData"); var sID = event.bindingContext.$rawData.val("VI_DDXB"); var row = ddata.getRowByID(sID); var options = { defaultValues : [ {fWPMC:ddata.getValue ('fWPMC', row),fXBFJ:ddata.getValue ('fXBFJ', row),fJSJ:ddata.getValue ('fJSJ', row),fJSFS:ddata.getValue ('fJSFS', row)} }; ddata.newData(options); }; 应该怎样处理attachment组件的复制
|