Browse Source

Merge branch 'monthly_report_daily_0.0.1' of git.xiaojukeji.com:pu_qa_tool/thoth-frontend into monthly_report_daily_0.0.1

qinzhipeng_v@didiglobal.com 4 years ago
parent
commit
aeacc4606c

+ 6 - 4
src/store/modules/monthlyReport/edit/index.js

@@ -542,10 +542,12 @@ export default {
           tabsActive
         })
         // 设置月报子标题
-        commit('SET_SUB_TITLE', {
-          id: pageType.search(/All/) > -1 ? `${id}` : `${res.data.parentId}`,
-          name: pageType.search(/All/) > -1 ? '' : res.data.reportName
-        })
+        setTimeout(() => {
+          commit('SET_SUB_TITLE', {
+            id: pageType.search(/All/) > -1 ? `${id}` : `${res.data.parentId}`,
+            name: pageType.search(/All/) > -1 ? '' : res.data.reportName
+          })
+        }, 700)
       }
     },
     // 月报更新

+ 1 - 1
src/views/monthlyReport/childrenPage/editReport/components/Analysis.vue

@@ -118,7 +118,7 @@ icon="el-icon-plus"
     </el-button>
     <template slot="save">
       <el-button
-        type="danger"
+        type="primary"
         size="small"
         @click.stop="updateModule('Submission')"
         >提交

+ 6 - 3
src/views/monthlyReport/childrenPage/editReport/components/MrTable.vue

@@ -129,7 +129,7 @@
               </div>
 
               <el-input
-                v-else-if="item.displayType === 'TextArea'"
+                v-else-if="item.displayType === 'Texterea'"
                 :ref="`${scope.row.rowKey}_${index}`"
                 v-model="scope.row[item.headerKey]"
                 type="textarea"
@@ -552,11 +552,14 @@ export default {
 /deep/.el-button{
   font-weight: 400;
 }
-.red {
+/deep/.red {
   color: red;
 }
+/deep/.green {
+  color: green;
+}
 
-.yellow {
+/deep/.yellow {
   color: yellow;
 }
 </style>

+ 1 - 1
src/views/monthlyReport/childrenPage/editReport/components/RichText.vue

@@ -8,7 +8,7 @@
       :height="200"
       :full-position-style="{ top:'20px',left:'15%', right: '15%' }"
     />
-    <div v-else style="cursor: pointer;color: #333" @click.stop="editDom" v-html="item.value||'请点此处击添加数据!'" />
+    <div v-else style="cursor: pointer;color: #333;padding-left: 30px;" @click.stop="editDom" v-html="item.value||'请点此处击添加数据!'" />
   </div>
 </template>
 

+ 13 - 11
src/views/monthlyReport/childrenPage/editReport/components/TableExpandRow.vue

@@ -10,14 +10,16 @@
         <span class="item-index">{{ index + 1 }}</span>
       </div>
       <!--问题-->
-      <div class="item-title">问题</div>
-      <div class="item-content">{{ item.problem }}</div>
+      <span class="item-title">问题:</span>
+      <span class="item-content">{{ item.problem }}</span>
+      <br />
       <!--原因-->
-      <div class="item-title">原因</div>
-      <div class="item-content">{{ item.reason }}</div>
+      <span class="item-title">原因:</span>
+      <span class="item-content">{{ item.reason }}</span>
+      <br />
       <!--改进项-->
-      <div class="item-title">改进项</div>
-      <div v-if="item.improvementItems && item.improvementItems.length">
+      <span class="item-title">改进项:</span>
+      <span v-if="item.improvementItems && item.improvementItems.length">
         <div
           v-for="(subItem, subIndex) in item.improvementItems"
           :key="subIndex"
@@ -39,7 +41,7 @@ style="min-width: 50px;display: inline-block;"
             /></span>
             <!--改进项: 计划完成时间-->
             <span
-              style="min-width: 200px;display: inline-block;margin-right: 10px;"
+              style="min-width: 200px;display: inline-block;margin-right: 10px;margin-left: 30px;"
               >计划完成时间:{{ subItem.deadline }}</span
             >
             <!--改进项: 进度-->
@@ -58,12 +60,12 @@ style="min-width: 50px;display: inline-block;"
                   :min="0"
                   :max="100" /></span
               >%
-              <span v-if="subItem.isHold" class="isHold">Hole</span>
+              <span v-if="subItem.isHold" class="isHold">Hold</span>
             </span>
             <!--改进项: 进度更新-->
             <span
               class="up-progress"
-              :style="{ width: !subItem.isHold ? '80px' : '80px' }"
+              :style="{ width: !subItem.isHold ? '60px' : '60px' }"
               ><span
 v-if="(!subItem.personInCharge || subItem.personInCharge.indexOf(username) > -1) && !subItem.isHold"
 @click.stop="progressEdit(subItem)"
@@ -76,7 +78,7 @@ v-if="(!subItem.personInCharge || subItem.personInCharge.indexOf(username) > -1)
             }}</span>
           </div>
         </div>
-      </div>
+      </span>
       <!--责任人: 计划完成时间:进度-->
     </div>
     <Hold ref="Hold" @upData="upHold" />
@@ -190,7 +192,7 @@ export default {
   .progress-wrapper {
     width: 75px;
     display: inline-block;
-    margin-right: 10px;
+    margin-right: 60px;
     position: relative;
     .isHold {
       position: absolute;

+ 1 - 1
src/views/monthlyReport/childrenPage/editReport/components/content.vue

@@ -91,7 +91,7 @@ export default {
 
 <style scoped lang="less">
 .content-wrapper {
-  margin-top: 10px;
+  //margin-top: 10px;
   margin-bottom: 30px;
 }
 </style>

+ 34 - 3
src/views/monthlyReport/childrenPage/editReport/components/core.vue

@@ -1,13 +1,17 @@
 <template>
   <div v-if="baseData.isVisible">
     <div v-if="baseData.type === 'Head1'" :id="baseData.domKey">
-      <headTitle :title="baseData.title" style="padding-top: 37px;" />
+      <headTitle
+        :title="baseData.title"
+        style="padding-top: 37px;padding-bottom: 10px;"
+      />
     </div>
     <div
       v-if="baseData.type.search(/Head2|Head3/) > -1"
       :id="baseData.domKey"
       :style="{ marginTop: baseData.type === 'head3' ? '0' : '10.2px' }"
     >
+      <!-- 不是业务线 -->
       <span
         v-if="fontWeightFont.indexOf(baseData.title) < 0"
         :style="{
@@ -21,7 +25,7 @@
         :sub-title="baseData.subTitles"
       />
       <span
-        v-else
+        v-else-if="isSHowContent()"
         :style="{
           color: '#333',
           fontWeight: fontWeightFont.indexOf(baseData.title) > -1 ? 500 : 400
@@ -40,7 +44,11 @@
       v-if="baseData.content && baseData.content.length"
       style="margin-bottom: -15px"
     >
-      <contentDom :base-data="baseData.content" :title="baseData.title" />
+      <contentDom
+        v-if="isSHowContent()"
+        :base-data="baseData.content"
+        :title="baseData.title"
+      />
     </div>
     <div v-if="baseData.children && baseData.children.length">
       <div v-if="baseData.children[0].type === 'Tag'">
@@ -110,6 +118,12 @@ export default {
       }
       return `${this.domIndex + 1}、`
     },
+    tabsActive() {
+      return this.$store.state.monthlyReportEdit.tabsActive
+    },
+    pageType() {
+      return this.$store.state.monthlyReportEdit.pageType
+    },
     pageDate() {
       return this.$store.state.monthlyReportEdit.pageDate
     }
@@ -199,6 +213,23 @@ export default {
       this.$nextTick(() => {
         this.$refs.markingIssues.openModal(params)
       })
+    },
+    // 判断 本月优秀&持续改进 在 状态大于 20 并且数据内容为空时,不显示
+    isSHowContent() {
+      /*
+       * 当页面处于全部查看时,并且页面数据状态 大于 10 ,并且 是业务线标题,并且 tab页签是·本月优秀·时,才进行判断当前数据是否显示*/
+
+      if (
+        this.tabsActive.search(/本月优秀/ > -1) &&
+        this.tabsActive.search(/本月优秀/ > -1) &&
+        this.baseData &&
+        this.baseData.content[0] &&
+        this.baseData.content[0].type === 'RichText' &&
+        !this.baseData.content[0].value
+      ) {
+        return false
+      }
+      return true
     }
   }
 }

+ 1 - 1
src/views/monthlyReport/childrenPage/editReport/index.vue

@@ -60,7 +60,7 @@
         <el-button
           v-if="(!$route.query.type || $route.query.type !== 'create') && (pageDate && pageDate.status < 20) && (roleCode === 100 || roleCode === 0)"
           slot="reference"
-          plain
+          type="danger"
           size="small"
           @click="dialogOpen('dialogDelete')"
           >删除