reedliuqing_i 5 years ago
parent
commit
39c7ed5742
2 changed files with 21 additions and 17 deletions
  1. 0 2
      package.json
  2. 21 15
      src/views/workbench/person/index.vue

+ 0 - 2
package.json

@@ -31,7 +31,6 @@
     "file-saver": "^2.0.2",
     "file-saver": "^2.0.2",
     "gantt-elastic": "^1.0.11",
     "gantt-elastic": "^1.0.11",
     "gantt-elastic-header": "^0.1.11",
     "gantt-elastic-header": "^0.1.11",
-    "gantt-schedule-timeline-calendar": "^2.6.7",
     "html2canvas": "^1.0.0-rc.3",
     "html2canvas": "^1.0.0-rc.3",
     "jodit": "^3.2.58",
     "jodit": "^3.2.58",
     "js-cookie": "2.2.0",
     "js-cookie": "2.2.0",
@@ -45,7 +44,6 @@
     "v-jsoneditor": "^1.2.2",
     "v-jsoneditor": "^1.2.2",
     "vue": "2.6.10",
     "vue": "2.6.10",
     "vue-fullcalendar": "^1.0.9",
     "vue-fullcalendar": "^1.0.9",
-    "vue-gantt-schedule-timeline-calendar": "^1.0.32",
     "vue-json-viewer": "^2.2.8",
     "vue-json-viewer": "^2.2.8",
     "vue-qr": "^2.2.1",
     "vue-qr": "^2.2.1",
     "vue-router": "3.0.6",
     "vue-router": "3.0.6",

+ 21 - 15
src/views/workbench/person/index.vue

@@ -2,18 +2,20 @@
   <el-container direction="vertical" class="workbench_penson">
   <el-container direction="vertical" class="workbench_penson">
     <el-main class="layout_main header" style="padding: 20px 30px">
     <el-main class="layout_main header" style="padding: 20px 30px">
       <div class="realname">{{ realname }}</div>
       <div class="realname">{{ realname }}</div>
-      <div
-        v-for="(item,index) in teamInfo"
-        v-show="index < 2 || teamInfoShow"
-        :key="index"
-        class="teamInfo"
-      >{{ item.teamName + '的' + getUserRoleInTeam(username,item) }}</div>
-      <div
-        v-if="teamInfo.length>2 && !teamInfoShow"
-        style="margin-top: 20px"
-        class="more"
-        @click.native="teamInfoShow = true"
-      >更多</div>
+      <div v-if="teamInfo">
+        <div
+          v-for="(item,index) in teamInfo"
+          v-show="index < 2 || teamInfoShow"
+          :key="index"
+          class="teamInfo"
+        >{{ item.teamName + '的' + getUserRoleInTeam(username,item) }}</div>
+        <div
+          v-if="teamInfo.length>2 && !teamInfoShow"
+          style="margin-top: 20px"
+          class="more"
+          @click.native="teamInfoShow = true"
+        >更多</div>
+      </div>
     </el-main>
     </el-main>
     <el-container style="margin-top: 10px" class="middle">
     <el-container style="margin-top: 10px" class="middle">
       <el-aside width="32.8%" style="margin-right: 10px" class="layout_aside">
       <el-aside width="32.8%" style="margin-right: 10px" class="layout_aside">
@@ -252,7 +254,7 @@ export default {
       teamInfoShow: false,
       teamInfoShow: false,
       teamAndMemberEnum: {},
       teamAndMemberEnum: {},
       teamAndMemberMap: {},
       teamAndMemberMap: {},
-      teamInfo: [],
+      teamInfo: null,
       userInfo: {},
       userInfo: {},
       username: localStorage.getItem('username'),
       username: localStorage.getItem('username'),
       realname: localStorage.getItem('realname'),
       realname: localStorage.getItem('realname'),
@@ -270,7 +272,10 @@ export default {
   methods: {
   methods: {
     init() {
     init() {
       this.showTeamAndMemberEnum()
       this.showTeamAndMemberEnum()
-      this.queryTeamInfoList(this.username)
+        .then(res => {
+          this.queryTeamInfoList(this.username)
+        })
+
       this.queryWorkList()
       this.queryWorkList()
     },
     },
     dateClick(arg) {
     dateClick(arg) {
@@ -375,7 +380,7 @@ export default {
     handleTabsClick() {},
     handleTabsClick() {},
     // 获取角色信息枚举类
     // 获取角色信息枚举类
     showTeamAndMemberEnum() {
     showTeamAndMemberEnum() {
-      workbenchApi.showTeamAndMemberEnum().then(res => {
+      return workbenchApi.showTeamAndMemberEnum().then(res => {
         this.teamAndMemberEnum = res.data
         this.teamAndMemberEnum = res.data
         if (this.teamAndMemberEnum) {
         if (this.teamAndMemberEnum) {
           for (const i in this.teamAndMemberEnum) {
           for (const i in this.teamAndMemberEnum) {
@@ -389,6 +394,7 @@ export default {
             }
             }
           }
           }
         }
         }
+        return res
       })
       })
     },
     },
     // 获取用户团队列表
     // 获取用户团队列表