Browse Source

优化报告首页

qinzhipeng_v 5 years ago
parent
commit
f5651e1455

+ 5 - 0
src/styles/PublicStyle/index.scss

@@ -407,6 +407,11 @@
         color:#409EFF !important;
       }
   }
+
+  .didi-hover:hover {
+    color:#409EFF;
+    cursor: pointer;
+  }
   .titleStatus {
     font-size:14px;
     font-family:MicrosoftYaHei;

+ 116 - 39
src/views/Platform/presentation/Templates/DailyReport.vue

@@ -1,50 +1,86 @@
 <template>
   <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task" title="测试日报" :close-on-click-modal="false" :destroy-on-close="true" :before-close="handleClose">
     <div class="blueStripe" />
-    <div style="margin: 2% 0%; font-size: 16pt; color: #333B4A;">
-      <el-steps :active="active" align-center finish-status="success">
-        <el-step title="选择模版" />
-        <el-step title="填写报告" />
-        <el-step title="发送报告" />
-      </el-steps>
-    </div>
-    <div v-if="showOne" style="margin: 0 5%;">
-      <el-radio v-model="radio" style="margin: 0% 36%;" class="_radio" label="1">测试日报模版</el-radio>
-      <div style="margin: 1% 35%; height: 410px;" class="Layout">
-        <el-image style="display: inline-block; width: 80%;" :src="src" />
+    <div v-if="reportHome">
+      <div style="margin: 2% 0%; font-size: 16pt; color: #333B4A;">
+        <el-steps :active="active" align-center finish-status="success">
+          <el-step title="选择模版" />
+          <el-step title="填写报告" />
+          <el-step title="发送报告" />
+        </el-steps>
       </div>
-      <div align="center">
-        <el-button size="small" type="primary" @click="NextStep()">下一步</el-button>
+      <div v-if="showOne">
+        <el-row type="flex" class="row-bg" justify="center">
+          <el-col :span="7">模版名称</el-col>
+          <el-col :span="6" />
+          <el-col :span="5" class="creator">创建人</el-col>
+        </el-row>
+        <el-row v-for="(item, index) in selectTemplate" :key="index" type="flex" class="row-bg" justify="center">
+          <el-col :span="7"><el-radio v-model="fromData.radio" class="_radio" :label="item.id" @change="selectRepot(item.id)">{{ item.name }}</el-radio></el-col>
+          <el-col :span="6" />
+          <el-col :span="5" class="creator">
+            {{ item.value }}
+            <span v-if="item.value !== '系统'" class="operation">
+              <i class="el-icon-edit didi-hover" />
+              <el-popover v-model="visible" placement="bottom" width="300">
+                <div>删除模版</div>
+                <hr>
+                <p>是否要删除模版{{ item.name }}?</p>
+                <div style="text-align: right; margin: 0">
+                  <el-button size="mini" type="primary" @click="visible = false">删除</el-button>
+                  <el-button type="primary" size="mini" @click="visible = false">取消</el-button>
+                </div>
+                <i slot="reference" class="el-icon-delete reportModel didi-hover" />
+              </el-popover>
+            </span>
+          </el-col>
+        </el-row>
+        <el-row type="flex" class="row-bg" justify="center">
+          <el-col :span="18">
+            <span class="didi-hover" @click="open_new_template()"><i class="el-icon-circle-plus-outline creator" /> 新建模版</span>
+          </el-col>
+        </el-row>
       </div>
     </div>
-    <div v-if="showTow">
+
+    <div v-if="reportTamplate">
       <div class="descr" style=" margin-bottom: 2%; height: 435px; overflow:scroll; overflow-x: hidden">
-        <DailyReport ref="DailyReport" :message="dailyNewData" @daily="daily" />
-      </div>
-      <div align="center">
-        <el-button size="small" type="primary" @click="handleClose1()">上一步</el-button>
-        <el-button size="small" type="primary" @click="created_out()">保存,下一步</el-button>
-      </div>
-    </div>
-    <div v-if="showThree">
-      <div style="margin: 0% 5%;font-size:18px; font-family:PingFangSC-Medium,PingFang SC; font-weight:500; color:rgba(51,59,74,1); line-height:29px;">
-        邮件列表
+        <NewReportTemplate ref="DailyReport" :message="dailyNewData" @daily="daily" />
       </div>
-      <div style="margin: 1% 5% 3%;">
-        <div class="Layout" style="margin-bottom: 10px;"><div class="div1">收件人</div><searchTeam :value.sync="form.name" :clearable="true" :multiple="true" style="width:100%" /></div>
-        <div class="Layout"><div class="div1">抄送</div><searchTeam :value.sync="form.names" :clearable="true" :multiple="true" style="width:100%" /></div>
-      </div>
-      <div style="margin: 0 5%; font-size:18px; font-family:PingFangSC-Medium,PingFang SC; font-weight:500; color:rgba(51,59,74,1); line-height:29px;">
-        报告预览
-      </div>
-      <div class="descr" style=" margin-bottom: 2%; height: 300px; overflow:scroll; overflow-x: hidden">
-        <testPresenyL id="Gambol" :message="preview" style="width: 100%" />
+
+      <div v-if="showTow">
+        <div class="descr" style=" margin-bottom: 2%; height: 435px; overflow:scroll; overflow-x: hidden">
+          <DailyReport ref="DailyReport" :message="dailyNewData" @daily="daily" />
+        </div>
+        <div align="center">
+          <el-button size="small" type="primary" @click="handleClose1()">上一步</el-button>
+          <el-button size="small" type="primary" @click="created_out()">保存,下一步</el-button>
+        </div>
+
       </div>
-      <div align="center">
-        <el-button size="small" type="primary" @click="gou_out()">上一步</el-button>
-        <el-button :disabled="send" :loading="send" size="small" type="primary" @click="sendReport(form)">发送</el-button>
+      <div v-if="showThree">
+        <div style="margin: 0% 5%;font-size:18px; font-family:PingFangSC-Medium,PingFang SC; font-weight:500; color:rgba(51,59,74,1); line-height:29px;">
+          邮件列表
+        </div>
+        <div style="margin: 1% 5% 3%;">
+          <div class="Layout" style="margin-bottom: 10px;"><div class="div1">收件人</div><searchTeam :value.sync="form.name" :clearable="true" :multiple="true" style="width:100%" /></div>
+          <div class="Layout"><div class="div1">抄送</div><searchTeam :value.sync="form.names" :clearable="true" :multiple="true" style="width:100%" /></div>
+        </div>
+        <div style="margin: 0 5%; font-size:18px; font-family:PingFangSC-Medium,PingFang SC; font-weight:500; color:rgba(51,59,74,1); line-height:29px;">
+          报告预览
+        </div>
+        <div class="descr" style=" margin-bottom: 2%; height: 300px; overflow:scroll; overflow-x: hidden">
+          <testPresenyL id="Gambol" :message="preview" style="width: 100%" />
+        </div>
+        <div align="center">
+          <el-button size="small" type="primary" @click="gou_out()">上一步</el-button>
+          <el-button :disabled="send" :loading="send" size="small" type="primary" @click="sendReport(form)">发送</el-button>
+        </div>
       </div>
     </div>
+    <div align="center">
+      <el-button size="small" type="primary" @click="clickTheButton === '下一步'? NextStep() : created_out()">{{ clickTheButton }}</el-button>
+    </div>
   </el-dialog>
 </template>
 
@@ -55,17 +91,31 @@ import DailyReport from '@/views/Platform/presentation/DailyNewsAdded.vue'
 import testPresenyL from '@/views/Platform/presentation/testPresenyL.vue'
 import { dailyReportSendmail } from '@/api/ResultPage'
 import html2canvas from 'html2canvas'
-import daily from '@/assets/daily.png'
 import searchTeam from '@/components/select/searchTeam'
+import NewReportTemplate from '@/views/Platform/presentation/Templates/NewReportTemplate.vue'
 
 export default {
   components: {
     DailyReport,
     testPresenyL,
-    searchTeam
+    searchTeam,
+    NewReportTemplate
   },
   data() {
     return {
+      visible: false, // delete
+      clickTheButton: '下一步', // 点击按钮
+      reportHome: true, // 报告主页
+      reportModel: [
+        { id: 3, name: '两轮车c端发版测试日报模版', value: '沈洁' }
+      ], // 创建的模版
+      selectTemplate: [
+        { id: 1, name: '客户端模版', value: '系统' },
+        { id: 2, name: '服务端模版', value: '系统' }
+      ],
+      fromData: {
+        radio: 1
+      },
       send: false,
       form: {},
       preview: {},
@@ -73,19 +123,31 @@ export default {
       dialogDaliy: false,
       showOne: true,
       showTow: false,
+      reportTamplate: false, // 新建模版
       showThree: false,
       radio: '1',
       newIndex: '',
       active: 1,
       daily_task: [],
-      src: daily,
       dailys: this.$route.query.id
     }
   },
+  created() {
+    this.reportSelectTemplate()
+  },
   destroyed() {
     this.showThree = false
   },
   methods: {
+    reportSelectTemplate() {
+      this.$nextTick(() => {
+        this.selectTemplate = this.selectTemplate.concat(this.reportModel)
+        console.log(this.selectTemplate, 'xsaxaxsa')
+      })
+    },
+    selectRepot(e) { // 选择的模版
+      console.log(e, '选择的模版')
+    },
     init(index, newData) {
       this.dialogDaliy = true
       var url = location.href // 获取url中"?"符后的字串
@@ -168,6 +230,11 @@ export default {
       this.form = {}
       this.active = 3
     },
+    open_new_template() {
+      this.reportTamplate = true
+      this.clickTheButton = '保存'
+      this.reportHome = false
+    },
     NextStep() {
       switch (Number(this.radio)) {
         case 1:
@@ -237,4 +304,14 @@ export default {
 .el-dialog__header {
     padding: 0 !important;
 }
+.reportModel {
+  margin-left: 10px;
+}
+.operation {
+   margin-left: 30px;
+}
+.creator {
+  display: inline-block;
+  line-height: 3;
+}
 </style>

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

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

+ 292 - 229
src/views/Platform/presentation/testPresentation.vue

@@ -1,118 +1,101 @@
 <template>
   <div class="eleStyle">
-    <div class="header_sty">
-      <el-tabs v-model="activeName" style="margin: 2%; min-height: 84vh; font-size: 14px;" @tab-click="handleClick">
-        <el-tab-pane label="测试日报" name="first">
-          <div style="margin: 30px 0;">测试日报
-            <el-input v-model="state" size="medium" filterable placeholder="报告名称搜索" style="width:20%;margin: 0 10px;" @change="getList(state)" />
-            <el-button type="primary" size="medium" @click="getQueryData(1), centerDialogVisible = true">新建测试日报</el-button>
+    <el-container class="header_sty">
+      <el-header class="public_header">
+        <el-tabs v-model="activeName" @tab-click="handleClick">
+          <el-tab-pane label="测试日报" name="first" />
+          <el-tab-pane label="准出报告" name="second" />
+          <el-tab-pane label="提测报告" name="third" />
+        </el-tabs>
+      </el-header>
+      <el-main class="public_main report-Layout">
+        <div class="Layout_space_between distance">
+          <div class="Layout_space_between">
+            <span style="width: 100px;">{{ title }}</span>
+            <el-input v-model="state" size="medium" filterable placeholder="报告名称搜索" style="width:100%;" @change="getList(state)" />
           </div>
-          <template>
-            <el-table :data="tableData" size="mini" :header-cell-style="{ background: '#F2F3F6' }" fit border style="width: 100%">
-              <el-table-column label="报告名称" min-width="280" align="center">
-                <template slot-scope="scope">
-                  <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 0)">{{ scope.row.reportName }}</a>
-                </template>
-              </el-table-column>
-              <el-table-column label="报告人" min-width="180" align="center">
-                <template slot-scope="scope">{{ scope.row.ownner }}</template>
-              </el-table-column>
-              <el-table-column label="创建时间" min-width="280" align="center">
-                <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
-              </el-table-column>
-              <el-table-column label="操作" align="center" fixed="right" min-width="230">
-                <template slot-scope="scope">
-                  <el-button size="mini" type="primary" plain @click="queryPresentation(scope.row)">更新</el-button>
-                  <el-button size="mini" type="danger" plain @click="delePresentation(scope.row.id, 0)">删除</el-button>
-                  <el-tooltip content="功能正在实现中···" placement="top">
-                    <el-button size="mini" type="info" plain>权限</el-button>
-                  </el-tooltip>
-                </template>
-              </el-table-column>
-            </el-table>
-          </template>
-          <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-tab-pane>
-        <el-tab-pane label="准出报告" name="second">
-          <div style="margin: 30px 0;">准出报告
-            <el-input v-model="state" size="medium" filterable placeholder="报告名称搜索" style="width:20%; margin: 0 10px;" @change="getListPern(state)" />
-            <el-button type="primary" size="medium" @click="getQueryData(2), centerDialogVisible = true">新建准出报告</el-button>
-          </div>
-          <template>
-            <el-table :data="tableData1" size="mini" :header-cell-style="{ background: '#F2F3F6' }" fit border style="width: 100%">
-              <el-table-column label="报告名称" min-width="150" align="center">
-                <template slot-scope="scope">
-                  <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 1)">{{ scope.row.reportName }}</a>
-                </template>
-              </el-table-column>
-              <el-table-column label="报告人" min-width="150" align="center">
-                <template slot-scope="scope">{{ scope.row.ownner }}</template>
-              </el-table-column>
-              <el-table-column label="日期" min-width="150" align="center">
-                <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
-              </el-table-column>
-              <el-table-column label="状态" min-width="150" align="center">
-                <template slot-scope="scope">{{ scope.row.statusString }}</template>
-              </el-table-column>
-              <el-table-column label="操作" align="center" fixed="right" min-width="230">
-                <template slot-scope="scope">
-                  <el-button size="mini" plain type="primary" @click="queryPresentation1(scope.row)">更新</el-button>
-                  <el-button size="mini" type="danger" plain @click="delePresentation(scope.row.id, 1)">删除</el-button>
-                  <el-tooltip content="功能正在实现中···" placement="top">
-                    <el-button size="mini" type="info" plain>权限</el-button>
-                  </el-tooltip>
-                </template>
-              </el-table-column>
-            </el-table>
-          </template>
-          <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="total1" @size-change="handleSizeChange" @current-change="handleCurrentChangePern" />
-        </el-tab-pane>
-        <el-tab-pane label="提测报告" name="third">
-          <div style="margin: 30px 0;">提测报告
-            <el-input v-model="state" size="medium" filterable placeholder="报告名称搜索" style="width:20%; margin: 0 10px;" @change="getListTest(state)" />
-            <el-button type="primary" size="medium" @click="getQueryData(3), centerDialogVisible = true">新建提测报告</el-button>
-          </div>
-          <template>
-            <el-table :data="tableData2" size="mini" :header-cell-style="{ background: '#F2F3F6' }" fit border style="width: 100%">
-              <el-table-column label="报告名称" min-width="230" align="center">
-                <template slot-scope="scope">
-                  <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 2)">{{ scope.row.name }}</a>
-                </template>
-              </el-table-column>
-              <el-table-column label="报告人" min-width="150" align="center">
-                <template slot-scope="scope">{{ scope.row.submitter }}</template>
-              </el-table-column>
-              <el-table-column label="日期" min-width="280" align="center">
-                <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
-              </el-table-column>
-              <el-table-column label="状态" min-width="150" align="center">
-                <template slot-scope="scope">{{ scope.row.statusString }}</template>
-              </el-table-column>
-              <el-table-column label="操作" align="center" fixed="right" min-width="230">
-                <template slot-scope="scope">
-                  <el-button size="mini" type="primary" plain @click="queryPresentation2(scope.row)">更新</el-button>
-                  <el-button size="mini" type="danger" plain @click="delePresentation(scope.row.id, 2)">删除</el-button>
-                  <el-tooltip content="功能正在实现中···" placement="top"><el-button type="info" plain size="mini">权限</el-button></el-tooltip>
-                </template>
-              </el-table-column>
-            </el-table>
-          </template>
-          <el-pagination style="margin-top:30px;" align="center" :current-page="curIndex" :page-sizes="[5, 10, 20, total]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total2" @size-change="handleSizeChange" @current-change="handleCurrentChangeTest" />
-        </el-tab-pane>
-      </el-tabs>
-      <!-- 日报/准出/提测选择任务 -->
-      <el-dialog title="选择任务" :visible.sync="centerDialogVisible" width="30%" center>
-        <div style="display: flex; align-items: center; justify-content: space-between; ">
-          <div style="width:100px;">选择任务 :</div>
-          <el-select v-model="queryData.code" filterable placeholder="请选择任务" size="mini" style="width:100%;">
-            <el-option v-for="item in restaurants" :key="item.id" :label="item.name" :value="item.id" />
-          </el-select>
+          <el-button type="primary" size="medium" @click="getQueryData(1), centerDialogVisible = true">新建{{ title }}</el-button>
         </div>
-        <span slot="footer" class="dialog-footer">
-          <el-button type="primary" size="mini" @click="createPresentation(queryData.code)">创建</el-button>
-        </span>
-      </el-dialog>
-    </div>
+        <el-table v-loading="loading" :data="tableData" size="mini" :header-cell-style="{ background: '#F2F3F6' }" border style="width: 100%" :show-overflow-tooltip="true">
+          <el-table-column label="报告名称" min-width="280" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <a v-if="title === '测试日报' || title === '准出报告'" href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row)">{{ scope.row.reportName }}</a>
+              <a v-if="title === '提测报告'" href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row)">{{ scope.row.name }}</a>
+            </template>
+          </el-table-column>
+          <el-table-column label="状态" min-width="150" align="center">
+            <template slot-scope="scope">{{ scope.row.statusString }}</template>
+          </el-table-column>
+          <el-table-column label="报告人" min-width="180" align="center">
+            <template slot-scope="scope">
+              <div v-if="title === '测试日报' || title === '准出报告'">{{ scope.row.ownner }}</div>
+              <div v-if="title === '提测报告'">{{ scope.row.submitter }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="创建时间" min-width="280" align="center">
+            <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" fixed="right" min-width="230">
+            <template slot-scope="scope">
+              <div v-if="title === '测试日报'">
+                <span v-if="scope.row.status === 0 ? true : false" class="didi-hover" @click="dailyButtom(5,scope.row)">发送</span>
+                <span v-if="scope.row.status === 0 ? true : false" style="margin: 0 30px;" class="didi-hover" @click="dailyButtom(6,scope.row)">编辑</span>
+                <span v-if="scope.row.status === 0 ? true : false" class="didi-hover" @click="report_click(4,scope.row )">删除</span>
+                <span v-if="scope.row.status === 1 ? true : false" class="didi-hover" @click="dailyButtom(3,scope.row)">复制</span>
+              </div>
+              <div v-if="title === '准出报告'">
+                <div v-if="scope.row.status === 1 ? false : true">
+                  <span v-if="scope.row.status === 2 ? true : false" class="didi-hover" @click="clientButtom(5,scope.row)">发送</span>
+                  <span v-if="scope.row.status === 2 ? true : false" style="margin: 0 30px;" class="didi-hover" @click="clientButtom(6,scope.row)">编辑</span>
+                  <span v-if="scope.row.status === 2 ? true : false" class="didi-hover" @click="report_click(4,scope.row )">删除</span>
+                </div>
+              </div>
+              <div v-if="title === '提测报告'">
+                <div v-if="scope.row.status === 1 ? false : true">
+                  <span v-if="scope.row.status === 3 ? true : false" class="didi-hover" @click="report_click(1,scope.row)">通过</span>
+                  <span v-if="scope.row.status === 3 ? true : false" style="margin-left: 30px;" class="didi-hover" @click="report_click(2,scope.row)">打回</span>
+                  <span v-if="scope.row.status === 0 ? true : false" class="didi-hover" @click="report_click(5,scope.row)">发送</span>
+                  <span v-if="scope.row.status === 0 ? true : false" style="margin: 0 30px;" class="didi-hover" @click="report_click(6,scope.row)">编辑</span>
+                  <span v-if="scope.row.status === 0 ? true : false" class="didi-hover" @click="report_click(4,scope.row )">删除</span>
+                  <span v-if="scope.row.status === 2 ? true : false" class="didi-hover" @click="report_click(3,scope.row)">重新提测</span>
+                </div>
+              </div>
+            </template>
+          </el-table-column>
+        </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-footer>
+    </el-container>
+    <!-- 日报/准出/提测选择任务 -->
+    <el-dialog title="选择任务" :visible.sync="centerDialogVisible" width="30%" center>
+      <div class="Layout_space_between">
+        <div style="width:100px;">选择任务 :</div>
+        <el-select v-model="queryData.code" filterable placeholder="请选择任务" size="mini" style="width:100%;">
+          <el-option v-for="item in restaurants" :key="item.id" :label="item.name" :value="item.id" />
+        </el-select>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" size="mini" @click="createPresentation(queryData.code)">创建</el-button>
+      </span>
+    </el-dialog>
+
+    <el-dialog :title="report_from.titName" :visible.sync="dialog_testData" width="30%" :close-on-click-modal="false">
+      <div style="position: absolute; top: 23px; left: 12px;width:4px;height:17px;background:#409EFF;border-radius:1px;" />
+      <div align="center">
+        <div v-if="title === '提测报告'">是否{{ report_from.statusString }}以下提测?</div>
+        <div v-if="title === '测试日报'">是否{{ report_from.statusString }}以下测试日报?</div>
+        <div v-if="title === '准出报告'">是否{{ report_from.statusString }}以下准出报告?</div>
+        <div style="color: #f79232;">{{ report_from.name }}</div>
+      </div>
+      <el-input v-show="report_from.statusString === '打回'" v-model="report_from.reason" type="textarea" placeholder="请输入打回原因..." :rows="3" />
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" size="mini" @click="passOrBackSend()">确 定</el-button>
+        <el-button type="danger" size="mini" @click="endDialog">取 消</el-button>
+      </span>
+    </el-dialog>
+
     <TestReport v-if="dialogVisible1" ref="TestReport" />
     <DailyReport v-if="dialogDaily" ref="DailyReport" />
     <ClientReport v-if="dialogClient" ref="ClientReport" />
@@ -120,12 +103,14 @@
 </template>
 
 <script>
+import '@/styles/PublicStyle/index.scss'
 import { dailyReportList, dailyReportDelete } from '@/api/testPresentetion' // 日报
 import { projectTestReportList, projectTestReportDelete } from '@/api/ResultPage' // 准出
 import { launchTestList, launchTestDelete, taskListCreate } from '@/api/InterfaceReport' // 提测
 import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
 import DailyReport from '@/views/Platform/presentation/Templates/DailyReport' // 日报
 import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
+import { launchTestUpdate } from '@/api/InterfaceReport'
 
 export default {
   name: 'TestPresentation',
@@ -137,13 +122,16 @@ export default {
   data() {
     return {
       activeName: 'first',
-      nowType: 0, // 当前报告类型
+      title: '测试日报', // 报告title
       userInformation: localStorage.getItem('username'),
       userNames: localStorage.getItem('realname'),
       bizJson: localStorage.getItem('bizId'),
       centerDialogVisible: false,
-      getListAllData: [],
-      pageSize: 5,
+      dialog_testData: false, // 操作弹窗
+      report_data: {}, // 当前点击数据
+      userData: { id: '', ename: this.userInformation, name: this.userNames },
+      loading: true,
+      pageSize: 15,
       curIndex: 1,
       total: 0,
       state: '',
@@ -151,27 +139,21 @@ export default {
       queryData: {
         state: ''
       },
+      report_from: {
+        name: '',
+        titName: '',
+        statusString: ''
+      },
       tableData: [],
-      tableData2: [], // 提测报告
-      total2: 0,
       z_name: '',
-      state2: '',
       restaurants2: [],
-      arrCode: {
-        id: '',
-        name: ''
-      },
-      data_type: {},
-      total1: 0, // 准出
-      ins: '',
       dialogVisible1: false, // 提测弹窗
       dialogDaily: false,
       dialogClient: false,
       indexPage: {
-        pageSize: 5,
+        pageSize: 15,
         curIndex: 1
-      },
-      tableData1: [{}]
+      }
     }
   },
   destroyed() {
@@ -179,8 +161,6 @@ export default {
   },
   created() {
     this.getList()
-    this.getListTest()
-    this.getListPern()
     this.$store.state.data.status = true
   },
   mounted() {
@@ -189,107 +169,199 @@ export default {
   methods: {
     handleClick(tab, event) {
       this.curIndex = 1
+      this.loading = true
       switch (Number(tab.index)) {
         case 0:
-          this.nowType = 0
+          this.title = '测试日报'
           this.getList()
           break
         case 1:
-          this.nowType = 1
-          this.getListPern()
+          this.title = '准出报告'
+          this.getList()
           break
         case 2:
-          this.nowType = 2
-          this.getListTest()
+          this.title = '提测报告'
+          this.getList()
           break
       }
     },
-    getList(e) { // 日报list
+    async getList(e) { // 报告list
+      this.loading = true
       this.z_name = e
-      var indexPage = { reportName: e, bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
-      dailyReportList(indexPage).then(res => {
+      const indexPage = { reportName: e, bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
+      if (this.title === '测试日报') {
+        const res = await dailyReportList(indexPage)
         if (res.code === 200) {
           this.tableData = res.data
           this.total = res.total
-        } else {
-          this.$message({ message: res.msg, type: 'error', duration: 1000, offset: 150 })
         }
-      })
-    },
-    getListTest(ele) { // 提测list
-      this.z_name = ele
-      var indexPage = { name: ele, bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
-      launchTestList(indexPage).then(res => {
+      }
+      if (this.title === '准出报告') {
+        const res = await projectTestReportList(indexPage)
         if (res.code === 200) {
-          this.tableData2 = res.data
-          this.total2 = res.total
-        } else {
-          this.$message({ message: res.msg, type: 'error', duration: 1000, offset: 150 })
+          this.tableData = res.data
+          this.total = res.total
         }
-      })
-    },
-    getListPern(e) { // 准出list
-      this.z_name = e
-      this.indexPage = { reportName: e, bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
-      projectTestReportList(this.indexPage).then(res => {
+      }
+      if (this.title === '提测报告') {
+        const data = { name: e, bizId: localStorage.getItem('bizId'), pageSize: this.pageSize, curIndex: this.curIndex }
+        const res = await launchTestList(data)
         if (res.code === 200) {
-          this.tableData1 = res.data
-          this.total1 = res.total
-        } else {
-          this.$message({ message: res.msg, type: 'error', duration: 1000, offset: 150 })
+          this.tableData = res.data
+          this.total = res.total
         }
-      })
+      }
+      this.loading = false
     },
-    delePresentation(e, index) { // 日报/准出/提测/删除报告
-      this.$confirm('是否确认删除', '确认信息', {
-        distinguishCancelAndClose: true,
-        confirmButtonText: '确定',
-        cancelButtonText: '取消'
-      }).then(() => {
-        this.userData = { id: '', ename: this.userInformation, name: this.userNames }
-        switch (index) {
-          case 0:
-            dailyReportDelete(this.userData, e).then(res => {
-              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 }
+      const userData = { id: '', ename: this.userInformation, name: this.userNames }
+      const objData = { launchTestInfo: launchTestInfo, user: userData }
+      if (this.report_from.statusString === '通过' || this.report_from.statusString === '打回') {
+        const res = await launchTestUpdate(objData)
+        if (res.code === 200) {
+          this.getList()
+          this.$message({ message: res.msg, type: 'success', offset: 150 })
+        }
+      } else if (this.report_from.statusString === '删除') {
+        switch (this.title) {
+          case '测试日报':
+            dailyReportDelete(this.userData, this.report_data.id).then(res => {
+              if (res.code === 200) {
+                this.$message({ type: 'success', message: '删除成功' })
+                this.getList()
+              }
             })
             break
-          case 1:
-            projectTestReportDelete(this.userData, e).then(res => {
-              this.getListPern()
+          case '准出报告':
+            projectTestReportDelete(this.userData, this.report_data.id).then(res => {
+              if (res.code === 200) {
+                this.$message({ type: 'success', message: '删除成功' })
+                this.getList()
+              }
             })
             break
-          case 2:
-            launchTestDelete(this.userData, e).then(res => {
-              this.getListTest()
+          case '提测报告':
+            launchTestDelete(this.userData, this.report_data.id).then(res => {
+              if (res.code === 200) {
+                this.$message({ type: 'success', message: '删除成功' })
+                this.getList()
+              }
             })
             break
         }
-        this.$message({ type: 'success', message: '已删除' })
-      }).catch(action => {
-        this.$message({ type: 'success', message: '已取消' })
-      })
+      }
     },
-    queryPresentation(data) { // 日报编辑
-      this.dialogDaily = true
-      this.$nextTick(() => {
-        this.$refs.DailyReport.init(2, data)
-      })
+
+    dailyButtom(e, data) { // 测试报告
+      console.log(data, 'xsaxsaxasxsxaxas')
+      this.report_data = data
+      switch (e) {
+        case 3:
+          this.dialogDaily = true
+          this.$nextTick(() => {
+            this.$refs.DailyReport.init(4, data)
+          })
+          break
+        case 5:
+          this.dialogDaily = true
+          this.$nextTick(() => {
+            this.$refs.DailyReport.init(3, data)
+          })
+          break
+        case 6:
+          this.dialogDaily = true
+          this.$nextTick(() => {
+            this.$refs.DailyReport.init(2, data)
+          })
+          break
+      }
     },
-    queryPresentation1(data) { // 准出编辑
-      this.dialogClient = true
-      this.$nextTick(() => {
-        this.$refs.ClientReport.init(2, data)
-      })
+
+    clientButtom(e, data) { // 准出报告
+      this.report_data = data
+      switch (e) {
+        case 5:
+          this.dialogClient = true
+          this.$nextTick(() => {
+            this.$refs.ClientReport.init(3, data)
+          })
+          break
+        case 6:
+          this.dialogClient = true
+          this.$nextTick(() => {
+            this.$refs.ClientReport.init(2, data)
+          })
+          break
+      }
     },
-    queryPresentation2(data) { // 提测编辑
-      this.dialogVisible1 = true
-      this.$nextTick(() => {
-        this.$refs.TestReport.init(2, data)
-      })
+
+    report_click(e, data) { // 提测报告
+      this.report_from.name = data.name || data.reportName
+      this.report_data = data
+      switch (e) {
+        case 1:
+          this.dialog_testData = true
+          this.report_from.titName = '提测确认'
+          this.report_from.statusString = '通过'
+          break
+        case 2:
+          this.dialog_testData = true
+          this.report_from.titName = '提测确认'
+          this.report_from.statusString = '打回'
+          break
+        case 3:
+          data.taskIds = [Number(this.taskId)]
+          this.dialogVisible1 = true
+          this.$nextTick(() => {
+            this.$refs.TestReport.init(4, data)
+          })
+          break
+        case 4:
+          this.dialog_testData = true
+          this.report_from.titName = '删除确认'
+          this.report_from.statusString = '删除'
+          break
+        case 5:
+          this.dialogVisible1 = true
+          this.$nextTick(() => {
+            this.$refs.TestReport.init(3, data)
+          })
+          break
+        case 6:
+          this.dialogVisible1 = true
+          this.$nextTick(() => {
+            this.$refs.TestReport.init(2, data)
+          })
+          break
+      }
     },
+    // queryPresentation(data) { // 报告编辑
+    //   switch (this.title) {
+    //     case '测试日报':
+    //       this.dialogDaily = true
+    //       this.$nextTick(() => {
+    //         this.$refs.DailyReport.init(2, data)
+    //       })
+    //       break
+    //     case '准出报告':
+    //       this.dialogClient = true
+    //       this.$nextTick(() => {
+    //         this.$refs.ClientReport.init(2, data)
+    //       })
+    //       break
+    //     case '提测报告':
+    //       this.dialogVisible1 = true
+    //       this.$nextTick(() => {
+    //         this.$refs.TestReport.init(2, data)
+    //       })
+    //       break
+    //   }
+    // },
     // 获取任务数据
-    getQueryData(e) {
-      this.ins = e
+    getQueryData() {
       this.$set(this.queryData, 'TestReport', '')
       this.$set(this.queryData, 'ClientReport', '')
       this.$set(this.queryData, 'code', '')
@@ -301,20 +373,20 @@ export default {
 
     createPresentation(e) {
       if (e !== '') {
-        switch (this.ins) {
-          case 1:
+        switch (this.title) {
+          case '测试日报':
             this.dialogDaily = true
             this.$nextTick(() => {
               this.$refs.DailyReport.init(7, [e])
             })
             break
-          case 2:
+          case '准出报告':
             this.dialogClient = true
             this.$nextTick(() => {
               this.$refs.ClientReport.init(7, [e])
             })
             break
-          case 3:
+          case '提测报告':
             this.dialogVisible1 = true
             this.$nextTick(() => {
               this.$refs.TestReport.init(7, [e])
@@ -334,21 +406,21 @@ export default {
     },
 
     // 日报/准出/提测
-    toReportView(ele, index) {
-      switch (index) {
-        case 0:
+    toReportView(ele) {
+      switch (this.title) {
+        case '测试日报':
           this.dialogDaily = true
           this.$nextTick(() => {
             this.$refs.DailyReport.init(3, ele)
           })
           break
-        case 1:
+        case '准出报告':
           this.dialogClient = true
           this.$nextTick(() => {
             this.$refs.ClientReport.init(3, ele)
           })
           break
-        case 2:
+        case '提测报告':
           this.dialogVisible1 = true
           this.$nextTick(() => {
             this.$refs.TestReport.init(3, ele)
@@ -356,31 +428,17 @@ export default {
           break
       }
     },
+    endDialog() { // 结束对话框
+      this.dialog_testData = false
+      this.$message({ type: 'warning', message: '已取消' })
+    },
     handleSizeChange(size) {
       this.pageSize = size
-      switch (this.nowType) {
-        case 0:
-          this.getList(this.z_name)
-          break
-        case 1:
-          this.getListPern(this.z_name)
-          break
-        case 2:
-          this.getListTest(this.z_name)
-          break
-      }
+      this.getList(this.z_name)
     },
     handleCurrentChange(curIndex) {
       this.curIndex = curIndex
       this.getList(this.z_name)
-    },
-    handleCurrentChangeTest(curIndex) {
-      this.curIndex = curIndex
-      this.getListTest(this.z_name)
-    },
-    handleCurrentChangePern(curIndex) {
-      this.curIndex = curIndex
-      this.getListPern(this.z_name)
     }
   }
 }
@@ -393,13 +451,18 @@ export default {
     display: inline-block;
   }
   .header_sty {
-    height:100%;
-    width:98%;
+    font-size: 14px;
     background:#ffffff;
-    margin: 1%;
+    margin: 10px;
     border-radius: 4px;
     overflow: hidden;
   }
+  .distance {
+    margin-bottom: 20px;
+  }
+  .report-Layout {
+    min-height: calc(100vh - 221px)
+  }
 </style>
 <style lang="stylus">
 .el-tabs__nav-wrap::after {