|
楼主 |
发表于 2015-10-24 14:00:22
|
显示全部楼层
上边的解决了
修改后的组件JS 在构造里加了 this.state1 = "upload";
var AttachmentSimple = BindComponent.extend({
// 构造函数
constructor : function(options) {
this.callParent(options);
this.state = "upload";
this.state1 = "upload";
this.initAttachmentValue([]);
},
//DOINIT
doInit: function(value, bindingContext, allBindings){
this.callParent(value, bindingContext, allBindings);
this.$state = justep.Bind.observable(this.state);
this.$state1 = justep.Bind.observable(this.state1);
//this.$state1 = justep.Bind.observable(this.state1);
this.initUploader();
var self = this;
$('body').on('click',function(event){
if(self.$state1 && self.$state1.get() == 'upload')
{
self.changeState1("upload");
}
if(self.$state && self.$state.get() == 'remove' && (!$(event.target).hasClass('x-remove-barget')) && (!$(event.target).hasClass('x-item-remove')) )
{
self.changeState("upload"
);
}
});
getFileUrl : function(realFileName,storeFileName,ownerID,operateType){
var url = '$UI/system/service/doc/common/simpleFileStore.j?realFileName=' + realFileName + '&storeFileName='+storeFileName + '&ownerID='+ownerID + '&operateType=' + operateType;
return require.toUrl(url);
},
getFileUrl1 : function(realFileName,storeFileName,ownerID,operateType){
var url = '$UI/system/service/doc/common/simpleFileStore1.j?realFileName=' + realFileName + '&storeFileName='+storeFileName + '&ownerID='+ownerID + '&operateType=' + operateType;
return require.toUrl(url);
},
这几个相关的都写了
组件运行时 visiblestate1.get() == 'upload'和visiblestate.get() == 'upload' 都可以使用 但是全是用的$UI/system/service/doc/common/simpleFileStore.j并没使用$UI/system/service/doc/common/simpleFileStore1.j 这是哪里的原因
|
|