Browse Source

月报:优化

洪海涛 4 years ago
parent
commit
839dde2a7d

+ 2 - 2
src/store/modules/monthlyReport/utils/index.js

@@ -30,7 +30,7 @@ export function setReportData(obj, line = 6) {
           if (item.type === 'ReadOnlyTable') {
             setTableHeader(item.tableHeaders)
             item.tableRows = readOnlyTableArrToObj(item.tableRows, item.tableHeaders)
-          } else if (item.type.search(/Table|TableAndRichText/) > -1) {
+          } else if (item.type.search(/Table|TableAndRichText|TableAndFeedBack/) > -1) {
             setTableHeader(item.tableHeaders)
             const { newObj, peopleList } = arrToObj(item.tableRows, item.tableHeaders)
             item.tableRows = newObj
@@ -84,7 +84,7 @@ export function reportDataBack(obj) {
         content.forEach((item) => {
           if (item.type === 'ReadOnlyTable') {
             item.tableRows = readOnlyTableObjToArr(item.tableRows, item.tableHeaders)
-          } else if (item.type.search(/Table|TableAndRichText/) > -1) {
+          } else if (item.type.search(/Table|TableAndRichText|TableAndFeedBack/) > -1) {
             item.tableRows = objToArr(item.tableRows, item.tableHeaders)
           }
         })

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

@@ -449,6 +449,10 @@ export default {
     this.$nextTick(() => {
       this.setAnalyticFeedbackTitle()
       this.init()
+      // 在月报已发布并且页面类型为阅读时设置分析反馈
+      if (this.pageDate && this.pageDate.status > 20 && this.pageType.search(/read/) > -1) {
+        this.setExpandRowKeys()
+      }
     })
     setTimeout(() => {
       if (!this.analyticFeedback) {
@@ -597,7 +601,6 @@ export default {
         //   feedbackType = 'feedbackType'
         // }
         this.setAnalyticFeedback(isFeedbackType ? 'feedbackType' : '', feedbackCharge)
-        this.setExpandRowKeys()
       }
     },
     addTableData() {

+ 250 - 0
src/views/monthlyReport/childrenPage/editReport/components/TableAndFeedBack/TableExpandRow.vue

@@ -0,0 +1,250 @@
+<template>
+  <div>
+    <div v-if="analyticFeedback && analyticFeedback.analyticContents">
+      <div
+        v-for="(item, index) in analyticFeedback.analyticContents"
+        :key="index"
+        class="analyticContents-wrapper"
+      >
+        <!--序号-->
+        <div>
+          <span class="item-index">{{ index + 1 }}</span>
+        </div>
+        <!--问题-->
+        <span class="item-title">问题:</span>
+        <span class="item-content">{{ item.problem }}</span>
+        <br>
+        <!--原因-->
+        <span class="item-title">原因:</span>
+        <span class="item-content">{{ item.reason }}</span>
+        <br>
+        <!--改进项-->
+        <span class="item-title">改进项:</span>
+        <span v-if="item.improvementItems && item.improvementItems.length">
+        <div
+          v-for="(subItem, subIndex) in item.improvementItems"
+          :key="subIndex"
+          class="improvementItems-wrapper"
+        >
+          <!--改进项: 描述-->
+          <div>{{ subIndex + 1 }}、{{ subItem.description }}{{ subItem.detail && ':' }}{{ subItem.detail }}</div>
+          <!--改进项: 其他-->
+          <div class="description-wrapper">
+            <!--改进项: 责任人-->
+            <span style="min-width: 50px;display: inline-block;"><span class="new-title">责任人:</span><span v-if="!subItem.personInCharge || !subItem.personInCharge.length">暂无负责人</span>
+              <MultiplePeopleInfo
+                v-else
+                style="display:inline-block "
+                :team-data="subItem.personInCharge"
+              />
+            </span>
+            <!--改进项: 计划完成时间-->
+            <span style="min-width: 120px;max-width: 200px;display: inline-block;margin-right: 40px;margin-left: 30px;">计划完成时间:{{ rTime(subItem.deadline) }}</span>
+            <!--改进项: 进度-->
+            <span
+              class="progress-wrapper"
+              :style="{ width: '300px' }"
+            ><span class="new-title">进度:</span><span>{{
+                subItem.progress || '0'
+              }}</span
+            >%
+              <el-tooltip
+                v-if="subItem.isHold"
+                class="item"
+                effect="dark"
+                :content="subItem.holdReason"
+                placement="top"
+              >
+                <span class="isHold">Hold</span>
+              </el-tooltip>
+          </span></div>
+        </div>
+      </span>
+        <!--责任人: 计划完成时间:进度-->
+      </div>
+    </div>
+    <div v-else style="padding-bottom: 10px;padding-left: 0;font-size: 14px">暂无分析反馈数据!</div>
+  </div>
+</template>
+
+<script>
+import MultiplePeopleInfo from '../MultiplePeopleInfo'
+
+export default {
+  name: 'TableExpandRow',
+  components: { MultiplePeopleInfo },
+  props: {
+    analyticFeedback: {
+      type: Object,
+      required: false,
+      default: null
+    }
+  },
+  data() {
+    return {
+      username: localStorage.getItem('username')
+    }
+  },
+  methods: {
+    setHold(index, subIndex, subItem) {
+      subItem.isProgressEdit = false
+      if (subItem.isHold) {
+        subItem.isHold = false
+        this.$forceUpdate()
+        return
+      }
+      this.$refs.Hold.open(index, subIndex, subItem.holdReason)
+    },
+    upHold({ index, subIndex, holdReason }) {
+      this.analyticFeedback.analyticContents[index].improvementItems[
+        subIndex
+      ].isHold = true
+      if (holdReason) {
+        window.log({ c: 'report_view', d: 'report_view_Feeback_hold' })
+        this.analyticFeedback.analyticContents[index].improvementItems[
+          subIndex
+        ].holdReason = holdReason
+      }
+      this.$forceUpdate()
+      this.$emit('upAnalyticFeedback')
+    },
+    // 处理日期格式:JS - 2020-01-01T00:00:00.000000Z 日期格式转换
+    rTime(date) {
+      if (!date) return ''
+      var json_date = new Date(date).toJSON()
+      return new Date(new Date(json_date) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '').replace(/00:00:00/, '')
+    }
+  }
+}
+</script>
+
+<style scoped lang="less">
+.analyticContents-wrapper {
+  .text-hide {
+    overflow: hidden; //超出的文本隐藏
+    text-overflow: ellipsis; //溢出用省略号显示
+    white-space: nowrap; //溢出不换行
+  }
+
+  color: #333333;
+  position: relative;
+  // border-bottom: 1px solid #EBEEF5;
+  padding-bottom: 10px;
+  margin-bottom: 10px;
+  font-size: 14px;
+
+  //&::after {
+  //  content: '';
+  //  position: absolute;
+  //  bottom: 0;
+  //  left: -50px;
+  //  right: -50px;
+  //  height: 1px;
+  //  border-bottom: 1px solid #ebeef5;
+  //}
+
+  &:nth-last-child(2) &:nth-last-child(1) {
+    background: #0eb400;
+    border-bottom: 0;
+    padding-bottom: 0;
+    margin-bottom: 0;
+
+    &::after {
+      border-bottom: 0;
+    }
+  }
+
+  .item-index {
+    position: absolute;
+    left: -26px;
+    text-align: center;
+    color: #fff;
+    width: 16px;
+    height: 16px;
+    line-height: 1;
+    background: #1890ff;
+    border-radius: 50%;
+    opacity: 1;
+    display: inline-block;
+  }
+
+  .item-title {
+    color: #666666;
+    margin-bottom: 5px;
+  }
+
+  .item-content {
+    margin-bottom: 5px;
+  }
+
+  .progress-wrapper {
+    width: 75px;
+    display: inline-block;
+    margin-right: 60px;
+    position: relative;
+
+    .isHold {
+      position: absolute;
+      background: #e8e8e8;
+      border-radius: 2px;
+      font-size: 0.25em;
+      line-height: 15px;
+      color: #666666;
+      top: -10px;
+      padding: 0 3px;
+      cursor: pointer;
+
+      &:hover {
+        .holdReason {
+          display: block;
+        }
+      }
+
+      .holdReason {
+        display: none;
+        position: absolute;
+        bottom: 18px;
+        left: 30px;
+        min-width: 90px;
+        background: #e8e8e8;
+        min-height: 14px;
+        z-index: 9999;
+        box-sizing: content-box;
+        padding: 10px;
+        border-radius: 10px;
+      }
+    }
+  }
+
+  .up-progress {
+    color: #1890ff;
+    display: inline-block;
+    // width: 50px;
+    margin: 0 20px 0 50px;
+    // margin-right: 10px;
+    cursor: pointer;
+  }
+
+  .Hold {
+    color: #1890ff;
+    display: inline-block;
+    cursor: pointer;
+  }
+.new-title{
+  color: #666666;
+}
+  // .description-wrapper {
+  // }
+  // .item-problem {
+  // }
+  // .item-reason {
+  // }
+   .improvementItems-wrapper {
+     margin-bottom: 20px;
+     padding-left: 28px;
+     &:last-child{
+       margin-bottom: 0;
+     }
+   }
+}
+</style>

+ 315 - 0
src/views/monthlyReport/childrenPage/editReport/components/TableAndFeedBack/TableExpandRowList.vue

@@ -0,0 +1,315 @@
+<template>
+  <div class="TableExpandRowList-wrapper">
+    <div>
+      <div v-for="(parentItem, parentIndex) in analyticFeedbackList" :key="parentIndex">
+<!--        <div v-if="parentItem && parentItem.feedbackCharge && parentItem.analyticContents && parentItem.analyticContents.length" style="margin-bottom: 30px;">-->
+        <div v-if="parentItem" style="margin-bottom: 30px;">
+          <div v-if="parentItem && parentItem.feedbackCharge " class="contentItem-wrapper-feedbackCharge">
+            <MultiplePeopleInfo
+              class="contentItem-wrapper-MultiplePeopleInfo"
+              :team-data="[parentItem.feedbackCharge]"
+            />
+<!--            <div class="identity">负责人</div>-->
+            <div v-if="parentItem.feedbackBy" class="contentItem-wrapper-feedbackBy">
+              <span class="by">by</span> <MultiplePeopleInfo
+              class="contentItem-wrapper-MultiplePeopleInfo"
+              :team-data="[parentItem.feedbackBy]"
+            />
+            </div>
+          </div>
+
+          <div v-if="parentItem && parentItem.analyticContents && parentItem.analyticContents.length || parentItem.contentItem">
+            <div
+              v-for="(item, index) in parentItem.analyticContents"
+              :key="index"
+              class="analyticContents-wrapper"
+            >
+              <!--序号-->
+              <div>
+                <span class="item-index">{{ index + 1 }}</span>
+              </div>
+              <!--问题-->
+              <span v-if="item.problem" class="item-title">问题:</span>
+              <span v-if="item.problem" class="item-content">{{ item.problem }}</span>
+              <br>
+              <!--原因-->
+              <span v-if="item.reason" class="item-title">原因:</span>
+              <span v-if="item.reason" class="item-content">{{ item.reason }}</span>
+              <br>
+              <!--改进项-->
+              <span v-if="item.improvementItems && item.improvementItems.length" class="item-title">改进项:</span>
+              <span v-if="item.improvementItems && item.improvementItems.length">
+                <div
+                  v-for="(subItem, subIndex) in item.improvementItems"
+                  :key="subIndex"
+                  class="improvementItems-wrapper"
+                >
+                  <!--改进项: 描述-->
+                  <div>{{ subIndex + 1 }}、{{ subItem.description }}{{ subItem.detail && ':' }}{{ subItem.detail }}</div>
+                  <!--改进项: 其他-->
+                  <div class="description-wrapper">
+                    <!--改进项: 责任人-->
+                    <span style="min-width: 50px;display: inline-block;"><span class="new-title">责任人:</span><span v-if="!subItem.personInCharge || !subItem.personInCharge.length">暂无负责人</span>
+                      <MultiplePeopleInfo
+                        v-else
+                        style="display:inline-block "
+                        :team-data="subItem.personInCharge"
+                      />
+                    </span>
+                    <!--改进项: 计划完成时间-->
+                    <span style="min-width: 120px;max-width: 200px;display: inline-block;margin-right: 40px;margin-left: 30px;">计划完成时间:{{ rTime(subItem.deadline) }}</span>
+                    <!--改进项: 进度-->
+                    <span
+                      class="progress-wrapper"
+                      :style="{ width: !subItem.isProgressEdit ? '300px' : '380px' }"
+                    ><span class="new-title">进度:</span><span>{{
+                        subItem.progress || '0'
+                      }}</span
+                    >%
+                      <el-tooltip
+                        v-if="subItem.isHold"
+                        class="item"
+                        effect="dark"
+                        :content="subItem.holdReason"
+                        placement="top"
+                      >
+                        <span class="isHold">Hold</span>
+                      </el-tooltip>
+                    </span>
+                  </div>
+                </div>
+              </span>
+              <!--责任人: 计划完成时间:进度-->
+            </div>
+          </div>
+          <div v-if="!parentItem || !parentItem.analyticContents " style="padding-bottom: 0px;padding-left: 0;font-size: 14px">暂无分析反馈数据!</div>
+
+          <div>
+            <div class="contentItem-wrapper-title">反思与思考</div>
+            <div v-if="parentItem.contentItem" class="contentItem-wrapper-content" v-html="parentItem.contentItem" />
+            <div v-else style="padding-bottom: 10px;padding-left: 0;font-size: 14px">暂无反思与思考!</div>
+          </div>
+        </div>
+      </div>
+<!--      <div v-if="!analyticFeedbackList" style="padding-bottom: 20px;padding-top: 10px;padding-left: 0;font-size: 14px">暂无分析反馈数据!</div>-->
+    </div>
+  </div>
+</template>
+
+<script>
+import MultiplePeopleInfo from '../MultiplePeopleInfo'
+
+export default {
+  name: 'TableExpandRow',
+  components: { MultiplePeopleInfo },
+  props: {
+    analyticFeedbackList: {
+      type: Array,
+      required: false,
+      default: null
+    }
+  },
+  data() {
+    return {
+      username: localStorage.getItem('username')
+    }
+  },
+  methods: {
+
+    // 处理日期格式:JS - 2020-01-01T00:00:00.000000Z 日期格式转换
+    rTime(date) {
+      if (!date) return ''
+      var json_date = new Date(date).toJSON()
+      return new Date(new Date(json_date) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '').replace(/00:00:00/, '')
+    }
+  }
+}
+</script>
+
+<style scoped lang="less">
+.TableExpandRowList-wrapper {
+  .analyticContents-wrapper {
+    .text-hide {
+      overflow: hidden; //超出的文本隐藏
+      text-overflow: ellipsis; //溢出用省略号显示
+      white-space: nowrap; //溢出不换行
+    }
+
+    color: #333333;
+    position: relative;
+    // border-bottom: 1px solid #EBEEF5;
+    padding-bottom: 10px;
+    margin-bottom: 10px;
+    font-size: 14px;
+
+    //&::after {
+    //  content: '';
+    //  position: absolute;
+    //  bottom: 0;
+    //  left: -50px;
+    //  right: -50px;
+    //  height: 1px;
+    //  border-bottom: 1px solid #ebeef5;
+    //}
+
+    &:nth-last-child(2) &:nth-last-child(1) {
+      background: #0eb400;
+      border-bottom: 0;
+      padding-bottom: 0;
+      margin-bottom: 0;
+
+      &::after {
+        border-bottom: 0;
+      }
+    }
+
+    .item-index {
+      position: absolute;
+      left: -26px;
+      text-align: center;
+      color: #fff;
+      width: 16px;
+      height: 16px;
+      line-height: 1;
+      background: #1890ff;
+      border-radius: 50%;
+      opacity: 1;
+      display: inline-block;
+    }
+
+    .item-title {
+      color: #666666;
+      margin-bottom: 5px;
+    }
+
+    .item-content {
+      margin-bottom: 5px;
+    }
+
+    .progress-wrapper {
+      width: 75px;
+      display: inline-block;
+      margin-right: 60px;
+      position: relative;
+
+      .isHold {
+        position: absolute;
+        background: #e8e8e8;
+        border-radius: 2px;
+        font-size: 0.25em;
+        line-height: 15px;
+        color: #666666;
+        top: -10px;
+        padding: 0 3px;
+        cursor: pointer;
+
+        &:hover {
+          .holdReason {
+            display: block;
+          }
+        }
+
+        .holdReason {
+          display: none;
+          position: absolute;
+          bottom: 18px;
+          left: 30px;
+          min-width: 90px;
+          background: #e8e8e8;
+          min-height: 14px;
+          z-index: 9999;
+          box-sizing: content-box;
+          padding: 10px;
+          border-radius: 10px;
+        }
+      }
+    }
+
+    .up-progress {
+      color: #1890ff;
+      display: inline-block;
+      // width: 50px;
+      margin: 0 20px 0 50px;
+      // margin-right: 10px;
+      cursor: pointer;
+    }
+
+    .Hold {
+      color: #1890ff;
+      display: inline-block;
+      cursor: pointer;
+    }
+    .new-title{
+      color: #666666;
+    }
+    // .description-wrapper {
+    // }
+    // .item-problem {
+    // }
+    // .item-reason {
+    // }
+    .improvementItems-wrapper {
+      margin-bottom: 20px;
+      padding-left: 28px;
+      &:last-child{
+        margin-bottom: 0;
+      }
+    }
+  }
+  .MultiplePeopleInfo_932n23211{
+    font-weight: 600;
+    display:inline-block;
+    text-align: center;
+    font-size: 14px
+  }
+  .contentItem-wrapper-feedbackCharge{
+    display: inline-block;
+    border-radius: 5px;
+    position: relative;
+    left: -40px;
+    border: 2px solid #00a0ff;
+    padding: 0px 5px;
+    text-align: center;
+    padding-left: 10px;
+    margin-bottom: 10px;
+    .identity{
+      display: inline-block;
+      //position: absolute;
+      //top: 0px;
+      //right: -35px;
+      border-radius: 20px;
+      padding: 0px 5px;
+      font-size: 12px;
+      background-color: #dcedff;
+      color: #409eff;
+    }
+    .contentItem-wrapper-MultiplePeopleInfo{
+      .MultiplePeopleInfo_932n23211();
+    }
+  }
+  .contentItem-wrapper-feedbackBy {
+    position: relative;
+    //left: -35px;
+    text-align: left;
+    display: inline-block;
+    .by{
+      .MultiplePeopleInfo_932n23211();
+    }
+    .contentItem-wrapper-MultiplePeopleInfo {
+      .MultiplePeopleInfo_932n23211();
+    }
+  }
+  .contentItem-wrapper-title {
+    font-weight: 600;
+    color: #333;
+    font-size: 14px;
+  }
+  .contentItem-wrapper-content {
+    background-color: #f7f7f7;
+    padding: 10px;
+    margin-top: 5px;
+    border-radius: 5px;
+  }
+}
+
+</style>

+ 513 - 0
src/views/monthlyReport/childrenPage/editReport/components/TableAndFeedBack/index.vue

@@ -0,0 +1,513 @@
+<template>
+  <div v-loading="paging.loading" class="table-wrapper">
+    <span @click.stop>
+      <el-table
+        :data="tableData"
+        border
+        style="width: 100%; margin-top: 10px"
+        highlight-current-row
+        row-key="rowKey"
+        :expand-row-keys="expandRowKeys"
+        :header-cell-style="{
+          background: '#F7F7F7',
+          color: '#4a4a4a',
+          'font-size': '14px',
+          'font-weight': '500'
+        }"
+        :cell-style="{ 'font-size': '14px', color: 'rgb(102,102,102)' }"
+        size="small"
+        show-overflow-tooltip="true"
+      >
+        <el-table-column
+          v-for="(item, index) in setColumns(columns)"
+          :key="item.headerKey"
+          :data-index="index"
+          :prop="item.headerKey"
+          :align="item.align"
+          :label="item.name"
+          :type="item.type"
+          :min-width="setMinWidth(item)"
+          :fixed="isFixed(item, index, columns)"
+        >
+          <template slot-scope="scope">
+            <!--    展开    -->
+            <div v-if="item.type === 'expand'">
+              <!-- <div @click="showItem(item, scope)">item</div>-->
+              <TableExpandRowList
+                v-if="scope.row.analyticFeedbackList"
+                :columns="columns"
+                :row="scope.row"
+                :analytic-feedback-list="scope.row.analyticFeedbackList"
+              />
+              <TableExpandRow
+                v-if="scope.row.analyticFeedback && !scope.row.analyticFeedbackList"
+                :columns="columns"
+                :row="scope.row"
+                :analytic-feedback="scope.row.analyticFeedback"
+              />
+            </div>
+            <!--    操作列    -->
+            <div v-else-if="item.name === '操作'">
+              <span v-for="(btnItem, btnIndex) in item.defaultValue" :key="btnIndex">
+                  <el-button
+                    style="margin-right: 10px"
+                    type="text"
+                    @click.stop="btnFun(btnItem, scope)"
+                  >
+                    {{ btnItem.value }}
+                  </el-button>
+                </span>
+            </div>
+            <!-- 其他操作区域 -->
+            <div
+              v-else
+              class="edit-wrapper"
+              :style="{ cursor: pageDate && pageDate.status < 20 ? 'pointer' : 'auto' }"
+            >
+              <!-- 编辑区域 -->
+              <div v-if="editKeys.indexOf(domKey) > -1 && item.displayType === 'Texterea'">
+                <!-- 文本域 -->
+                <el-input
+                  v-model="scope.row[item.headerKey]"
+                  type="textarea"
+                  placeholder="请输入"
+                  :maxlength="item.name.search(/天数/) > -1 ? 10 : ''"
+                  :autosize="{ minRows: item.name.search(/天数/) > -1 ? 1 : 2, maxRows: 30 }"
+                  show-word-limit
+                />
+              </div>
+              <!--  <div v-else class="edit-cell" @click.stop="editLine(scope.row, index)">  -->
+              <!-- 文本展示 -->
+              <div v-else class="edit-cell" @click.stop="editLine(scope.row, index)">
+                <div v-if="item.displayType === 'Cascader'">
+                  <CascaderInfo :team-data="scope.row[item.headerKey]" />
+                </div>
+                <div v-else-if="item.displayType === 'CascaderSingle'">
+                  <CascaderSingleInfo :team-data="scope.row[item.headerKey]" />
+                </div>
+                <div v-else-if="item.displayType === 'Select'">
+                  <!-- 单个人员选择 -->
+                  <div v-if="item.selectType && item.selectType === 'SinglePeople'">
+                    <MultiplePeopleInfo :team-data="scope.row[item.headerKey]" />
+                  </div>
+                  <!-- 多个人员选择 -->
+                  <div v-else-if=" item.selectType && item.selectType === 'MultiplePeople'">
+                    <MultiplePeopleInfo :team-data="scope.row[item.headerKey]" />
+                  </div>
+                  <!-- 多个人员选择 -->
+                  <div v-else-if="item.selectType && item.selectType === 'people'">
+                    <MultiplePeopleInfo :team-data="scope.row[item.headerKey]" />
+                  </div>
+                  <div v-else>
+                    {{ scope.row[item.headerKey] }}
+                  </div>
+                </div>
+                <div
+                  v-else-if="item.displayType === 'Texterea'"
+                  :style="{
+                    cursor: item.name.search(/需求名称|问题/) > -1 && scope.row.operationTarget ? 'pointer' : 'auto',
+                    color: item.name.search(/需求名称|问题/) > -1 && scope.row.operationTarget ? '#1890ff':'#666'
+                  }"
+                  @click.stop="item.name.search(/需求名称|问题/) > -1 && pageType.search(/edit/) < 0 && goto(scope.row.operationTarget) || editLine(scope.row, index)"
+                >
+                  <TextInfo :text-align="item.name" :text="scope.row[item.headerKey]" />
+                </div>
+                <div v-else>
+                 <span v-html="scope.row[item.headerKey]" />
+                </div>
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+    </span>
+
+    <!--  分页  -->
+    <div v-if="false" class="pagination-wrapper">
+      <el-pagination
+        :current-page.sync="paging.curIndex"
+        :page-size="paging.pageSize"
+        :pager-count="5"
+        layout="total, sizes, prev, pager, next, jumper"
+        :page-sizes="[10, 15, 20, 30]"
+        :total="paging.pageTotal"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+    </div>
+
+    <div />
+  </div>
+</template>
+
+<script>
+import _ from 'lodash'
+import { uuid10 } from '@/utils'
+import CascaderInfo from '../CascaderInfo'
+import TextInfo from '../TextInfo'
+import MultiplePeopleInfo from '../MultiplePeopleInfo'
+import TableExpandRow from './TableExpandRow'
+import TableExpandRowList from './TableExpandRowList'
+import CascaderSingleInfo from '../CascaderSingleInfo'
+
+export default {
+  name: 'MrTable',
+  components: {
+    CascaderInfo,
+    MultiplePeopleInfo,
+    TableExpandRow,
+    TableExpandRowList,
+    TextInfo,
+    CascaderSingleInfo
+  },
+  props: {
+    plusTableDataBottom: {
+      type: String,
+      required: false,
+      default: () => '18px'
+    },
+    domKey: {
+      type: String,
+      required: false,
+      default: () => ''
+    },
+    subTitles: {
+      type: Object,
+      required: false,
+      default: () => null
+    },
+    columns: {
+      type: Array,
+      required: false,
+      default: () => []
+    },
+    // 分析反馈时使用的数据
+    title: {
+      type: String,
+      required: false,
+      default: () => ''
+    },
+    tableData: {
+      type: Array,
+      required: false,
+      default: () => []
+    },
+    baseDataDomKey: {
+      type: String,
+      required: false,
+      default: () => ''
+    }
+  },
+  data() {
+    return {
+      analyticFeedback: '',
+      expandRowKeys: [],
+      feedbackIndex: null,
+      username: localStorage.getItem('username'),
+      paging: {
+        tableData: [],
+        curIndex: 1,
+        pageTotal: 0,
+        pageSize: 10,
+        loading: false,
+        timer: 1200
+      }
+    }
+  },
+  computed: {
+    isExpand() {
+      return true
+    },
+    selectEnum() {
+      return this.$store.state.monthlyReportEdit.selectEnum
+    },
+    tabPageData() {
+      return this.$store.state.monthlyReportEdit.tabPageData
+    },
+    pageType() {
+      return this.$store.state.monthlyReportEdit.pageType
+    },
+    tabsActive() {
+      return this.$store.state.monthlyReportEdit.tabsActive
+    },
+    pageDate() {
+      return this.$store.state.monthlyReportEdit.pageDate
+    },
+    roleCode() {
+      return this.$store.state.monthlyReportEdit.roleCode
+    },
+    subReportName() {
+      return this.$store.state.monthlyReportEdit.subReportName
+    },
+    subReportInfo() {
+      return this.$store.state.monthlyReportEdit.subReportInfo
+    },
+    editKeys() {
+      return this.$store.state.monthlyReportEdit.editKeys
+    },
+    isLoading() {
+      return this.$store.state.monthlyReportEdit.isLoading
+    },
+    version() {
+      return this.$store.state.monthlyReportEdit.version
+    },
+    isHistory() {
+      return this.$store.state.monthlyReportEdit.isHistory
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.init()
+    })
+  },
+  methods: {
+    init() {
+      this.paging.curIndex = 1
+      this.paging.pageSize = 10
+      // console.log(this.isLoading, this.domKey)
+      this.paging.loading = this.isLoading.indexOf(this.domKey) > -1
+      this.paging.tableData = [...this.tableData].splice((this.paging.curIndex - 1 || 0) * this.paging.pageSize, this.paging.pageSize)
+      this.paging.pageTotal = this.tableData.length
+      // console.log('init', this.paging)
+      setTimeout(() => {
+        this.paging.loading = false
+        this.setExpandRowKeys()
+      }, this.paging.timer)
+    },
+    setMinWidth(item) {
+      let width = 80
+      if (item.name === '操作') {
+        if (item.defaultValue.length) {
+          width = item.defaultValue.length * (item.defaultValue.length > 2 ? 20 : 30)
+        }
+        if (this.isExpand) {
+          width = 50
+        }
+      }
+      if (item.name === '定级') {
+        width = 70
+      }
+
+      if (item.name === '原因') {
+        width = 150
+      }
+
+      if (item.name === '影响') {
+        width = 100
+      }
+      if (item.name.search(/团队/) > -1) {
+        width = 50
+      }
+      if (item.name.search(/问题/) > -1 && ((this.tabsActive.search(/本月重点问题/) > -1 &&
+        this.pageType === 'readAll') ||
+        (this.pageType === 'read' && this.title === '本月重点问题'))) {
+        width = 300
+      }
+
+      if (item.name.search(/改进项/) > -1) {
+        width = 200
+      }
+
+      if (this.pageType.search(/read/) > -1) {
+        if (item.name.search(/标签|影响/) > -1) {
+          width = 150
+        }
+        if (item.name.search(/定级|天数|类型/) > -1) {
+          width = 35
+        }
+        if (item.name.search(/原因|描述/) > -1) {
+          width = 250
+        }
+        if (item.name.search(/改进项/) > -1) {
+          width = 200
+        }
+        if (item.name.search(/责任人|负责人|模块|团队|是否/) > -1) {
+          width = 40
+        }
+      }
+      return `${width}px`
+    },
+    isFixed(item, index, columns) {
+      if (item.name === '操作') return 'right'
+      return false
+    },
+    editLine(row, index) {
+      // console.log(this.pageDate.status, this.domKey, this.editKeys)
+      if (this.pageDate.status < 20) {
+        this.$store.commit('monthlyReportEdit/ADD_EDIT_KEYS', this.domKey)
+      }
+      this.$forceUpdate()
+    },
+    btnFun(btnItem, scope) {
+      this.$store.commit('monthlyReportEdit/INIT_EDIT_KEYS')
+      if (btnItem.value === '删除') {
+        this.tableData.splice(scope.$index, 1)
+      }
+      if (btnItem.value === '链接') {
+        // console.log(scope)
+        this.$refs['LinkEdit'].open(scope.row.operationTarget || '', scope.$index)
+        // console.log(btnItem, scope, this.columns)
+      }
+      if (btnItem.value === '标记') {
+        this.$refs.markingIssues.modalShow = true
+        this.$nextTick(() => {
+          this.$refs.markingIssues.openModal({
+            title: '标记为重点问题',
+            scope,
+            headerTitle: this.title,
+            columns: this.columns
+          })
+        })
+      }
+      if (btnItem.value === '分析反馈') {
+        // console.log(293, btnItem, scope)
+        this.$refs.Analysis.open(scope.row.analyticFeedbackList, scope.$index, scope.row, this.columns)
+      }
+    },
+    // 添加插入
+    setColumns(columns) {
+      let newColumns = _.cloneDeep(columns)
+      if (this.isExpand) {
+        newColumns = [
+          {
+            dataType: 'Single',
+            defaultValue: null,
+            displayType: 'Cascader',
+            name: '',
+            align: 'left',
+            type: 'expand',
+            selectEnum: null,
+            selectType: null,
+            headerKey: uuid10(6)
+          },
+          ...newColumns
+        ]
+        newColumns[1].align = 'left'
+      }
+      newColumns.forEach((elm) => {
+        if (!elm.align) {
+          elm.align = 'center'
+        }
+      })
+      // if (this.pageDate.status > 10 && this.tabsActive.indexOf('本月重点问题') < 0) {
+      const { isHistory } = this.$route.query
+      // 非编辑状态,并且不是·本月重点问题·,删除操作按钮
+      if (this.pageDate && this.pageDate.status > 10 && !this.isExpand || isHistory) {
+        newColumns.splice(newColumns.length - 1, 1)
+      }
+      return newColumns
+    },
+    setExpandRowKeys() {
+      if (this.isExpand && this.tableData && this.tableData.length) {
+        this.tableData.forEach((elm) => {
+          if (
+            elm.analyticFeedback &&
+            elm.analyticFeedback.hasOwnProperty('isCommitted') &&
+            elm.analyticFeedback.isCommitted &&
+            this.expandRowKeys.indexOf(elm.rowKey) < 0
+          ) {
+            this.expandRowKeys.push(elm.rowKey)
+          }
+          if (
+            elm.analyticFeedbackList &&
+            elm.analyticFeedbackList.length &&
+            this.expandRowKeys.indexOf(elm.rowKey) < 0
+          ) {
+            this.expandRowKeys.push(elm.rowKey)
+          }
+        })
+      }
+    },
+    // 页面跳转
+    goto(url) {
+      // console.log(url)
+      url && window.open(url, '_blank')
+    }
+  }
+}
+</script>
+
+<style scoped lang="less">
+.table-wrapper {
+  position: relative;
+
+  .pagination-wrapper {
+    position: absolute;
+    right: 0;
+    bottom: 5px;
+
+    .el-pagination {
+      margin: 0;
+    }
+  }
+}
+
+.edit-wrapper {
+  .edit-cell {
+    min-height: 23px;
+    width: 100%;
+  }
+}
+
+.plus-table-data {
+  margin-top: 2px;
+}
+
+/deep/ .el-table__expand-column {
+  border-right: 0;
+
+  .el-icon-arrow-right:before {
+    // 这是展开图标
+    border: 1px solid rgba(0, 0, 0, 0.14901960784313725);
+  }
+}
+
+/deep/ .el-table__expand-column .cell {
+  .el-table__expand-icon {
+    .el-icon-arrow-right:before {
+      // 这是展开图标
+      content: '\e6d9';
+      //content: "\e6d8";
+    }
+  }
+
+  .el-table__expand-icon--expanded {
+    // 这是点击后的旋转角度
+    //transform: rotate(180deg);
+    transform: rotate(0deg);
+
+    .el-icon-arrow-right:before {
+      // 这是展开图标
+      //content: "\e6d9";
+      content: '\e6d8' !important;
+    }
+  }
+}
+
+/deep/ .svg-icon {
+  width: 1em;
+  height: 1em;
+}
+
+/deep/ .el-table__expanded-cell {
+  padding-bottom: 0;
+  padding-left: 60px;
+}
+
+/deep/ .el-button {
+  font-weight: 400;
+}
+
+/deep/ .red {
+  color: red;
+}
+
+/deep/ .green {
+  color: green;
+}
+
+/deep/ .yellow {
+  color: yellow;
+}
+
+</style>

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

@@ -24,10 +24,23 @@
           {{ setNoDataTitle(title) }}
         </div>
       </div>
+      <!-- 带分析反馈的table -->
+      <div v-else-if="item.type === 'TableAndFeedBack'">
+        <TableAndFeedBack
+          :title="title"
+          :sub-titles="subTitles"
+          :columns="item.tableHeaders"
+          :table-data="item.tableRows"
+          :dom-key="item.domKey"
+          :base-data-dom-key="baseDataDomKey"
+          plus-table-data-bottom="0px"
+        />
+      </div>
       <div v-else-if="item.type === 'overallOverviewo'">
         <OverallOverviewOfTheServer v-if="pageType.search(/readAll/) > -1 && tabsActive.search(/服务端/) > -1" />
         <OverallOverviewOfTheClient v-if="pageType.search(/readAll/) > -1 && tabsActive.search(/客户端/) > -1" />
       </div>
+
       <!--   表格和富文本:TableAndRichText   -->
       <div v-else-if="item.type === 'TableAndRichText'">
         <mrTable
@@ -88,15 +101,15 @@
         <div v-else class="no-data" style="padding-left: 20px">暂无数据!</div>
       </div>
       <div v-else>
-<!--        <div>item.name{{ item }}</div>-->
-<!--        <div>item.type{{ item.type }}</div>-->
-<!--        <div>item.domKey{{ item.domKey }}</div>-->
-<!--        <fixedText-->
-<!--          v-model="item.value"-->
-<!--          :title="item.title"-->
-<!--          :name="item.name"-->
-<!--          :dom-key="item.domKey"-->
-<!--        />-->
+        <!--        <div>item.name{{ item }}</div>-->
+        <!--        <div>item.type{{ item.type }}</div>-->
+        <!--        <div>item.domKey{{ item.domKey }}</div>-->
+        <!--        <fixedText-->
+        <!--          v-model="item.value"-->
+        <!--          :title="item.title"-->
+        <!--          :name="item.name"-->
+        <!--          :dom-key="item.domKey"-->
+        <!--        />-->
       </div>
     </div>
   </div>
@@ -104,6 +117,7 @@
 
 <script>
 import mrTable from './MrTable'
+import TableAndFeedBack from './TableAndFeedBack'
 import RichText from './RichText'
 import VarText from './VarText'
 import OverallOverviewOfTheServer from './OverallOverviewOfTheServer'
@@ -114,6 +128,7 @@ export default {
   name: 'Content',
   components: {
     mrTable,
+    TableAndFeedBack,
     RichText,
     OverallOverviewOfTheServer,
     OverallOverviewOfTheClient,
@@ -171,7 +186,7 @@ export default {
 }
 </script>
 
-<style scoped lang='less'>
+<style scoped lang="less">
 .content-wrapper {
   //margin-top: 10px;
   //margin-bottom: 15px;

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

@@ -100,7 +100,7 @@
             />
           </div>
           <div v-else style="margin-top: 30px;">暂无数据!</div>
-          <historyRecord v-if="pageType.search(/All/) < 0 && tabPageData && windowHref.indexOf('isHistory=new') < 0" v-model="historyRecordReload" />
+          <historyRecord v-if="pageType.search(/All/) < 0 && tabPageData && windowHref.indexOf('isHistory=new') < 0 && pageDate && pageDate.status <30" v-model="historyRecordReload" />
         </div>
         <div class="right-wrapper">
           <Affix

+ 28 - 6
src/views/monthlyReport/components/monthlyEards.vue

@@ -2,11 +2,22 @@
   <el-card shadow="always" class="card">
     <div class="Layout-flex report-header">
       <span>{{ data.bizName }}</span>
-      <el-button v-show="data.status === 20 || data.status === 30" type="text" @click="jump('report_home_SeeMore', '/monthlyReport/edit', { pageType: data.status === 0 ? 'edit' : 'read', reportId: data.parentId, subReportId: data.subReportId })">查看更多</el-button>
-      <el-button v-show="data.status === 10" type="text" @click="jump('report_home_Edit', '/monthlyReport/edit', { pageType: 'edit', subReportId: data.subReportId, reportId: data.parentId })">填写</el-button>
+      <el-button
+v-show="data.status === 20 || data.status === 30"
+type="text"
+                 @click="jump('report_home_SeeMore', '/monthlyReport/edit', { pageType: data.status === 0 ? 'edit' : 'read', reportId: data.parentId, subReportId: data.subReportId })">
+        查看更多
+      </el-button>
+      <el-button
+v-show="data.status === 10"
+type="text"
+                 @click="jump('report_home_Edit', '/monthlyReport/edit', { pageType: 'edit', subReportId: data.subReportId, reportId: data.parentId })">
+        填写
+      </el-button>
     </div>
     <div class="report-title">
-      <svg-icon class="report-icon-title" icon-class="icon-red" />重点问题
+      <svg-icon class="report-icon-title" icon-class="icon-red" />
+      重点问题
     </div>
     <section class="report-content-data">
       <div style="color: #FAAD14;">
@@ -27,14 +38,15 @@
 
     </section>
     <div class="report-title">
-      <svg-icon class="report-icon-title" icon-class="icon-yellow" />上月改进
+      <svg-icon class="report-icon-title" icon-class="icon-yellow" />
+      上月改进
     </div>
     <section class="report-content-data" style="margin-bottom: 20px;">
       <div v-if="data.lastMonthImprovmentList && !data.lastMonthImprovmentList[0]">暂无数据</div>
       <div v-for="(item, index) in data.lastMonthImprovmentList" v-else :key="index">
         <span>{{ `${index + 1}、${item.name}` }}</span>
         归属团队:<span>{{ item.team || '无' }}</span>
-        达成情况:<span>{{ item.process || '无' }}</span>
+        <versiondom v-if="version === 'v1'">达成情况:<span>{{ item.process || '无' }}</span></versiondom>
       </div>
     </section>
   </el-card>
@@ -43,6 +55,7 @@
 <script>
 export default {
   props: {
+    version: { type: String, required: false, default: 'v1' },
     datas: { type: Object, required: true }
   },
   data() {
@@ -70,7 +83,7 @@ export default {
 
 <style>
 .el-tooltip__popper {
-    max-width: 200px;
+  max-width: 200px;
 }
 </style>
 
@@ -79,46 +92,55 @@ export default {
   color: #333333;
   border: 1px solid #FFF;
   margin: 5px 0;
+
   /deep/ .el-card__body {
     padding: 0;
   }
+
   .Layout-flex {
     display: flex;
     align-items: center;
     justify-content: space-between;
   }
+
   .Layout-start {
     display: flex;
     align-items: center;
     justify-content: flex-start;
   }
+
   .report-header {
     font-weight: 600;
     line-height: 60px;
     padding: 0 20px;
     border-bottom: 1px solid #e2e2e2;
   }
+
   .report-title {
     padding: 10px 20px 5px;
     display: flex;
     align-items: center;
+
     .report-icon-title {
       color: #333333;
       font-size: 30px;
       margin-right: 10px;
     }
   }
+
   .report-content-data {
     margin: 0 20px 0 63px;
     height: 100px;
     overflow-y: auto;
     padding-right: 15px;
     font-size: 12px;
+
     div {
       color: #666666;
       // font-size: 14px;
       font-weight: 400;
       line-height: 23px;
+
       span {
         color: #333333;
       }

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

@@ -43,7 +43,7 @@
       </div>
       <el-row v-if="tagData && tagData.subReportList && tagData.subReportList.length" :gutter="12">
         <el-col v-for="(item, index) in tagData.subReportList" :key="index + 'yh'" :span="innerWidth">
-          <monthlyEards :datas="item" />
+          <monthlyEards :version="tagData.version" :datas="item" />
         </el-col>
       </el-row>
     </div>

+ 1 - 1
src/views/useCase/components/useCase.vue

@@ -31,7 +31,7 @@ export default {
     src() {
       const { caseRoute } = getUrlParamsObj(['caseRoute'])
       // const bizId = EncryptId(`${this.bizId}`)
-//  host =      // const
+      //  host =      // const
       //   getEnv() === 'test'
       //     ? 'http://10.96.83.94:9000/index.html#'
       //     : getEnv() === 'pre'