diff --git a/src/common/verify/index.js b/src/common/verify/index.js index acb0272ba..2f030082a 100644 --- a/src/common/verify/index.js +++ b/src/common/verify/index.js @@ -457,6 +457,15 @@ export default { callback() } }, + // 验证输入数字和英文 + testNumberCode (rule, value, callback) { + let reg = /[0-9\-]/ + if (value !== '' && !value.match(reg)) { + return callback(new Error('只能输入数字')) + } else { + callback() + } + }, validUrl (rule, value, callback) { let reg = /(^((https|ftp|http|file):\/\/)|www\.)*([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/gm if (!value.match(reg)) { diff --git a/src/components/CustomFormComponents/DatePicker.vue b/src/components/CustomFormComponents/DatePicker.vue index 19fbd067e..c5ea683dc 100644 --- a/src/components/CustomFormComponents/DatePicker.vue +++ b/src/components/CustomFormComponents/DatePicker.vue @@ -11,6 +11,8 @@ :class="{'form-item-disabled': disabled}" > @@ -336,7 +336,7 @@ export default { standNum = item.standSort + ' ' + item.standNumber } // 验证标准号在系统中是否存在 - this.$http.post('lawss/sarTestItem/validateStandNumber', { + this.$http.post('sarStandardsInfo/sar-standards-info/validateStandNumber', { standnumber: standNum }, { _this: this diff --git a/src/pages/details/otherStandardDetails/index.vue b/src/pages/details/otherStandardDetails/index.vue index 0d47b1ac6..179e7af34 100644 --- a/src/pages/details/otherStandardDetails/index.vue +++ b/src/pages/details/otherStandardDetails/index.vue @@ -47,7 +47,7 @@

{{ sarStandardsInfoEO.standYear || '-' }}

{{ sarStandardsInfoEO.standName || '-' }}

{{ sarStandardsInfoEO.standEnName || '-' }}

-

{{ sarStandardsInfoEO.standNature || '-' }}

+

{{ standMap[sarStandardsInfoEO.standNature] || '-' }}