cuiqian2004
2025-03-20 c094d4a32180130de0c26c75a5abc414128a5ec1
pages/modal/3018_2.vue
@@ -3,8 +3,8 @@
      <view class="view-content">
         <!-- 表头样式 -->
         <OIForm ref="refBaseForm" class="v-headStyle" :form="head_styledef.form" :focusId="focusFieldId"
            @click="onClick" @focus="ontap" @change="onEnterChange" @click-prefix="classAttr_extButton"
            @click-suffix="classAttr_extButton"></OIForm>
            @on-click="onClick" @on-focus="ontap" @on-change="onEnterChange" @on-click-prefix="classAttr_extButton"
            @on-click-suffix="classAttr_extButton"></OIForm>
      </view>
      <view class="view-bottom">
@@ -685,6 +685,7 @@
               var attr = item.fieldId;
               this.head_styledef.form.model[attr] = newVal;
               var onChangeEvent = item.bind.onChangeEvent; //内容变化后事件
               // this.onScanValue(this.head_styledef.form.items[2].setting.colList[0], "test")
               if (onChangeEvent?.id) { //内容变化后事件
                  this.onChange(onChangeEvent);
               }
@@ -978,44 +979,8 @@
                  if (data.result) {
                     var result = data.result;
                     $this.setFormValues(data.result)
                     for (var i = 0; i < result.length; i++) {
                        for (var c = 0; c < $this.$data.head_styledef.form.items
                           .length; c++) {
                           var attr = $this.$data.head_styledef.form.items[c];
                           //判断表单里是否有返回字段,没有就装载到model里,点击确定提交的时候带上这些数据
                           if ($this.head_styledef.form.model[result[i].attr] ==
                              undefined) {
                              $this.head_styledef.form.model[result[i].attr] =
                                 result[i]
                                 .value;
                           }
                           //判断是否是栅格表单
                           if (attr.name != 'Layout') {
                              if (attr.fieldId == result[i].attr) {
                                 attr.value = '';
                                 attr.oldvalue = '';
                                 attr.value = result[i].value;
                                 attr.oldvalue = result[i].value;
                                 $this.head_styledef.form.model[attr.fieldId] =
                                    result[i]
                                    .value;
                              }
                           } else if (attr.name == 'Layout') {
                              attr.setting.colList.forEach(col => {
                                 if (col) {
                                    if (col.fieldId == result[i].attr) {
                                       col.value = '';
                                       col.oldvalue = '';
                                       col.value = result[i].value;
                                       col.oldvalue = result[i].value;
                                       $this.head_styledef.form.model[col
                                             .fieldId] =
                                          result[i].value;
                                    }
                                 }
                              });
                           }
                        }
                        var length = 0;
                        if (!$this.$data.refdatastore.filter(function(s) {
@@ -1631,25 +1596,6 @@
                           }
                        }
                     });
                  }
               }
               var length = 0;
               if (!$this.$data.refdatastore.filter(function(s) {
                     return data[i].attr == s.attr
                  }).length) {
                  length = 1;
                  $this.$data.refdatastore.push(data[i]);
               }
               if (length == 0) {
                  for (var j = 0; j < $this.$data.refdatastore
                     .length; j++) {
                     if ($this.$data.refdatastore[j].attr == data[
                           i]
                        .attr) {
                        $this.$data.refdatastore[j].value = data[
                              i]
                           .value;
                     }
                  }
               }
            }