cuiqian2004
2025-03-05 e8b665122cf256caae4993534c696d029883f0d5
pages/modal/3200.vue
@@ -16,7 +16,7 @@
                  :placeholder="item.placeholder"
                  :style="{'width':item.setting.prefix && item.setting.suffix?'78%':item.setting.prefix || item.setting.suffix?'87%':'96%'}"
                  :focus="focusMateria" @focus="ontap(item)" @keyup.enter="onEnterChange(item)"
                  @blur="onEnterChange(item)"  :maxlength="-1"/>
                  @blur="onEnterChange(item)" :maxlength="-1" />
               <text v-if="item.setting.suffix" class="uni-icon" :class="[item.setting.suffix]"
                  @click="onEnterChange(item)">&#xe568;</text>
            </view>
@@ -50,9 +50,8 @@
                           <view v-if="item.name!='Layout'">
                              <text class="txt_title"
                                 :style="{'width':item.labelWidth+'px'}">{{item.label}}:</text>
                           <!-- 文本框/数字框 -->
                              <view class="dv_input"
                                 v-if="(item.name=='Input' || item.name=='InputNumber')">
                              <!-- 文本框/数字框 -->
                              <view class="dv_input" v-if="(item.name=='Input' || item.name=='InputNumber')">
                                 <text v-if="item.setting.prefix" class="uni-icon"
                                    :class="[item.setting.prefix]" @change="onChange(item)">&#xe568;</text>
                                 <input class="uni-input" :class="item.disabled?'input-disabled':''"
@@ -60,7 +59,8 @@
                                    v-model="item.value" :disabled="item.disabled"
                                    :placeholder="item.placeholder"
                                    :style="{'width':item.setting.prefix && item.setting.suffix?'78%':item.setting.prefix || item.setting.suffix?'87%':'96%'}"
                                    :focus="focusMateria" @focus="ontap(item)" @blur="onevent(item)" :maxlength="-1"/>
                                    :focus="focusMateria" @focus="ontap(item)" @blur="onevent(item)"
                                    :maxlength="-1" />
                                 <text v-if="item.setting.suffix" class="uni-icon"
                                    :class="[item.setting.suffix]" @click="onChange(item)">&#xe568;</text>
                              </view>
@@ -79,18 +79,20 @@
                              </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="onModelValue(item)"
                                 :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>
@@ -127,21 +129,19 @@
                                          v-model="cols.value" :disabled="cols.disabled"
                                          :placeholder="cols.placeholder"
                                          :style="{'width':cols.setting.prefix && cols.setting.suffix?'78%':cols.setting.prefix || cols.setting.suffix?'87%':'96%'}"
                                          :focus="focusMateria" @focus="ontap(cols)"
                                          @blur="onevent(cols)"  :maxlength="-1"/>
                                          :focus="focusMateria" @focus="ontap(cols)" @blur="onevent(cols)"
                                          :maxlength="-1" />
                                       <text v-if="cols.setting.suffix" class="uni-icon"
                                          :class="[cols.setting.suffix]"
                                          @click="onChange(cols)">&#xe568;</text>
                                    </view>
                                    <!-- 下拉框-单选 cols.useDict?cols.dict:cols.selections-->
                                    <uni-data-select id="dv_select"
                                       v-if="cols.name=='Select'"
                                    <uni-data-select id="dv_select" v-if="cols.name=='Select'"
                                       :class="cols.disabled?'input-disabled':''" v-model="cols.value"
                                       :localdata="cols.dict" @change="onChange(cols)"
                                       :disabled="cols.disabled" :clear="false"></uni-data-select>
                                    <!-- 多行文本 -->
                                    <view class="input-wrapper"
                                       v-if="cols.name=='Textarea'">
                                    <view class="input-wrapper" v-if="cols.name=='Textarea'">
                                       <textarea class="uni-input" :value="cols.value"
                                          :class="cols.disabled?'input-disabled':''"
                                          :placeholder="cols.placeholder" @blur="onModelValue(cols)"
@@ -150,12 +150,12 @@
                                    </view>
                                    <!-- 复选框 -->
                                    <checkbox-group class="check_rememberPwd" v-if="cols.name=='Checkbox'"
                                       :class="cols.disabled?'input-disabled':''" :disabled="item.disabled"
                                       @change="onModelValue(cols)" :data-ischeck="cols.value"
                                       :style="{'margin-left':'10rpx'}">
                                       <label>
                                          <checkbox :value="cols.value" :checked="cols.value" />
                                          <text>{{cols.label}}</text>
                                       :class="cols.disabled?'input-disabled':''" :disabled="cols.disabled"
                                       @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>
                                    <!-- 单选框 -->
@@ -487,7 +487,25 @@
                     console.log(ele.useDict);
                     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
                              }
                           })
                        }
                     }
                  });
               }
@@ -498,7 +516,7 @@
                  title: this.translateSys("error") + "1.1",
                  content: tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
@@ -529,7 +547,7 @@
                  title: this.translateSys("error") + "1.1",
                  content: tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
@@ -564,7 +582,7 @@
                  title: this.translateSys("error") + "1.1",
                  content: tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
         },
@@ -605,7 +623,7 @@
                  title: this.translateSys("error") + "3",
                  content: ex.errMsg,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
         },
@@ -636,14 +654,14 @@
                           title: this.translateSys("tip"),
                           content: tip,
                           showCancel: false,
                           confirmText: this.translateSys("cancel")
                           confirmText: this.translateSys('close')
                        });
                     } else uni.showModal({
                        title: this.translateSys("tip"),
                        content: tip + ',' + this.translateSys('tip') + ':' + result
                           .ret,
                        showCancel: false,
                        confirmText: this.translateSys("cancel")
                        confirmText: this.translateSys('close')
                     });
                     return false;
                  } else {
@@ -653,7 +671,7 @@
                        title: this.translateSys("tip"),
                        content: tip,
                        showCancel: false,
                        confirmText: this.translateSys("cancel")
                        confirmText: this.translateSys('close')
                     });
                     if (result.result_type == 0 && result.action) {
@@ -676,7 +694,7 @@
                              title: this.translateSys("tip"),
                              content: result.info,
                              showCancel: false,
                              confirmText: this.translateSys("cancel")
                              confirmText: this.translateSys('close')
                           });
                        }
                     }
@@ -690,7 +708,7 @@
                        "comma") +
                     tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
@@ -854,7 +872,7 @@
                     title: this.translateSys("error") + "5.1",
                     content: ex.errMsg,
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
               });
            } catch (ex) {
@@ -863,7 +881,7 @@
                  title: this.translateSys("error") + "5.2",
                  content: tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
         },
@@ -919,7 +937,7 @@
                                    content: tip,
                                    showCancel: false,
                                    confirmText: this.translateSys(
                                       "cancel")
                                       'close')
                                 });
                              }
                           }
@@ -995,7 +1013,7 @@
                        title: this.translateSys("tip"),
                        content: this.translateSys("unrealized"),
                        showCancel: false,
                        confirmText: this.translateSys("cancel")
                        confirmText: this.translateSys('close')
                     });
                  }
               } else if (btn.FunCode == "Delete") {
@@ -1015,7 +1033,7 @@
                     title: this.translateSys("tip"),
                     content: this.translateSys("unrealized"),
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
               }
            } catch (ex) {
@@ -1024,7 +1042,7 @@
                  title: this.translateSys("error"),
                  content: tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
         },
@@ -1090,7 +1108,7 @@
                              "delete_success"),
                           showCancel: false,
                           confirmText: this.translateSys(
                              "cancel")
                              'close')
                        });
                     }).catch(ex => {
                        // console.log(ex);
@@ -1100,7 +1118,7 @@
                           content: ex.errMsg,
                           showCancel: false,
                           confirmText: this.translateSys(
                              "cancel")
                              'close')
                        });
                     });
                  } else if (res.cancel) {
@@ -1163,7 +1181,7 @@
                        title: this.translateSys("tip"),
                        content: tip,
                        showCancel: false,
                        confirmText: this.translateSys("cancel")
                        confirmText: this.translateSys('close')
                     });
                  } else uni.showModal({
                     title: this.translateSys("tip"),
@@ -1172,7 +1190,7 @@
                        result
                        .ret,
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
                  return false;
               } else {
@@ -1184,7 +1202,7 @@
                     title: this.translateSys("tip"),
                     content: tip,
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
               }
@@ -1194,7 +1212,7 @@
                  title: this.translateSys("error"),
                  content: tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
               this.showError(ex);
            }
@@ -1243,7 +1261,7 @@
                              'tip_no_app_param'),
                           showCancel: false,
                           confirmText: this.translateSys(
                              "cancel")
                              'close')
                        });
                        return;
                     }
@@ -1268,7 +1286,7 @@
                        content: this.translate(
                           "function_not_exist"),
                        showCancel: false,
                        confirmText: this.translateSys("cancel")
                        confirmText: this.translateSys('close')
                     });
                  }
@@ -1277,7 +1295,7 @@
                     title: this.translateSys("error"),
                     content: this.translate("cannot_related_function"),
                     showCancel: false,
                     confirmText: this.translateSys("cancel")
                     confirmText: this.translateSys('close')
                  });
               }
@@ -1291,7 +1309,7 @@
                  title: this.translateSys("error"),
                  content: tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
               return undefined
            }
@@ -1314,7 +1332,7 @@
                  title: this.translateSys("error") + "7",
                  content: tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
         },
@@ -1456,7 +1474,7 @@
                              content: tip,
                              showCancel: false,
                              confirmText: this
                                 .translateSys("cancel")
                                 .translateSys('close')
                           });
                        } else uni.showModal({
                           title: this.translateSys(
@@ -1468,7 +1486,7 @@
                              .ret,
                           showCancel: false,
                           confirmText: this.translateSys(
                              "cancel")
                              'close')
                        });
                        return false;
                     } else {
@@ -1482,7 +1500,7 @@
                           content: tip,
                           showCancel: false,
                           confirmText: this.translateSys(
                              "cancel")
                              'close')
                        });
                        if (result.result_type == 0 && result
@@ -1527,7 +1545,7 @@
                                 showCancel: false,
                                 confirmText: this
                                    .translateSys(
                                       "cancel")
                                       'close')
                              });
                           }
                        }
@@ -1542,7 +1560,7 @@
                        content: ex.errMsg,
                        showCancel: false,
                        confirmText: this.translateSys(
                           "cancel")
                           'close')
                     });
                  });
               }
@@ -1557,7 +1575,7 @@
                     this.translate('reason') + this.translateSys(
                        "colon") + tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
@@ -1600,7 +1618,7 @@
                           content: tip,
                           showCancel: false,
                           confirmText: this
                              .translateSys("cancel")
                              .translateSys('close')
                        });
                     } else uni.showModal({
                        title: this.translateSys(
@@ -1611,7 +1629,7 @@
                           result.ret,
                        showCancel: false,
                        confirmText: this.translateSys(
                           "cancel")
                           'close')
                     });
                     return false;
                  } else {
@@ -1625,7 +1643,7 @@
                        content: tip,
                        showCancel: false,
                        confirmText: this.translateSys(
                           "cancel")
                           'close')
                     });
                     if (result.result_type == 0 && result
@@ -1701,7 +1719,7 @@
                                 showCancel: false,
                                 confirmText: this
                                    .translateSys(
                                       "cancel"
                                       'close'
                                    )
                              });
                           }
@@ -1716,7 +1734,7 @@
                              showCancel: false,
                              confirmText: this
                                 .translateSys(
                                    "cancel")
                                    'close')
                           });
                        }
                     }
@@ -1731,7 +1749,7 @@
                     content: ex.errMsg,
                     showCancel: false,
                     confirmText: this.translateSys(
                        "cancel")
                        'close')
                  });
               });
            } catch (ex) {
@@ -1744,7 +1762,7 @@
                     this.translate('reason') + this.translateSys(
                        "colon") + tip,
                  showCancel: false,
                  confirmText: this.translateSys("cancel")
                  confirmText: this.translateSys('close')
               });
            }
@@ -2011,7 +2029,7 @@
      },
   };
</script>
<style lang="less">
<style lang="scss">
   .uni-page-modal-3200 {
      display: flex;
      flex-direction: column;
@@ -2223,7 +2241,7 @@
         margin-top: 25rpx;
         padding: 20rpx;
         line-height: 1.5;
         background: #4D6AF4;
         background: #27A6E1;
         border: none;
         color: #fff;
         font-size: 38rpx;
@@ -2238,8 +2256,8 @@
         padding: 20rpx;
         line-height: 1.5;
         background: #fff;
         border: none;
         color: #000;
         // border: none;
          color: #000;
         font-size: 38rpx;
         font-weight: bold;
         float: left;