qinzhipeng_v 5 lat temu
rodzic
commit
f727150d5d

+ 45 - 0
src/api/reportTemplate.js

@@ -65,6 +65,15 @@ export function bugGetReportSumData(data) {
   })
 }
 
+// 删除
+export function dailyReportDelete(data, id) {
+  return request({
+    url: Presentation + '/dailyReport/delete?id=' + id,
+    method: 'post',
+    data
+  })
+}
+
 // 报告创建
 export function dailyReportCreate(data) {
   return request({
@@ -138,6 +147,42 @@ export function reportreleaseList(data) {
   })
 }
 
+// 根据任务idList获取缺陷统计数据
+export function bugGetReportOutSumData(data) {
+  return request({
+    url: Presentation + '/bug/getReportOutSumData',
+    method: 'post',
+    data
+  })
+}
+
+// 根据任务idList获取遗留缺陷列表
+export function bugGetReportNotResolveData(data) {
+  return request({
+    url: Presentation + '/bug/getReportNotResolveData',
+    method: 'post',
+    data
+  })
+}
+
+// 根据任务idList获取报告的初始数据(计划准出时间,计划开发周期,计划测试周期,实际测试周期,开发人员,测试人员)
+export function reportreleaseInitReportRelease(data) {
+  return request({
+    url: Presentation + '/reportrelease/initReportRelease',
+    method: 'post',
+    data
+  })
+}
+
+// 创建准出报告
+export function reportreleaseCreate(data) {
+  return request({
+    url: Presentation + '/reportrelease/create',
+    method: 'post',
+    data
+  })
+}
+
 // 提测报告部分
 
 // 新版提测报告list

+ 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/reportManagement/components/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'

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

@@ -677,7 +677,9 @@ export default {
           break
         case 2: // 日报
           this.dialogDaily = true
-          this.$nextTick(() => { this.$refs.DailyReport.init(1) })
+          this.$nextTick(() => {
+            this.$refs.DailyReport.init(7, [this.taskId])
+          })
           break
         case 3:
           this.dialogClient = true

+ 394 - 0
src/views/reportManagement/ReleaseReport/components/ResultPageyL.vue

@@ -0,0 +1,394 @@
+<template>
+  <div class="velStyle">
+    <!-- 准出预览 -->
+    <div v-if="towShow" class="reportContent">
+      <div>
+        <div style="display: flex; white-space: nowrap; font-family:SimSuncss">
+          <span style="flex:1;font-weight: bold;font-size: 20px;color: #3a8ee6">{{ ClientDatayl.reportName }}</span>
+          <span style="flex:1;margin: 0.5% 0 0 20px;font-size: 17px;">by {{ ClientDatayl.ownner }}</span>
+        </div>
+        <div style="margin: 2% 0 1% 0; font-size: 17px; font-weight: bold;">一. 项目概述</div><br>
+        <div style="display:flex;">
+          <div style="flex:1">
+            <div class="marage">测试结果 : <span :style="status1">{{ status }}</span></div><br>
+            <div class="marage">开发人员 : {{ ClientDatayl.developer }}</div><br>
+            <div class="marage">开发周期 : {{ ClientDatayl.devTimeEnd }} 至 {{ ClientDatayl.devTimeStart }}</div><br>
+            <div class="marage">准出延期 : <span :style="taskLateDisabled">{{ ClientDatayl.taskLateStatus }}</span></div><br>
+          </div>
+          <div style="flex:1">
+            <div class="marage">准入结果 : {{ ClientDatayl.launchInfo }}</div><br>
+            <div class="marage">测试人员 : {{ ClientDatayl.tester }}</div><br>
+            <div class="marage">测试周期 : {{ ClientDatayl.testTimeEnd }} 至 {{ ClientDatayl.testTimeStart }} </div><br>
+            <div v-show="showDelay1" class="marage">延期原因 : {{ ClientDatayl.taskLateReason }}</div><br>
+          </div>
+        </div>
+        <div style="display:flex;">
+          <div style="flex:1">
+            <div class="marage">涉及安全项 : <span :style="getInfoBtnDisabled">{{ ClientDatayl.getInfoBtn }}</span></div><br>
+          </div>
+          <div style="flex:1">
+            <div v-show="showData" class="marage">完成结果 : {{ ClientDatayl.safeInfo }}</div>
+          </div>
+        </div>
+        <div style="white-space: nowrap;">SDL链接 : <el-link href="http://wiki.intra.xiaojukeji.com/pages/viewpage.action?pageId=237016271" type="primary" target="_blank"> 普惠SDL准入标准</el-link></div>
+        <div class="titleStyle">二. 项目背景</div><br>
+        <div class="rich" v-html="editorElem" />
+
+        <div class="titleStyle">三. 模块信息</div>
+
+        <div class="marage">1、模块信息</div>
+
+        <div class="rich" v-html="editorElems" />
+
+        <div class="marage">2、本期功能</div>
+
+        <div class="rich" v-html="editorFrom" />
+
+        <div class="marage">3、风险点</div>
+
+        <div class="rich" v-html="editorF" />
+
+        <div class="marage">4、缺陷分析</div>
+
+        <el-table :data="tableData" border>
+          <el-table-column prop="totalBug" label="bug总数" min-width="200" align="center" edit="false">
+            <template slot-scope="scope">
+              <el-input v-if="scope.row.totalBug.edit" ref="totalBug" v-model="scope.row.totalBug.value" style="width: 100%" @blur="scope.row.totalBug.edit = false" />
+              <span v-else>{{ scope.row.totalBug.value }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="fixBug" min-width="200" align="center" label="已解决bug数">
+            <template slot-scope="scope">
+              <el-input v-if="scope.row.fixBug.edit" ref="fixBug" v-model="scope.row.fixBug.value" style="width: 100%" @blur="scope.row.fixBug.edit = false" />
+              <span v-else>{{ scope.row.fixBug.value }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="remainBug" min-width="200" align="center" label="遗留bug数">
+            <template slot-scope="scope">
+              <el-input v-if="scope.row.remainBug.edit" ref="remainBug" v-model="scope.row.remainBug.value" style="width: 100%" @blur="scope.row.remainBug.edit = false" />
+              <span v-else>{{ scope.row.remainBug.value }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="rateOfReopen" min-width="200" align="center" label="reopen率">
+            <template slot-scope="scope">
+              <el-input v-if="scope.row.rateOfReopen.edit" ref="rateOfReopen" v-model="scope.row.rateOfReopen.value" style="width: 100%" @blur="scope.row.rateOfReopen.edit = false" />
+              <span v-else>{{ scope.row.rateOfReopen.value }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="invalidBug" min-width="200" align="center" label="无效bug数">
+            <template slot-scope="scope">
+              <el-input v-if="scope.row.invalidBug.edit" ref="invalidBug" v-model="scope.row.invalidBug.value" style="width: 100%" @blur="scope.row.invalidBug.edit = false" />
+              <span v-else>{{ scope.row.invalidBug.value }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-row>
+          <el-col :span="24"><div style="margin:2% 0;">5、遗留问题</div>{{ ClientDatayl.bugInfo }}</el-col>
+        </el-row>
+
+        <div class="rich" v-html="editorData" />
+
+        <div class="titleStyle">四. 测试项</div>
+
+        <div class="marage">1、功能测试 : <span style="margin-left:40px;" :style="fctResultChange">{{ fctResult }}</span></div>
+
+        <div class="rich" v-html="editorEl" />
+
+        <div class="marage">2、可靠性测试 : <span style="margin-left:40px;" :style="rqtResultChange">{{ rqtResult }}</span></div>
+
+        <div class="rich" v-html="editorEle" />
+
+        <div class="marage">3、稳定性测试 : <span style="margin-left:40px;" :style="pftResultChange">{{ pftResult }}</span></div>
+
+        <div class="rich" v-html="editorSix" />
+
+        <div class="marage">4、安全性测试 : <span style="margin-left:40px;" :style="safeResultChange">{{ safeResult }}</span></div>
+
+        <div class="rich" v-html="editorEight" />
+
+        <div class="marage">5、线上监控 : <span style="margin-left:40px;" :style="moniterResultChange">{{ moniterResult }}</span></div>
+
+        <div class="rich" v-html="editorNine" />
+      </div>
+    </div>
+
+    <div v-if="oneShow" class="reportContent">
+      <div>
+        <div style="display: flex; white-space: nowrap; font-family:SimSuncss">
+          <span style="flex:1;font-weight: bold;font-size: 20px;color: #3a8ee6">{{ ClientDatayl.reportName }}</span>
+          <span style="flex:2;margin: 0.5% 0 0 20px;font-size: 17px;">by {{ ClientDatayl.ownner }}</span>
+        </div>
+        <div style="margin: 2% 0 1% 0; font-size: 19px; font-weight: bold;">一、项目概述</div><br>
+        <div style="display:flex;">
+          <div style="flex:1">
+            <div class="marage">测试结果 : <span :style="status1">{{ status }}</span></div><br>
+            <div class="marage">开发人员 : {{ ClientDatayl.developer }}</div><br>
+            <div class="marage">开发周期 : {{ ClientDatayl.devTimeEnd }} 至 {{ ClientDatayl.devTimeStart }}</div><br>
+            <div class="marage">准出延期 : <span :style="taskLateDisabled">{{ ClientDatayl.taskLateStatus }}</span></div><br>
+          </div>
+          <div style="flex:1">
+            <div class="marage">准入结果 : {{ ClientDatayl.smokeTestResult }}</div><br>
+            <div class="marage">测试人员 : {{ ClientDatayl.tester }}</div><br>
+            <div class="marage">测试周期 : {{ ClientDatayl.testTimeEnd }} 至 {{ ClientDatayl.testTimeStart }} </div><br>
+            <div v-show="showDelay1" class="marage">延期原因 : {{ ClientDatayl.taskLateReason }}</div><br>
+          </div>
+        </div>
+
+        <div class="titleStyle">二. 项目背景</div>
+
+        <div class="rich" v-html="editorElem" />
+
+        <div class="titleStyle">三. 测试项</div>
+
+        <p>功能测试 : <span style="margin-left:40px;" :style="pftResult1">{{ pftResult }}</span></p>
+
+        <div class="rich" v-html="editorElems1" />
+
+        <p>兼容测试 : <span style="margin-left:40px;" :style="sctResult1">{{ sctResult }}</span></p>
+
+        <div class="rich" v-html="editorFrom1" />
+
+        <div class="titleStyle">四. 产品验收</div>
+
+        <p>验收结果 : <span style="margin-left:40px;" :style="acceptanceResult1">{{ acceptanceResult }}</span></p>
+
+        <div class="rich" v-html="editorFro" />
+
+        <div class="titleStyle">五. bug指标</div>
+
+        <el-table :data="tableData" border>
+          <el-table-column prop="totalBug" label="bug总数" min-width="200" align="center" edit="false">
+            <template slot-scope="scope">
+              <el-input v-if="scope.row.totalBug.edit" ref="totalBug" v-model="scope.row.totalBug.value" style="width: 100%" @blur="scope.row.totalBug.edit = false" />
+              <span v-else>{{ scope.row.totalBug.value }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="fixBug" min-width="200" align="center" label="已解决bug数">
+            <template slot-scope="scope">
+              <el-input v-if="scope.row.fixBug.edit" ref="fixBug" v-model="scope.row.fixBug.value" style="width: 100%" @blur="scope.row.fixBug.edit = false" />
+              <span v-else>{{ scope.row.fixBug.value }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="remainBug" min-width="200" align="center" label="遗留bug数">
+            <template slot-scope="scope">
+              <el-input v-if="scope.row.remainBug.edit" ref="remainBug" v-model="scope.row.remainBug.value" style="width: 100%" @blur="scope.row.remainBug.edit = false" />
+              <span v-else>{{ scope.row.remainBug.value }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="rateOfFix" min-width="200" align="center" label="bug解决率">
+            <template slot-scope="scope">
+              <el-input v-if="scope.row.rateOfFix.edit" ref="rateOfFix" v-model="scope.row.rateOfFix.value" style="width: 100%" @blur="scope.row.rateOfFix.edit = false" />
+              <span v-else>{{ scope.row.rateOfFix.value }}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-row class="pre-line">
+          <el-col :span="24"><div style="margin: 2% 0;">1、遗留问题</div>{{ ClientDatayl.bugInfo }}</el-col>
+        </el-row>
+
+        <div class="rich" v-html="editorEle1" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { bugFinishList } from '@/api/ResultPage'
+
+export default {
+  name: 'ResultPageyL',
+  props: {
+    message: {
+      type: Object,
+      required: true
+    }
+  },
+  data() {
+    return {
+      showDelay1: false,
+      taskLateStatus: '',
+      getInfoBtnDisabled: { color: 'green' },
+      taskLateDisabled: { color: 'green' },
+      pftResult1: { colocr: 'green' },
+      sctResult1: { colocr: 'green' },
+      acceptanceResult1: { colocr: 'green' },
+      fctResultChange: { colocr: '' },
+      rqtResultChange: { color: '' },
+      pftResultChange: { color: '' },
+      safeResultChange: { color: '' },
+      moniterResultChange: { color: '' },
+      showData: false,
+      status: '',
+      acceptanceResult: '',
+      sctResult: '',
+      pftResult: '',
+      towShow: false,
+      oneShow: false,
+      showDisabled: true,
+      showDisabled1: true,
+      ClientDatayl: {},
+      editorElem: '',
+      editorElems: '',
+      editorElems1: '',
+      editorFrom: '',
+      editorFrom1: '',
+      editorF: '',
+      editorData: '',
+      editorEl: '',
+      editorEle: '',
+      editorEle1: '',
+      editorSix: '',
+      editorEight: '',
+      editorNine: '',
+      tableData: [],
+      bugNum: {},
+      status1: { color: 'green' },
+      fctResult: '',
+      moniterResult: '',
+      rqtResult: '',
+      safeResult: ''
+    }
+  },
+  created() {
+    this.idGet()
+  },
+  methods: {
+    idGet() {
+      this.ClientDatayl = this.message
+      console.log(this.ClientDatayl, 'ddddddd')
+      this.editorElems1 = this.ClientDatayl.fctInfo
+      this.editorFrom1 = this.ClientDatayl.sctInfo
+      this.editorFro = this.ClientDatayl.acceptanceResultInfo
+      this.editorEle1 = this.ClientDatayl.bugTarget
+      this.editorElem = this.ClientDatayl.projectBackground
+      this.editorElems = this.ClientDatayl.moduleInfo
+      this.editorFrom = this.ClientDatayl.functionInfo
+      this.editorF = this.ClientDatayl.onlineRisk
+      this.editorEle = this.ClientDatayl.rqtInfo
+      this.editorData = this.ClientDatayl.bugInfo
+      this.editorEl = this.ClientDatayl.fctInfo
+      this.editorSix = this.ClientDatayl.pftInfo
+      this.editorEight = this.ClientDatayl.safeResultInfo
+      this.editorNine = this.ClientDatayl.moniterResultInfo
+      this.getBugData()
+      if (this.ClientDatayl.type === 2) {
+        this.towShow = true
+        this.oneShow = false
+      } else {
+        this.oneShow = true
+        this.towShow = false
+      }
+      if (this.ClientDatayl.status === 1) {
+        this.status = '通过'
+      } else {
+        this.status = '未通过'
+        this.status1.color = 'red'
+      }
+      if (this.ClientDatayl.taskLateStatus === 1) {
+        this.ClientDatayl.taskLateStatus = '否'
+        this.showDelay1 = false
+        this.taskLateDisabled.color = 'green'
+      } else {
+        this.ClientDatayl.taskLateStatus = '是'
+        this.taskLateDisabled.color = 'red'
+        this.showDelay1 = true
+      }
+      if (this.ClientDatayl.safeInfo !== '') {
+        this.ClientDatayl.getInfoBtn = '是'
+        this.getInfoBtnDisabled.color = 'red'
+        this.showData = true
+      } else {
+        this.ClientDatayl.getInfoBtn = '否'
+        this.getInfoBtnDisabled.color = 'green'
+        this.showData = false
+      }
+      switch (this.ClientDatayl.pftResult) {
+        case 1: this.pftResult = '通过'; this.pftResult1.color = 'green'; break
+        case 2: this.pftResult = '未通过'; this.pftResult1.color = 'red'; break
+        case 3: this.pftResult = '未执行'; this.pftResult1.color = 'Orange'; break
+      }
+      switch (this.ClientDatayl.sctResult) {
+        case 1: this.sctResult = '测试通过'; this.sctResult1.color = 'green'; break
+        case 2: this.sctResult = '测试未通过'; this.sctResult1.color = 'red'; break
+      }
+      switch (this.ClientDatayl.acceptanceResult) {
+        case 1: this.acceptanceResult = '通过'; this.acceptanceResult1.color = 'green'; break
+        case 2: this.acceptanceResult = '未通过'; this.acceptanceResult1.color = 'red'; break
+        case 3: this.acceptanceResult = '未执行'; this.acceptanceResult1.color = 'Orange'; break
+      }
+      switch (this.ClientDatayl.fctResult) { // 功能测试
+        case 1: this.fctResult = '通过'; this.fctResultChange.color = 'green'; break
+        case 2: this.fctResult = '未通过'; this.fctResultChange.color = 'red'; break
+        case 3: this.fctResult = '未执行'; this.fctResultChange.color = 'Orange'; break
+      }
+      switch (this.ClientDatayl.rqtResult) { // 可靠性测试
+        case 1: this.rqtResult = '通过'; this.rqtResultChange.color = 'green'; break
+        case 2: this.rqtResult = '未通过'; this.rqtResultChange.color = 'red'; break
+        case 3: this.rqtResult = '未执行'; this.rqtResultChange.color = 'Orange'; break
+      }
+      switch (this.ClientDatayl.pftResult) { // 稳定性测试
+        case 1: this.pftResult = '通过'; this.pftResultChange.color = 'green'; break
+        case 2: this.pftResult = '未通过'; this.pftResultChange.color = 'red'; break
+        case 3: this.pftResult = '未执行'; this.pftResultChange.color = 'Orange'; break
+      }
+      switch (this.ClientDatayl.safeResult) { // 安全性测试
+        case 1: this.safeResult = '通过'; this.safeResultChange.color = 'green'; break
+        case 2: this.safeResult = '未通过'; this.safeResultChange.color = 'red'; break
+        case 3: this.safeResult = '未执行'; this.safeResultChange.color = 'Orange'; break
+      }
+      switch (this.ClientDatayl.moniterResult) { // 线上监控
+        case 1: this.moniterResult = '通过'; this.moniterResultChange.color = 'green'; break
+        case 2: this.moniterResult = '未通过'; this.moniterResultChange.color = 'red'; break
+        case 3: this.moniterResult = '未执行'; this.moniterResultChange.color = 'Orange'; break
+      }
+    },
+    getBugData() {
+      this.bugNum = { type: this.ClientDatayl.type, taskIds: this.ClientDatayl.taskIds }
+      bugFinishList(this.bugNum).then(res => {
+        this.$set(this.ClientDatayl, 'launchInfo', res.data.launchInfo)
+        this.tableData = [res.data]
+        this.formatData()
+      })
+    },
+
+    formatData() {
+      this.tableData.forEach(item => {
+        for (var key in item) {
+          item[key] = {
+            value: item[key],
+            edit: false
+          }
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+  .marage {
+    margin: 1% 0;
+  }
+  .reportContent {
+    padding: 2%;
+  }
+  .velStyle {
+    width: 100%;
+    height:100%;
+    display: inline-block;
+    font-size: 14px;
+    color: #333B4A;
+  }
+  .titleStyle {
+    color: #333B4A;
+    margin: 2% 0;
+    font-size: 17px;
+    font-weight: bold;
+  }
+  .pre-line >>> .el-col{
+    white-space: pre-line
+  }
+  .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>

+ 147 - 0
src/views/reportManagement/ReleaseReport/components/iconDisplay.vue

@@ -0,0 +1,147 @@
+<template>
+  <div>
+    <el-table
+      :data="bugTableData"
+      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="缺陷总数" 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>
+    <div id="line-echarts" class="line-echarts" />
+    <div class="Layout_space_between">
+      <div id="lineShow" class="backTop" />
+      <div id="barShow" class="backTop" />
+    </div>
+    <div class="backStyle">遗留缺陷</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%"
+      show-overflow-tooltip="true"
+    >
+      <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-column prop="date" label="备注(Hole原因等)" align="center" min-width="150" />
+    </el-table>
+  </div>
+</template>
+
+<script>
+import echarts from 'echarts'
+import { bugGetReportOutSumData, bugGetReportNotResolveData, bugGetReportDisDataByMember, bugGetReportDisDataByPri } from '@/api/reportTemplate' // 模版添删改查
+export default {
+  props: {
+    taskIds: { type: Array, default: null }
+  },
+  data() {
+    return {
+      bugTableData: [],
+      tableData: [],
+      taskId: [] // 创建准出的任务
+    }
+  },
+  watch: {
+    taskIds: {
+      handler(newV) {
+        newV ? this.getRouterData(newV) : ''
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    async getRouterData(val) {
+      const res = await bugGetReportOutSumData({ taskIds: val })
+      if (res.code === 200) {
+        this.bugTableData = [res.data]
+      }
+      const res1 = await bugGetReportNotResolveData({ taskIds: val })
+      if (res1.code === 200) {
+        this.tableData = res1.dada
+      }
+      const res2 = await bugGetReportDisDataByMember({ taskIds: val })
+      if (res2.code === 200) {
+        const data = res2.data.yaxis.map(item => ({
+          ...item,
+          type: 'bar',
+          barWidth: '20px'
+        }))
+        setTimeout(() => {
+          echarts.init(document.getElementById('lineShow')).setOption({
+            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[0] ? res2.data.xaxis : ['P0', 'P1', 'P2', 'P3'], 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({ taskIds: val })
+      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)
+      }
+
+      setTimeout(() => {
+        echarts.init(document.getElementById('line-echarts')).setOption({
+          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: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期七'], axisTick: { alignWithLabel: true }}],
+          yAxis: [{ type: 'value', axisLine: { show: false }, axisTick: { show: false }, splitLine: { show: true, lineStyle: { type: 'dashed' }}}],
+          series: [{ name: '直接访问', type: 'line', smooth: true, data: [5, 25, 5, 25, 5, 15, 5] }]
+
+        })
+      }, 200)
+    },
+
+    click_bugName(id) { // 缺陷跳转
+      this.$router.push({ name: '缺陷详情', params: { id: id }})
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+ .line-echarts {
+     width: 100%;
+     height:400px;
+  }
+
+  .backTop {
+    width: 400px;
+    height:400px;
+  }
+</style>

+ 270 - 0
src/views/reportManagement/ReleaseReport/newReleaeTemplate.vue

@@ -0,0 +1,270 @@
+<template>
+  <!-- 新建报告模版 -->
+  <div class="report-container">
+    <el-form ref="fromCreateData" :model="fromCreateData">
+      <el-form-item label="模版名称" prop="moduleName" :rules="[{ required: true, message: '模版名称不能为空', trigger: 'change'}]"><br>
+        <el-input v-model="fromCreateData.moduleName" size="small" style="width:100%;" placeholder="请输入模版名称(不可与现有模版重名)" />
+      </el-form-item>
+      <div class="backStyle">模版内容</div>
+
+      <el-row class="from-margin">
+        <el-col :span="24">
+          <span class="from-names">测试结果: </span>
+          <span class="from-value">通过</span>
+        </el-col>
+      </el-row>
+
+      <el-row class="from-margin">
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-name">计划准出时间: </span>
+          <el-date-picker
+            v-model="fromCreateData.releasePlanTime"
+            type="date"
+            placeholder="选择日期时间"
+            format="yyyy.MM.dd"
+            value-format="yyyy.MM.dd"
+            style="width: 100%;"
+            size="small"
+          />
+        </el-col>
+        <el-col :span="12">
+          <span class="from-namev"> 实际准出时间:{{ fromCreateData.releaseActualTime }}</span>
+        </el-col>
+      </el-row>
+
+      <el-row class="from-margin">
+        <el-col :span="24" class="Layout_space_between">
+          <span class="from-namea"><span style="color: red;">*</span> 准出延期原因 : </span>
+          <el-input v-model="fromCreateData.moduleName" size="small" />
+        </el-col>
+      </el-row>
+
+      <el-row class="from-margin">
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-name">计划开发周期: </span>
+          <el-date-picker v-model="fromCreateData.testPlanTimeStart" type="daterange" size="small" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy.MM.dd" value-format="yyyy.MM.dd" style="width: -webkit-fill-available;" />
+        </el-col>
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-namer"> 实际开发周期:</span>
+          <el-date-picker v-model="fromCreateData.testPlanTimeEnd" type="daterange" size="small" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy.MM.dd" value-format="yyyy.MM.dd" style="width: -webkit-fill-available;" />
+        </el-col>
+      </el-row>
+
+      <el-row class="from-margin">
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-name">计划测试周期: </span>
+          <el-date-picker v-model="fromCreateData.testActualTimeStart" type="daterange" size="small" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy.MM.dd" value-format="yyyy.MM.dd" style="width: -webkit-fill-available;" />
+        </el-col>
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-namer">实际测试周期:</span>
+          <el-date-picker v-model="fromCreateData.testActualTimeEnd" type="daterange" size="small" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy.MM.dd" value-format="yyyy.MM.dd" style="width: -webkit-fill-available;" />
+        </el-col>
+      </el-row>
+
+      <el-row class="from-margin">
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-name">开发人员: </span>
+          <searchTeam :value.sync="fromCreateData.developer" :clearable="true" :multiple="true" :size="'small'" style="width: 100%;" />
+        </el-col>
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-namer"> 测试人员:</span>
+          <searchTeam :value.sync="fromCreateData.tester" :clearable="true" :multiple="true" :size="'small'" style="width: 100%;" />
+        </el-col>
+      </el-row>
+      <normal-area id="report-template" :value.sync="fromCreateData.content" :height="500" />
+    </el-form>
+    <div class="backStyle">缺陷统计</div>
+    <iconDisplay :task-ids="taskId" />
+  </div>
+</template>
+
+<script>
+import '@/styles/PublicStyle/index.scss' // 公共css
+import searchTeam from '@/components/select/searchTeam' // 人员搜索
+import normalArea from '@/components/input/normalArea' // 富文本
+import iconDisplay from '@/views/reportManagement/ReleaseReport/components/iconDisplay.vue'
+import { settingAddReportModule, settingUpdateReportModule, settingGetReportModuleById, reportreleaseInitReportRelease, reportreleaseCreate } from '@/api/reportTemplate' // 模版添删改查
+
+export default {
+  components: {
+    normalArea,
+    searchTeam,
+    iconDisplay
+  },
+  props: {
+    templateId: { type: [String, Number], default: null }, // 模版id
+    type: { type: String, default: 'new' },
+    taskIds: { type: Array, default: null }
+  },
+  data() {
+    return {
+      tpltId: '', // 模版id
+      taskId: [], // 创建准出的任务
+      fromCreateData: {}, // from
+      releaseType: '' // 新建模版还是新建准出报告
+    }
+  },
+  watch: {
+    templateId: {
+      handler(newV) {
+        if (newV !== 1 && newV !== 2) {
+          this.tpltId = newV
+          this.tpltId ? this.settingGetReportModuleById(newV) : ''
+        }
+        if (newV === 1) {
+          this.fromCreateData.content = `
+          <p>背景</p><br>
+          <div>测试内容</div>
+          <p>功能测试</p>
+          <table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="20%"><col width="20%"><col width="20%"><col width="20%"></colgroup><thead><tr><th>页面</th><th>模块</th><th>接口</th><th>测试结果</th><th>备注</th></tr></thead><tbody><tr><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></tr></tbody></table>
+          <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>机型</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>
+          <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>网络类型</th><th>测试结果</th></tr></thead><tbody><tr><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td></tr></tbody></table>
+          <p>产品验收</p>
+          <table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="20%"><col width="20%"><col width="20%"><col width="20%"></colgroup><thead><tr><th>验收项</th><th>验收点</th><th>验收人</th><th>验收结果</th><th>备注</th></tr></thead><tbody><tr><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></tr></tbody></table>
+         `
+        }
+        if (newV === 2) {
+          this.fromCreateData.content = `
+          <p>背景</p><br>
+          <div>测试内容</div>
+          <p>功能测试</p>
+          <table border="1" style="border: 1px solid #DEE2E7" width="100%"><colgroup><col width="20%"><col width="20%"><col width="20%"><col width="20%"></colgroup><thead><tr><th>页面</th><th>模块</th><th>接口</th><th>测试结果</th><th>备注</th></tr></thead><tbody><tr><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></tr></tbody></table>
+          <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>
+          <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>
+          <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>
+         `
+        }
+      },
+      immediate: true
+    },
+    type: {
+      handler(newV) {
+        this.releaseType = newV
+      },
+      immediate: true
+    },
+    taskIds: {
+      handler(newV) {
+        if (newV) {
+          this.taskId = newV
+          this.reportreleaseInitReportRelease(newV)
+        }
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    async reportreleaseInitReportRelease(val) {
+      const res = await reportreleaseInitReportRelease({ taskIds: val })
+      if (res.code === 200) {
+        this.fromCreateData = res.data
+      }
+    },
+    async settingGetReportModuleById(val) { // 获取自定义模版内容
+      const res = await settingGetReportModuleById(val)
+      if (res.code === 200) {
+        this.fromCreateData = res.data
+      }
+    },
+
+    // 创建准出报告
+    reportreleaseCreate() {
+      this.$refs.fromCreateData.validate((valid) => {
+        if (valid) {
+          const data = this.fromCreateData
+          data.taskIds = this.taskId
+          data.reportName = this.fromCreateData.moduleName
+          data.bizId = localStorage.getItem('bizId')
+          data.moduleId = this.tpltId
+          data.developer = this.fromCreateData.developer ? this.fromCreateData.developer.toString() : null
+          data.tester = this.fromCreateData.tester ? this.fromCreateData.tester.toString() : null
+
+          reportreleaseCreate(data).then(res => {
+            if (res.code === 200) {
+              console.log(res)
+            }
+            this.$emit('SaveNextStep')
+          })
+        }
+      })
+    },
+
+    // 新建模版
+    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 lang="scss" scoped>
+  .backStyle {
+    font-size:16px;
+    font-family:MicrosoftYaHei;
+    line-height:19px;
+    color:rgba(51,51,51,1);
+    margin: 1% 0;
+  }
+
+.report-container {
+    display: inline-block;
+    font-size:14px;
+    font-family:Microsoft Sans Serif;
+    font-weight:400;
+    line-height:22px;
+    color:#666666;
+    opacity:1;
+    .from-name {
+      width: 140px !important;
+    }
+    .from-names {
+      width: 100px !important;
+    }
+    .from-namea {
+      width: 119px !important;
+    }
+    .from-namer {
+      width: 140px !important;
+      margin-left:10px;
+    }
+    .from-namev {
+      margin-left:10px;
+      vertical-align: sub;
+    }
+    .from-value {
+      margin-left: 30px;
+      color:rgba(126,211,33,1);
+    }
+}
+
+  .from-margin {
+    margin-bottom:20px;
+  }
+</style>

+ 192 - 0
src/views/reportManagement/ReleaseReport/releaePreview.vue

@@ -0,0 +1,192 @@
+<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>
+
+    <el-row class="from-margin">
+      <el-col :span="24">
+        <span class="from-names">测试结果: </span>
+        <span class="from-value">通过</span>
+      </el-col>
+    </el-row>
+
+    <el-row class="from-margin">
+      <el-col :span="12" class="Layout_space_between">
+        <span class="from-name">计划准出时间:{{ fromCreateData.releasePlanTime }}</span>
+      </el-col>
+      <el-col :span="12">
+        <span class="from-namev"> 实际准出时间:{{ fromCreateData.releaseActualTime }}</span>
+      </el-col>
+    </el-row>
+
+    <el-row class="from-margin">
+      <el-col :span="24" class="Layout_space_between">
+        <span class="from-namea">准出延期原因 : {{ fromCreateData.moduleName }}</span>
+      </el-col>
+    </el-row>
+
+    <el-row class="from-margin">
+      <el-col :span="12" class="Layout_space_between">
+        <span class="from-name">计划开发周期:{{ fromCreateData.testPlanTimeStart }}</span>
+      </el-col>
+      <el-col :span="12" class="Layout_space_between">
+        <span class="from-namer"> 实际开发周期:{{ fromCreateData.testPlanTimeEnd }}</span>
+      </el-col>
+    </el-row>
+
+    <el-row class="from-margin">
+      <el-col :span="12" class="Layout_space_between">
+        <span class="from-name">计划测试周期:{{ fromCreateData.testActualTimeStart }} </span>
+      </el-col>
+      <el-col :span="12" class="Layout_space_between">
+        <span class="from-namer">实际测试周期:{{ fromCreateData.testActualTimeEnd }}</span>
+      </el-col>
+    </el-row>
+
+    <el-row class="from-margin">
+      <el-col :span="12" class="Layout_space_between">
+        <span class="from-name">开发人员:{{ fromCreateData.developer }}</span>
+      </el-col>
+      <el-col :span="12" class="Layout_space_between">
+        <span class="from-namer"> 测试人员:{{ fromCreateData.tester }}</span>
+      </el-col>
+    </el-row>
+    <normal-area id="report-template" :value.sync="fromCreateData.content" :height="500" />
+    <div class="backStyle">缺陷统计</div>
+    <iconDisplay :task-ids="taskId" />
+  </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/ReleaseReport/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 {
+    width: 100%;
+    display: inline-block;
+    font-size:14px;
+    font-family:Microsoft Sans Serif;
+    font-weight:400;
+    line-height:22px;
+    color:#666666;
+    opacity:1;
+    .from-name {
+      width: 140px !important;
+    }
+    .from-names {
+      width: 100px !important;
+    }
+    .from-namea {
+      width: 119px !important;
+    }
+    .from-namer {
+      width: 140px !important;
+      margin-left:10px;
+    }
+    .from-namev {
+      margin-left:10px;
+      vertical-align: sub;
+    }
+    .from-value {
+      margin-left: 30px;
+      color:rgba(126,211,33,1);
+    }
+  .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>

+ 219 - 0
src/views/reportManagement/ReleaseReport/releaeTemplate.vue

@@ -0,0 +1,219 @@
+<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>
+        <el-input v-model="fromCreateData.reportName" 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>
+    <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.reportor = localStorage.getItem('usernames')
+          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>

+ 247 - 0
src/views/reportManagement/Testing/components/acceptTheReport.vue

@@ -0,0 +1,247 @@
+<template>
+  <!-- 提测预览 -->
+  <div class="eleStyle_one">
+    <div class="reportContent">
+      <div style="display: flex; white-space: nowrap; font-family:SimSuncss">
+        <span style="flex:1;font-weight: bold;font-size: 20px;color: #3a8ee6">{{ fromCreateData.name }}</span>
+        <span style="flex:2;margin:1% 0 0 20px;font-size: 17px;">by {{ fromCreateData.submitter }}</span>
+      </div>
+      <div class="titleStyle" style="margin:1% 0;">一. 提测详情</div>
+      <div v-if="oneShow">
+        <el-form :model="fromCreateData">
+          <div style="display: flex;">
+            <div style="flex:1" class="marage">是否延期 : <span :style="lateStatus1">{{ lateStatus }}</span></div><br>
+            <div v-show="showDelay" style="flex:1" class="marage">延期原因 : {{ fromCreateData.lateReason }}</div><br>
+          </div>
+
+          <div style="display: flex;">
+            <div style="flex:1" class="marage">涉及安全项 : <span :style="safeStatus1">{{ safeStatus }}</span></div><br>
+            <div v-show="showData" style="flex:1" class="marage">完成结果 : {{ fromCreateData.safeInfo }}</div><br>
+          </div>
+
+          <div style="display: flex;">
+            <el-form-item style="flex:1;margin: 0 0 1%;" label="CodeReview : "><span :style="CodeReview1">{{ CodeReview }}</span></el-form-item>
+            <el-form-item v-show="showCodeReview" style="flex:1" label="执行人 : ">{{ fromCreateData.crBy }}</el-form-item>
+          </div>
+
+          <div style="display: flex;">
+            <div style="flex:1">
+              <div class="marage">SDL链接 : <a href="http://wiki.intra.xiaojukeji.com/pages/viewpage.action?pageId=237016271" style="color:blue;">普惠SDL准入标准</a></div><br>
+              <div class="marage">是否跟版 : {{ fromCreateData.isEdition }}</div><br>
+              <div class="marage">优 先 级 : {{ fromCreateData.priority }}</div><br>
+            </div>
+            <div style="flex:1;">
+              <div class="marage">开发时间 : {{ fromCreateData.devTimeStart }} 至 {{ fromCreateData.devTimeEnd }}</div><br>
+              <div class="marage">计划提测时间 : {{ fromCreateData.planLaunchTime }}</div><br>
+              <div class="marage">实际提测时间 : {{ fromCreateData.launchTime }}</div><br>
+            </div>
+          </div>
+          <div class="marage">prd地址 : {{ fromCreateData.prdUrl }}</div><br>
+          <div class="marage">设计方案 : {{ fromCreateData.devUrl }}</div><br>
+          <div class="marage">自测结果 : {{ fromCreateData.selfTestInfo }}</div><br>
+          <div class="marage">测试建议 : {{ fromCreateData.testSuggest }}</div><br>
+          <el-form-item label="提测模块" style="margin: 2px 0;" />
+          <div class="rich" v-html=" moduleInfoOne" />
+        </el-form>
+      </div>
+
+      <div v-if="towShow">
+        <el-form :model="fromCreateData">
+          <div style="display:flex;">
+            <div style="flex:1">
+              <el-form-item label="测试地址 : ">{{ fromCreateData.packageUrl }}</el-form-item><br>
+              <el-form-item label="提测环境 : ">{{ fromCreateData.env }}</el-form-item><br>
+              <el-form-item label="自测结果 : ">{{ fromCreateData.selfTestInfo }}</el-form-item><br>
+            </div>
+            <div style="flex:1">
+              <el-form-item label="打包分支 : ">{{ fromCreateData.packageBranch }}</el-form-item><br>
+              <el-form-item label="优 先 级 : ">{{ fromCreateData.priority }}</el-form-item><br>
+            </div>
+          </div>
+
+          <div style="display: flex;">
+            <el-form-item style="flex:1" label="新增Apollo : "><span :style="configInfo1">{{ config }}</span></el-form-item><br>
+            <el-form-item v-show="showDelay1" style="flex:1" label="Apollo名称 : ">{{ fromCreateData.configInfo }}</el-form-item><br>
+          </div>
+
+          <div style="display: flex;">
+            <el-form-item style="flex:1;margin: 1% 0;" label="依赖组件 : "><span :style="dependentComponents1">{{ dependentCom }}</span></el-form-item>
+            <el-form-item v-show="showDelay2" style="flex:1" label="组件名称 : ">{{ fromCreateData.dependentComponents }}</el-form-item>
+          </div>
+
+          <div style="display: flex;">
+            <el-form-item style="flex:1;margin: 0 0 1%;" label="是否延期 : "><span :style="lateStatus1">{{ lateStatus }}</span></el-form-item>
+            <el-form-item v-show="showDelay" style="flex:1" label="延期原因 : ">{{ fromCreateData.lateReason }}</el-form-item>
+          </div>
+
+          <div style="display: flex;">
+            <el-form-item style="flex:1;margin: 0 0 1%;" label="CodeReview : "><span :style="CodeReview1">{{ CodeReview }}</span></el-form-item>
+            <el-form-item v-show="showCodeReview" style="flex:1" label="执行人 : ">{{ fromCreateData.crBy }}</el-form-item>
+          </div>
+
+          <el-form-item label="PM & UI : ">{{ fromCreateData.pmUi }}</el-form-item><br>
+          <div class="noWrap">
+            <el-form-item label="测试建议 :">{{ fromCreateData.testSuggest }}</el-form-item><br>
+            <el-form-item label="需求list :">{{ fromCreateData.functionInfo }}</el-form-item><br>
+            <el-form-item label="涉及接口 :">{{ fromCreateData.interfaceInfo }}</el-form-item><br>
+          </div>
+        </el-form>
+      </div>
+      <div class="titleStyle">二. 联调详情</div>
+      <div class="rich" v-html="joinTestOne" />
+
+      <div class="titleStyle">三. 其他</div>
+      <el-form :model="fromCreateData">
+        <div class="noWrap">
+          <el-form-item v-if="oneShow" label="新增配置 :">{{ fromCreateData.configInfo }}</el-form-item><br>
+          <el-form-item label="其他 :">{{ fromCreateData.others }}</el-form-item><br>
+        </div>
+      </el-form>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'AcceptTheReport',
+  props: {
+    message: {
+      type: Object,
+      required: true
+    }
+  },
+  data() {
+    return {
+      configInfo1: { color: 'green' },
+      dependentComponents1: { color: 'green' },
+      lateStatus1: { color: 'red' },
+      CodeReview1: { color: 'red' },
+      safeStatus1: { color: 'green' },
+      form: {},
+      dependentCom: '否',
+      config: '否',
+      showDelay: false,
+      showDelay1: false,
+      showDelay2: false,
+      showCodeReview: false,
+      towShow: false,
+      oneShow: false,
+      showData: false,
+      joinTestOne: '',
+      lateStatus: '',
+      CodeReview: '否', // CodeReview
+      safeStatus: '',
+      name: '',
+      haha: '',
+      moduleInfoOne: '',
+      fromCreateData: {}
+    }
+  },
+  created() {
+    this.idGet()
+  },
+  methods: {
+    idGet() {
+      this.fromCreateData = this.message
+
+      if (this.fromCreateData.type === 2) {
+        this.towShow = false
+        this.oneShow = true
+      } else {
+        this.oneShow = false
+        this.towShow = true
+      }
+      this.name = this.fromCreateData.name
+      this.joinTestOne = this.fromCreateData.joinTest
+      this.moduleInfoOne = this.fromCreateData.moduleInfo
+      if (this.fromCreateData.safeInfo !== '') {
+        this.showData = true
+        this.safeStatus = '是'
+        this.safeStatus1.color = 'red'
+      } else {
+        this.showData = false
+        this.safeStatus = '否'
+        this.safeStatus1.color = 'green'
+      }
+
+      if (this.fromCreateData.lateReason !== '' && this.fromCreateData.lateReason !== null) {
+        this.showDelay = true
+        this.lateStatus = '是'
+      } else {
+        this.showDelay = false
+        this.lateStatus = '否'
+        this.lateStatus1.color = 'green'
+      }
+      if (this.fromCreateData.configInfo !== '') {
+        this.showDelay1 = true
+        this.config = '是'
+      } else {
+        this.showDelay1 = false
+        this.config = '否'
+        this.configInfo1.color = 'red'
+      }
+      if (this.fromCreateData.dependentComponents !== '') {
+        this.showDelay2 = true
+        this.dependentCom = '是'
+      } else {
+        this.showDelay2 = false
+        this.dependentCom = '否'
+        this.dependentComponents1.color = 'red'
+      }
+      if (this.fromCreateData.crBy !== '' && this.fromCreateData.crBy !== null) { // CodeReview
+        this.showCodeReview = true
+        this.CodeReview = '是'
+        this.CodeReview1.color = 'green'
+      } else {
+        this.showCodeReview = false
+        this.CodeReview = '否'
+      }
+    }
+
+  }
+}
+</script>
+
+<style scoped>
+  .reportContent {
+    padding: 2%;
+  }
+  .marage {
+    padding: 2% 0;
+  }
+  .eleStyle_one {
+    width: 100%;
+    height:100%;
+    display: inline-block;
+    font-size: 14px;
+    color: #606266;
+  }
+   .eleStyle_one .el-form-item {
+      margin-bottom: -15px;
+    }
+  .titleStyle {
+    color: #333B4A;
+    margin: 1% 0;
+    font-size: 17px;
+    font-weight: bold;
+  }
+  .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>
+<style lang="stylus" scoped>
+ .noWrap >>> .el-form-item
+  display flex
+ .eleStyle_one  >>> .el-form-item__label
+  text-align left
+  font-weight 400 !important
+</style>
+<style scoped lang="scss">
+/deep/ .el-form-item__content{
+  white-space: pre-line
+}
+.marage {
+  white-space: pre-line
+}
+</style>

+ 19 - 55
src/views/reportManagement/components/DailyReport.vue

@@ -1,5 +1,5 @@
 <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">
+  <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task report-dialog" :title="reportHome ? '测试日报' : `创建测试日报模版`" :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" />
 
@@ -11,21 +11,21 @@
 
     <div class="report-leftRight">
       <div v-if="showOne" style="min-height: 50vh;">
-        <el-row type="flex" class="row-bg" justify="center">
+        <el-row type="flex" 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-row v-for="(item, index) in reportModel" :key="index" type="flex" 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-radio v-model="fromData.radio" class="creatorList" :label="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-row v-for="(item, index) in selectTemplate" :key="index" type="flex" 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-radio v-model="fromData.radio" class="creatorList" :label="item.id">{{ item.moduleName }}</el-radio>
             </el-col>
             <el-col :span="5" class="creatorList">
               {{ item.creatorObject.name }}
@@ -45,7 +45,7 @@
             </el-col>
           </el-row>
         </div>
-        <el-row type="flex" class="row-bg" justify="center">
+        <el-row type="flex" 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>
@@ -63,6 +63,7 @@
       <!-- 日报预览 -->
       <dailyPreview v-if="dailyPreview" ref="dailyPreview" class="daily" :daily-id="dailyId" @handleClose="handleClose" />
       <!-- 日报预览 -->
+
     </div>
     <div slot="footer" class="dialog-footer" align="center">
       <!-- 新建模版 -->
@@ -93,13 +94,8 @@ export default {
     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 }},
@@ -107,12 +103,10 @@ export default {
       ], // 创建的模版
       templateId: '', // 模版id
       modelId: '', // 下一步选择的模版id
-      selectTemplate: [],
+      selectTemplate: [], // 模版option
       fromData: {
         radio: 1
       },
-      bizJson: localStorage.getItem('bizId'),
-      preview: {},
       newDailyTemplate: false, // 新建日报模版
       reportTamplate: false, // new模版
       dailyPreview: false, // 日报预览
@@ -120,29 +114,16 @@ export default {
       updateDaily: false, // 编辑
       dialogDaliy: false,
       showOne: true,
-      showTow: false,
-      radio: '1',
-      newIndex: '',
       active: 1,
-      daily_taskIds: [], // 选择的任务ID
-      num: 0,
-      dailys: this.$route.query.id
+      daily_taskIds: [] // 选择的任务ID
     }
   },
-  watch: {
-    title: {
-      handler(newV) {
-        newV === '测试日报' ? this.num = 3 : ''
-        newV === '准出报告' ? this.num = 4 : ''
-        newV === '提测报告' ? this.num = 1 : ''
-        this.getreportTemplate()
-      },
-      immediate: true
-    }
+  created() {
+    this.getreportTemplate()
   },
   methods: {
     async getreportTemplate() { // 获取模版list
-      const res = await settingQueryReportModuleList({ bizId: this.bizJson, type: this.num })
+      const res = await settingQueryReportModuleList({ bizId: localStorage.getItem('bizId'), type: 3 }) // 3 日报
       if (res.code === 200) {
         this.$nextTick(() => {
           const data = res.data
@@ -150,33 +131,15 @@ export default {
             ...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)
+      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 // 关联任务
@@ -216,7 +179,6 @@ export default {
           break
         case 7: // 新建
           this.daily_taskIds = newData
-          this.fromData.radio = 1 // 选择的模版
           this.reportHome = true // 步骤条
           this.active = 1 // 步骤条状态第三步
           this.showOne = true // 展示第一步
@@ -227,11 +189,11 @@ export default {
     },
 
     report_update() { // 编辑模版
-      this.$refs.DailyReport.getQueryData(this.num)
+      this.$refs.DailyReport.getQueryData(3)
     },
 
     created_out() { // 新建模版
-      this.$refs.newReportTemplate.getCreateData(this.num)
+      this.$refs.newReportTemplate.getCreateData(3)
     },
 
     reportReturn() { // 新建模版点击返回
@@ -268,7 +230,6 @@ export default {
     },
 
     NextStep() { // 第一步到第二步
-      this.fromData.radio = 1
       this.reportHome = true // 步骤条
       this.active = 2 // 步骤条状态第二步
       this.showOne = false // 隐藏第一步
@@ -315,6 +276,9 @@ export default {
 <style lang="scss" scoped>
 .report-leftRight {
   margin: 0 13%;
+  >>> .el-row .el-col {
+    margin: 0;
+}
 }
 
 .titIcon {

+ 394 - 0
src/views/reportManagement/components/ReleaseReport.vue

@@ -0,0 +1,394 @@
+<template>
+  <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task report-dialog" :title="reportHome ? '准出报告' : `创建准出报告模版`" :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; margin: 0 13%; ">
+        <el-row type="flex" 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" justify="center">
+          <el-col :span="19">
+            <el-radio v-model="fromData.radio" class="creatorList" :label="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" 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">{{ 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" 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模版 -->
+      <newReleaeTemplate v-if="reportTamplate" ref="newReleaeTemplate" class="daily" :template-id="templateId" :task-ids="daily_taskIds" :type="'new'" @getreportTemplate="getreportTemplate" @reportReturn="reportReturn" />
+      <!-- new模版 -->
+
+      <!-- 新建准出模版 -->
+      <newReleaeTemplate v-if="newDailyTemplate" ref="dailyTemplate" class="daily" :template-id="fromData.radio" :task-ids="daily_taskIds" :type="'create'" @SaveNextStep="SaveNextStep" />
+      <!-- 新建准出模版 -->
+
+      <!-- 准出预览 -->
+      <releaePreview 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 releaeTemplate from '@/views/reportManagement/ReleaseReport/releaeTemplate.vue'
+// 准出
+import newReleaeTemplate from '@/views/reportManagement/ReleaseReport/newReleaeTemplate.vue'
+import releaePreview from '@/views/reportManagement/ReleaseReport/releaePreview.vue'
+
+export default {
+  components: {
+    releaePreview,
+    newReleaeTemplate
+  },
+  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,
+      active: 1,
+      daily_taskIds: [], // 选择的任务ID
+      num: 0,
+      dailys: this.$route.query.id
+    }
+  },
+  created() {
+    this.getreportTemplate()
+  },
+  methods: {
+    async getreportTemplate() { // 获取模版list
+      const res = await settingQueryReportModuleList({ bizId: this.bizJson, type: 4 })
+      if (res.code === 200) {
+        this.$nextTick(() => {
+          const data = res.data
+          this.selectTemplate = data.map(item => ({
+            ...item,
+            operation: false
+          }))
+          console.log(this.selectTemplate, 'xsaxaxsa')
+        })
+      }
+    },
+    init(index, newData) {
+      console.log(index, newData, '测试')
+      this.dialogDaliy = true
+      switch (index) {
+        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 // 隐藏第三部
+          this.reportTamplate = false // 隐藏模版
+          break
+        case 8: // 新建
+          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(4)
+    },
+
+    created_out() { // 新建模版
+      this.$refs.newReleaeTemplate.getCreateData(4)
+    },
+
+    reportReturn() { // 新建模版点击返回
+      this.fromData.radio = 1
+      this.reportHome = true // 步骤条
+      this.showOne = true // 模版选择
+      this.reportTamplate = false // 编辑区域
+      this.newDailyTemplate = false // 隐藏第二步
+      this.dailyPreview = false // 隐藏第三步
+    },
+
+    open_new_template(val) { // 点击新建模版
+      console.log(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.reportreleaseCreate()
+    },
+
+    NextStep() { // 第一步到第二步
+      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 1%;
+  >>> .el-row .el-col {
+    margin: 0;
+}
+}
+
+.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>

+ 31 - 23
src/views/reportManagement/daily/components/BugDetails.vue

@@ -12,7 +12,7 @@
         <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 === 0 ? true : false" class="didi-hover" @click="dialog_testData = true">删除</span>
           <span v-if="details.status === 1 ? true : false" class="didi-hover" @click="dailyButtom(3,details)">复制</span>
         </div>
       </div>
@@ -29,15 +29,15 @@
             <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 class="task-name">{{ details.reportorObject ? details.reportorObject.name : '' }}</div>
             </div>
             <div class="Layout_flex_start">
               <div class="title-name">收件人 : </div>
-              <div class="task-name">{{ details.sendToObject }}</div>
+              <div class="task-name">{{ details.sendToObject ? details.sendToObject.name : '' }}</div>
             </div>
             <div class="Layout_flex_start">
               <div class="title-name">抄送人 : </div>
-              <div class="task-name">{{ details.sendCcObject }}</div>
+              <div class="task-name">{{ details.sendCcObject ? details.sendCcObject.name : '' }}</div>
             </div>
           </el-header>
           <el-main class="report-mains">
@@ -61,42 +61,43 @@
         </el-container>
       </el-aside>
     </el-container>
-    <el-dialog :title="details.titName" :visible.sync="dialog_testData" width="30%" :close-on-click-modal="false">
+    <el-dialog title="删除确认" :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>是否删除以下测试日报?</div>
+        <div style="color: #f79232;">{{ details.reportName }}</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> -->
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" size="mini" @click="deleteDaily()">确 定</el-button>
+        <el-button type="danger" size="mini" @click="dialog_testData = false">取 消</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" />
+    <!-- <TestReport v-if="dialogVisible1" ref="TestReport" /> -->
+    <DailyReport v-if="dialogDaily" ref="DailyReport" :title="'测试日报'" @getList="getReportContent(reportId)" />
+    <!-- <ClientReport v-if="dialogClient" ref="ClientReport" /> -->
   </el-container>
 </template>
 
 <script>
 import '@/styles/PublicStyle/index.scss'
-import { dailyReportGetV2 } from '@/api/reportTemplate'
+import { dailyReportGetV2, dailyReportDelete } from '@/api/reportTemplate'
 import iconDisplay from '@/views/reportManagement/daily/components/iconDisplay.vue'
-import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
+// import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
 import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
-import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
+// import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
 export default {
   components: {
-    TestReport,
+    // TestReport,
     DailyReport,
-    ClientReport,
+    // ClientReport,
     iconDisplay
   },
   data() {
     return {
+      userInformation: localStorage.getItem('username'),
+      userNames: localStorage.getItem('realname'),
+      userData: { id: '', ename: this.userInformation, name: this.userNames },
+      dialogDaily: false, // 日报弹窗
       dialog_testData: false, // 操作弹窗
       reportId: this.$route.query.id,
       details: {}
@@ -113,7 +114,6 @@ export default {
       }
     },
     dailyButtom(e, data) { // 测试报告
-      this.report_data = data
       switch (e) {
         case 3: // 复制 第二步
           this.dialogDaily = true
@@ -134,6 +134,14 @@ export default {
           })
           break
       }
+    },
+    async deleteDaily() { // 删除日报‘
+      const res = await dailyReportDelete(this.userData, this.details.id)
+      if (res.code === 200) {
+        this.dialog_testData = false
+        this.$router.push({ name: '报告' })
+        this.$message({ type: 'success', message: '删除成功' })
+      }
     }
   }
 }

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

@@ -51,6 +51,7 @@ export default {
     id: {
       handler(newV) {
         if (newV !== null) {
+          this.$forceUpdate()
           this.taskid_arr = JSON.parse(JSON.stringify(newV))
           this.taskid_arr.map(item => {
             this.bugGetReportSumData(item)

+ 38 - 38
src/views/reportManagement/daily/components/testPresenyL.vue

@@ -23,7 +23,7 @@
 
 <script>
 import echarts from 'echarts'
-// import { bugDailyList } from '@/api/testPresentetion'
+import { bugDailyList } from '@/api/testPresentetion'
 
 export default {
   name: 'TestPresenyL',
@@ -71,43 +71,43 @@ export default {
       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()
-      // })
-      // })
+      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()
+        })
+      })
     }
   }
 }

+ 1 - 1
src/views/reportManagement/daily/dailyPreview.vue

@@ -19,7 +19,7 @@
       </div>
       <div class="Layout_space_between">
         <span class="backStyle"> 标题 : {{ fromCreateData.reportName }}</span>
-        <span>报告人:{{ '秦志鹏' }}</span>
+        <span>报告人:{{ fromCreateData.reportor }}</span>
       </div>
       <span class="backStyle"> 模版内容</span>
       <div v-html="fromCreateData.content" />

+ 3 - 4
src/views/reportManagement/daily/dailyTemplate.vue

@@ -29,10 +29,7 @@
         <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-input v-model="fromCreateData.reportName" 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" />
@@ -76,6 +73,7 @@ export default {
   watch: {
     modelId: {
       handler(newV) {
+        console.log(newV, 'cdcdcdc')
         if (newV.id) {
           if (newV.updateDaily === false) {
             newV.reportName = ''
@@ -160,6 +158,7 @@ export default {
       this.$refs.fromCreateData.validate((valid) => {
         if (valid) {
           this.fromCreateData.bizId = localStorage.getItem('bizId')
+          this.fromCreateData.reportor = localStorage.getItem('usernames')
           this.fromCreateData.taskIds = this.taskid_arr
           this.fromCreateData.moduleId = this.moduleId
           if (val) { // 编辑

+ 61 - 22
src/views/reportManagement/testPresentation.vue

@@ -17,16 +17,16 @@
             <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="returnNewest">返回最新</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>
         </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>
+          <el-table-column label="报告名称" min-width="280" show-overflow-tooltip>
             <template slot-scope="scope">
               <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>
+              <a v-if="title === '提测报告'" href="javascript:void(0)" style="color:#20a0ff" @click="history ? toReportView(scope.row) : OldDaily(scope.row)">{{ scope.row.name }}</a>
             </template>
           </el-table-column>
           <el-table-column label="状态" min-width="150" align="center">
@@ -77,7 +77,8 @@
         </el-table>
       </el-main>
       <el-footer class="public_footer">
-        <el-pagination style="margin-top:30px;" align="center" :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+        <el-pagination v-if="history" style="margin-top:30px;" align="center" :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+        <el-pagination v-if="!history" style="margin-top:30px;" align="center" :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange1" @current-change="handleCurrentChange1" />
       </el-footer>
     </el-container>
     <!-- 日报/准出/提测选择任务 -->
@@ -109,14 +110,20 @@
     </el-dialog>
 
     <TestReport v-if="dialogVisible1" ref="TestReport" />
-    <DailyReport v-if="dialogDaily" ref="DailyReport" :title="title" @getList="getList" />
-    <ClientReport v-if="dialogClient" ref="ClientReport" />
+    <DailyReport v-if="dialogDaily" ref="DailyReport" @getList="getList" />
+    <ReleaseReport v-if="dialogClient" ref="ClientReport" />
 
-    <el-dialog title="日报预览" :visible.sync="testPresenyL" class="public_task" width="70%" :close-on-click-modal="false">
+    <el-dialog :title="title" :visible.sync="reportDaily" 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">
+      <div v-if="title === '测试日报'" style=" margin-bottom: 2%; height: 600px; overflow:scroll; overflow-x: hidden">
         <testPresenyL v-if="testPresenyL" :message="message" />
       </div>
+      <div v-if="title === '准出报告'" style=" margin-bottom: 2%; height: 600px; overflow:scroll; overflow-x: hidden">
+        <ResultPageyL v-if="ResultPageyL" :message="message" />
+      </div>
+      <div v-if="title === '提测报告'" style=" margin-bottom: 2%; height: 600px; overflow:scroll; overflow-x: hidden">
+        <acceptTheReport v-if="acceptTheReport" :message="message" />
+      </div>
     </el-dialog>
   </div>
 </template>
@@ -128,18 +135,22 @@ 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/reportManagement/components/DailyReport' // 日报
-import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
+import ReleaseReport from '@/views/reportManagement/components/ReleaseReport' // 准出
 import { launchTestUpdate } from '@/api/InterfaceReport'
 import { dailyReportList, dailyReportListV2, reportreleaseList, reportdelivertestList } from '@/api/reportTemplate'
-import testPresenyL from '@/views/reportManagement/daily/components/testPresenyL.vue'
+import testPresenyL from '@/views/reportManagement/daily/components/testPresenyL.vue' // 老日报数据
+import ResultPageyL from '@/views/reportManagement/ReleaseReport/components/ResultPageyL.vue' // 老准出报告
+import acceptTheReport from '@/views/reportManagement/Testing/components/acceptTheReport.vue' // 老提测报告
 
 export default {
   name: 'TestPresentation',
   components: {
     TestReport,
     DailyReport,
-    ClientReport,
-    testPresenyL
+    ReleaseReport,
+    testPresenyL,
+    ResultPageyL,
+    acceptTheReport
   },
   data() {
     return {
@@ -150,7 +161,10 @@ export default {
       userNames: localStorage.getItem('realname'),
       bizJson: localStorage.getItem('bizId'),
       message: {}, // 老日报数据
+      reportDaily: false,
       testPresenyL: false, // 老日报数据
+      ResultPageyL: false, // 老准出报告
+      acceptTheReport: false, // 老提测报告
       centerDialogVisible: false, // 新建报告选择任务
       dialog_testData: false, // 操作弹窗
       report_data: {}, // 当前点击数据
@@ -193,18 +207,19 @@ export default {
       switch (Number(tab.index)) {
         case 0:
           this.title = '测试日报'
-          this.getList()
+          this.history ? this.getList() : this.gethistoryData()
           break
         case 1:
           this.title = '准出报告'
-          this.getList()
+          this.history ? this.getList() : this.gethistoryData()
           break
         case 2:
           this.title = '提测报告'
-          this.getList()
+          this.history ? this.getList() : this.gethistoryData()
           break
       }
     },
+
     async getList(e) { // 报告list
       this.loading = true
       this.history = true
@@ -227,13 +242,19 @@ export default {
         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
+          this.tableData = res.data.list || []
+          this.total = res.data.total
         }
       }
       this.loading = false
     },
 
+    returnNewest() { // 返回最新
+      this.pageSize = 10
+      this.curIndex = 1
+      this.getList()
+    },
+
     async passOrBackSend() { // 提测打回
       this.dialog_testData = false
       const launchTestInfo = { status: this.report_data.status, id: this.report_data.id, launchRepulseInfo: this.report_from.reason }
@@ -276,7 +297,6 @@ export default {
     },
 
     dailyButtom(e, data) { // 测试报告
-      console.log(data, 'xsaxsaxasxsxaxas')
       this.report_data = data
       switch (e) {
         case 3: // 复制 第二步
@@ -450,21 +470,40 @@ export default {
     },
 
     OldDaily(val) {
-      this.testPresenyL = true
-      this.message = val
+      this.reportDaily = true
+      if (this.title === '测试日报') {
+        this.testPresenyL = true
+        this.message = val
+      }
+      if (this.title === '准出报告') {
+        this.ResultPageyL = true
+        this.message = val
+      }
+      if (this.title === '提测报告') {
+        this.acceptTheReport = true
+        this.message = val
+      }
     },
 
     endDialog() { // 结束对话框
       this.dialog_testData = false
       this.$message({ type: 'warning', message: '已取消' })
     },
-    handleSizeChange(size) {
+    handleSizeChange(size) { // 分页
       this.pageSize = size
       this.getList()
     },
-    handleCurrentChange(curIndex) {
+    handleCurrentChange(curIndex) { // 分页
       this.curIndex = curIndex
       this.getList()
+    },
+    handleSizeChange1(size) { // used 分页
+      this.pageSize = size
+      this.gethistoryData()
+    },
+    handleCurrentChange1(curIndex) { // used 分页
+      this.curIndex = curIndex
+      this.gethistoryData()
     }
   }
 }