소스 검색

添加日报

qinzhipeng_v 5 년 전
부모
커밋
1964dd813b

+ 119 - 0
src/api/reportTemplate.js

@@ -29,3 +29,122 @@ export function settingUpdateReportModule(data) {
     data
   })
 }
+
+// 删除模板,需校验权限
+export function settingDeleteReportModule(data, id) {
+  return request({
+    url: Presentation + `/setting/deleteReportModule?id=${id}`,
+    method: 'post',
+    data
+  })
+}
+
+// 获取单个模板内容
+export function settingGetReportModuleById(id) {
+  return request({
+    url: Presentation + `/setting/getReportModuleById?id=${id}`,
+    method: 'get'
+  })
+}
+
+// 根据任务idList获取P0P1缺陷类别
+export function bugGetReportHighPriData(data) {
+  return request({
+    url: Presentation + '/bug/getReportHighPriData',
+    method: 'post',
+    data
+  })
+}
+
+// 根据任务idList获取缺陷统计数据
+export function bugGetReportSumData(data) {
+  return request({
+    url: Presentation + '/bug/getReportSumData',
+    method: 'post',
+    data
+  })
+}
+
+// 报告创建
+export function dailyReportCreate(data) {
+  return request({
+    url: Presentation + '/dailyReport/create',
+    method: 'post',
+    data
+  })
+}
+
+// 更新创建
+export function dailyReportUpdate(data) {
+  return request({
+    url: Presentation + '/dailyReport/update',
+    method: 'post',
+    data
+  })
+}
+
+// 获取缺陷责任人分布
+export function bugGetReportDisDataByMember(data) {
+  return request({
+    url: Presentation + '/bug/getReportDisDataByMember',
+    method: 'post',
+    data
+  })
+}
+
+// 获取缺陷等级分布
+export function bugGetReportDisDataByPri(data) {
+  return request({
+    url: Presentation + '/bug/getReportDisDataByPri',
+    method: 'post',
+    data
+  })
+}
+
+// 报告查看(需区分已发送或未发送)
+export function dailyReportGetV2(id) {
+  return request({
+    url: Presentation + `/dailyReport/getV2?id=${id}`,
+    method: 'get'
+  })
+}
+
+// 查看所有日报列表 (新)
+export function dailyReportListV2(data) {
+  return request({
+    url: Presentation + '/dailyReport/listV2',
+    method: 'post',
+    data
+  })
+}
+
+// 查看所有老日报列表
+export function dailyReportList(data) {
+  return request({
+    url: Presentation + '/dailyReport/list',
+    method: 'post',
+    data
+  })
+}
+
+// 准出报告部分
+
+// 新版准出报告list
+export function reportreleaseList(data) {
+  return request({
+    url: Presentation + '/reportrelease/list',
+    method: 'post',
+    data
+  })
+}
+
+// 提测报告部分
+
+// 新版提测报告list
+export function reportdelivertestList(data) {
+  return request({
+    url: Presentation + '/reportdelivertest/list',
+    method: 'post',
+    data
+  })
+}

+ 5 - 5
src/router/index.js

@@ -187,19 +187,19 @@ export const constantRoutes = [{
     path: '/Platform/presentation',
     name: '报告',
     component: (resolve) => require(['@/views/Platform/presentation/testa'], resolve),
-    redirect: '/Platform/presentation/testPresentation',
+    redirect: '/reportManagement/testPresentation',
     meta: { title: '报告' },
     children: [{
-      path: 'testPresentation',
+      path: 'reportManagement',
       name: '报告',
-      component: (resolve) => require(['@/views/Platform/presentation/testPresentation'], resolve),
+      component: (resolve) => require(['@/views/reportManagement/testPresentation'], resolve),
       meta: { title: '报告' }
     },
     {
-      path: 'Templates/BugDetails',
+      path: 'BugDetails',
       name: '报告详情',
       hidden: true,
-      component: (resolve) => require(['@/views/Platform/presentation/Templates/BugDetails'], resolve),
+      component: (resolve) => require(['@/views/reportManagement/daily/components/BugDetails'], resolve),
       meta: { title: '报告详情' }
     },
     {

+ 0 - 123
src/views/Platform/presentation/Templates/BugDetails.vue

@@ -1,123 +0,0 @@
-<template>
-  <el-container class="BackgroundCloth">
-    <el-header class="public_header setLine">
-      <div class="Layout_space_between">
-        <div class="Layout_flex_start">
-          <div>baogaoID</div>
-          <div>{{ '测试日报' }}</div>
-          <el-button size="mini">已发送</el-button>
-        </div>
-        <div>
-          <el-button type="text">通过</el-button>
-          <el-button type="text">打回</el-button>
-        </div>
-      </div>
-    </el-header>
-    <el-container>
-      <el-main class="report-main">
-        <div><div class="blur-column" /> 报告内容</div>
-        <hr>
-        <div class="Layout_flex_start">
-          <div>报告人 : </div>
-          <div>{{ '秦志鹏' }}</div>
-        </div>
-        <div class="Layout_flex_start">
-          <div>收件人 : </div>
-          <div>{{ '秦志鹏, 张杰, 余霖, 廖子君' }}</div>
-        </div>
-        <div class="Layout_flex_start">
-          <div :span="12">抄送人 : </div>
-          <div :span="12">{{ '秦志鹏' }}</div>
-        </div>
-      </el-main>
-      <el-aside width="400px">
-        <el-container>
-          <el-header class="report-mains">
-            <div><div class="blur-column" /> 用户信息</div>
-            <hr>
-            <div class="Layout_flex_start">
-              <div>报告人 : </div>
-              <div>{{ '秦志鹏' }}</div>
-            </div>
-            <div class="Layout_flex_start">
-              <div>收件人 : </div>
-              <div>{{ '秦志鹏, 张杰, 余霖, 廖子君' }}</div>
-            </div>
-            <div class="Layout_flex_start">
-              <div :span="12">抄送人 : </div>
-              <div :span="12">{{ '秦志鹏' }}</div>
-            </div>
-          </el-header>
-          <el-main class="report-mains">
-            <div><div class="blur-column" /> 时间</div>
-            <hr>
-            <div class="Layout_flex_start">
-              <div>创建时间 : </div>
-              <div>{{ '2020-10-10 12:20' }}</div>
-            </div>
-            <div class="Layout_flex_start">
-              <div>发送时间 : </div>
-              <div>{{ '2020-10-10 12:20' }}</div>
-            </div>
-          </el-main>
-          <el-footer class="report-mains">
-            <div><div class="blur-column" /> 关联任务</div>
-            <hr>
-            <div class="Layout_flex_start">
-              <div>报告人 : </div>
-              <div>{{ '秦志鹏' }}</div>
-            </div>
-            <div class="Layout_flex_start">
-              <div>收件人 : </div>
-              <div>{{ '秦志鹏, 张杰, 余霖, 廖子君' }}</div>
-            </div>
-            <div class="Layout_flex_start">
-              <div :span="12">抄送人 : </div>
-              <div :span="12">{{ '秦志鹏' }}</div>
-            </div>
-          </el-footer>
-        </el-container>
-      </el-aside>
-    </el-container>
-  </el-container>
-</template>
-
-<script>
-import '@/styles/PublicStyle/index.scss'
-export default {
-
-}
-</script>
-
-<style lang="scss" scoped>
-.BackgroundCloth {
-.report-Header {
-  margin: 10px 10px 0;
-  background: #FFF;
-  border-radius:4px;
-}
-.report-main {
-  margin: 10px;
-  background: #FFF;
-  border-radius:4px;
-}
-.report-mains {
-  min-height: 150px;
-  padding: 20px ;
-  margin: 10px 10px 0 0;
-  background: #FFF;
-  border-radius:4px;
-}
-.blur-column {
-  width:4px;
-  height:15px;
-  display:inline-block;
-  vertical-align: middle;
-  background:#409EFF;
-  border-radius:1px;
-}
-}
-.setLine {
-  padding: 10px 20px;
-}
-</style>

+ 0 - 383
src/views/Platform/presentation/Templates/DailyReport.vue

@@ -1,383 +0,0 @@
-<template>
-  <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task report-dialog" :title="reportHome ? title : `创建${title}模版`" :close-on-click-modal="false" :destroy-on-close="true" :before-close="handleClose">
-    <div v-if="reportHome" class="blueStripe" />
-    <i v-if="!reportHome" class="el-icon-arrow-left report-return didi-hover" @click="reportReturn" />
-
-    <el-steps v-if="reportHome" :active="active" align-center finish-status="success" class="report-steps">
-      <el-step title="选择模版" />
-      <el-step title="填写报告" />
-      <el-step title="发送报告" />
-    </el-steps>
-
-    <div v-if="showOne" style="min-height: 50vh;">
-      <el-row type="flex" class="row-bg" justify="center">
-        <el-col :span="7">模版名称</el-col>
-        <el-col :span="6" />
-        <el-col :span="5" class="creator">创建人</el-col>
-      </el-row>
-      <el-row v-for="(item, index) in selectTemplate" :key="index" type="flex" class="row-bg" justify="center">
-        <el-col :span="7">
-          <el-radio v-model="fromData.radio" class="_radio" :label="item.id" @change="selectRepot(item.id)">{{ item.name }}</el-radio>
-        </el-col>
-        <el-col :span="6" />
-        <el-col :span="5" class="creator">
-          {{ item.value }}
-          <span v-if="item.value !== '系统'" class="operation">
-            <i class="el-icon-edit didi-hover" @click="report_update(item.id)" />
-            <el-popover v-model="visible" placement="bottom" width="300">
-              <div>删除模版</div>
-              <hr>
-              <p>是否要删除模版{{ item.name }}?</p>
-              <div style="text-align: right; margin: 0">
-                <el-button size="mini" type="primary" @click="visible = false">删除</el-button>
-                <el-button type="primary" size="mini" @click="visible = false">取消</el-button>
-              </div>
-              <i slot="reference" class="el-icon-delete reportModel didi-hover" />
-            </el-popover>
-          </span>
-        </el-col>
-      </el-row>
-      <el-row type="flex" class="row-bg" justify="center">
-        <el-col :span="18">
-          <span class="didi-hover" @click="open_new_template()"><i class="el-icon-circle-plus-outline creator" /> 新建模版</span>
-        </el-col>
-      </el-row>
-    </div>
-
-    <!-- 创建模版 -->
-    <div v-if="reportTamplate" class="descr" style=" margin-bottom: 2%; height: 435px; overflow:scroll; overflow-x: hidden">
-      <NewReportTemplate ref="DailyReport" :message="dailyNewData" :template-status="templateStatus" @getreportTemplate="getreportTemplate" />
-    </div>
-    <!-- 创建模版 -->
-
-    <div v-if="showThree">
-      <div style="margin: 0% 5%;font-size:18px; font-family:PingFangSC-Medium,PingFang SC; font-weight:500; color:rgba(51,59,74,1); line-height:29px;">
-        邮件列表
-      </div>
-      <div style="margin: 1% 5% 3%;">
-        <div class="Layout" style="margin-bottom: 10px;">
-          <div class="div1">收件人</div>
-          <searchTeam :value.sync="form.name" :clearable="true" :multiple="true" style="width:100%" />
-        </div>
-        <div class="Layout">
-          <div class="div1">抄送</div>
-          <searchTeam :value.sync="form.names" :clearable="true" :multiple="true" style="width:100%" />
-        </div>
-      </div>
-      <div style="margin: 0 5%; font-size:18px; font-family:PingFangSC-Medium,PingFang SC; font-weight:500; color:rgba(51,59,74,1); line-height:29px;">
-        报告预览
-      </div>
-      <div class="descr" style=" margin-bottom: 2%; height: 300px; overflow:scroll; overflow-x: hidden">
-        <testPresenyL id="Gambol" :message="preview" style="width: 100%" />
-      </div>
-      <div align="center">
-        <el-button size="small" type="primary" @click="gou_out()">上一步</el-button>
-        <el-button :disabled="send" :loading="send" size="small" type="primary" @click="sendReport(form)">发送</el-button>
-      </div>
-    </div>
-
-    <div slot="footer" class="dialog-footer" align="center">
-      <el-button size="small" type="primary" @click="clickTheButton === '下一步'? NextStep() : created_out()">{{ clickTheButton }}</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import '@/views/projectManage/publicCss/index.css'
-import '@/styles/PublicStyle/index.scss'
-// import DailyReport from '@/views/Platform/presentation/DailyNewsAdded.vue'
-import testPresenyL from '@/views/Platform/presentation/testPresenyL.vue'
-import { dailyReportSendmail } from '@/api/ResultPage'
-import { settingQueryReportModuleList } from '@/api/reportTemplate'
-import html2canvas from 'html2canvas'
-import searchTeam from '@/components/select/searchTeam'
-import NewReportTemplate from '@/views/Platform/presentation/Templates/NewReportTemplate.vue'
-
-export default {
-  components: {
-    // DailyReport,
-    testPresenyL,
-    searchTeam,
-    NewReportTemplate
-  },
-  props: {
-    title: { type: String, default: '' }
-  },
-  data() {
-    return {
-      templateStatus: false, // 模版状态
-      visible: false, // delete
-      clickTheButton: '下一步', // 点击按钮
-      reportHome: true, // 报告主页
-      reportModel: [
-        { id: 3, name: '两轮车c端发版测试日报模版', value: '沈洁' }
-      ], // 创建的模版
-      selectTemplate: [
-        { id: 1, name: '客户端模版', value: '系统' },
-        { id: 2, name: '服务端模版', value: '系统' }
-      ],
-      fromData: {
-        radio: 1
-      },
-      bizJson: localStorage.getItem('bizId'),
-      send: false,
-      form: {},
-      preview: {},
-      dailyNewData: {}, // 新建模版
-      dialogDaliy: false,
-      showOne: true,
-      showTow: false,
-      reportTamplate: false, // 新建模版
-      showThree: false,
-      radio: '1',
-      newIndex: '',
-      active: 1,
-      daily_task: [],
-      num: 0,
-      dailys: this.$route.query.id
-    }
-  },
-  watch: {
-    title: {
-      handler(newV) {
-        newV === '测试日报' ? this.num = 3 : ''
-        newV === '准出报告' ? this.num = 4 : ''
-        newV === '提测报告' ? this.num = 1 : ''
-        this.getreportTemplate()
-      },
-      immediate: true
-    }
-  },
-  created() {
-    this.reportSelectTemplate()
-  },
-  destroyed() {
-    this.showThree = false
-  },
-  methods: {
-    async getreportTemplate() { // 获取模版list
-      const res = await settingQueryReportModuleList({ bizId: this.bizJson, type: this.num })
-      if (res.code === 200) {
-        console.log(res)
-      }
-    },
-    reportSelectTemplate() {
-      this.$nextTick(() => {
-        this.selectTemplate = this.selectTemplate.concat(this.reportModel)
-        console.log(this.selectTemplate, 'xsaxaxsa')
-      })
-    },
-    selectRepot(e) { // 选择的模版
-      console.log(e, '选择的模版')
-    },
-    init(index, newData) {
-      this.dialogDaliy = true
-      var url = location.href // 获取url中"?"符后的字串
-      var arr = url.split('=')
-      switch (index) {
-        case 1:
-          this.daily_task = [Number(arr[1])]
-          this.showOne = true
-          this.showTow = false
-          this.showThree = false
-          this.active = 1
-          break
-        case 2:
-          // this.dailyNewData = newData
-          // this.dailyNewData.creatask = '编辑'
-          this.newIndex = 2
-          this.showOne = false
-          this.showTow = true
-          this.showThree = false
-          this.active = 2
-          break
-        case 3:
-          this.showOne = false
-          this.showTow = false
-          this.showThree = true
-          this.form = {}
-          this.preview = newData
-          this.active = 3
-          break
-        case 4:
-          this.daily_task = [Number(arr[1])]
-          // this.dailyNewData = newData
-          // this.dailyNewData.creatask = '复制'
-          this.newIndex = 1
-          this.showOne = false
-          this.showTow = true
-          this.showThree = false
-          this.active = 2
-          break
-        case 7:
-          this.daily_task = newData
-          // this.dailyNewData.taskIds = newData
-          this.showOne = true
-          this.showTow = false
-          this.showThree = false
-          this.active = 1
-          break
-      }
-    },
-    handleClose() {
-      this.dialogDaliy = false
-      this.showThree = false
-      this.showOne = false
-      this.showTow = false
-      this.radio = '1'
-      this.reportTamplate = false // 第二步false
-    },
-
-    report_update() { // 编辑模版
-      this.$refs.DailyReport.getQueryData(3)
-    },
-
-    created_out() { // 新建模版
-      this.$refs.DailyReport.getCreateData(3)
-    },
-
-    gou_out() {
-      // this.dailyNewData = this.preview
-      // this.dailyNewData.creatask = '编辑'
-      this.active = 2
-      this.newIndex = 2
-      this.showOne = false
-      this.showTow = true
-      this.showThree = false
-    },
-    daily(e) {
-      this.preview = e
-      this.dailys = e.id
-      this.showOne = false
-      this.showTow = false
-      this.showThree = true
-      this.form = {}
-      this.active = 3
-    },
-    reportReturn() { // 新建模版点击返回
-      this.reportHome = true // 步骤条
-      this.showOne = true // 模版选择
-      this.reportTamplate = false // 编辑区域
-      this.clickTheButton = '下一步' // 底部按钮
-    },
-    open_new_template() { // 点击新建模版
-      this.templateStatus = false // 模版状态
-      this.dailyNewData = {}
-      this.reportHome = false // 步骤条
-      this.showOne = false // 模版选择
-      this.reportTamplate = true // 编辑区域
-      this.clickTheButton = '保存' // 底部按钮
-    },
-    NextStep() {
-      switch (Number(this.radio)) {
-        case 1:
-          this.templateStatus = true // 模版状态
-          this.dailyNewData = {}
-          this.dailyNewData.taskIds = this.daily_task
-          this.dailyNewData.creatask = '新建'
-          this.reportTamplate = true
-          this.showOne = false
-          this.showTow = true
-          this.active = 2
-          this.newIndex = 1
-          break
-        case 2:
-          this.$message({ message: '请选择要创建的‘模版’', type: 'error', duration: 1000, offset: 150 })
-          break
-      }
-    },
-    sendReport(e) {
-      if (e.name !== undefined) {
-        this.send = true
-        var ele = this.preview
-        setTimeout(() => {
-          html2canvas(document.getElementsByClassName('reportContent')[0], { useCORS: true }).then(canvas => {
-            var url = canvas.toDataURL('image/png', 1)
-            url = url.toString().substring(url.indexOf(',') + 1)
-            var postData = { 'reportId': ele.id, 'imgStr': url, 'url': window.location.href, 'emailUser': e.name ? e.name.join(',') : null, 'copyTo': e.names ? e.names.join(',') : null }
-            dailyReportSendmail(postData).then(res => {
-              res.code === 200 ? this.$message({ type: 'success', message: '报告发送中,请稍后进行邮件查收!' }) : this.$message({ type: 'error', message: '发送测试日报失败,请联系管理员!' })
-              this.send = false
-              this.handleClose()
-            })
-          })
-        }, 500)
-      } else {
-        this.$message({ message: '请填写邮箱', type: 'error', offset: 150 })
-      }
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-._radio {
-    margin: 3% 0;
-    color: #333B4A;
-    font-size: 16pt
-}
-
-.descr {
-    width: 94%;
-    margin: auto;
-}
-
-.descr::-webkit-scrollbar {
-    width: 0;
-}
-
-.div1 {
-    width: 60px;
-    font-size: 14px;
-    font-family: MicrosoftYaHei;
-    color: rgba(51, 51, 51, 1);
-    line-height: 19px;
-}
-
-.titIcon {
-    width: 4px;
-    height: 17px;
-    background: #409EFF;
-    border-radius: 1px;
-}
-
-.el-dialog__header {
-    padding: 0 !important;
-}
-
-.reportModel {
-    margin-left: 10px;
-}
-
-.operation {
-    margin-left: 30px;
-}
-
-.creator {
-    display: inline-block;
-    line-height: 3;
-}
-
-.report-dialog {
-  >>>.el-dialog__header {
-      padding: 20px 20px 10px;
-      border-bottom: 1px solid red;
-  }
-  >>>.el-dialog__footer {
-      padding: 15px 20px;
-      text-align: right;
-      border-top: 1px solid red;
-  }
-}
-.report-return {
-  font-size: 18px;
-  position: absolute;
-  top: 23px;
-  left: 11px;
-}
-.report-steps {
-  margin-bottom: 1%;
-  font-size: 16pt;
-  color: #333B4A;
-}
-</style>

+ 0 - 266
src/views/Platform/presentation/Templates/NewReportTemplate.vue

@@ -1,266 +0,0 @@
-<template>
-  <!-- 新增测试日报 -->
-  <div class="eleStyle">
-    <el-form ref="fromCreateData" :model="fromCreateData" :rules="serviceDataRules">
-      <el-form-item v-if="TLstatus" label="关联任务" prop="selectTask" label-width="80px">
-        <el-select
-          v-model="fromCreateData.selectTask"
-          filterable
-          remote
-          reserve-keyword
-          placeholder="请输入任务名称或ID"
-          :remote-method="remoteMethod"
-          :loading="loading"
-          style="width: 100%"
-          size="small"
-          :disabled="disabled"
-          @change="tasksChange"
-        >
-          <el-option
-            v-for="item in tasksOptions"
-            :key="item.id"
-            :label="item.name"
-            :value="item.id"
-            :disabled="item.isScheduleLocked === 1"
-          >
-            <div class="Layout_space_between">
-              <span>{{ item.name }}</span>
-            </div>
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item v-if="TLstatus" label="标题" prop="reportName" label-width="80px">
-        <div class="Layout_space_between">
-          <el-input v-model="fromCreateData.reportName" size="small" style="width: 80%;" placeholder="请输入报告名称" />
-          <span>报告人:{{ '秦志鹏' }}</span>
-        </div>
-      </el-form-item>
-      <el-form-item label="模版名称" prop="moduleName" label-width="80px">
-        <el-input v-model="fromCreateData.moduleName" size="small" style="width:15vw;" placeholder="请输入模版名称(不可与现有模版重名)" />
-      </el-form-item>
-      <el-form-item label="模版内容" prop="content"><br>
-        <normal-area id="report-template" :value.sync="fromCreateData.content" :height="500" />
-      </el-form-item>
-    </el-form>
-    <div class="backStyle">缺陷统计</div>
-    <el-table :data="tableData" border size="mini" style="width: 100%">
-      <el-table-column prop="date" label="缺陷总数" align="center" min-width="180" />
-      <el-table-column prop="date" label="待修复" align="center" min-width="180" />
-      <el-table-column prop="date" label="待测试" align="center" min-width="180" />
-      <el-table-column prop="date" label="已完成" align="center" min-width="180" />
-      <el-table-column prop="date" label="Reopen" align="center" min-width="180" />
-      <el-table-column prop="date" label="Hold" align="center" min-width="180" />
-    </el-table>
-    <div class="backStyle">今日新增缺陷(-个)</div>
-    <div :class="{'space-between' : xaxisTotal < 8} ">
-      <div id="lineShow" :class="{'backTop' : xaxisTotal < 8,'backLeft' : xaxisTotal > 7}" />
-      <div id="barShow" :class="{'backTop' : xaxisTotal < 8, 'backLeft' : xaxisTotal > 7}" />
-    </div>
-    <div class="backStyle">P0&P1缺陷列表(-个)</div>
-    <el-table :data="tableData" border size="mini" style="width: 100%">
-      <el-table-column prop="date" label="缺陷ID" align="center" min-width="180" />
-      <el-table-column prop="date" label="缺陷标题" align="center" min-width="180" />
-      <el-table-column prop="date" label="状态" align="center" min-width="180" />
-      <el-table-column prop="date" label="缺陷等级" align="center" min-width="180" />
-      <el-table-column prop="date" label="提报人" align="center" min-width="180" />
-      <el-table-column prop="date" label="责任人" align="center" min-width="180" />
-      <el-table-column prop="date" label="修复人" align="center" min-width="180" />
-    </el-table>
-  </div>
-</template>
-
-<script>
-import '@/styles/PublicStyle/index.scss'
-import echarts from 'echarts'
-import { bugDailyList } from '@/api/testPresentetion'
-import normalArea from '@/components/input/normalArea'
-import { settingAddReportModule, settingUpdateReportModule } from '@/api/reportTemplate' // 模版添删改查
-
-export default {
-  name: 'DailyNewsAdded',
-  components: {
-    normalArea
-  },
-  props: {
-    message: { type: Object, required: true },
-    templateStatus: { type: Boolean, default: false } // 判断模版是新建/还是下一步
-  },
-  data() {
-    return {
-      tableData: [{
-        date: 0
-      }],
-      userInformation: localStorage.getItem('username'),
-      userNames: localStorage.getItem('realname'),
-      serviceDataRules: {
-        selectTask: [{ required: true, message: '关联任务不能为空', trigger: 'change' }],
-        moduleName: [{ required: true, message: '报告标题不能为空', trigger: 'change' }],
-        content: [{ required: true, message: '模版内容不能为空', trigger: 'change' }]
-      },
-      fromCreateData: {
-        content: `<div style="color: #606266"><h3>一. 进度和风险</h3><p>项目整体进度</p><p>项目风险与问题</p><table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="8%"><col width="8%"><col width="8%"><col width="8%"></colgroup><thead><tr><th>风险等级</th><th>风险项</th><th>当前状态</th><th>跟进人</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table><h3>二. 测试情况</h3><p>1、测试进展</p><table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="8%"><col width="8%"><col width="8%"><col width="8%"><col width="8%"><col width="8%"><col width="8%"></colgroup><thead><tr><th>标题1</th><th>标题2</th><th>标题3</th><th>标题4</th><th>标题5</th><th>标题6</th><th>标题7</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table><p>2、测试说明</p></div>`
-      },
-      userData: '',
-      objData: '',
-      dateList: [],
-      numList: [],
-      bugName: [],
-      statusMap: [],
-      statusList: [],
-      dailys: '',
-      xaxisTotal: 0,
-      TLstatus: false // 模版状态
-    }
-  },
-  watch: {
-    message: {
-      handler(newV) {
-        newV ? this.getRouterData() : ''
-      },
-      immediate: true
-    },
-    templateStatus: {
-      handler(newV) {
-        this.TLstatus = newV
-      },
-      immediate: true
-    }
-  },
-  // created() {
-  //   this.getRouterData()
-  // },
-  mounted() {
-    const myChart = echarts.init(document.getElementById('lineShow'))
-    const myChartA = echarts.init(document.getElementById('barShow'))
-    window.addEventListener('resize', () => {
-      if (myChart) {
-        myChart.resize()
-        myChartA.resize()
-      }
-    })
-  },
-  methods: {
-    getRouterData() {
-      var url = location.href // 获取url中"?"符后的字串
-      var arr = url.split('=')
-      this.fromCreateData = this.message
-      var Ts_Ids = ''
-      this.fromCreateData.taskIds ? Ts_Ids = this.fromCreateData.taskIds : Ts_Ids = [Number(arr[1])]
-      bugDailyList({ taskIds: Ts_Ids }).then(res => {
-        this.dateList = res.data.dateList
-        this.statusMap = res.data.statusMap
-        this.statusList = res.data.statusList
-        this.numList = res.data.bugMap
-        if (this.dateList.length >= 7 || this.statusList.length >= 7) {
-          this.xaxisTotal = 8
-        } else {
-          this.xaxisTotal = 1
-        }
-        for (var ele of this.numList) {
-          this.bugName.push(ele.name)
-        }
-        setTimeout(item => {
-          echarts.init(document.getElementById('lineShow')).setOption({
-            title: { left: 'center', text: 'bug数量汇总' },
-            color: ['#2F54EB', '#13C2C2', '#F78B16', '#9254DE'],
-            tooltip: { trigger: 'axis' },
-            legend: { top: 30, data: this.bugName },
-            grid: { left: '5%', right: '5%', bottom: '12%', containLabel: true },
-            xAxis: { type: 'category', boundaryGap: true, data: this.dateList, axisLabel: { interval: 0, rotate: 30 }},
-            yAxis: { type: 'value' },
-            series: this.numList
-          })
-          echarts.init(document.getElementById('lineShow')).resize()
-        }, 1000)
-        setTimeout(item => {
-          echarts.init(document.getElementById('barShow')).setOption({
-            title: { text: 'bug状态汇总', x: 'center' },
-            color: ['#2F54EB', '#13C2C2', '#F78B16', '#9254DE'],
-            tooltip: { trigger: 'axis' },
-            legend: { top: 30, data: this.statusMap },
-            grid: { left: '5%', right: '5%', bottom: '12%', containLabel: true },
-            xAxis: [{ data: this.statusList, axisLabel: { interval: 0, rotate: 45 }}],
-            yAxis: [{}],
-            series: this.statusMap
-          })
-          echarts.init(document.getElementById('barShow')).resize()
-        }, 500)
-      })
-    },
-    // parentHandleclick(e, task, id) {
-    //   console.log(this.fromCreateData, 'cdcdscdcd')
-    //   if (e === 1) {
-    //     this.ids = task
-    //     delete this.fromCreateData.id
-    //     this.getCreateData(this.fromCreateData)
-    //   } else {
-    //     this.dailys = id
-    //     this.getQueryData(this.fromCreateData)
-    //   }
-    // },
-
-    // 新建模版
-    getCreateData(e) {
-      this.$refs['fromCreateData'].validate((valid) => {
-        if (valid) {
-          alert(1)
-          this.fromCreateData.bizId = localStorage.getItem('bizId')
-          this.fromCreateData.type = e
-          settingAddReportModule(this.fromCreateData).then(res => {
-            if (res.code === 200) {
-              this.$message.success(res.msg)
-              this.$emit('getreportTemplate')
-            }
-          })
-        } else {
-          return false
-        }
-      })
-    },
-
-    // 编辑模版
-    getQueryData(e) {
-      this.fromCreateData.bizId = localStorage.getItem('bizId')
-      this.fromCreateData.type = e
-      this.fromCreateData.id = e
-      settingUpdateReportModule(this.fromCreateData).then(res => {
-        if (res.code === 200) {
-          this.$message({ type: 'success', message: '更新成功' })
-          this.$emit('getreportTemplate')
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style scoped>
-  .eleStyle {
-    width: 100%;
-    height:100%;
-    display: inline-block;
-  }
-  .backStyle {
-    font-size: 19px;
-    font-weight: bold;
-    border-radius: 4px;
-    margin: 1% 0;
-  }
-
-  .space-between {
-    display:flex;
-    align-items: center;
-    justify-content: space-between;
-  }
-
-  .backTop {
-    flex:1.5;
-    width: 400px;
-    height:400px;
-  }
-
-  .backLeft {
-    width: 100%;
-    height:400px;
-  }
-</style>

+ 1 - 1
src/views/projectManage/projectList/components/taskList.vue

@@ -120,7 +120,7 @@
 import imgUrl from '@/assets/建立档案@2x.png'
 import '@/styles/PublicStyle/index.scss'
 import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
-import DailyReport from '@/views/Platform/presentation/Templates/DailyReport' // 日报
+import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
 import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
 import { taskList } from '@/api/projectIndex'
 import { taskUpdate } from '@/api/projectViewDetails'

+ 1 - 1
src/views/projectManage/requirement/components/taskList.vue

@@ -117,7 +117,7 @@
 <script>
 import imgUrl from '@/assets/建立档案@2x.png'
 import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
-import DailyReport from '@/views/Platform/presentation/Templates/DailyReport' // 日报
+import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
 import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
 import { taskList } from '@/api/projectIndex'
 import { taskUpdate } from '@/api/projectViewDetails'

+ 1 - 1
src/views/projectManage/taskList/components/reportList.vue

@@ -203,7 +203,7 @@ import {
   launchTestDelete
 } from '@/api/taskIndex' // ajax
 import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
-import DailyReport from '@/views/Platform/presentation/Templates/DailyReport' // 日报
+import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
 import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
 import { dailyReportDelete, projectTestReportDelete } from '@/api/testPresentetion' // 日报
 import { launchTestUpdate } from '@/api/InterfaceReport'

+ 1 - 1
src/views/projectManage/taskList/taskViewDetail.vue

@@ -347,7 +347,7 @@ import scheduleList from './components/scheduleList'
 import reportList from './components/reportList'
 import dataStatistics from './components/dataStatistics'
 import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
-import DailyReport from '@/views/Platform/presentation/Templates/DailyReport' // 日报
+import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
 import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
 import stage from '@/assets/detailPage/风险状态.png'
 import stage1 from '@/assets/detailPage/正常状态.png'

+ 1 - 1
src/views/projectManage/version/components/taskList.vue

@@ -125,7 +125,7 @@
 import imgUrl from '@/assets/建立档案@2x.png'
 import '@/styles/PublicStyle/index.scss'
 import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
-import DailyReport from '@/views/Platform/presentation/Templates/DailyReport' // 日报
+import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
 import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
 import { taskUpdate } from '@/api/projectViewDetails'
 import { configShowTaskEnum, configShowTaskStatusEnum } from '@/api/taskIndex'

+ 410 - 0
src/views/reportManagement/components/DailyReport.vue

@@ -0,0 +1,410 @@
+<template>
+  <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task report-dialog" :title="reportHome ? title : `创建${title}模版`" :close-on-click-modal="false" :destroy-on-close="true" :before-close="handleClose">
+    <div v-if="reportHome" class="blueStripe" />
+    <i v-if="!reportHome" class="el-icon-arrow-left report-return didi-hover" @click="reportReturn" />
+
+    <el-steps v-if="reportHome" :active="active" align-center finish-status="success" class="report-steps">
+      <el-step title="选择模版" />
+      <el-step title="填写报告" />
+      <el-step title="发送报告" />
+    </el-steps>
+
+    <div class="report-leftRight">
+      <div v-if="showOne" style="min-height: 50vh;">
+        <el-row type="flex" class="row-bg" justify="center">
+          <el-col :span="19" class="creator">模版名称</el-col>
+          <el-col :span="5" class="creator">创建人</el-col>
+        </el-row>
+        <el-row v-for="(item, index) in reportModel" :key="index" type="flex" class="row-bg" justify="center">
+          <el-col :span="19">
+            <el-radio v-model="fromData.radio" class="creatorList" :label="item.id" @change="selectRepot(item.id)">{{ item.moduleName }}</el-radio>
+          </el-col>
+          <el-col :span="5" class="creatorList">{{ item.creatorObject.name }}</el-col>
+        </el-row>
+
+        <div ref="refName" style="max-height: 260px; overflow:scroll; overflow-x: hidden">
+          <el-row v-for="(item, index) in selectTemplate" :key="index" type="flex" class="row-bg" justify="center" @mouseover.native="item.operation = true" @mouseleave.native="item.operation = false">
+            <el-col :span="19">
+              <el-radio v-model="fromData.radio" class="creatorList" :label="item.id" @change="selectRepot(item.id)">{{ item.moduleName }}</el-radio>
+            </el-col>
+            <el-col :span="5" class="creatorList">
+              {{ item.creatorObject.name }}
+              <span class="operation">
+                <i class="el-icon-edit-outline didi-hover" @click="open_new_template(item)" />
+                <el-popover :ref="item.id" placement="bottom" width="300" trigger="click">
+                  <div><div class="blur-column" /> 删除模版</div>
+                  <div class="blueStripe" />
+                  <div class="deletreport">是否要删除模版{{ item.moduleName }}?</div>
+                  <div style="text-align: right; margin: 0">
+                    <el-button size="mini" type="danger" @click="settingDeleteReportModule(item)">确定</el-button>
+                    <el-button size="mini" @click="closeDefaultPopover()">取消</el-button>
+                  </div>
+                  <i slot="reference" class="el-icon-delete reportModel didi-hover" />
+                </el-popover>
+              </span>
+            </el-col>
+          </el-row>
+        </div>
+        <el-row type="flex" class="row-bg" justify="center">
+          <el-col :span="24">
+            <span class="didi-hover" @click="open_new_template()"><i class="el-icon-circle-plus-outline creatorList didi-hover" /> <span style="margin-left: 8px">新建模版</span></span>
+          </el-col>
+        </el-row>
+      </div>
+
+      <!-- new模版 -->
+      <newReportTemplate v-if="reportTamplate" ref="newReportTemplate" class="daily" :template-id="templateId" @getreportTemplate="getreportTemplate" @reportReturn="reportReturn" />
+      <!-- new模版 -->
+
+      <!-- 新建日报模版 -->
+      <dailyTemplate v-if="newDailyTemplate" ref="dailyTemplate" class="daily" :model-id="fromData.radio" :task-ids="daily_taskIds" @SaveNextStep="SaveNextStep" />
+      <!-- 新建日报模版 -->
+
+      <!-- 日报预览 -->
+      <dailyPreview v-if="dailyPreview" ref="dailyPreview" class="daily" :daily-id="dailyId" @handleClose="handleClose" />
+      <!-- 日报预览 -->
+    </div>
+    <div slot="footer" class="dialog-footer" align="center">
+      <!-- 新建模版 -->
+      <el-button v-if="reportTamplate" size="small" type="primary" @click="created_out()">保存</el-button>
+      <!-- 第一步 -->
+      <el-button v-if="showOne" size="small" type="primary" @click="NextStep()">下一步</el-button>
+      <!-- 第二步 -->
+      <el-button v-if="newDailyTemplate" size="small" type="primary" @click="reportReturn">上一步</el-button>
+      <el-button v-if="newDailyTemplate" size="small" type="primary" @click="getCreateData">保存, 下一步</el-button>
+      <!-- 第三步 -->
+      <el-button v-if="dailyPreview" size="small" type="primary" @click="sendReportReturn">上一步</el-button>
+      <el-button v-if="dailyPreview" size="small" type="primary" @click="sendReport">发送</el-button>
+    </div>
+
+  </el-dialog>
+</template>
+
+<script>
+import '@/styles/PublicStyle/index.scss'
+import { settingQueryReportModuleList, settingDeleteReportModule, dailyReportGetV2 } from '@/api/reportTemplate'
+import dailyTemplate from '@/views/reportManagement/daily/dailyTemplate.vue'
+import newReportTemplate from '@/views/reportManagement/daily/newReportTemplate.vue'
+import dailyPreview from '@/views/reportManagement/daily/dailyPreview.vue'
+
+export default {
+  components: {
+    dailyTemplate,
+    newReportTemplate,
+    dailyPreview
+  },
+  props: {
+    title: { type: String, default: '' }
+  },
+  data() {
+    return {
+      visible2: false,
+      templateStatus: false, // 模版状态
+      reportHome: true, // 报告主页
+      reportModel: [
+        { id: 1, moduleName: '客户端模版', creatorObject: { 'idap': '', 'name': '系统', 'deptid': '', 'deptName': '', 'empId': '', 'phoneUrl': null }},
+        { id: 2, moduleName: '服务端模版', creatorObject: { 'idap': '', 'name': '系统', 'deptid': '', 'deptName': '', 'empId': '', 'phoneUrl': null }}
+      ], // 创建的模版
+      templateId: '', // 模版id
+      modelId: '', // 下一步选择的模版id
+      selectTemplate: [],
+      fromData: {
+        radio: 1
+      },
+      bizJson: localStorage.getItem('bizId'),
+      preview: {},
+      newDailyTemplate: false, // 新建日报模版
+      reportTamplate: false, // new模版
+      dailyPreview: false, // 日报预览
+      dailyId: '', // 当前创建报告的id
+      updateDaily: false, // 编辑
+      dialogDaliy: false,
+      showOne: true,
+      showTow: false,
+      radio: '1',
+      newIndex: '',
+      active: 1,
+      daily_taskIds: [], // 选择的任务ID
+      num: 0,
+      dailys: this.$route.query.id
+    }
+  },
+  watch: {
+    title: {
+      handler(newV) {
+        newV === '测试日报' ? this.num = 3 : ''
+        newV === '准出报告' ? this.num = 4 : ''
+        newV === '提测报告' ? this.num = 1 : ''
+        this.getreportTemplate()
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    async getreportTemplate() { // 获取模版list
+      const res = await settingQueryReportModuleList({ bizId: this.bizJson, type: this.num })
+      if (res.code === 200) {
+        this.$nextTick(() => {
+          const data = res.data
+          this.selectTemplate = data.map(item => ({
+            ...item,
+            operation: false
+          }))
+          console.log(this.selectTemplate, 'xsaxaxsa')
+        })
+      }
+    },
+    // reportSelectTemplate() {
+    //   this.$nextTick(() => {
+    //     this.selectTemplate = this.selectTemplate.concat(this.reportModel)
+    //     console.log(this.selectTemplate, 'xsaxaxsa')
+    //   })
+    // },
+    selectRepot(e) { // 选择的模版
+
+    },
+    init(index, newData) {
+      console.log(index, newData)
+      this.dialogDaliy = true
+      var url = location.href // 获取url中"?"符后的字串
+      var arr = url.split('=')
+      switch (index) {
+        case 1:
+          this.daily_task = [Number(arr[1])]
+          this.showOne = true
+          this.showTow = false
+          this.active = 1
+          break
+        case 2: // 编辑
+          console.log(newData, '西单商场')
+          dailyReportGetV2(newData.id).then(res => {
+            if (res.code === 200) {
+              this.daily_taskIds = res.data.taskIds // 关联任务
+              this.fromData.radio = res.data // 选择的模块
+            }
+          })
+          this.reportHome = true // 步骤条
+          this.active = 2 // 步骤条状态第三步
+          this.showOne = false // 隐藏第一步
+          this.newDailyTemplate = true // 隐藏第二步
+          this.dailyPreview = false // 展示第三部
+          this.updateDaily = true // 编辑
+          break
+        case 3: // 发送报告
+          this.dailyId = newData.id
+          this.reportHome = true // 步骤条
+          this.active = 3 // 步骤条状态第三步
+          this.showOne = false // 隐藏第一步
+          this.newDailyTemplate = false // 隐藏第二步
+          this.dailyPreview = true // 展示第三部
+          break
+        case 4: // 复制
+          dailyReportGetV2(newData.id).then(res => {
+            if (res.code === 200) {
+              this.daily_taskIds = res.data.taskIds // 关联任务
+              const data = res.data
+              data.updateDaily = false
+              this.fromData.radio = data // 选择的模块
+            }
+          })
+          this.reportHome = true // 步骤条
+          this.active = 2 // 步骤条状态第三步
+          this.showOne = false // 隐藏第一步
+          this.newDailyTemplate = true // 隐藏第二步
+          this.dailyPreview = false // 展示第三部
+          this.updateDaily = false // 新建
+          break
+        case 7: // 新建
+          this.daily_taskIds = newData
+          this.fromData.radio = 1 // 选择的模版
+          this.reportHome = true // 步骤条
+          this.active = 1 // 步骤条状态第三步
+          this.showOne = true // 展示第一步
+          this.newDailyTemplate = false // 隐藏第二步
+          this.dailyPreview = false // 隐藏第三部
+          break
+      }
+    },
+
+    report_update() { // 编辑模版
+      this.$refs.DailyReport.getQueryData(this.num)
+    },
+
+    created_out() { // 新建模版
+      this.$refs.newReportTemplate.getCreateData(this.num)
+    },
+
+    reportReturn() { // 新建模版点击返回
+      this.fromData.radio = 1
+      this.reportHome = true // 步骤条
+      this.showOne = true // 模版选择
+      this.reportTamplate = false // 编辑区域
+      this.newDailyTemplate = false // 隐藏第二步
+      this.dailyPreview = false // 隐藏第三步
+    },
+
+    open_new_template(val) { // 点击新建模版
+      val ? this.templateId = val.id : this.templateId = null
+      this.reportTamplate = true // 编辑区域
+      this.reportHome = false // 步骤条
+      this.showOne = false // 模版选择
+    },
+
+    async settingDeleteReportModule(item) {
+      const res = await settingDeleteReportModule({ id: item.id }, item.id)
+      if (res.code === 200) {
+        this.getreportTemplate()
+        this.closeDefaultPopover()
+        this.$message({ message: '已删除’', type: 'success', duration: 1000, offset: 150 })
+      }
+    },
+
+    closeDefaultPopover() { // 模拟点击
+      this.$refs.refName.click()
+    },
+
+    getCreateData() { // 保存,下一步
+      this.$refs.dailyTemplate.getCreateData(this.updateDaily)
+    },
+
+    NextStep() { // 第一步到第二步
+      this.fromData.radio = 1
+      this.reportHome = true // 步骤条
+      this.active = 2 // 步骤条状态第二步
+      this.showOne = false // 隐藏第一步
+      this.newDailyTemplate = true // 展示第二步
+      this.dailyPreview = false // 隐藏第三步
+    },
+
+    SaveNextStep(ele) { // 第二步到第三部
+      console.log(ele, 'xsaxasxasxsaxsa')
+      this.dailyId = ele.id // 新建报告id
+      this.reportHome = true // 步骤条
+      this.active = 3 // 步骤条状态第三步
+      this.showOne = false // 隐藏第一步
+      this.newDailyTemplate = false // 隐藏第二步
+      this.dailyPreview = true // 展示第三部
+    },
+
+    async sendReportReturn() { // 第三步返回第二部
+      const res = await dailyReportGetV2(this.dailyId)
+      if (res.code === 200) {
+        this.daily_taskIds = res.data.taskIds // 关联任务
+        this.fromData.radio = res.data // 选择的模块
+      }
+      this.reportHome = true // 步骤条
+      this.active = 2 // 步骤条状态第三步
+      this.showOne = false // 隐藏第一步
+      this.newDailyTemplate = true // 隐藏第二步
+      this.dailyPreview = false // 展示第三部
+      this.updateDaily = true // 编辑
+    },
+
+    sendReport() { // 截图
+      this.$refs.dailyPreview.sendReport()
+    },
+
+    handleClose() {
+      this.dialogDaliy = false
+      this.$emit('getList')
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.report-leftRight {
+  margin: 0 13%;
+}
+
+.titIcon {
+    width: 4px;
+    height: 17px;
+    background: #409EFF;
+    border-radius: 1px;
+}
+
+.el-dialog__header {
+    padding: 0 !important;
+}
+
+.reportModel {
+    margin-left: 10px;
+}
+
+.operation {
+    margin-left: 30px;
+}
+
+.creator {
+  display: inline-block;
+  font-size:16px;
+  font-family:Microsoft Sans Serif;
+  font-weight:400;
+  line-height:22px;
+  color:rgba(51,51,51,1);
+  opacity:1;
+}
+
+.creatorList {
+  display: inline-block;
+  font-size:14px;
+  font-family:Microsoft Sans Serif;
+  font-weight:400;
+  line-height: 2.8;
+  color:rgba(51,51,51,1);
+  opacity:1;
+}
+
+.deletreport {
+  font-size:14px;
+  text-align: center;
+  margin: 30px 0;
+  font-family:MicrosoftYaHei;
+  color:rgba(51,59,74,1);
+  opacity:1;
+}
+
+.report-dialog {
+  >>>.el-dialog__header {
+    padding: 20px 20px 10px;
+    border-bottom: 1px solid rgba(238,238,238,1);
+    opacity:1;
+  }
+  >>>.el-dialog__footer {
+    padding: 15px 20px;
+    text-align: right;
+    border-top: 1px solid rgba(238,238,238,1);
+    opacity:1;
+  }
+}
+.report-return {
+  font-size: 18px;
+  position: absolute;
+  top: 23px;
+  left: 11px;
+}
+.report-steps {
+  margin-bottom: 20px;
+  font-size:16px;
+  font-family:PingFang SC;
+  font-weight:500;
+  line-height:22px;
+  color:rgba(51,51,51,1);
+  opacity:1;
+}
+.daily {
+   max-height: 460px;
+   overflow:scroll;
+   overflow-x: hidden
+}
+
+.blur-column {
+  width:4px;
+  height:15px;
+  display:inline-block;
+  vertical-align: middle;
+  background:#409EFF;
+  border-radius:1px;
+}
+</style>

+ 243 - 0
src/views/reportManagement/daily/components/BugDetails.vue

@@ -0,0 +1,243 @@
+<template>
+  <el-container class="BackgroundCloth">
+    <el-header class="public_header setLine">
+      <div class="Layout_space_between">
+        <div class="Layout_flex_start">
+          <div>
+            <span class="details-id">{{ 'report-' + details.id }}</span><br>
+            <span class="report-title">{{ details.reportName }}</span>
+          </div>
+          <div class="details-statusString">{{ details.statusString }}</div>
+        </div>
+        <div>
+          <span v-if="details.status === 0 ? true : false" class="didi-hover" @click="dailyButtom(5,details)">发送</span>
+          <span v-if="details.status === 0 ? true : false" style="margin: 0 30px;" class="didi-hover" @click="dailyButtom(6,details)">编辑</span>
+          <span v-if="details.status === 0 ? true : false" class="didi-hover" @click="report_click(4,details )">删除</span>
+          <span v-if="details.status === 1 ? true : false" class="didi-hover" @click="dailyButtom(3,details)">复制</span>
+        </div>
+      </div>
+    </el-header>
+    <el-container>
+      <el-main class="report-main">
+        <div class="title"><div class="blur-column" /> 报告内容</div>
+        <div v-html="details.content" />
+        <icon-display :id="[$route.query.id]" />
+      </el-main>
+      <el-aside width="400px">
+        <el-container>
+          <el-header class="report-mains">
+            <div class="title"><div class="blur-column" /> 用户信息</div>
+            <div class="Layout_flex_start">
+              <div class="title-name">报告人 : </div>
+              <div class="task-name">{{ details.reportorObject }}</div>
+            </div>
+            <div class="Layout_flex_start">
+              <div class="title-name">收件人 : </div>
+              <div class="task-name">{{ details.sendToObject }}</div>
+            </div>
+            <div class="Layout_flex_start">
+              <div class="title-name">抄送人 : </div>
+              <div class="task-name">{{ details.sendCcObject }}</div>
+            </div>
+          </el-header>
+          <el-main class="report-mains">
+            <div class="title"><div class="blur-column" /> 时间</div>
+            <div class="Layout_flex_start">
+              <div class="title-name">创建时间 : </div>
+              <div class="task-name">{{ details.gmtCreate }}</div>
+            </div>
+            <div class="Layout_flex_start">
+              <div class="title-name">发送时间 : </div>
+              <div class="task-name">{{ details.gmtModify }}</div>
+            </div>
+          </el-main>
+          <el-footer class="report-mains">
+            <div class="title"><div class="blur-column" /> 关联任务</div>
+            <div v-for="(item, index) in details.taskDetailList" :key="index" class="Layout_flex_start task-bot">
+              <div class="task-id">{{ item.taskId }}</div>
+              <div class="task-name">{{ item.name }}</div>
+            </div>
+          </el-footer>
+        </el-container>
+      </el-aside>
+    </el-container>
+    <el-dialog :title="details.titName" :visible.sync="dialog_testData" width="30%" :close-on-click-modal="false">
+      <div style="position: absolute; top: 23px; left: 12px;width:4px;height:17px;background:#409EFF;border-radius:1px;" />
+      <div align="center">
+        <div v-if="title === '提测报告'">是否{{ details.statusString }}以下提测?</div>
+        <div v-if="title === '测试日报'">是否{{ details.statusString }}以下测试日报?</div>
+        <div v-if="title === '准出报告'">是否{{ details.statusString }}以下准出报告?</div>
+        <div style="color: #f79232;">{{ details.name }}</div>
+      </div>
+      <!-- <el-input v-show="report_from.statusString === '打回'" v-model="report_from.reason" type="textarea" placeholder="请输入打回原因..." :rows="3" /> -->
+      <!-- <span slot="footer" class="dialog-footer">
+        <el-button type="primary" size="mini" @click="passOrBackSend()">确 定</el-button>
+        <el-button type="danger" size="mini" @click="endDialog">取 消</el-button>
+      </span> -->
+    </el-dialog>
+    <TestReport v-if="dialogVisible1" ref="TestReport" />
+    <DailyReport v-if="dialogDaily" ref="DailyReport" :title="title" @getList="getList" />
+    <ClientReport v-if="dialogClient" ref="ClientReport" />
+  </el-container>
+</template>
+
+<script>
+import '@/styles/PublicStyle/index.scss'
+import { dailyReportGetV2 } from '@/api/reportTemplate'
+import iconDisplay from '@/views/reportManagement/daily/components/iconDisplay.vue'
+import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
+import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
+import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
+export default {
+  components: {
+    TestReport,
+    DailyReport,
+    ClientReport,
+    iconDisplay
+  },
+  data() {
+    return {
+      dialog_testData: false, // 操作弹窗
+      reportId: this.$route.query.id,
+      details: {}
+    }
+  },
+  created() {
+    this.getReportContent(this.reportId)
+  },
+  methods: {
+    async getReportContent(e) {
+      const res = await dailyReportGetV2(e)
+      if (res.code === 200) {
+        this.details = res.data
+      }
+    },
+    dailyButtom(e, data) { // 测试报告
+      this.report_data = data
+      switch (e) {
+        case 3: // 复制 第二步
+          this.dialogDaily = true
+          this.$nextTick(() => {
+            this.$refs.DailyReport.init(4, data)
+          })
+          break
+        case 5: // 日报第三步
+          this.dialogDaily = true
+          this.$nextTick(() => {
+            this.$refs.DailyReport.init(3, data)
+          })
+          break
+        case 6: // 日报第二步
+          this.dialogDaily = true
+          this.$nextTick(() => {
+            this.$refs.DailyReport.init(2, data)
+          })
+          break
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.BackgroundCloth {
+.report-Header {
+  margin: 10px 10px 0;
+  background: #FFF;
+  border-radius:4px;
+}
+
+.details-id {
+  font-size:12px;
+  font-family:PingFang SC;
+  font-weight:400;
+  line-height:20px;
+  color:rgba(51,59,74,1);
+  opacity:0.5;
+}
+
+.report-title {
+  font-size:20px;
+  font-family:PingFangSC-Medium;
+  line-height:28px;
+  color:rgba(51,59,74,1);
+  opacity:1;
+}
+
+.details-statusString {
+  font-size:14px;
+  font-family:MicrosoftYaHei;
+  line-height:17px;
+  padding: 5px 8px;
+  margin-left: 15px;
+  color:rgba(111,124,147,1);
+  border:1px solid rgba(191,198,220,1);
+  opacity:1;
+  border-radius:4px;
+}
+
+.report-main {
+  margin: 10px;
+  background: #FFF;
+  border-radius:4px;
+}
+.report-mains {
+  min-height: 200px;
+  padding: 20px ;
+  margin: 10px 10px 0 0;
+  background: #FFF;
+  border-radius:4px;
+}
+.title {
+  font-size:16px;
+  font-family:PingFangSC-Medium;
+  line-height:35px;
+  margin-bottom: 10px;
+  color:rgba(51,59,74,1);
+  opacity:1;
+}
+
+.title-name {
+  width:100px;
+  font-size:14px;
+  margin-bottom: 10px;
+  font-family:PingFangSC-Regular;
+  line-height:20px;
+  color:rgba(102,102,102,1);
+  opacity:1;
+}
+
+.task-id {
+  width:100px;
+  font-size:14px;
+  font-family:MicrosoftYaHei;
+  line-height:17px;
+  color:rgba(102,102,102,1);
+  opacity:1;
+}
+
+.task-name {
+  font-size:14px;
+  font-family:MicrosoftYaHei;
+  line-height:17px;
+  color:rgba(51,51,51,1);
+  opacity:1;
+}
+
+.blur-column {
+  width:4px;
+  height:15px;
+  display:inline-block;
+  vertical-align: middle;
+  background:#409EFF;
+  border-radius:1px;
+}
+
+.task-bot {
+   margin-bottom: 10px;
+}
+}
+.setLine {
+  padding: 10px 20px;
+}
+</style>

+ 149 - 0
src/views/reportManagement/daily/components/iconDisplay.vue

@@ -0,0 +1,149 @@
+<template>
+  <div>
+    <div class="backStyle">缺陷统计</div>
+    <el-table :data="tableList" border size="mini" style="width: 100%">
+      <el-table-column prop="缺陷总数" label="缺陷总数" align="center" min-width="100" />
+      <el-table-column prop="待修复" label="待修复" align="center" min-width="100" />
+      <el-table-column prop="待测试" label="待测试" align="center" min-width="100" />
+      <el-table-column prop="已完成" label="已完成" align="center" min-width="100" />
+      <el-table-column prop="Reopen" label="Reopen" align="center" min-width="100" />
+      <el-table-column prop="Hold" label="Hold" align="center" min-width="100" />
+    </el-table>
+    <div class="backStyle">今日新增缺陷(-个)</div>
+    <div class="Layout_space_between">
+      <div id="lineShow" class="backTop" />
+      <div id="barShow" class="backTop" />
+    </div>
+    <div class="backStyle">P0&P1缺陷列表(-个)</div>
+    <el-table :data="report_bugList" border size="mini" style="width: 100%" show-overflow-tooltip="true">
+      <el-table-column prop="bugId" label="缺陷ID" align="center" min-width="80" show-overflow-tooltip />
+      <el-table-column prop="bugName" label="缺陷标题" align="center" min-width="100" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span class="didi-hover" @click.stop="click_bugName(scope.row.id)">{{ scope.row.bugName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="priorityLevel" label="状态" align="center" min-width="100" show-overflow-tooltip />
+      <el-table-column prop="priorityName" label="缺陷等级" align="center" min-width="100" show-overflow-tooltip />
+      <el-table-column prop="creatorList" label="提报人" align="center" min-width="90" show-overflow-tooltip />
+      <el-table-column prop="assignerList" label="责任人" align="center" min-width="90" show-overflow-tooltip />
+      <el-table-column prop="currentHandlerList" label="修复人" align="center" min-width="90" show-overflow-tooltip />
+    </el-table>
+  </div>
+</template>
+
+<script>
+import moment from 'moment'
+import echarts from 'echarts'
+import '@/styles/PublicStyle/index.scss'
+import { bugGetReportSumData, bugGetReportHighPriData, bugGetReportDisDataByMember, bugGetReportDisDataByPri } from '@/api/reportTemplate' // 模版添删改查
+export default {
+  props: {
+    id: { type: Array, default: null }
+  },
+  data() {
+    return {
+      tableList: [], // 缺陷统计
+      report_bugList: [], // P0&P1缺陷列表
+      taskid_arr: []
+    }
+  },
+  watch: {
+    id: {
+      handler(newV) {
+        if (newV !== null) {
+          this.taskid_arr = JSON.parse(JSON.stringify(newV))
+          this.taskid_arr.map(item => {
+            this.bugGetReportSumData(item)
+          })
+        }
+      },
+      immediate: true
+    }
+  },
+  //  mounted() {
+  // const myChart = echarts.init(document.getElementById('lineShow'))
+  // const myChartA = echarts.init(document.getElementById('barShow'))
+  // window.addEventListener('resize', () => {
+  //   if (myChart) {
+  //     myChart.resize()
+  //     myChartA.resize()
+  //   }
+  // })
+  // },
+  methods: {
+    click_bugName(id) { // 缺陷跳转
+      this.$router.push({ name: '缺陷详情', params: { id: id }})
+    },
+    async bugGetReportSumData() {
+      const date = moment().locale('zh-cn').format('YYYY-MM-DD')
+      const data = {
+        createStartTime: `${date} 00:00:00`, // 当天的开始时间
+        createEndTime: `${date} 23:59:59`, // 当天的结束时间
+        taskIds: this.taskid_arr // 任务id list
+      }
+      const res = await bugGetReportSumData(data) // 获取缺陷统计
+      if (res.code === 200) {
+        this.tableList = []
+        this.tableList.push(res.data)
+      }
+      const res1 = await bugGetReportHighPriData(data) // 获取P0&P1缺陷列表
+      if (res1.code === 200) {
+        this.report_bugList = res1.data
+      }
+      const res2 = await bugGetReportDisDataByMember(data) // 获取缺陷责任人分布
+      if (res2.code === 200) {
+        const data = res2.data.yaxis.map(item => ({
+          ...item,
+          type: 'bar',
+          barWidth: '20px'
+        }))
+        setTimeout(() => {
+          echarts.init(document.getElementById('lineShow')).setOption({
+            backgroundColor: '#FFF',
+            color: ['#409EFF'],
+            title: { text: '缺陷责任人分布', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
+            tooltip: { axisPointer: { type: 'shadow' }},
+            grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
+            xAxis: [{ type: 'category', data: res2.data.xaxis.length <= 0 ? ['P0', 'P1', 'P2', 'P3'] : res2.data.xaxis, axisTick: { alignWithLabel: true }}],
+            yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
+            series: res2.data.yaxis[0].data <= 0 ? [{ name: '无数据', type: 'bar', barWidth: '20px', data: [0, 0, 0, 0] }] : data
+          })
+        }, 200)
+      }
+      const res3 = await bugGetReportDisDataByPri(data) // 获取缺陷等级分布
+      if (res3.code === 200) {
+        const data = res3.data.yaxis.map(item => ({
+          ...item,
+          type: 'bar',
+          barWidth: '20px'
+        }))
+        setTimeout(() => {
+          echarts.init(document.getElementById('barShow')).setOption({
+            backgroundColor: '#FFF',
+            color: ['#409EFF'],
+            title: { text: '缺陷等级分布', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
+            tooltip: { axisPointer: { type: 'shadow' }},
+            grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
+            xAxis: [{ type: 'category', data: res3.data.xaxis, axisTick: { alignWithLabel: true }}],
+            yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
+            series: res3.data.yaxis[0].data <= 0 ? [{ name: '无数据', type: 'bar', barWidth: '20px', data: [0, 0, 0, 0] }] : data
+          })
+        }, 200)
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.backStyle {
+    font-size: 14px;
+    font-weight: bold;
+    border-radius: 4px;
+    margin: 10px 0;
+  }
+  .backTop {
+    width: 350px;
+    height:350px;
+  }
+</style>

+ 155 - 0
src/views/reportManagement/daily/components/testPresenyL.vue

@@ -0,0 +1,155 @@
+<template>
+  <!-- 老日报预览 -->
+  <div>
+    <el-form :model="fromCreat" class="from-creat reportContent">
+      <div style="display: flex; white-space: nowrap; font-family:SimSuncss">
+        <span style="flex:1;font-weight: bold;font-size: 20px;color: #3a8ee6">{{ fromCreat.reportName }}</span>
+        <span style="flex:2;margin: 0.5% 0 0 20px;font-size: 17px;">by {{ fromCreat.ownner }}</span>
+      </div>
+      <div style="font-size:15px;color:#606266;line-height: 25px;" class="rich" v-html="projectProgress" />
+      <div class="titleStyle" style="margin-top: 10px;">三. bug情况</div>
+      <div style="border: 1px,solid #ccc;font-size:14px;color:#606266;padding-bottom: 20px;">
+        <div style="margin: 1%;">1、bug统计</div>
+        <div :class="{'space-between' : xaxisTotal < 8} ">
+          <div id="lineShow" :class="{'backTop' : xaxisTotal < 8,'backLeft' : xaxisTotal > 7}" />
+          <div id="barShow" :class="{'backTop' : xaxisTotal < 8, 'backLeft' : xaxisTotal > 7}" />
+        </div>
+        <div style="margin: 1%;">2、bug说明:</div>
+        <div class="pre-line">{{ bugshow }}</div>
+      </div>
+    </el-form>
+  </div>
+</template>
+
+<script>
+import echarts from 'echarts'
+// import { bugDailyList } from '@/api/testPresentetion'
+
+export default {
+  name: 'TestPresenyL',
+  props: {
+    message: {
+      type: Object,
+      required: true
+    }
+  },
+  data() {
+    return {
+      userInformation: localStorage.getItem('username'),
+      userNames: localStorage.getItem('realname'),
+      bugshow: '',
+      postData: {},
+      fromCreat: {},
+      TestProgress: '',
+      projectProgress: '',
+      dateList: [],
+      numList: [],
+      bugName: [],
+      statusMap: [],
+      statusList: [],
+      pro: '',
+      xaxisTotal: 0,
+      name: ''
+    }
+  },
+  mounted() {
+    this.idGet()
+    const myChart = echarts.init(document.getElementById('lineShow'))
+    const myChartA = echarts.init(document.getElementById('barShow'))
+    window.addEventListener('resize', () => {
+      if (myChart) {
+        myChart.resize()
+        myChartA.resize()
+      }
+    })
+  },
+  methods: {
+    idGet() {
+      this.fromCreat = this.message
+      this.name = this.fromCreat.reportName
+      this.gntCreateEnd = this.fromCreat.gmtCreate
+      this.bugshow = this.fromCreat.bugExplain
+      this.projectProgress = this.fromCreat.testExplain
+      this.pro = { taskIds: this.fromCreat.taskIds, gntCreateEnd: this.gntCreateEnd }
+      // bugDailyList(this.pro).then(res => {
+      //   this.dateList = res.data.dateList
+      //   this.statusMap = res.data.statusMap
+      //   this.statusList = res.data.statusList
+      //   this.numList = res.data.bugMap
+      //   for (var ele of this.numList) {
+      //     this.bugName.push(ele.name)
+      //   }
+      //   if (this.dateList.length >= 7 || this.statusList.length >= 7) {
+      //     this.xaxisTotal = 8
+      //   } else {
+      //     this.xaxisTotal = 1
+      //   }
+      // this.$nextTick(() => {
+      //   echarts.init(document.getElementById('lineShow')).setOption({
+      //     title: { left: 'center', text: 'bug数量汇总' },
+      //     tooltip: { trigger: 'axis' },
+      //     legend: { top: 30, data: this.bugName },
+      //     grid: { left: '5%', right: '5%', bottom: '12%', containLabel: true },
+      //     xAxis: { type: 'category', boundaryGap: true, data: this.dateList, axisLabel: { interval: 0, rotate: 30 }},
+      //     yAxis: { type: 'value' },
+      //     series: this.numList
+      //   })
+      //   echarts.init(document.getElementById('lineShow')).resize()
+      //   echarts.init(document.getElementById('barShow')).setOption({
+      //     title: { text: 'bug状态汇总', x: 'center' },
+      //     color: ['#003366', '#006699', '#4cabce', '#e5323e'],
+      //     tooltip: { trigger: 'axis' },
+      //     legend: { top: 30, data: this.statusMap },
+      //     grid: { left: '5%', right: '5%', bottom: '12%', containLabel: true },
+      //     xAxis: [{ data: this.statusList, axisLabel: { interval: 0, rotate: 30 }}],
+      //     yAxis: [{}],
+      //     series: this.statusMap
+      //   })
+      //   echarts.init(document.getElementById('barShow')).resize()
+      // })
+      // })
+    }
+  }
+}
+</script>
+
+<style scoped>
+  .from-creat {
+    margin: 3% auto;
+    padding: 0 2%;
+    width: 100%;
+  }
+  .titleStyle {
+    color: #333B4A;
+    margin: 1% 0 1% 0;
+    font-size: 17px;
+    font-weight: bold;
+  }
+
+  .space-between {
+    display:flex;
+    align-items: center;
+    justify-content: space-between;
+  }
+
+  .backTop {
+    flex:1.5;
+    width: 400px;
+    height:400px;
+  }
+
+  .backLeft {
+    width: 100%;
+    height:400px;
+  }
+  #app .hideSidebar .sidebar-container {
+    display: none;
+  }
+  .pre-line {
+    white-space: pre-line;
+    padding-left: 10px;
+  }
+    .rich>>> table tr td{border:1px solid #ccc;font-size: 15px; color: #606266}
+  .rich>>> table th{border:1px solid #ccc; font-size: 15px; background: #F0F7FF; color: #606266}
+  .rich>>> table {border:1px solid #ccc; border-collapse: collapse;line-height: 30px; text-align: center;font-size: 15px; color: #606266}
+</style>

+ 125 - 0
src/views/reportManagement/daily/dailyPreview.vue

@@ -0,0 +1,125 @@
+<template>
+  <!-- 预览测试日报 -->
+  <div class="parent-style">
+    <div class="backStyle"> 邮件列表</div>
+    <div class="Layout_space_between" style="margin-bottom: 10px;">
+      <div class="div1">收件人</div>
+      <searchTeam :value.sync="form.name" :clearable="true" :multiple="true" style="width:100%" />
+    </div>
+    <div class="Layout_space_between">
+      <div class="div1">抄送</div>
+      <searchTeam :value.sync="form.names" :clearable="true" :multiple="true" style="width:100%" />
+    </div>
+    <div class="backStyle"> 报告预览</div>
+    <div id="repot-list">
+      <span class="backStyle"> 任务名称</span>
+      <div v-for="(item, index) in fromCreateData.taskDetailList" :key="index" class="Layout_flex_start report-taskList">
+        <span>{{ item.taskId }}</span>
+        <span>{{ item.name }}</span>
+      </div>
+      <div class="Layout_space_between">
+        <span class="backStyle"> 标题 : {{ fromCreateData.reportName }}</span>
+        <span>报告人:{{ '秦志鹏' }}</span>
+      </div>
+      <span class="backStyle"> 模版内容</span>
+      <div v-html="fromCreateData.content" />
+      <icon-display :id="fromCreateData.taskIds" />
+    </div>
+  </div>
+</template>
+
+<script>
+import '@/styles/PublicStyle/index.scss'
+import html2canvas from 'html2canvas'
+import { dailyReportSendmail } from '@/api/ResultPage'
+import searchTeam from '@/components/select/searchTeam'
+import iconDisplay from '@/views/reportManagement/daily/components/iconDisplay.vue'
+import { dailyReportGetV2 } from '@/api/reportTemplate' // 模版添删改查
+
+export default {
+  name: 'DailyNewsAdded',
+  components: {
+    searchTeam,
+    iconDisplay
+  },
+  props: {
+    dailyId: { type: [String, Number], default: null }
+  },
+  data() {
+    return {
+      form: {}, // 发送报告content
+      fromCreateData: {}, // listAll
+      tasksOptions: [], // 任务下拉选项
+      tasksDetailList: [], // 已有任务项目
+      taskid_arr: [], // taskIds
+      moduleId: '', // 模块id
+      daily_Id: '' // daily_Id
+    }
+  },
+  watch: {
+    dailyId: {
+      handler(newV) {
+        this.daily_Id = newV
+        this.dailyReportGetV2(newV)
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    async dailyReportGetV2(val) { // 获取日报数据
+      const res = await dailyReportGetV2(val)
+      if (res.code === 200) {
+        this.fromCreateData = res.data
+      }
+    },
+
+    sendReport() {
+      if (this.form.name !== undefined) {
+        // const targetDom = document.getElementById('repot-list')
+        // const copyDom = targetDom.cloneNode(true)
+        // document.querySelector('body').appendChild(copyDom)
+        setTimeout(() => {
+          html2canvas(document.getElementById('repot-list'), { useCORS: true }).then(canvas => {
+            const imgData = canvas.toDataURL('image/png', 1)
+            const sendImgData = imgData.toString().substring(imgData.indexOf(',') + 1)
+            const postData = { 'reportId': this.daily_Id, 'imgStr': sendImgData, 'url': window.location.href, 'emailUser': this.form.name ? this.form.name.join(',') : null, 'copyTo': this.form.names ? this.form.names.join(',') : null }
+            dailyReportSendmail(postData).then(res => {
+              res.code === 200 ? this.$message.success('报告发送中,请稍后进行邮件查收!') : this.$message.error('发送测试日报失败,请联系管理员!')
+              // document.querySelector('body').removeChild(copyDom)
+              this.$emit('handleClose')
+            })
+          })
+        }, 500)
+      } else {
+        this.$message({ message: '请填写邮箱', type: 'error', offset: 150 })
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.parent-style {
+  .report-taskList{
+    font-size:14px;
+    font-family:MicrosoftYaHei;
+    line-height:17px;
+    color:rgba(102,102,102,1);
+    margin-top: 10px;
+    opacity:1;
+  }
+}
+.div1 {
+    width: 60px;
+    font-size: 14px;
+    font-family: MicrosoftYaHei;
+    color: rgba(51, 51, 51, 1);
+    line-height: 19px;
+}
+  .backStyle {
+    font-size: 14px;
+    font-weight: bold;
+    border-radius: 4px;
+    margin: 10px 0;
+  }
+</style>

+ 221 - 0
src/views/reportManagement/daily/dailyTemplate.vue

@@ -0,0 +1,221 @@
+<template>
+  <!-- 新增测试日报 -->
+  <div class="parent-style">
+    <el-form ref="fromCreateData" class="dailyFrom" :model="fromCreateData" :rules="serviceDataRules">
+      <div class="report-Padding">
+        <span style="color: #f56b6c">*</span>
+        <span class="backStyle"> 任务名称</span>
+      </div>
+
+      <el-select
+        v-model="fromCreateData.taskIds"
+        filterable
+        remote
+        reserve-keyword
+        placeholder="请输入任务名称或ID"
+        :remote-method="remoteMethod"
+        style="width: 100%"
+        size="small"
+        @change="colseSelect"
+      >
+        <el-option v-for="item in tasksOptions" :key="item.id" :label="item.name" :value="item.id" :disabled="item.isScheduleLocked === 1" @click.native="tasksChange(item)">
+          <div class="Layout_space_between"><span>{{ item.name }}</span></div>
+        </el-option>
+      </el-select>
+      <div v-if="selectTask" class="taskError">任务名称不能为空</div>
+      <div v-for="(item, index) in tasksDetailList" :key="index" class="Layout_space_between report-taskList">
+        <span>{{ item.taskIdSting }}</span>
+        <span>{{ item.name }}</span>
+        <i class="el-icon-circle-close didi-hover" @click="delete_task(item)" />
+      </div>
+      <el-form-item label="标题" prop="reportName"><br>
+        <div class="Layout_space_between">
+          <el-input v-model="fromCreateData.reportName" size="small" style="width: 80%;" placeholder="请输入报告名称" />
+          <span>创建人:{{ '秦志鹏' }}</span>
+        </div>
+      </el-form-item>
+      <el-form-item label="模版内容" prop="content"><br>
+        <normal-area id="report-template" :value.sync="fromCreateData.content" :height="500" />
+      </el-form-item>
+    </el-form>
+    <icon-display :id="taskid_arr" />
+  </div>
+</template>
+
+<script>
+import '@/styles/PublicStyle/index.scss'
+import normalArea from '@/components/input/normalArea'
+import { taskList as allTaskList } from '@/api/taskIndex'
+import iconDisplay from '@/views/reportManagement/daily/components/iconDisplay.vue'
+import { settingGetReportModuleById, dailyReportCreate, dailyReportUpdate } from '@/api/reportTemplate' // 模版添删改查
+
+export default {
+  name: 'DailyNewsAdded',
+  components: {
+    normalArea,
+    iconDisplay
+  },
+  props: {
+    modelId: { type: [String, Number, Object], default: 1 },
+    taskIds: { type: Array, default: () => null }
+  },
+  data() {
+    return {
+      serviceDataRules: {
+        reportName: [{ required: true, message: '标题不能为空', trigger: 'change' }],
+        content: [{ required: true, message: '模版内容不能为空', trigger: 'change' }]
+      },
+      fromCreateData: {}, // listAll
+      tasksOptions: [], // 任务下拉选项
+      tasksDetailList: [], // 已有任务项目
+      taskid_arr: [], // taskIds
+      moduleId: '', // 模块id
+      selectTask: false // 选择的任务id
+    }
+  },
+  watch: {
+    modelId: {
+      handler(newV) {
+        if (newV.id) {
+          if (newV.updateDaily === false) {
+            newV.reportName = ''
+          }
+          this.fromCreateData = newV
+          this.$set(this.fromCreateData, 'taskIds', null)
+          this.moduleId = newV.moduleId
+          newV.updateDaily === false ? this.$refs.fromCreateData.resetFields() : ''
+        } else {
+          this.moduleId = newV
+          this.fromCreateData = {}
+          if (newV === 1 || newV === 2) {
+            this.fromCreateData.content = `<div style="color: #606266"><h3>进度和风险</h3><p>项目整体进度</p><p>项目风险与问题</p><table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="8%"><col width="8%"><col width="8%"><col width="8%"></colgroup><thead><tr><th>风险等级</th><th>风险项</th><th>当前状态</th><th>跟进人</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table><h3>测试情况</h3><p>测试进展</p><table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="8%"><col width="8%"><col width="8%"><col width="8%"><col width="8%"><col width="8%"><col width="8%"></colgroup><thead><tr><th>标题1</th><th>标题2</th><th>标题3</th><th>标题4</th><th>标题5</th><th>标题6</th><th>标题7</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table><p>测试说明</p></div>`
+          } else {
+            this.settingGetReportModuleById(newV)
+          }
+        }
+      },
+      immediate: true
+    },
+    taskIds: {
+      handler(newV) {
+        if (newV[0]) {
+          this.taskid_arr = newV
+          this.tasksDetailList = []
+          newV.map(item => {
+            this.remoteMethods(item)
+          })
+        }
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    async settingGetReportModuleById(val) { // 获取表单数据
+      const res = await settingGetReportModuleById(val)
+      if (res.code === 200) {
+        this.fromCreateData = res.data
+      }
+    },
+    async remoteMethods(query) { // 远程搜索任务
+      const res = await allTaskList({ bizId: Number(localStorage.getItem('bizId')), name: query })
+      if (res.code === 200) {
+        this.tasksOptions = res.data
+        this.tasksDetailList.push(res.data[0])
+        this.$set(this.fromCreateData, 'taskIds', null)
+      }
+    },
+    async remoteMethod(query) { // 远程搜索任务
+      const res = await allTaskList({ bizId: Number(localStorage.getItem('bizId')), name: query })
+      if (res.code === 200) {
+        this.tasksOptions = res.data
+      }
+    },
+    tasksChange(data) { // 任务列表变动
+      this.tasksDetailList.length <= 0 ? this.selectTask = true : this.selectTask = false
+      const isEx = this.tasksDetailList.find(item => item.id === data.id)
+      if (isEx) {
+        this.$message({ message: '任务已存在', type: 'warning', duration: 1000, offset: 150 })
+        return false
+      }
+      this.tasksDetailList.push(data)
+      this.taskid_arr.push(data.id)
+    },
+
+    colseSelect() { // 清空任务名称
+      this.$set(this.fromCreateData, 'taskIds', null)
+    },
+
+    delete_task(val) { // 删除关联的任务
+      this.tasksDetailList = this.tasksDetailList.filter(item => {
+        return item.id !== val.id
+      })
+      this.taskid_arr = this.taskid_arr.filter(item => {
+        return item.id !== val.id
+      })
+      this.tasksDetailList.length <= 0 ? this.selectTask = true : this.selectTask = false
+    },
+
+    // 新建模版
+    getCreateData(val) {
+      this.$refs.fromCreateData.validate((valid) => {
+        if (valid) {
+          this.fromCreateData.bizId = localStorage.getItem('bizId')
+          this.fromCreateData.taskIds = this.taskid_arr
+          this.fromCreateData.moduleId = this.moduleId
+          if (val) { // 编辑
+            dailyReportUpdate(this.fromCreateData).then(res => {
+              if (res.code === 200) {
+                this.$emit('SaveNextStep', res.data)
+                this.$message({ type: 'success', message: '更新成功' })
+              }
+            })
+          } else {
+            dailyReportCreate(this.fromCreateData).then(res => {
+              if (res.code === 200) {
+                this.$emit('SaveNextStep', res.data)
+                this.$message({ type: 'success', message: '创建成功' })
+              }
+            })
+          }
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.dailyFrom {
+  >>> .el-form-item {
+    margin-bottom: 0px;
+}
+}
+.parent-style {
+  .report-taskList{
+    font-size:14px;
+    font-family:MicrosoftYaHei;
+    line-height:17px;
+    color:rgba(102,102,102,1);
+    margin-top: 10px;
+    opacity:1;
+  }
+}
+
+  .report-Padding {
+    margin-bottom: 12px;
+  }
+
+  .backStyle {
+    font-size: 14px;
+    font-weight: bold;
+    border-radius: 4px;
+    margin: 10px 0;
+  }
+
+  .taskError {
+    color: #F56C6C;
+    font-size: 12px;
+    line-height: 1;
+    padding-top: 4px;
+  }
+</style>

+ 171 - 0
src/views/reportManagement/daily/newReportTemplate.vue

@@ -0,0 +1,171 @@
+<template>
+  <!-- 新建报告模版 -->
+  <div>
+    <el-form ref="fromCreateData" :model="fromCreateData" :rules="serviceDataRules">
+      <el-form-item label="模版名称" prop="moduleName" label-width="80px">
+        <el-input v-model="fromCreateData.moduleName" size="small" style="width:100%;" placeholder="请输入模版名称(不可与现有模版重名)" />
+      </el-form-item>
+      <el-form-item label="模版内容" prop="content"><br>
+        <normal-area id="report-template" :value.sync="fromCreateData.content" :height="500" />
+      </el-form-item>
+    </el-form>
+    <div class="backStyle">缺陷统计</div>
+    <el-table
+      :data="tableData"
+      border
+      size="mini"
+      style="width: 100%"
+      :header-cell-style="{ backgroundColor: 'rgba(241,241,241,1)', color: 'rgba(51,59,74,1)', fontSize: '14px', fontWeight: '400'}"
+    >
+      <el-table-column prop="date" label="缺陷总数" align="center" min-width="100" />
+      <el-table-column prop="date" label="待修复" align="center" min-width="100" />
+      <el-table-column prop="date" label="待测试" align="center" min-width="100" />
+      <el-table-column prop="date" label="已完成" align="center" min-width="100" />
+      <el-table-column prop="date" label="Reopen" align="center" min-width="100" />
+      <el-table-column prop="date" label="Hold" align="center" min-width="100" />
+    </el-table>
+    <div class="backStyle">今日新增缺陷(-个)</div>
+    <div class="Layout_space_between">
+      <div id="lineShow" class="backTop" />
+      <div id="barShow" class="backTop" />
+    </div>
+    <div class="backStyle">P0&P1缺陷列表(-个)</div>
+    <el-table
+      :data="tableData"
+      border
+      size="mini"
+      :header-cell-style="{ backgroundColor: 'rgba(241,241,241,1)', color: 'rgba(51,59,74,1)', fontSize: '14px', fontWeight: '400'}"
+      style="width: 100%"
+    >
+      <el-table-column prop="date" label="缺陷ID" align="center" min-width="100" />
+      <el-table-column prop="date" label="缺陷标题" align="center" min-width="100" />
+      <el-table-column prop="date" label="状态" align="center" min-width="100" />
+      <el-table-column prop="date" label="缺陷等级" align="center" min-width="100" />
+      <el-table-column prop="date" label="提报人" align="center" min-width="100" />
+      <el-table-column prop="date" label="责任人" align="center" min-width="100" />
+      <el-table-column prop="date" label="修复人" align="center" min-width="100" />
+    </el-table>
+  </div>
+</template>
+
+<script>
+import '@/styles/PublicStyle/index.scss' // 公共css
+import echarts from 'echarts'
+import normalArea from '@/components/input/normalArea' // 富文本
+import { settingAddReportModule, settingUpdateReportModule, settingGetReportModuleById } from '@/api/reportTemplate' // 模版添删改查
+
+export default {
+  components: {
+    normalArea
+  },
+  props: {
+    templateId: { type: [String, Number], default: null } // 模版id
+  },
+  data() {
+    return {
+      tableData: [{ date: 0 }],
+      tpltId: '', // 模版id
+      bugP0P1: [], // bugP0P1数据
+      serviceDataRules: {
+        moduleName: [{ required: true, message: '模版名称不能为空', trigger: 'change' }],
+        content: [{ required: true, message: '模版内容不能为空', trigger: 'change' }]
+      },
+      fromCreateData: {},
+      TLstatus: false // 模版状态
+    }
+  },
+  watch: {
+    templateId: {
+      handler(newV) {
+        this.tpltId = newV
+        this.tpltId ? this.settingGetReportModuleById(newV) : ''
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getRouterData()
+  },
+  methods: {
+    async settingGetReportModuleById(val) {
+      const res = await settingGetReportModuleById(val)
+      if (res.code === 200) {
+        this.fromCreateData = res.data
+      }
+    },
+    getRouterData() {
+      setTimeout(() => {
+        echarts.init(document.getElementById('lineShow')).setOption({
+          backgroundColor: '#FFF',
+          color: ['#FF333333'],
+          title: { text: '缺陷责任人分布', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
+          tooltip: { axisPointer: { type: 'shadow' }},
+          grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
+          xAxis: [{ type: 'category', data: ['P0', 'P1', 'P2', 'P3'], axisTick: { alignWithLabel: true }}],
+          yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
+          series: [{ name: '直接访问', type: 'bar', barWidth: '20%', data: [0, 0, 0, 0] }]
+
+        })
+        echarts.init(document.getElementById('barShow')).setOption({
+          backgroundColor: '#FFF',
+          color: ['#FF4A5164'],
+          title: { text: '缺陷等级分布', x: 'center', textStyle: { fontSize: 14, fontStyle: 'normal', fontWeight: 'normal' }},
+          tooltip: { axisPointer: { type: 'shadow' }},
+          grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
+          xAxis: [{ type: 'category', data: ['P0', 'P1', 'P2', 'P3'], axisTick: { alignWithLabel: true }}],
+          yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
+          series: [{ name: '直接访问', type: 'bar', barWidth: '20%', data: [0, 0, 0, 0] }]
+        })
+      }, 200)
+    },
+
+    // 新建模版
+    getCreateData(e) {
+      this.$refs['fromCreateData'].validate((valid) => {
+        if (valid) {
+          this.fromCreateData.bizId = localStorage.getItem('bizId')
+          this.fromCreateData.type = e
+          if (this.tpltId) {
+            settingUpdateReportModule(this.fromCreateData).then(res => {
+              if (res.code === 200) {
+                this.$message({ type: 'success', message: '更新成功' })
+                this.$emit('getreportTemplate')
+                this.$emit('reportReturn')
+              }
+            })
+          } else {
+            settingAddReportModule(this.fromCreateData).then(res => {
+              if (res.code === 200) {
+                this.$message({ type: 'success', message: '创建成功' })
+                this.$emit('getreportTemplate')
+                this.$emit('reportReturn')
+              }
+            })
+          }
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+  .backStyle {
+    font-size:16px;
+    font-family:MicrosoftYaHei;
+    line-height:19px;
+    color:rgba(51,51,51,1);
+    margin: 1% 0;
+  }
+
+  .space-between {
+    display:flex;
+    align-items: center;
+    justify-content: space-between;
+  }
+
+  .backTop {
+    width: 400px;
+    height:400px;
+  }
+</style>

+ 87 - 30
src/views/Platform/presentation/testPresentation.vue → src/views/reportManagement/testPresentation.vue

@@ -8,19 +8,25 @@
           <el-tab-pane label="提测报告" name="third" />
         </el-tabs>
       </el-header>
+
       <el-main class="public_main report-Layout">
         <div class="Layout_space_between distance">
           <div class="Layout_space_between">
             <span style="width: 100px;">{{ title }}</span>
-            <el-input v-model="state" size="medium" filterable placeholder="报告名称搜索" style="width:100%;" @change="getList(state)" />
+            <el-input v-if="history" v-model="state" size="medium" filterable placeholder="报告名称搜索" style="width:100%;" @change="getList(state)" />
+            <el-input v-if="!history" v-model="state" size="medium" filterable placeholder="报告名称搜索" style="width:100%;" @change="gethistoryData(state)" />
+          </div>
+          <div class="Layout_space_between">
+            <el-button v-if="!history" type="primary" size="medium" @click="getList">返回最新</el-button>
+            <el-button v-if="history" type="primary" size="medium" @click="gethistoryData">查看老数据</el-button>
+            <el-button v-if="history" type="primary" size="medium" @click="getQueryData">新建{{ title }}</el-button>
           </div>
-          <el-button type="primary" size="medium" @click="getQueryData">新建{{ title }}</el-button>
         </div>
         <el-table v-loading="loading" :data="tableData" size="mini" :header-cell-style="{ background: '#F2F3F6' }" border style="width: 100%" :show-overflow-tooltip="true">
           <el-table-column label="报告名称" min-width="280" align="center" show-overflow-tooltip>
             <template slot-scope="scope">
-              <a v-if="title === '测试日报' || title === '准出报告'" href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row)">{{ scope.row.reportName }}</a>
-              <a v-if="title === '提测报告'" href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row)">{{ scope.row.name }}</a>
+              <a v-if="title === '测试日报' || title === '准出报告'" href="javascript:void(0)" style="color:#20a0ff" @click="history ? toReportView(scope.row) : OldDaily(scope.row)">{{ scope.row.reportName }}</a>
+              <a v-if="title === '提测报告'" href="javascript:void(0)" style="color:#20a0ff" @click="history ? toReportView(scope.row) : ''">{{ scope.row.name }}</a>
             </template>
           </el-table-column>
           <el-table-column label="状态" min-width="150" align="center">
@@ -28,14 +34,20 @@
           </el-table-column>
           <el-table-column label="报告人" min-width="180" align="center">
             <template slot-scope="scope">
-              <div v-if="title === '测试日报' || title === '准出报告'">{{ scope.row.ownner }}</div>
-              <div v-if="title === '提测报告'">{{ scope.row.submitter }}</div>
+              <div v-if="history">
+                <div v-if="title === '测试日报' || title === '准出报告'">{{ scope.row.reportorObject.name ===null ? '' : scope.row.reportorObject.name }}</div>
+                <div v-if="title === '提测报告'">{{ scope.row.submitter }}</div>
+              </div>
+              <div v-if="!history">
+                <div v-if="title === '测试日报' || title === '准出报告'">{{ scope.row.ownner }}</div>
+                <div v-if="title === '提测报告'">{{ scope.row.submitter }}</div>
+              </div>
             </template>
           </el-table-column>
           <el-table-column label="创建时间" min-width="280" align="center">
             <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
           </el-table-column>
-          <el-table-column label="操作" align="center" fixed="right" min-width="230">
+          <el-table-column v-if="history" label="操作" align="center" fixed="right" min-width="230">
             <template slot-scope="scope">
               <div v-if="title === '测试日报'">
                 <span v-if="scope.row.status === 0 ? true : false" class="didi-hover" @click="dailyButtom(5,scope.row)">发送</span>
@@ -97,41 +109,54 @@
     </el-dialog>
 
     <TestReport v-if="dialogVisible1" ref="TestReport" />
-    <DailyReport v-if="dialogDaily" ref="DailyReport" :title="title" />
+    <DailyReport v-if="dialogDaily" ref="DailyReport" :title="title" @getList="getList" />
     <ClientReport v-if="dialogClient" ref="ClientReport" />
+
+    <el-dialog title="日报预览" :visible.sync="testPresenyL" class="public_task" width="70%" :close-on-click-modal="false">
+      <div class="blueStripe" />
+      <div style=" margin-bottom: 2%; height: 600px; overflow:scroll; overflow-x: hidden">
+        <testPresenyL v-if="testPresenyL" :message="message" />
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import '@/styles/PublicStyle/index.scss'
-import { dailyReportList, dailyReportDelete } from '@/api/testPresentetion' // 日报
+import { dailyReportDelete } from '@/api/testPresentetion' // 日报
 import { projectTestReportList, projectTestReportDelete } from '@/api/ResultPage' // 准出
 import { launchTestList, launchTestDelete, taskListCreate } from '@/api/InterfaceReport' // 提测
 import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
-import DailyReport from '@/views/Platform/presentation/Templates/DailyReport' // 日报
+import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
 import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
 import { launchTestUpdate } from '@/api/InterfaceReport'
+import { dailyReportList, dailyReportListV2, reportreleaseList, reportdelivertestList } from '@/api/reportTemplate'
+import testPresenyL from '@/views/reportManagement/daily/components/testPresenyL.vue'
 
 export default {
   name: 'TestPresentation',
   components: {
     TestReport,
     DailyReport,
-    ClientReport
+    ClientReport,
+    testPresenyL
   },
   data() {
     return {
       activeName: 'first',
       title: '测试日报', // 报告title
+      history: true, // 新老数据
       userInformation: localStorage.getItem('username'),
       userNames: localStorage.getItem('realname'),
       bizJson: localStorage.getItem('bizId'),
+      message: {}, // 老日报数据
+      testPresenyL: false, // 老日报数据
       centerDialogVisible: false, // 新建报告选择任务
       dialog_testData: false, // 操作弹窗
       report_data: {}, // 当前点击数据
       userData: { id: '', ename: this.userInformation, name: this.userNames },
       loading: true,
-      pageSize: 15,
+      pageSize: 10,
       curIndex: 1,
       total: 0,
       state: '',
@@ -149,7 +174,7 @@ export default {
       dialogDaily: false,
       dialogClient: false,
       indexPage: {
-        pageSize: 15,
+        pageSize: 10,
         curIndex: 1
       }
     }
@@ -161,9 +186,6 @@ export default {
     this.getList()
     this.$store.state.data.status = true
   },
-  // mounted() {
-  //   this.getQueryData()
-  // },
   methods: {
     handleClick(tab, event) {
       this.curIndex = 1
@@ -185,25 +207,25 @@ export default {
     },
     async getList(e) { // 报告list
       this.loading = true
-      this.z_name = e
-      const indexPage = { reportName: e, bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
+      this.history = true
+      const indexPage = { bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
       if (this.title === '测试日报') {
-        const res = await dailyReportList(indexPage)
+        const res = await dailyReportListV2(indexPage)
         if (res.code === 200) {
           this.tableData = res.data
           this.total = res.total
         }
       }
       if (this.title === '准出报告') {
-        const res = await projectTestReportList(indexPage)
+        const res = await reportreleaseList(indexPage)
         if (res.code === 200) {
-          this.tableData = res.data
-          this.total = res.total
+          this.tableData = res.data.list || []
+          this.total = res.data.total
         }
       }
       if (this.title === '提测报告') {
-        const data = { name: e, bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
-        const res = await launchTestList(data)
+        const data = { bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
+        const res = await reportdelivertestList(data)
         if (res.code === 200) {
           this.tableData = res.data
           this.total = res.total
@@ -257,19 +279,19 @@ export default {
       console.log(data, 'xsaxsaxasxsxaxas')
       this.report_data = data
       switch (e) {
-        case 3:
+        case 3: // 复制 第二步
           this.dialogDaily = true
           this.$nextTick(() => {
             this.$refs.DailyReport.init(4, data)
           })
           break
-        case 5:
+        case 5: // 日报第三步
           this.dialogDaily = true
           this.$nextTick(() => {
             this.$refs.DailyReport.init(3, data)
           })
           break
-        case 6:
+        case 6: // 日报第二步
           this.dialogDaily = true
           this.$nextTick(() => {
             this.$refs.DailyReport.init(2, data)
@@ -381,7 +403,7 @@ export default {
     toReportView(ele) {
       switch (this.title) {
         case '测试日报':
-          this.$router.push({ name: '报告详情', query: { data: ele }})
+          this.$router.push({ name: '报告详情', query: { id: ele.id }})
           break
         case '准出报告':
           this.dialogClient = true
@@ -397,17 +419,52 @@ export default {
           break
       }
     },
+
+    async gethistoryData(e) { // 查看所有老日报列表
+      this.loading = true
+      this.history = false
+      const indexPage = { bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
+      if (this.title === '测试日报') {
+        const res = await dailyReportList(indexPage)
+        if (res.code === 200) {
+          this.tableData = res.data
+          this.total = res.total
+        }
+      }
+      if (this.title === '准出报告') {
+        const res = await projectTestReportList(indexPage)
+        if (res.code === 200) {
+          this.tableData = res.data
+          this.total = res.total
+        }
+      }
+      if (this.title === '提测报告') {
+        const data = { bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
+        const res = await launchTestList(data)
+        if (res.code === 200) {
+          this.tableData = res.data
+          this.total = res.total
+        }
+      }
+      this.loading = false
+    },
+
+    OldDaily(val) {
+      this.testPresenyL = true
+      this.message = val
+    },
+
     endDialog() { // 结束对话框
       this.dialog_testData = false
       this.$message({ type: 'warning', message: '已取消' })
     },
     handleSizeChange(size) {
       this.pageSize = size
-      this.getList(this.z_name)
+      this.getList()
     },
     handleCurrentChange(curIndex) {
       this.curIndex = curIndex
-      this.getList(this.z_name)
+      this.getList()
     }
   }
 }

+ 1 - 1
src/views/workbench/team/components/taskList.vue

@@ -123,7 +123,7 @@
 import imgUrl from '@/assets/建立档案@2x.png'
 import '@/styles/PublicStyle/index.scss'
 import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
-import DailyReport from '@/views/Platform/presentation/Templates/DailyReport' // 日报
+import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
 import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
 import { taskSelfList, taskTeamList } from '@/api/workSchedule'
 import { taskUpdate } from '@/api/projectViewDetails'