|
@@ -5,7 +5,7 @@
|
|
<el-tab-pane label="个人中心" name="first">
|
|
<el-tab-pane label="个人中心" name="first">
|
|
<el-col :span="24" class="one_1"> 基本信息</el-col>
|
|
<el-col :span="24" class="one_1"> 基本信息</el-col>
|
|
<el-col :span="24" class="one_2">
|
|
<el-col :span="24" class="one_2">
|
|
- <el-form label-position="top" ref="ruleFormRef" :model="form" :rules="rules" label-width="80px" class="form">
|
|
|
|
|
|
+ <el-form label-position="top" ref="FormRef" :model="form" :rules="rules" label-width="80px" class="form">
|
|
<el-form-item label="账号" prop="account">
|
|
<el-form-item label="账号" prop="account">
|
|
<el-input size="large" clearable disabled v-model="form.account" placeholder="请输入账号">
|
|
<el-input size="large" clearable disabled v-model="form.account" placeholder="请输入账号">
|
|
<template #prefix>
|
|
<template #prefix>
|
|
@@ -53,7 +53,7 @@
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-col :span="24" class="button">
|
|
<el-col :span="24" class="button">
|
|
- <el-button type="primary" @click="submitForm(ruleFormRef)">保存</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="submitForm(FormRef)">保存</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-form>
|
|
</el-form>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -139,6 +139,7 @@ const activeName = ref('first')
|
|
const form = ref({})
|
|
const form = ref({})
|
|
// 表单验证
|
|
// 表单验证
|
|
const ruleFormRef = ref()
|
|
const ruleFormRef = ref()
|
|
|
|
+const FormRef = ref()
|
|
const validatePhoneNumber = (rule, value, callback) => {
|
|
const validatePhoneNumber = (rule, value, callback) => {
|
|
const reg = /^1[3-9]\d{9}$/
|
|
const reg = /^1[3-9]\d{9}$/
|
|
if (!value) {
|
|
if (!value) {
|
|
@@ -245,6 +246,8 @@ const submitForm = async (formEl) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
const data = cloneDeep(form.value)
|
|
const data = cloneDeep(form.value)
|
|
if (data.role_type) delete data.role_type
|
|
if (data.role_type) delete data.role_type
|
|
|
|
+ if (data.plate && data.plate.length > 0) data.industry = data.plate[0]
|
|
|
|
+ delete data.plate
|
|
const res = await store.update(data)
|
|
const res = await store.update(data)
|
|
if ($checkRes(res, true)) search()
|
|
if ($checkRes(res, true)) search()
|
|
} else {
|
|
} else {
|