| | |
| | | <el-table-column type="index" align="center" label="序号" width="65" v-if="data.isIndex" :key="Math.random()"> |
| | | </el-table-column> |
| | | <el-table-column :prop="a.label" :label="a.value" :sortable="data.sort==false?false:'custom'" |
| | | v-for="(a, ai) in tableHead" :key="ai" show-overflow-tooltip min-width="155"> |
| | | v-for="(a, ai) in tableHead" :key="ai" show-overflow-tooltip min-width="155" v-if="!data.headNoShow||(data.headNoShow&&data.headNoShow.length==0)||(data.headNoShow&&data.headNoShow.length>0&&!data.headNoShow.find(d=>d==a.label))"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="showType(a.label, data.tagField) != null"> |
| | | <template v-if="typeof(scope.row[a.label]) == 'object'"> |
| | |
| | | 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' |