diff --git a/src/views/auditPages/assetsManagement/assetsAuth.vue b/src/views/auditPages/assetsManagement/assetsAuth.vue index aa15846..a83283d 100644 --- a/src/views/auditPages/assetsManagement/assetsAuth.vue +++ b/src/views/auditPages/assetsManagement/assetsAuth.vue @@ -105,7 +105,15 @@ </el-form-item> </el-col> <el-col :span="18" style="margin-left: 10px;"> - <el-form-item prop="Port"> + <el-form-item prop="ymtxrLxfs" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="ruleForm.ymtxrLxfs" style="width: 100%;" placeholder="请输入11位移动电话号码"></el-input> </el-form-item> </el-col> @@ -657,7 +665,15 @@ </el-form-item> </el-col> <el-col :span="8" style="margin-left: 10px;"> - <el-form-item prop="email"> + <el-form-item prop="fgfzryx" + :rules="[ + { + type: 'email', + message: '请输入正确的邮箱地址', + trigger: ['blur', 'change'] + } + ]" + > <el-input v-model="ruleForm.fgfzryx" style="width: 100%;" placeholder="请输入邮箱"></el-input> </el-form-item> </el-col> @@ -680,7 +696,15 @@ </el-form-item> </el-col> <el-col :span="8" style="margin-left: 10px;"> - <el-form-item prop="email"> + <el-form-item prop="bmfzryx" + :rules="[ + { + type: 'email', + message: '请输入正确的邮箱地址', + trigger: ['blur', 'change'] + } + ]" + > <el-input v-model="ruleForm.bmfzryx" style="width: 100%;" placeholder="请输入邮箱"></el-input> </el-form-item> </el-col> @@ -703,7 +727,15 @@ </el-form-item> </el-col> <el-col :span="8" style="margin-left: 10px;"> - <el-form-item prop="email"> + <el-form-item prop="dylxryx" + :rules="[ + { + type: 'email', + message: '请输入正确的邮箱地址', + trigger: ['blur', 'change'] + } + ]" + > <el-input v-model="ruleForm.dylxryx" style="width: 100%;" placeholder="请输入邮箱"></el-input> </el-form-item> </el-col> @@ -726,7 +758,15 @@ </el-form-item> </el-col> <el-col :span="7" style="margin-left: 10px;"> - <el-form-item prop="email"> + <el-form-item :prop="'otherConcat.' + index + '.qtlxryx'" + :rules="[ + { + type: 'email', + message: '请输入正确的邮箱地址', + trigger: ['blur', 'change'] + } + ]" + > <el-input v-model="domain.qtlxryx" style="width: 100%;" placeholder="请输入邮箱"></el-input> </el-form-item> </el-col> @@ -828,7 +868,15 @@ </el-row> <el-row> <el-col :span="12"> - <el-form-item label="备案联系人电话"> + <el-form-item label="备案联系人电话" prop="ipcBalxrdh" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="ruleForm.ipcBalxrdh" style="width: 100%;" placeholder="请输入备案联系人电话"></el-input> </el-form-item> </el-col> @@ -1094,7 +1142,15 @@ </el-row> <el-row style="display: flex;"> <el-col :span="8"> - <el-form-item label="测评机构联系人电话"> + <el-form-item label="测评机构联系人电话" prop="sfCpjglxrdh" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="ruleForm.sfCpjglxrdh" style="width: 100%;" placeholder="请输入测评机构联系人电话"></el-input> </el-form-item> </el-col> @@ -1111,12 +1167,28 @@ </el-row> <el-row style="display: flex;"> <el-col :span="8"> - <el-form-item label="测评时联系人电话"> + <el-form-item label="测评时联系人电话" prop="sfCpslxrdh" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="ruleForm.sfCpslxrdh" style="width: 100%;" placeholder="请输入测评时联系人电话"></el-input> </el-form-item> </el-col> <el-col :span="8"> - <el-form-item label="测评师电话"> + <el-form-item label="测评师电话" prop="sfCpsdh" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="ruleForm.sfCpsdh" style="width: 100%;" placeholder="请输入测评师电话"></el-input> </el-form-item> </el-col> @@ -1230,7 +1302,15 @@ </el-form-item> </el-col> <el-col :span="11" style="margin-left: 10px;"> - <el-form-item class="daoqitixingren" :label="'联系电话' + (index == 0 ? '' : index)"> + <el-form-item class="daoqitixingren" :label="'联系电话' + (index == 0 ? '' : index)" :prop="'chepingUnit.' + index + '.lxdh'" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="domain.lxdh" placeholder="请输入联系电话"></el-input> </el-form-item> </el-col> @@ -1260,7 +1340,15 @@ </el-form-item> </el-col> <el-col :span="11" style="margin-left: 10px;"> - <el-form-item class="daoqitixingren" :label="'联系电话' + (index == 0 ? '' : index)"> + <el-form-item class="daoqitixingren" :label="'联系电话' + (index == 0 ? '' : index)" :prop="'yjgysUnit.' + index + '.lxdh'" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="domain.lxdh" placeholder="请输入联系电话"></el-input> </el-form-item> </el-col> @@ -1290,7 +1378,15 @@ </el-form-item> </el-col> <el-col :span="11" style="margin-left: 10px;"> - <el-form-item class="daoqitixingren" :label="'联系电话' + (index == 0 ? '' : index)"> + <el-form-item class="daoqitixingren" :label="'联系电话' + (index == 0 ? '' : index)" :prop="'jfywUnit.' + index + '.lxdh'" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="domain.lxdh" placeholder="请输入联系电话"></el-input> </el-form-item> </el-col> @@ -1320,7 +1416,15 @@ </el-form-item> </el-col> <el-col :span="11" style="margin-left: 10px;"> - <el-form-item class="daoqitixingren" :label="'联系电话' + (index == 0 ? '' : index)"> + <el-form-item class="daoqitixingren" :label="'联系电话' + (index == 0 ? '' : index)" :prop="'xtsjUnit.' + index + '.lxdh'" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="domain.lxdh" placeholder="请输入联系电话"></el-input> </el-form-item> </el-col> @@ -1350,7 +1454,15 @@ </el-form-item> </el-col> <el-col :span="12" style="margin-left: 10px;"> - <el-form-item class="daoqitixingren" required :label="'联系电话' + (index == 0 ? '' : index)"> + <el-form-item class="daoqitixingren" required :label="'联系电话' + (index == 0 ? '' : index)" :prop="'xtjsUnit.' + index + '.lxdh'" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="domain.lxdh" placeholder="请输入联系电话"></el-input> </el-form-item> </el-col> @@ -1399,7 +1511,15 @@ </el-form-item> </el-col> <el-col :span="12" style="margin-left: 10px;"> - <el-form-item class="daoqitixingren" required :label="'联系电话' + (index == 0 ? '' : index)"> + <el-form-item class="daoqitixingren" required :label="'联系电话' + (index == 0 ? '' : index)" :prop="'xtyyUnit.' + index + '.lxdh'" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="domain.lxdh" placeholder="请输入联系电话"></el-input> </el-form-item> </el-col> @@ -1448,7 +1568,15 @@ </el-form-item> </el-col> <el-col :span="11" style="margin-left: 10px;"> - <el-form-item class="daoqitixingren" :label="'联系电话' + (index == 0 ? '' : index)"> + <el-form-item class="daoqitixingren" :label="'联系电话' + (index == 0 ? '' : index)" :prop="'aqfwUnit.' + index + '.lxdh'" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="domain.lxdh" placeholder="请输入联系电话"></el-input> </el-form-item> </el-col> @@ -1772,7 +1900,15 @@ </el-form-item> </el-col> <el-col :span="8" style="margin-left: 10px;"> - <el-form-item label="机房联系人电话"> + <el-form-item label="机房联系人电话" prop="xjgywxt.yptJflxrdh" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="ruleForm.xjgywxt.yptJflxrdh" style="width: 100%;" placeholder="请输入机房联系人电话"></el-input> </el-form-item> </el-col> @@ -1821,7 +1957,15 @@ </el-form-item> </el-col> <el-col :span="8" style="margin-left: 10px;"> - <el-form-item label="机房联系人电话"> + <el-form-item label="机房联系人电话" prop="xjgywxt.dsjJflxrdh" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="ruleForm.xjgywxt.dsjJflxrdh" style="width: 100%;" placeholder="请输入机房联系人电话"></el-input> </el-form-item> </el-col> @@ -1908,7 +2052,15 @@ </el-form-item> </el-col> <el-col :span="8" style="margin-left: 10px;"> - <el-form-item label="联系人电话"> + <el-form-item label="联系人电话" prop="xjgywxt.wlwsbLxrdh" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="ruleForm.xjgywxt.wlwsbLxrdh" style="width: 100%;" placeholder="请输入联系人电话"></el-input> </el-form-item> </el-col> @@ -1992,18 +2144,26 @@ </el-col> </el-row> <el-row style="display: flex;"> - <el-col :span="8" style="margin-left: 10px;"> + <el-col :span="8"> <el-form-item label="服务端IP"> <el-input v-model="ruleForm.xjgywxt.appIp" style="width: 100%;" placeholder="请输入服务端IP"></el-input> </el-form-item> </el-col> - <el-col :span="8"> + <el-col :span="8" style="margin-left: 10px;"> <el-form-item label="联系人"> <el-input v-model="ruleForm.xjgywxt.appLxr" style="width: 100%;" placeholder="请输入联系人"></el-input> </el-form-item> </el-col> <el-col :span="8" style="margin-left: 10px;"> - <el-form-item label="联系人电话"> + <el-form-item label="联系人电话" prop="xjgywxt.appLxrdh" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="ruleForm.xjgywxt.appLxrdh" style="width: 100%;" placeholder="请输入联系人电话"></el-input> </el-form-item> </el-col> @@ -2096,7 +2256,15 @@ </el-form-item> </el-col> <el-col :span="8" style="margin-left: 10px;"> - <el-form-item label="联系人电话"> + <el-form-item label="联系人电话" prop="xjgywxt.gykzLxrdh" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > <el-input v-model="ruleForm.xjgywxt.gykzLxrdh" style="width: 100%;" placeholder="请输入联系人电话"></el-input> </el-form-item> </el-col> @@ -2189,8 +2357,17 @@ </el-form-item> </el-col> <el-col :span="8" style="margin-left: 10px;"> - <el-form-item label="联系人电话"> - <el-input v-model="ruleForm.xjgywxt.cdnLxrdh" style="width: 100%;" placeholder="请输入联系人电话"></el-input> + <el-form-item label="联系人电话" prop="xjgywxt.cdnLxrdh" + :rules="[ + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: '请输入正确的手机号码', + trigger: 'blur' + } + ]" + > + <el-input v-model="ruleForm.xjgywxt.cdnLxrdh" style="width: 100%;" placeholder="请输入联系人电话" + ></el-input> </el-form-item> </el-col> </el-row> @@ -2228,7 +2405,15 @@ </el-row> <el-row style="display: flex;"> <el-col :span="12"> - <el-form-item label="注册邮箱"> + <el-form-item label="注册邮箱" prop="whoisZcyx" + :rules="[ + { + type: 'email', + message: '请输入正确的邮箱地址', + trigger: ['blur', 'change'] + } + ]" + > <el-input v-model="ruleForm.whoisZcyx" placeholder="请输入注册邮箱"></el-input> </el-form-item> </el-col> @@ -2703,17 +2888,17 @@ export default { this.$set(this.ruleForm.xjgywxt, 'remark', "") } this.ruleForm.xttz ? this.xttz = this.ruleForm.xttz.split(',') : []; - this.ruleForm.gylxxList.length > 0 ? this.chepingUnit = this.ruleForm.gylxxList.filter((item) => item.type == 1) : [] - this.ruleForm.gylxxList.length > 0 ? this.yjgysUnit = this.ruleForm.gylxxList.filter((item) => item.type == 2) : [] - this.ruleForm.gylxxList.length > 0 ? this.jfywUnit = this.ruleForm.gylxxList.filter((item) => item.type == 3) : [] - this.ruleForm.gylxxList.length > 0 ? this.xtsjUnit = this.ruleForm.gylxxList.filter((item) => item.type == 4) : [] - this.ruleForm.gylxxList.length > 0 ? this.xtjsUnit = this.ruleForm.gylxxList.filter((item) => item.type == 5) : [] - this.ruleForm.gylxxList.length > 0 ? this.xtyyUnit = this.ruleForm.gylxxList.filter((item) => item.type == 7) : [] - this.ruleForm.gylxxList.length > 0 ? this.aqfwUnit = this.ruleForm.gylxxList.filter((item) => item.type == 6) : [] + this.chepingUnit = (this.ruleForm.gylxxList.filter((item) => item.type == 1) == [] ? this.ruleForm.gylxxList.filter((item) => item.type == 1) : [{name:"",tyshxydm:"",lxr:"",lxdh:"",type:1}]) + this.yjgysUnit = (this.ruleForm.gylxxList.filter((item) => item.type == 2) == [] ? this.ruleForm.gylxxList.filter((item) => item.type == 2) : [{name:"",tyshxydm:"",lxr:"",lxdh:"",type:2}]) + this.jfywUnit = (this.ruleForm.gylxxList.filter((item) => item.type == 3) == [] ? this.ruleForm.gylxxList.filter((item) => item.type == 3) : [{name:"",tyshxydm:"",lxr:"",lxdh:"",type:3}]) + this.xtsjUnit = (this.ruleForm.gylxxList.filter((item) => item.type == 4) == [] ? this.ruleForm.gylxxList.filter((item) => item.type == 4) : [{name:"",tyshxydm:"",lxr:"",lxdh:"",type:4}]) + this.xtjsUnit = (this.ruleForm.gylxxList.filter((item) => item.type == 5) == [] ? this.ruleForm.gylxxList.filter((item) => item.type == 5) : [{name:"",tyshxydm:"",lxr:"",lxdh:"",type:5}]) + this.xtyyUnit = (this.ruleForm.gylxxList.filter((item) => item.type == 7) == [] ? this.ruleForm.gylxxList.filter((item) => item.type == 7) : [{name:"",tyshxydm:"",lxr:"",lxdh:"",type:7}]) + this.aqfwUnit = (this.ruleForm.gylxxList.filter((item) => item.type == 6) == [] ? this.ruleForm.gylxxList.filter((item) => item.type == 6) : [{name:"",tyshxydm:"",lxr:"",lxdh:"",type:6}]) - this.fwqxx = this.ruleForm.jcwlList.filter((item) => item.type == 1) - this.wlsb = this.ruleForm.jcwlList.filter((item) => item.type == 2) - this.aqsb = this.ruleForm.jcwlList.filter((item) => item.type == 3) + this.fwqxx = (this.ruleForm.jcwlList.filter((item) => item.type == 1) == [] ? this.ruleForm.jcwlList.filter((item) => item.type == 1) : [{sblx:"",pp:"",ipType:"",sbIP:"",czxx:"",czxxbb:"",yjxh:"",yjxlh:"",yjbbxx:"",yjyt:"",yjbswz:"",type: 1}]) + this.wlsb = (this.ruleForm.jcwlList.filter((item) => item.type == 2) == [] ? this.ruleForm.jcwlList.filter((item) => item.type == 2) : [{sblx:"",pp:"",ipType:"",sbIP:"",czxx:"",czxxbb:"",yjxh:"",yjxlh:"",yjbbxx:"",yjyt:"",yjbswz:"",type: 2}]) + this.aqsb = (this.ruleForm.jcwlList.filter((item) => item.type == 3) == [] ? this.ruleForm.jcwlList.filter((item) => item.type == 3) : [{sblx:"",pp:"",ipType:"",sbIP:"",czxx:"",czxxbb:"",yjxh:"",yjxlh:"",yjbbxx:"",yjyt:"",yjbswz:"",type: 3}]) this.xtfhqkFcg = this.ruleForm.xtfhqkFcg.split(',') this.xtfhqkFxl = this.ruleForm.xtfhqkFxl.split(',')