编辑
@@ -35,6 +40,14 @@ export default {
props: {
value: Object,
},
+ watch: {
+ value: {
+ handler(val) {
+ console.log(val);
+ },
+ deep: true,
+ },
+ },
data() {
return {};
},
diff --git a/src/pages/system/view/organization/usermanagement/form.vue b/src/pages/system/view/organization/usermanagement/form.vue
index 39bed447315b571edd2dd1288f7bf5836c755ab6..67fb482dc1506c964e8f4e135af26e83931a486a 100644
--- a/src/pages/system/view/organization/usermanagement/form.vue
+++ b/src/pages/system/view/organization/usermanagement/form.vue
@@ -74,6 +74,7 @@ export default {
this.current--;
},
async onSubmit() {
+ console.log(this.form);
if (this.form.userJobRelationList.length === 0) {
this.$message.error('必须设置岗位!');
return;
@@ -81,9 +82,10 @@ export default {
const userCertificateList = this.form.userCertificateList.map((i) => {
return {
...i,
- pictureUrl: i.pictureUrl[0]?.url || undefined,
+ pictureUrl: i.pictureUrl && (i.pictureUrl[0]?.url || undefined),
};
});
+ console.log(userCertificateList);
const userRoleRelationList = this.form.userRoleRelationList.map((i) => ({ roleId: i }));
const data = { ...this.form, userRoleRelationList, userCertificateList };
if (this.form.userId) {