Browse Source

fix:增加手机号码特殊处理

magic v 4 years ago
parent
commit
5aa9ab1a63

+ 1 - 1
src/pages/FormVolume/Layoutileads1/index.vue

@@ -43,7 +43,7 @@
                   :maxlength="item.max || 200" 
                   :text-right="(item.layout_align || data.topic.layout_align) === 'right'"
                   :placeholder="['input'].includes(item.type) ? '请填写' : '请选择'" 
-                  :readonly="!['input'].includes(item.type)"
+                  :readonly="!['input'].includes(item.type) || item.disabled"
                   v-if="['input', 'select', 'date'].includes(item.type)"
                   @click="!['input'].includes(item.type) && btnOpen(item)" />
 

+ 7 - 1
src/pages/FormVolume/mixins/index.js

@@ -134,7 +134,7 @@ export default {
           let res = await pm
           data = res.data
         }
-
+        
         this.inTopicComponent(data, Custom)
 
         this.$set(this, 'data', data)
@@ -149,6 +149,11 @@ export default {
       data = data || this.data
       data.result.forEach(item => {
         typeof callback === 'function' && callback(item)
+
+        if (new RegExp('手机号码').test(item.title)) {
+          item.val = this.$route.query.patient_mobile || ''
+          item.disabled = true
+        }
       })
     },
     btnOpenSuccess(callback) {
@@ -195,6 +200,7 @@ export default {
         if (this.data.topic.flag === 2) {
           let config = {
             patient_name: new RegExp('姓名'),
+            patient_mobile: new RegExp('手机号码'),
             age: new RegExp('年龄'),
             sex: new RegExp('性别'),
             birthday: new RegExp('出生日期')