| | |
| | | edit_compose_cls_id:"", |
| | | global_attr:[], |
| | | refdatastore: [], //引用数据存储区// {attr:'G_PRJ_' + bindattr + '_ID', value:info.id} |
| | | inputValList:[{Name:"test"},{Name:"test2"},{Name:"test3"},{Name:"test4"},{Name:"test5"},{Name:"test6"},{Name:"test7"}], |
| | | inputValList:[{Name:"test"},{Name:"test2"},{Name:"test3"},{Name:"test4"},{Name:"test5"},{Name:"test6"},{Name:"test7"}] |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=e.target.value; |
| | | }, |
| | | onchange(e) { |
| | | console.log(e.target); |
| | | // console.log(e.target); |
| | | var value=this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].dictitem[e.target.value]; |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]; |
| | | console.log(data_attr); |
| | | if (value.Name != data_attr.Value) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=value.Name; |
| | | console.log(this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value); |
| | | // console.log(this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value); |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | |
| | | var index ,iindex,dindex=0; |
| | | for(var i in this.$data.classAttrList){ |
| | | for(var j in this.$data.classAttrList[i].Attr){ |
| | | for(var d in this.$data.classAttrList[i].Attr[j].dictitem){ |
| | | if(delvalue[0].Name == this.$data.classAttrList[i].Attr[j].dictitem[d].Name){ |
| | | this.$data.classAttrList[i].Attr[j].Value=""; |
| | | } |
| | | if(delvalue[0].attr == this.$data.classAttrList[i].Attr[j].Name){ |
| | | this.$data.classAttrList[i].Attr[j].Value=""; |
| | | } |
| | | } |
| | | } |
| | |
| | | var index ,iindex,dindex=0; |
| | | for(var i in this.$data.classAttrList){ |
| | | for(var j in this.$data.classAttrList[i].Attr){ |
| | | for(var d in this.$data.classAttrList[i].Attr[j].dictitem){ |
| | | if(item[v].Name == this.$data.classAttrList[i].Attr[j].dictitem[d].Name){ |
| | | index=i;iindex=j;dindex=d; |
| | | } |
| | | if(item[v].attr == this.$data.classAttrList[i].Attr[j].Name){ |
| | | index=i;iindex=j;dindex=d; |
| | | } |
| | | } |
| | | } |
| | |
| | | console.log(data_attr); |
| | | if (itemvalue.Name != data_attr.Value) { |
| | | this.$data.classAttrList[index].Attr[iindex].Value=value; |
| | | console.log(this.$data.classAttrList[index].Attr[iindex].Value); |
| | | // console.log(this.$data.classAttrList[index].Attr[iindex].Value); |
| | | var eventid = this.$data.classAttrList[index].Attr[iindex].action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | |
| | | }, |
| | | add(){ |
| | | uni.showLoading({ |
| | | title:"加载中..." |
| | | title:"加载中...", |
| | | mask:true |
| | | }); |
| | | var req=[]; |
| | | var attrlist = this.$data.classAttrList; |
| | |
| | | for (var d = 0; d < ca.dictitem.length; d++) { |
| | | ca.dictitem[d].label=ca.dictitem[d].CN_S_NAME; |
| | | ca.dictitem[d].value=ca.dictitem[d].CN_S_NAME; |
| | | ca.dictitem[d].attr=ca.Name; |
| | | if(ca.dictitem[d].CN_C_IS_DEFAULT=='1') |
| | | ca.Value=ca.dictitem[d].CN_S_NAME; |
| | | } |