jt
2023-05-11 9bcb6b47a130099d65dc0b55d2c2addd8b9191ca
pages/modal/classAttr.vue
@@ -399,7 +399,7 @@
            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) {
@@ -503,13 +503,13 @@
            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;
@@ -553,10 +553,8 @@
               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="";
                     }
                  }
               }
@@ -566,10 +564,8 @@
               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;
                     }
                  }
               }
@@ -579,7 +575,7 @@
               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;
@@ -814,7 +810,8 @@
         },
         add(){
            uni.showLoading({
               title:"加载中..."
               title:"加载中...",
               mask:true
            });
            var req=[];
            var attrlist = this.$data.classAttrList;
@@ -943,6 +940,7 @@
                                    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;
                                    }