| | |
| | | return |
| | | } |
| | | } |
| | | this.upLoad = true |
| | | for (var a in this.data.selectField) { |
| | | if (this.data.selectField[a].choose == true) { |
| | | this.upData[a] = JSON.stringify(this.upData[a]) |
| | | } |
| | | } |
| | | this.upHead.forEach((item, index) => { |
| | | if (this.data.cascaderField && this.data.cascaderField[item.label]) { |
| | | if (this.upData[item.label]) { |
| | | this.upData[item.label] = JSON.stringify(this.upData[item.label]) |
| | | } else { |
| | | this.upData[item.label] = '' |
| | | for (var i = 0; i < this.upHead.length; i++) { |
| | | if(this.upHead[i].label == 'password'){ |
| | | if(this.upData[this.upHead[i].label]){ |
| | | const reg2 =/^(?=.*?[a-z])(?=.*?[A-Z])(?=.*?\d)(?=.*?[~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?])[a-zA-Z\d~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?]*$/; |
| | | if (!reg2.test(this.upData[this.upHead[i].label])) { |
| | | this.$message.error('密码必须包括数字、大小写字母以及特殊字符') |
| | | return |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | if (this.data.cascaderField && this.data.cascaderField[this.upHead[i].label]) { |
| | | if (this.upData[this.upHead[i].label]) { |
| | | this.upData[this.upHead[i].label] = JSON.stringify(this.upData[this.upHead[i].label]) |
| | | } else { |
| | | this.upData[this.upHead[i].label] = '' |
| | | } |
| | | } |
| | | } |
| | | this.upLoad = true |
| | | this.$axios.post(this.upUrl, this.upData, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |