朱鑫波 4 éve
szülő
commit
5f87402046
1 módosított fájl, 55 hozzáadás és 9 törlés
  1. 55 9
      src/views/OKRpage.vue

+ 55 - 9
src/views/OKRpage.vue

@@ -248,8 +248,8 @@
                   <h2>{{ "KR:" + ele.krInfo }}</h2>
                   <p>{{ "详细描述:" + (ele.krDesc || "暂无") }}</p>
 
-                  <h2>对齐KR</h2>
-                  <div>
+                  <h2>对齐KR</h2>
+                  <div style="max-height: 200px; overflow: auto">
                     <ul>
                       <li
                         v-for="(list, indexOne) in Alignment"
@@ -262,7 +262,8 @@
                             width: 100%;
                           "
                         >
-                          {{ list.krInfo }}
+                          <span style="width: 60%">{{ list.krInfo }}</span
+                          ><span>{{ list.userName }}</span>
 
                           <a
                             @click="deleteAlignment(list.id, ele)"
@@ -287,6 +288,45 @@
                       >确定</el-button
                     > -->
                   </div>
+                  <h2>对齐我的KR</h2>
+                  <div style="max-height: 200px; overflow: auto">
+                    <ul>
+                      <li
+                        v-for="(list, indexOne) in otherAligned"
+                        style="display: flex; justify-content: space-between"
+                      >
+                        <p
+                          style="
+                            display: flex;
+                            justify-content: space-between;
+                            width: 100%;
+                          "
+                        >
+                          {{ list.krInfo }}
+                          <span>{{ list.userName }}</span>
+                          <!-- <a
+                            @click="deleteAlignment(list.id, ele)"
+                            style="
+                              white-space: nowrap;
+                              margin-left: 20px;
+                              cursor: pointer;
+                              color: red;
+                            "
+                            >删除</a
+                          > -->
+                        </p>
+                      </li>
+                    </ul>
+                    <!-- <el-button size="mini" type="text" @click="visible = false"
+                      >取消</el-button
+                    >
+                    <el-button
+                      type="primary"
+                      size="mini"
+                      @click="visible = false"
+                      >确定</el-button
+                    > -->
+                  </div>
 
                   <span slot="reference" class="content">
                     <span class="KR-content">
@@ -1129,7 +1169,10 @@
           <li v-for="(item, index) in alignmentList" class="infinite-list-item">
             <el-checkbox :key="item.id" :label="item.id">
               <el-card class="box-card">
-                <h3>{{ item.krInfo }}</h3>
+                <h3>
+                  {{ item.krInfo
+                  }}<span style="color: red">({{ item.userName }})</span>
+                </h3>
                 <p class="text item">
                   {{ item.krDesc }}
                 </p>
@@ -1194,6 +1237,7 @@ export default {
       checkedCities: [],
       krId: null,
       Alignment: [],
+      otherAligned: [],
       yearValue: undefined,
       cycleValue: undefined,
       yearsOptions: [],
@@ -1353,9 +1397,9 @@ export default {
           this.AlignmentVisible = false;
           this.alignmentPage = 1;
           this.okLoading = false;
-        }else{
+        } else {
           this.$message.success(res.message);
-           this.okLoading = false;
+          this.okLoading = false;
         }
       });
     },
@@ -1366,8 +1410,8 @@ export default {
       this.AlignmentVisible = true;
       this.krId = ele.id;
       getAction("/okr/kr/list", {
-        year: "2020",
-        quarter: 4,
+        year: this.yearValue,
+        quarter: this.cycleValue,
         pageSize: 10,
         pageNo: 1,
         userId: this.person,
@@ -1408,9 +1452,11 @@ export default {
     getAlignmentList(ele) {
       console.log(ele);
       this.Alignment = [];
+      this.otherAligned = [];
       postAction(`/okr/kr/alignList?originId=${ele.id}`).then((res) => {
         if (res.success) {
-          this.Alignment.push(...res.data);
+          this.Alignment.push(...res.myAlign);
+          this.otherAligned.push(...res.otherAligned);
         }
       });
     },