소스 검색

修改家族树、家族成员、个人发表刷新数据丢失的问题;修改个人生平默认页适应iPhone 5小屏幕

Alex 4 년 전
부모
커밋
8358d238cf
4개의 변경된 파일51개의 추가작업 그리고 33개의 파일을 삭제
  1. 16 10
      src/views/system/appUser/detail/publish.vue
  2. 17 11
      src/views/system/family/detail/member.vue
  3. 16 10
      src/views/system/family/detail/treeList.vue
  4. 2 2
      src/views/template/t.vue

+ 16 - 10
src/views/system/appUser/detail/publish.vue

@@ -206,18 +206,24 @@ export default {
     };
   },
   activated() {
-    this.baseUrl = process.env.VUE_APP_BASE_API;
-    const uid = this.$route.query.uid;
-    this.queryParams.appUserId = uid;
-
-    this.getDicts("sys_yes_no").then(response => {
-      this.messageOptions = response.data;
-    });
-
-    this.getUser(uid);
-    this.getList();
+    this.init();
+  },
+  created(){
+    this.init();
   },
   methods: {
+    init(){
+      this.baseUrl = process.env.VUE_APP_BASE_API;
+      const uid = this.$route.query.uid;
+      this.queryParams.appUserId = uid;
+
+      this.getDicts("sys_yes_no").then(response => {
+        this.messageOptions = response.data;
+      });
+
+      this.getUser(uid);
+      this.getList(); 
+    },
       getUser(id){
         getUser(id).then(response => {
             const nickName = response.data.nickName;

+ 17 - 11
src/views/system/family/detail/member.vue

@@ -147,7 +147,7 @@
         <el-row :gutter="0" type="flex" justify="start">
           <el-col :span="12">
             <el-form-item label="手机号" prop="mobile">
-              <el-input v-model="form.mobile" placeholder="请输入手机号" :readonly="readonly"/>
+              <el-input v-model="form.mobile" placeholder="请输入手机号" :readonly="false"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -289,19 +289,25 @@ export default {
       familyName: null,
     };
   },
+  created(){
+    this.init();
+  },
   activated() {
-    const fid = this.$route.query.fid;
-    this.queryParams.familyId = fid;
-    this.getFamily(fid);
-    this.getList();
-    this.getDicts("sys_user_sex").then((response) => {
-      this.genderOptions = response.data;
-    });
-    this.getDicts("app_member_state").then((response) => {
-      this.stateOptions = response.data;
-    });
+    this.init();
   },
   methods: {
+    init(){
+      const fid = this.$route.query.fid;
+      this.queryParams.familyId = fid;
+      this.getFamily(fid);
+      this.getList();
+      this.getDicts("sys_user_sex").then((response) => {
+        this.genderOptions = response.data;
+      });
+      this.getDicts("app_member_state").then((response) => {
+        this.stateOptions = response.data;
+      });
+    },
     findSpouse(query){
       if (query.length > 1) {
         this.loadings = true;

+ 16 - 10
src/views/system/family/detail/treeList.vue

@@ -197,19 +197,25 @@ export default {
       }
     }
   },
+  created(){
+    this.init();
+  },
   activated() {
-    const fid = this.$route.query.fid;
-    this.queryParams.familyId = fid;
-    this.getFamily(fid);
-    this.getList();
-    this.getDicts("sys_user_sex").then((response) => {
-      this.genderOptions = response.data;
-    });
-    this.getDicts("app_member_state").then((response) => {
-      this.stateOptions = response.data;
-    });
+    this.init();
   },
   methods: {
+    init(){ 
+      const fid = this.$route.query.fid;
+      this.queryParams.familyId = fid;
+      this.getFamily(fid);
+      this.getList();
+      this.getDicts("sys_user_sex").then((response) => {
+        this.genderOptions = response.data;
+      });
+      this.getDicts("app_member_state").then((response) => {
+        this.stateOptions = response.data;
+      });
+    },
     getFamily(id){
       getFamily(id).then(response => {
         this.familyName = response.data.fullName;

+ 2 - 2
src/views/template/t.vue

@@ -30,7 +30,7 @@
   </el-form>
 
     <el-drawer
-      :size="'70%'"
+      :size="'90%'"
       :wrapperClosable="false"
       :close-on-press-escape="false"
       :destroy-on-close="true"
@@ -245,7 +245,7 @@ export default {
 }
 .el-drawer__header {
     margin-bottom: 8px;
-    padding: 10 5 10;
+    padding: 10px 5px 10px;
 }
 .box-card {
   height: 250px;