cuiqian2004
2025-03-03 b0041cf10ba3ddf74b9edcfd340a7d1c9179d878
pages/modal/3037_2.vue
@@ -39,16 +39,17 @@
            </view>
            <!-- 复选框 -->
            <checkbox-group class="check_rememberPwd" v-if="item.name=='Checkbox'"
               :class="item.disabled?'input-disabled':''" @change="onModelValue(item)" :disabled="item.disabled"
               :data-ischeck="item.value" :style="{'margin-left':'10rpx'}">
               <label>
                  <checkbox :value="item.value" :checked="item.value" />
                  <text>{{item.label}}</text>
               :class="item.disabled?'input-disabled':''" :disabled="item.disabled" @change="onCheckBoxValue"
               :data-attr="item.fieldId">
               <label v-for="(item2) in item.selections" :key="item2.value">
                  <checkbox :value="item2.value" :checked="item.value.includes(item2.value)" />
                  <text>{{item2.label}}</text>
               </label>
            </checkbox-group>
            <!-- 单选框 -->
            <radio-group class="check_rememberPwd" v-if="item.name=='Radio'"
               :class="item.disabled?'input-disabled':''" :disabled="item.disabled" @change="onModelValue(item)">
               :class="item.disabled?'input-disabled':''" :disabled="item.disabled" @change="onRadioBoxValue"
               :data-attr="item.fieldId">
               <label v-for="(item2) in item.selections" :key="item2.value">
                  <radio :value="item2.value" :checked="item2.value === item.value" />
                  <text>{{item2.label}}</text>
@@ -128,17 +129,17 @@
                     </view>
                     <!-- 复选框 -->
                     <checkbox-group class="check_rememberPwd" v-if="item.name=='Checkbox'"
                        :class="item.disabled?'input-disabled':''" @change="onModelValue(item)"
                        :data-ischeck="item.value" :disabled="item.disabled" :style="{'margin-left':'10rpx'}">
                        <label>
                           <checkbox :value="item.value" :checked="item.value" />
                           <text>{{item.label}}</text>
                        :class="item.disabled?'input-disabled':''" :disabled="item.disabled" @change="onCheckBoxValue"
                        :data-attr="item.fieldId">
                        <label v-for="(item2) in item.selections" :key="item2.value">
                           <checkbox :value="item2.value" :checked="item.value.includes(item2.value)" />
                           <text>{{item2.label}}</text>
                        </label>
                     </checkbox-group>
                     <!-- 单选框 -->
                     <radio-group class="check_rememberPwd" v-if="item.name=='Radio'"
                        :class="item.disabled?'input-disabled':''" :disabled="item.disabled"
                        :style="{'margin-left':'10rpx'}" @change="onModelValue(item)">
                        :style="{'margin-left':'10rpx'}" @change="onRadioBoxValue" :data-attr="cols.fieldId">
                        <label v-for="(item2) in item.selections" :key="item2.value">
                           <radio :value="item2.value" :checked="item2.value === item.value" />
                           <text>{{item2.label}}</text>
@@ -194,17 +195,17 @@
                           <!-- 复选框 -->
                           <checkbox-group class="check_rememberPwd" v-if="cols.name=='Checkbox'"
                              :class="cols.disabled?'input-disabled':''" :disabled="cols.disabled"
                              @change="onModelValue(cols)" :data-ischeck="cols.value"
                              :style="{'margin-left':'10rpx'}">
                              <label>
                                 <checkbox :value="cols.value" :checked="cols.value" />
                                 <text>{{cols.label}}</text>
                              @change="onCheckBoxValue" :data-attr="cols.fieldId">
                              <label v-for="(cols2) in cols.selections" :key="cols2.value">
                                 <checkbox :value="cols2.value"
                                    :checked="cols.value.includes(cols2.value)" />
                                 <text>{{cols2.label}}</text>
                              </label>
                           </checkbox-group>
                           <!-- 单选框 -->
                           <radio-group class="check_rememberPwd" v-if="cols.name=='Radio'"
                              :class="cols.disabled?'input-disabled':''" :disabled="cols.disabled"
                              @change="onModelValue(cols)">
                              @change="onRadioBoxValue " :data-attr="cols.fieldId">
                              <label v-for="(cols2) in cols.selections" :key="cols2.value">
                                 <radio :value="cols2.value" :checked="cols2.value === cols.value" />
                                 <text>{{cols2.label}}</text>
@@ -251,8 +252,8 @@
         <uni-popup class="view-popup" ref="popup" background-color="#fff" @change="popupChange">
            <view class="popup-header">{{check_list.title}}</view>
            <view class="popup-content" :class="{ 'popup-height': popupType === 'left' || popupType === 'right' }"
               :style="{'width':check_list.width?check_list.width+'px':'200px','height':check_list.height?check_list.height+'px':'88%'}">
               <view class="popup-cont" :style="{'height':check_list.height?check_list.height-45+'px':'415px'}">
            :style="{'width':check_list.width?check_list.width+'px':'375rpx','height':check_list.height?check_list.height+'px':popupType =='center'?'60vh':'88vh'}">
            <view class="popup-cont" :style="{'height':check_list.height?check_list.height-45+'px':popupType =='center'?'50vh':'80vh'}">
                  <view class="view_popup_CheckList" v-for="(item,index) in check_list.items">
                     <checkbox-group class="check_list" @change="checkChange" :data-ischeck="item.check"
                        :data-index="index" :style="{'margin-left': '10rpx'}">
@@ -411,6 +412,23 @@
                     ele.show = true;
                     if (ele.useDict == true) { //判断useDict是否使用字典
                        await this.DictGetInfo(ele.bind.dict, index, 'mast');
                     } else {
                        if (ele?.name === "Select") {
                           const selections = ele?.selections || []
                           //有默认值,显示默认值
                           let itemName = ele.value || "";
                           if (itemName) {
                              $this.head_styledef.form
                                 .model[ele.fieldId] = itemName;
                           }
                           $this.head_styledef.form.items[index].dict = selections.map((a) => {
                              return {
                                 value: a.value,
                                 text: a.label
                              }
                           })
                        }
                     }
                  });
               }
@@ -455,6 +473,21 @@
                  $this.detail1_styledef.form.items.forEach(async (ele, index) => {
                     if (ele.useDict == true) { //判断useDict是否使用字典
                        await this.DictGetInfo(ele.bind.dict, index, 'sub');
                     } else {
                        if (ele?.name === "Select") {
                           const selections = ele?.selections || []
                           //有默认值,显示默认值
                           let itemName = ele.value || "";
                           if (itemName) {
                              $this.detail1_styledef.form.items[ele.fieldId] = itemName;
                           }
                           $this.detail1_styledef.form.items[index].dict = selections.map((a) => {
                              return {
                                 value: a.value,
                                 text: a.label
                              }
                           })
                        }
                     }
                  });
               }
@@ -964,6 +997,17 @@
                  }
               }
            }
         },
         onCheckBoxValue(e) { //绑定Model值
            let values = e.detail.value || []
            let attr = e.currentTarget?.dataset?.attr || ""
            this.head_styledef.form.model[attr] = values;
         },
         onRadioBoxValue(e) { //绑定Model值
            let value = e.detail.value || ""
            let attr = e.currentTarget?.dataset?.attr || ""
            this.head_styledef.form.model[attr] = value;
         },
         onModelValue(item) { //绑定Model值
            //console.log(e.target)
@@ -1955,7 +1999,6 @@
<style>
   .popup-content {
      @include flex;
   }
   .popup-height {