From 2c66d5e8036399690367a860c6f3f9ca1f82c777 Mon Sep 17 00:00:00 2001 From: su1124 <1583764726@qq.com> Date: 星期三, 13 十二月 2023 18:15:53 +0800 Subject: [PATCH] su --- src/views/hosp/history/index.vue | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/views/hosp/history/index.vue b/src/views/hosp/history/index.vue index f8d2b97..d871618 100644 --- a/src/views/hosp/history/index.vue +++ b/src/views/hosp/history/index.vue @@ -259,7 +259,7 @@ <template slot-scope="scope"> <!-- <el-input v-model="scope.row.isOk" placeholder="璇疯緭鍏ユ槸鍚︾棅鎰�" /> --> <el-select filterable size="mini" v-model="scope.row.harmTypeLogs" multiple placeholder="璇烽�夋嫨鏈夊鍥犵礌" clearable> - <el-option v-for="dict in harmTypeList" :key="dict.aid" :label="dict.harmtype" + <el-option v-for="dict in harmTypeList" :key="dict.aid" :label="dict.harmType" :value="dict.aid" /> </el-select> </template> @@ -300,6 +300,17 @@ name: "History", dicts: ["tj_smoking_pinlv", "sys_yes_no", "tj_work_status", "tj_work", "dict_ageunit", "dict_job"], data() { + let checkPhoneNum = (rule, value, callback) => { + console.log( value) + let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/); + if (value == "" && value == undefined && !value) { + return callback(''); + } else if(value != undefined && value != ""){ + return callback(); + }else if (!patter.test(value)) { + return callback(''); + } + }; return { selectList: [], dataList:[], @@ -376,7 +387,7 @@ deleted: [ { required: true, - message: "$comment涓嶈兘涓虹┖", + validator: checkPhoneNum, trigger: "blur", }, ], -- Gitblit v1.8.0