|
@@ -37,15 +37,15 @@
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
:picker-options="pickerOptions"></el-date-picker>
|
|
:picker-options="pickerOptions"></el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
-<!-- <el-form-item label="地址" prop="address" style="width: 160%">-->
|
|
|
|
-<!-- <provincecity-->
|
|
|
|
-<!-- ref="addFormProvince"-->
|
|
|
|
-<!-- @selectChange="locationChange"-->
|
|
|
|
-<!-- :provinceCode="userForm.location.provinceCode!==''?userForm.location.provinceCode:'3200'"-->
|
|
|
|
-<!-- :cityCode="userForm.location.cityCode!==''?userForm.location.cityCode:'3201'"-->
|
|
|
|
-<!-- ></provincecity>-->
|
|
|
|
-<!--<!– :isModifyMode="!isModifyMode"–>-->
|
|
|
|
-<!-- </el-form-item>-->
|
|
|
|
|
|
+ <el-form-item label="省市" prop="address" style="width: 160%">
|
|
|
|
+ <provincecity v-if="userForm.location!==null"
|
|
|
|
+ ref="addFormProvince"
|
|
|
|
+ @selectChange="locationChange"
|
|
|
|
+ :provinceCode="userForm.location!==null?userForm.location&&userForm.location.provinceCode:'3200'"
|
|
|
|
+ :cityCode="userForm.location!==null?userForm.location&&userForm.location.cityCode:'3201'"
|
|
|
|
+ ></provincecity>
|
|
|
|
+<!-- :isModifyMode="!isModifyMode"-->
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="个人能力" style="width: 160%">
|
|
<el-form-item label="个人能力" style="width: 160%">
|
|
<el-checkbox-group v-model="userForm.personalCompetence">
|
|
<el-checkbox-group v-model="userForm.personalCompetence">
|
|
<el-checkbox v-for="item in serviceType" :label="item.code" :name="item.code" :key="item.code" >{{item.name}}</el-checkbox>
|
|
<el-checkbox v-for="item in serviceType" :label="item.code" :name="item.code" :key="item.code" >{{item.name}}</el-checkbox>
|
|
@@ -65,7 +65,7 @@
|
|
import Apis from '@/js/api'
|
|
import Apis from '@/js/api'
|
|
import {notify} from '@/constants/index'
|
|
import {notify} from '@/constants/index'
|
|
import {storageGet,getAllServiceTypes,getProvinceNameByProvinceCode,getProvinceCodeByProvinceName} from '@/js/index'
|
|
import {storageGet,getAllServiceTypes,getProvinceNameByProvinceCode,getProvinceCodeByProvinceName} from '@/js/index'
|
|
- import provincecity from '@/components/commons/ProvinceCity'
|
|
|
|
|
|
+ import provincecity from '@/components/commons/NProvinceCity'
|
|
export default {
|
|
export default {
|
|
name: "Mine",
|
|
name: "Mine",
|
|
data() {
|
|
data() {
|
|
@@ -127,7 +127,8 @@
|
|
console.log(params);
|
|
console.log(params);
|
|
Http.put(`/api/personal/update/${this.user.id}`, params).then(res => {
|
|
Http.put(`/api/personal/update/${this.user.id}`, params).then(res => {
|
|
this.isModifyMode = false;
|
|
this.isModifyMode = false;
|
|
- notify('success', '修改成功 ')
|
|
|
|
|
|
+ notify('success', '修改成功 ');
|
|
|
|
+ this.loadData();
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -187,9 +188,9 @@
|
|
this.userForm.province = res.userVO.province ? res.userVO.province : '';
|
|
this.userForm.province = res.userVO.province ? res.userVO.province : '';
|
|
this.userForm.city = res.userVO.city ? res.userVO.city : '';
|
|
this.userForm.city = res.userVO.city ? res.userVO.city : '';
|
|
this.userForm.personalCompetence = res.userVO.personalCompetence ? res.userVO.personalCompetence : [];
|
|
this.userForm.personalCompetence = res.userVO.personalCompetence ? res.userVO.personalCompetence : [];
|
|
- this.location = getProvinceCodeByProvinceName(this.userForm.province, this.userForm.city);
|
|
|
|
- this.userForm.province = this.location&&this.location.provinceCode;
|
|
|
|
- this.userForm.city = this.location&&this.location.cityCode;
|
|
|
|
|
|
+ this.userForm.location = getProvinceCodeByProvinceName(this.userForm.province, this.userForm.city);
|
|
|
|
+ this.userForm.province = this.userForm.location&&this.userForm.location.provinceCode;
|
|
|
|
+ this.userForm.city = this.userForm.location&&this.userForm.location.cityCode;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
setUserInfo(){
|
|
setUserInfo(){
|
|
@@ -203,9 +204,11 @@
|
|
|
|
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.setUserInfo();
|
|
|
|
- this.setServiceType();
|
|
|
|
- this.loadData();
|
|
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ this.setUserInfo();
|
|
|
|
+ this.setServiceType();
|
|
|
|
+ this.loadData();
|
|
|
|
+ })
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|