qinzhipeng_v 5 anos atrás
pai
commit
df5cee331d

+ 27 - 0
src/api/reportTemplate.js

@@ -265,6 +265,15 @@ export function reportdelivertestCreate(data) {
   })
 }
 
+// 更新创建
+export function reportdelivertestUpdate(data) {
+  return request({
+    url: Presentation + '/reportdelivertest/update',
+    method: 'post',
+    data
+  })
+}
+
 // 提测报告查看(需区分已发送或未发送)
 export function reportdelivertestGetReportById(id) {
   return request({
@@ -272,3 +281,21 @@ export function reportdelivertestGetReportById(id) {
     method: 'get'
   })
 }
+
+// 报告发送(存储发件人、抄送人、图表数据)
+export function reportdelivertestSendmail(data) {
+  return request({
+    url: Presentation + `/reportdelivertest/sendmail`,
+    method: 'post',
+    data
+  })
+}
+
+// 报告删除
+export function reportdelivertestDelete(data, id) {
+  return request({
+    url: Presentation + `/reportdelivertest/delete?id=${id}`,
+    method: 'post',
+    data
+  })
+}

+ 9 - 2
src/router/index.js

@@ -196,10 +196,10 @@ export const constantRoutes = [{
       meta: { title: '报告' }
     },
     {
-      path: 'DailyDetails',
+      path: 'dailyDetails',
       name: '日报详情',
       hidden: true,
-      component: (resolve) => require(['@/views/reportManagement/daily/components/DailyDetails'], resolve),
+      component: (resolve) => require(['@/views/reportManagement/daily/components/dailyDetails'], resolve),
       meta: { title: '报告详情' }
     },
     {
@@ -209,6 +209,13 @@ export const constantRoutes = [{
       component: (resolve) => require(['@/views/reportManagement/ReleaseReport/components/releaseDetails'], resolve),
       meta: { title: '报告详情' }
     },
+    {
+      path: 'deliverDetails',
+      name: '提测详情',
+      hidden: true,
+      component: (resolve) => require(['@/views/reportManagement/Testing/components/deliverDetails'], resolve),
+      meta: { title: '报告详情' }
+    },
     {
       path: 'DailyNewsAdded',
       name: '新增测试日报',

+ 210 - 0
src/views/reportManagement/Testing/TestingPreview.vue

@@ -0,0 +1,210 @@
+<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 id="repot-list">
+      <div class="backStyle">报告名称 :{{ fromCreateData.reportName }}</div>
+      <div class="backStyle">报告内容</div>
+
+      <el-row class="from-margin">
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-name">计划提测时间:{{ fromCreateData.deliverTestPlanTime }}</span>
+        </el-col>
+        <el-col :span="12">
+          <span class="from-namev">实际提测时间:{{ fromCreateData.deliverTestActualTime }}</span>
+        </el-col>
+      </el-row>
+
+      <el-row v-show="fromCreateData.isDelay === 1" class="from-margin">
+        <el-col :span="24" class="Layout_space_between">
+          <span class="from-namea">提测延期原因 : {{ fromCreateData.delayReason }}</span>
+        </el-col>
+      </el-row>
+
+      <el-row class="from-margin">
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-name">计划开发时间:{{ fromCreateData.devPlanTimeStart + '至' + fromCreateData.devPlanTimeEnd }}</span>
+        </el-col>
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-namer">实际开发时间:{{ fromCreateData.devActualTimeStart + '至' + fromCreateData.devActualTimeEnd }}</span>
+        </el-col>
+      </el-row>
+
+      <el-row class="from-margin">
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-name">是否跟版:{{ fromCreateData.followVersion === 2 ? '否' : '是' }} </span>
+        </el-col>
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-namer">跟版客户端:{{ fromCreateData.involveAppString }}</span>
+        </el-col>
+      </el-row>
+
+      <el-row class="from-margin">
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-name">CodeReview:{{ fromCreateData.isCodeReview === 0 ? '否' : '是' }}</span>
+        </el-col>
+        <el-col :span="12" class="Layout_space_between">
+          <span class="from-namer">执行人:{{ fromCreateData.codeReviewExecutor }}</span>
+        </el-col>
+      </el-row>
+      <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%; margin-bottom: 20px;"
+        show-overflow-tooltip="true"
+      >
+        <el-table-column prop="bugName" label="需求" align="center" min-width="250" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span class="didi-hover">{{ 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="PM" align="center" min-width="100" show-overflow-tooltip />
+        <el-table-column prop="creatorList" label="跟版客户端" align="center" min-width="90" show-overflow-tooltip />
+      </el-table>
+
+      <div v-html="fromCreateData.content" />
+
+    </div>
+  </div>
+</template>
+
+<script>
+import '@/styles/PublicStyle/index.scss'
+import html2canvas from 'html2canvas'
+import searchTeam from '@/components/select/searchTeam'
+import { reportdelivertestGetReportById, reportdelivertestSendmail, reportdelivertestGetRequiresByTaskIds } from '@/api/reportTemplate' // 模版添删改查
+
+export default {
+  name: 'DailyNewsAdded',
+  components: {
+    searchTeam
+  },
+  props: {
+    dailyId: { type: [String, Number], default: null }
+  },
+  data() {
+    return {
+      form: {}, // 发送报告content
+      fromCreateData: {}, // listAll
+      tasksOptions: [], // 任务下拉选项
+      tasksDetailList: [], // 已有任务项目
+      taskid_arr: [], // taskIds
+      moduleId: '', // 模块id
+      tableData: [],
+      daily_Id: '' // daily_Id
+    }
+  },
+  watch: {
+    dailyId: {
+      handler(newV) {
+        console.log(newV, 'cdskcjbdsjcbdsbcnjdsncjkdsncjkdsncjkdsncjkldsncklsdnclkndsklcndklsnckl')
+        this.daily_Id = newV
+        this.reportdelivertestGetReportById(newV)
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    async reportdelivertestGetReportById(val) { // 获取提测报告数据
+      const res = await reportdelivertestGetReportById(val)
+      if (res.code === 200) {
+        this.fromCreateData = res.data
+        this.reportdelivertestGetRequiresByTaskIds(this.fromCreateData.taskIds)
+      }
+    },
+
+    async reportdelivertestGetRequiresByTaskIds(val) {
+      const res2 = await reportdelivertestGetRequiresByTaskIds({ taskIds: val })
+      if (res2.code === 200) {
+        this.tableData = res2.data.list
+      }
+    },
+
+    sendReport() {
+      if (this.form.name !== undefined) {
+        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 }
+            reportdelivertestSendmail(postData).then(res => {
+              res.code === 200 ? this.$message.success('报告发送中,请稍后进行邮件查收!') : this.$message.error('发送测试日报失败,请联系管理员!')
+              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>

+ 361 - 0
src/views/reportManagement/Testing/components/deliverDetails.vue

@@ -0,0 +1,361 @@
+<template>
+  <el-container class="BackgroundCloth">
+    <el-header class="public_header setLine">
+      <div class="Layout_space_between">
+        <div class="Layout_flex_start">
+          <div>
+            <span class="details-id">{{ 'report-' + details.id }}</span><br>
+            <span class="report-title">{{ details.reportName }}</span>
+          </div>
+          <div class="details-statusString">{{ details.statusString }}</div>
+        </div>
+        <div v-if="details.status === 1 ? false : true">
+          <span v-if="details.status === 3 ? true : false" class="didi-hover" @click="dialog_testData = true, AsTp = '通过'">通过</span>
+          <span v-if="details.status === 3 ? true : false" style="margin-left: 30px;" class="didi-hover" @click="dialog_testData = true, AsTp = '打回'">打回</span>
+          <span v-if="details.status === 0 ? true : false" class="didi-hover" @click="report_click(3,details)">发送</span>
+          <span v-if="details.status === 0 ? true : false" style="margin: 0 30px;" class="didi-hover" @click="report_click(2,details)">编辑</span>
+          <span v-if="details.status === 0 ? true : false" class="didi-hover" @click="dialog_testData = true, AsTp = '删除'">删除</span>
+          <span v-if="details.status === 2 ? true : false" class="didi-hover" @click="report_click(2,details)">重新提测</span>
+        </div>
+      </div>
+    </el-header>
+    <el-container>
+      <el-main class="report-main">
+        <div class="title"><div class="blur-column" /> 报告内容</div>
+
+        <el-row class="from-margin">
+          <el-col :span="12" class="Layout_space_between">
+            <span class="from-name">计划提测时间:{{ details.deliverTestPlanTime }}</span>
+          </el-col>
+          <el-col :span="12">
+            <span class="from-namev">实际提测时间:{{ details.deliverTestActualTime }}</span>
+          </el-col>
+        </el-row>
+
+        <el-row v-show="details.isDelay === 1" class="from-margin">
+          <el-col :span="24" class="Layout_space_between">
+            <span class="from-namea">提测延期原因 : {{ details.delayReason }}</span>
+          </el-col>
+        </el-row>
+
+        <el-row class="from-margin">
+          <el-col :span="12" class="Layout_space_between">
+            <span class="from-name">计划开发时间:{{ details.devPlanTimeStart + '至' + details.devPlanTimeEnd }}</span>
+          </el-col>
+          <el-col :span="12" class="Layout_space_between">
+            <span class="from-namer">实际开发时间:{{ details.devActualTimeStart + '至' + details.devActualTimeEnd }}</span>
+          </el-col>
+        </el-row>
+
+        <el-row class="from-margin">
+          <el-col :span="12" class="Layout_space_between">
+            <span class="from-name">是否跟版:{{ details.followVersion === 2 ? '否' : '是' }} </span>
+          </el-col>
+          <el-col :span="12" class="Layout_space_between">
+            <span class="from-namer">跟版客户端:{{ details.involveAppString }}</span>
+          </el-col>
+        </el-row>
+
+        <el-row class="from-margin">
+          <el-col :span="12" class="Layout_space_between">
+            <span class="from-name">CodeReview:{{ details.isCodeReview === 0 ? '否' : '是' }}</span>
+          </el-col>
+          <el-col :span="12" class="Layout_space_between">
+            <span class="from-namer">执行人:{{ details.codeReviewExecutor }}</span>
+          </el-col>
+        </el-row>
+        <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%; margin-bottom: 20px;"
+          show-overflow-tooltip="true"
+        >
+          <el-table-column prop="bugName" label="需求" align="center" min-width="250" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span class="didi-hover">{{ 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="PM" align="center" min-width="100" show-overflow-tooltip />
+          <el-table-column prop="creatorList" label="跟版客户端" align="center" min-width="90" show-overflow-tooltip />
+        </el-table>
+
+        <div v-html="details.content" />
+
+      </el-main>
+      <el-aside width="400px">
+        <el-container>
+          <el-header class="report-mains">
+            <div class="title"><div class="blur-column" /> 用户信息</div>
+            <div class="Layout_flex_start">
+              <div class="title-name">报告人 : </div>
+              <div class="task-name">{{ details.reportorObject ? details.reportorObject.name : '' }}</div>
+            </div>
+            <div class="Layout_flex_start">
+              <div class="title-name">收件人 : </div>
+              <div v-for="(item, index) in details.sendToObject" :key="index" class="task-name"> {{ item.name }} <span v-if="index < details.sendToObject.length - 1"> , </span></div>
+            </div>
+            <div class="Layout_flex_start">
+              <div class="title-name">抄送人 : </div>
+              <div v-for="(item, index) in details.sendCcObject" :key="index" class="task-name">{{ item.name }} <span v-if="index < details.sendCcObject.length - 1"> , </span></div>
+            </div>
+          </el-header>
+          <el-main class="report-mains">
+            <div class="title"><div class="blur-column" /> 时间</div>
+            <div class="Layout_flex_start">
+              <div class="title-name">创建时间 : </div>
+              <div class="task-name">{{ details.gmtCreate }}</div>
+            </div>
+            <div class="Layout_flex_start">
+              <div class="title-name">发送时间 : </div>
+              <div class="task-name">{{ details.gmtModify }}</div>
+            </div>
+          </el-main>
+          <el-footer class="report-mains">
+            <div class="title"><div class="blur-column" /> 关联任务</div>
+            <div v-for="(item, index) in details.taskDetailList" :key="index" class="Layout_flex_start task-bot">
+              <div class="task-id">{{ item.taskId }}</div>
+              <div class="task-name">{{ item.name }}</div>
+            </div>
+          </el-footer>
+        </el-container>
+      </el-aside>
+    </el-container>
+    <el-dialog :title="AsTp === '删除'? '删除确认': '提测确认'" :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="AsTp === '删除'">是否删除以下提测报告?</div>
+        <div v-if="AsTp === '通过'">是否通过以下提测报告?</div>
+        <div v-if="AsTp === '打回'">是否打回以下提测报告?</div>
+        <div style="color: #f79232;">{{ details.reportName }}</div>
+        <el-input v-show="AsTp === '打回'" v-model="details.returnReason" type="textarea" placeholder="请输入打回原因..." :rows="3" />
+      </div>
+      <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>
+    <TestingReport v-if="dialogDaily" ref="DailyReport" @getList="reportreleaseGetReportById(reportId)" />
+  </el-container>
+</template>
+
+<script>
+import '@/styles/PublicStyle/index.scss'
+import { reportdelivertestGetReportById, reportreleaseDelete, reportdelivertestGetRequiresByTaskIds, reportdelivertestUpdate } from '@/api/reportTemplate'
+import TestingReport from '@/views/reportManagement/components/TestingReport' // 准出
+export default {
+  components: {
+    TestingReport
+  },
+  data() {
+    return {
+      dialogDaily: false, // 准出报告弹窗
+      dialog_testData: false, // 操作弹窗
+      tableData: [],
+      AsTp: '',
+      reportId: this.$route.query.id,
+      details: {}
+    }
+  },
+  created() {
+    this.reportdelivertestGetReportById(this.reportId)
+  },
+  methods: {
+    async reportdelivertestGetReportById(e) { // 获取准出报告data
+      const res = await reportdelivertestGetReportById(e)
+      if (res.code === 200) {
+        this.details = res.data
+        this.reportdelivertestGetRequiresByTaskIds(this.details.taskIds)
+      }
+    },
+
+    async reportdelivertestGetRequiresByTaskIds(val) {
+      const res2 = await reportdelivertestGetRequiresByTaskIds({ taskIds: val })
+      if (res2.code === 200) {
+        this.tableData = res2.data.list
+      }
+    },
+
+    report_click(e, data) { // 准出报告
+      this.report_data = data
+      this.dialogDaily = true
+      this.$nextTick(() => {
+        this.$refs.DailyReport.init(e, data)
+      })
+    },
+    async deleteDaily() { // 删除准出报告
+      if (this.AsTp === '打回' || this.AsTp === '通过') {
+        const data = {
+          id: this.details.id,
+          moduleId: this.details.moduleId,
+          bizId: this.details.bizId,
+          taskIds: this.details.taskIds,
+          reportName: this.details.reportName,
+          returnReason: this.details.returnReason,
+          status: this.AsTp === '打回' ? 2 : this.AsTp === '通过' ? 1 : ''
+        }
+        const res1 = await reportdelivertestUpdate(data)
+        if (res1.code === 200) {
+          this.dialog_testData = false
+          this.$message({ type: 'success', message: this.AsTp === '打回' ? '已打回' : '已通过' })
+          this.reportdelivertestGetReportById(this.reportId)
+        }
+      }
+      if (this.AsTp === '删除') {
+        const res = await reportreleaseDelete({}, this.details.id)
+        if (res.code === 200) {
+          this.dialog_testData = false
+          this.$router.push({ name: '报告' })
+          this.$message({ type: 'success', message: '删除成功' })
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.BackgroundCloth {
+.report-Header {
+  margin: 10px 10px 0;
+  background: #FFF;
+  border-radius:4px;
+}
+.from-margin {
+    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;
+  }
+}
+
+.details-id {
+  font-size:12px;
+  font-family:PingFang SC;
+  font-weight:400;
+  line-height:20px;
+  color:rgba(51,59,74,1);
+  opacity:0.5;
+}
+
+.report-title {
+  font-size:20px;
+  font-family:PingFangSC-Medium;
+  line-height:28px;
+  color:rgba(51,59,74,1);
+  opacity:1;
+}
+
+.details-statusString {
+  font-size:14px;
+  font-family:MicrosoftYaHei;
+  line-height:17px;
+  padding: 5px 8px;
+  margin-left: 15px;
+  color:rgba(111,124,147,1);
+  border:1px solid rgba(191,198,220,1);
+  opacity:1;
+  border-radius:4px;
+}
+
+.report-main {
+  margin: 10px;
+  background: #FFF;
+  border-radius:4px;
+}
+.report-mains {
+  min-height: 200px;
+  padding: 20px ;
+  margin: 10px 10px 0 0;
+  background: #FFF;
+  border-radius:4px;
+}
+.title {
+  font-size:16px;
+  font-family:PingFangSC-Medium;
+  line-height:35px;
+  margin-bottom: 10px;
+  color:rgba(51,59,74,1);
+  opacity:1;
+}
+
+.title-name {
+  width:100px;
+  font-size:14px;
+  margin-bottom: 10px;
+  font-family:PingFangSC-Regular;
+  line-height:20px;
+  color:rgba(102,102,102,1);
+  opacity:1;
+}
+
+.task-id {
+  width:100px;
+  font-size:14px;
+  font-family:MicrosoftYaHei;
+  line-height:17px;
+  color:rgba(102,102,102,1);
+  opacity:1;
+}
+
+.task-name {
+  font-size:14px;
+  font-family:MicrosoftYaHei;
+  line-height:17px;
+  color:rgba(51,51,51,1);
+  opacity:1;
+}
+
+.blur-column {
+  width:4px;
+  height:15px;
+  display:inline-block;
+  vertical-align: middle;
+  background:#409EFF;
+  border-radius:1px;
+}
+
+.task-bot {
+   margin-bottom: 10px;
+}
+}
+.setLine {
+  padding: 10px 20px;
+}
+</style>

+ 82 - 56
src/views/reportManagement/Testing/newTestingTemplate.vue

@@ -8,7 +8,7 @@
       <el-form-item v-if="releaseType === 'create'" label="报告名称" prop="reportName" :rules="[{ required: true, message: '报告名称不能为空', trigger: 'change'}]"><br>
         <el-input v-model="fromCreateData.reportName" size="small" style="width:100%;" placeholder="请输入报告名称名称" />
       </el-form-item>
-      <div class="backStyle">模版内容</div>
+      <div class="backStyle">{{ releaseType === 'create'? "报告内容" : '模版内容' }}</div>
 
       <el-row class="from-margin">
         <el-col :span="12" class="Layout_space_between">
@@ -30,24 +30,15 @@
       </el-row>
 
       <el-row class="from-margin">
-        <el-col :span="12" class="Layout_flex_start">
-          <span class="from-name">是否延期: </span>
-          <template>
-            <el-radio-group v-model="from.isDelay" :disabled="releaseType === 'new'">
-              <el-radio :label="0">否</el-radio>
-              <el-radio :label="1">是</el-radio>
-            </el-radio-group>
-          </template>
-        </el-col>
-        <el-col v-show="fromCreateData.isDelay === 1" :span="12" class="Layout_space_between">
-          <span class="from-namea"><span v-if="releaseType === 'create'" style="color:red;">*</span>准出延期原因 : </span>
-          <el-input v-model="from.delayReason" size="small" :disabled="releaseType === 'new'" placeholder="请输入准出原因" style="width: 80%;" />
+        <el-col v-show="from.isDelay === 1" :span="24" class="Layout_space_between">
+          <span class="from-namea"><span v-if="releaseType === 'create'" style="color:red;">*</span>提测延期原因 : </span>
+          <el-input v-model="from.delayReason" size="small" :disabled="releaseType === 'new'" placeholder="请输入准出原因" style="width: 100%;" />
         </el-col>
       </el-row>
       {{ from.devPlanTimeStart }}
       <el-row class="from-margin">
         <el-col :span="12" class="Layout_space_between">
-          <span class="from-name">计划开发时间: </span>
+          <span class="from-name">计划开发时间:</span>
           <el-date-picker v-model="from.devPlanTimeStart" type="daterange" :disabled="releaseType === 'new'" 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">
@@ -66,9 +57,11 @@
             </el-radio-group>
           </template>
         </el-col>
-        <el-col :span="12" class="Layout_flex_start">
+        <el-col v-if="from.followVersion === 1" :span="12" class="Layout_flex_start">
           <span class="from-namer">跟版客户端</span>
-          <el-input v-model="from.involveAppString" :disabled="releaseType === 'new'" size="small" />
+          <el-select v-model="from.involveAppString" filterable remote size="small" :disabled="releaseType === 'new'" clearable placeholder="请选择" style="width: -webkit-fill-available;">
+            <el-option v-for="item in appClient" :key="item.code" :label="item.msg" :value="item.code" />
+          </el-select>
         </el-col>
       </el-row>
 
@@ -76,15 +69,15 @@
         <el-col :span="12" class="Layout_flex_start">
           <span class="from-name"><span style="color: red;">*</span>CodeReview:</span>
           <template>
-            <el-radio-group v-model="from.radio" :disabled="releaseType === 'new'">
+            <el-radio-group v-model="from.isCodeReview" :disabled="releaseType === 'new'">
               <el-radio :label="0">否</el-radio>
               <el-radio :label="1">是</el-radio>
             </el-radio-group>
           </template>
         </el-col>
-        <el-col :span="12" class="Layout_space_between">
+        <el-col v-if="from.isCodeReview === 1" :span="12" class="Layout_space_between">
           <span class="from-namer"><span style="color: red;">*</span>执行人:</span>
-          <searchTeam :value.sync="from.tester" :clearable="true" :multiple="true" :size="'small'" :disabled="releaseType === 'new'" style="width: 100%;" />
+          <searchTeam :value.sync="from.codeReviewExecutor" :clearable="true" :multiple="true" :size="'small'" :disabled="releaseType === 'new'" style="width: 100%;" />
         </el-col>
       </el-row>
     </el-form>
@@ -97,7 +90,7 @@
       style="width: 100%; margin-bottom: 20px;"
       show-overflow-tooltip="true"
     >
-      <el-table-column prop="bugName" label="需求" align="center" min-width="100" show-overflow-tooltip>
+      <el-table-column prop="bugName" label="需求" align="center" min-width="250" show-overflow-tooltip>
         <template slot-scope="scope">
           <span class="didi-hover">{{ scope.row.bugName }}</span>
         </template>
@@ -115,7 +108,8 @@
 import '@/styles/PublicStyle/index.scss' // 公共css
 import searchTeam from '@/components/select/searchTeam' // 人员搜索
 import normalArea from '@/components/input/normalArea' // 富文本
-import { settingAddReportModule, settingUpdateReportModule, settingGetReportModuleById, reportdelivertestInitReportRelease, reportdelivertestCreate, reportdelivertestGetRequiresByTaskIds } from '@/api/reportTemplate' // 模版添删改查
+import { configShowTaskEnum } from '@/api/taskIndex'
+import { settingAddReportModule, settingUpdateReportModule, settingGetReportModuleById, reportdelivertestInitReportRelease, reportdelivertestCreate, reportdelivertestGetRequiresByTaskIds, reportdelivertestUpdate } from '@/api/reportTemplate' // 模版添删改查
 
 export default {
   components: {
@@ -134,44 +128,43 @@ export default {
       taskId: [], // 创建准出的任务
       fromCreateData: {}, // from
       from: {},
+      appClient: [], // 跟版客户端
       releaseType: '' // 新建模版还是新建准出报告
     }
   },
   watch: {
     templateId: {
       handler(newV) {
-        if (newV !== 1 && newV !== 2) {
-          console.log(newV, 'tmepId')
-          this.tpltId = newV
-          this.tpltId ? this.settingGetReportModuleById(newV) : ''
-        }
-        if (newV === 1) {
-          this.fromCreateData.content = `
+        console.log(newV, '更新')
+        if (newV.id) {
+          console.log(newV, '有数据')
+          this.fromCreateData = newV
+          this.from = newV
+        } else {
+          if (newV !== 1 && newV !== 2) {
+            console.log(newV, 'tmepId')
+            this.tpltId = newV
+            this.tpltId ? this.settingGetReportModuleById(newV) : ''
+          }
+          if (newV === 1) {
+            this.tpltId = newV
+            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 = `
+          }
+          if (newV === 2) {
+            this.tpltId = newV
+            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
@@ -193,6 +186,9 @@ export default {
       immediate: true
     }
   },
+  created() {
+    this.configShowTaskEnum()
+  },
   methods: {
     async reportdelivertestInitReportRelease(val) { // 报告时间
       const res = await reportdelivertestInitReportRelease({ taskIds: val })
@@ -205,6 +201,12 @@ export default {
         this.tableData = res.data.list
       }
     },
+    async configShowTaskEnum() {
+      const res = await configShowTaskEnum()
+      if (res.code === 200) {
+        this.appClient = res.data.appClient // 涉及客户端
+      }
+    },
     async settingGetReportModuleById(val) { // 获取自定义模版内容
       const res = await settingGetReportModuleById(val)
       if (res.code === 200) {
@@ -212,21 +214,45 @@ export default {
       }
     },
 
-    // 创建准出报告
-    reportreleaseCreate() {
+    // 创建提测报告
+    reportreleaseCreate(val) {
       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
-          reportdelivertestCreate(data).then(res => {
-            if (res.code === 200) {
-              console.log(res)
-            }
-            this.$emit('SaveNextStep')
-          })
+          if (val) {
+            const data = this.fromCreateData
+            data.deliverTestPlanTime = this.from.deliverTestPlanTime
+            data.delayReason = this.from.delayReason
+            data.deliverTestActualTime = this.from.deliverTestActualTime
+            data.devActualTimeStart = this.from.devActualTimeStart
+
+            data.followVersion = this.from.followVersion
+            data.involveAppString = this.from.involveAppString
+
+            data.isCodeReview = this.from.isCodeReview
+            data.codeReviewExecutor = this.from.codeReviewExecutor
+            data.taskIds = this.taskId
+            data.bizId = localStorage.getItem('bizId')
+            data.moduleId = this.tpltId
+            reportdelivertestUpdate(data).then(res => {
+              if (res.code === 200) {
+                this.$message({ type: 'success', message: '更新成功' })
+                this.$emit('SaveNextStep', res.data)
+              }
+            })
+          } else {
+            const data = {}
+            data.reportName = this.fromCreateData.reportName
+            data.content = this.fromCreateData.content
+            data.taskIds = this.taskId
+            data.bizId = localStorage.getItem('bizId')
+            data.moduleId = this.tpltId
+            reportdelivertestCreate(data).then(res => {
+              if (res.code === 200) {
+                this.$message({ type: 'success', message: '创建成功' })
+                this.$emit('SaveNextStep', res.data)
+              }
+            })
+          }
         }
       })
     },
@@ -280,7 +306,7 @@ export default {
     color:#666666;
     opacity:1;
     .from-name {
-      width: 140px !important;
+      width: 150px !important;
     }
     .from-namea {
       width: 119px !important;

+ 6 - 24
src/views/reportManagement/components/TestingReport.vue

@@ -61,7 +61,7 @@
       <!-- 新建日报模版 -->
 
       <!-- 日报预览 -->
-      <dailyPreview v-if="dailyPreview" ref="dailyPreview" class="daily" :daily-id="dailyId" @handleClose="handleClose" />
+      <TestingPreview v-if="dailyPreview" ref="dailyPreview" class="daily" :daily-id="dailyId" @handleClose="handleClose" />
       <!-- 日报预览 -->
 
     </div>
@@ -83,16 +83,14 @@
 
 <script>
 import '@/styles/PublicStyle/index.scss'
-import { settingQueryReportModuleList, settingDeleteReportModule, dailyReportGetV2 } from '@/api/reportTemplate'
-// import dailyTemplate from '@/views/reportManagement/daily/dailyTemplate.vue'
+import { settingQueryReportModuleList, settingDeleteReportModule, reportdelivertestGetReportById } from '@/api/reportTemplate'
 import newTestingTemplate from '@/views/reportManagement/Testing/newTestingTemplate.vue'
-import dailyPreview from '@/views/reportManagement/daily/dailyPreview.vue'
+import TestingPreview from '@/views/reportManagement/Testing/TestingPreview.vue'
 
 export default {
   components: {
-    // dailyTemplate,
     newTestingTemplate,
-    dailyPreview
+    TestingPreview
   },
   data() {
     return {
@@ -140,7 +138,7 @@ export default {
       this.dialogDaliy = true
       switch (index) {
         case 2: // 编辑
-          dailyReportGetV2(newData.id).then(res => {
+          reportdelivertestGetReportById(newData.id).then(res => {
             if (res.code === 200) {
               this.daily_taskIds = res.data.taskIds // 关联任务
               this.fromData.radio = res.data // 选择的模块
@@ -161,22 +159,6 @@ export default {
           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.reportHome = true // 步骤条
@@ -248,7 +230,7 @@ export default {
     },
 
     async sendReportReturn() { // 第三步返回第二部
-      const res = await dailyReportGetV2(this.dailyId)
+      const res = await reportdelivertestGetReportById(this.dailyId)
       if (res.code === 200) {
         this.daily_taskIds = res.data.taskIds // 关联任务
         this.fromData.radio = res.data // 选择的模块

+ 1 - 7
src/views/reportManagement/daily/components/DailyDetails.vue

@@ -13,7 +13,7 @@
           <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="dialog_testData = true">删除</span>
-          <span v-if="details.status === 1 ? true : false" class="didi-hover" @click="dailyButtom(3,details)">复制</span>
+          <span v-if="details.status === 3 ? true : false" class="didi-hover" @click="dailyButtom(3,details)">复制</span>
         </div>
       </div>
     </el-header>
@@ -72,9 +72,7 @@
         <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" @getList="getReportContent(reportId)" />
-    <!-- <ClientReport v-if="dialogClient" ref="ClientReport" /> -->
   </el-container>
 </template>
 
@@ -82,14 +80,10 @@
 import '@/styles/PublicStyle/index.scss'
 import { dailyReportGetV2, dailyReportDelete } from '@/api/reportTemplate'
 import iconDisplay from '@/views/reportManagement/daily/components/iconDisplay.vue'
-// import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
 import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
-// import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
 export default {
   components: {
-    // TestReport,
     DailyReport,
-    // ClientReport,
     iconDisplay
   },
   data() {

+ 19 - 16
src/views/reportManagement/testPresentation.vue

@@ -26,7 +26,7 @@
           <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) : OldDaily(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)">{{ history ? scope.row.reportName : scope.row.name }}</a>
             </template>
           </el-table-column>
           <el-table-column label="状态" min-width="150">
@@ -36,7 +36,7 @@
             <template slot-scope="scope">
               <div v-if="history">
                 <div v-if="title === '测试日报' || title === '准出报告'">{{ scope.row.reportorObject.name ===null ? '' : scope.row.reportorObject.name }}</div>
-                <div v-if="title === '提测报告'">{{ scope.row.submitter }}</div>
+                <div v-if="title === '提测报告'">{{ scope.row.reportorObject.name }}</div>
               </div>
               <div v-if="!history">
                 <div v-if="title === '测试日报' || title === '准出报告'">{{ scope.row.ownner }}</div>
@@ -53,7 +53,7 @@
                 <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>
+                <span v-if="scope.row.status === 3 ? true : false" class="didi-hover" @click="dailyButtom(3,scope.row)">复制</span>
               </div>
               <div v-if="title === '准出报告'">
                 <div v-if="scope.row.status === 3 ? false : true">
@@ -132,12 +132,11 @@
 import '@/styles/PublicStyle/index.scss'
 import { dailyReportDelete } from '@/api/testPresentetion' // 日报
 import { projectTestReportList } from '@/api/ResultPage' // 准出
-import { launchTestList, launchTestDelete, taskListCreate } from '@/api/InterfaceReport' // 提测
+import { launchTestList, taskListCreate } from '@/api/InterfaceReport' // 提测
 import TestingReport from '@/views/reportManagement/components/TestingReport' // 提测
 import DailyReport from '@/views/reportManagement/components/DailyReport' // 日报
 import ReleaseReport from '@/views/reportManagement/components/ReleaseReport' // 准出
-import { launchTestUpdate } from '@/api/InterfaceReport'
-import { dailyReportList, dailyReportListV2, reportreleaseList, reportdelivertestList, reportreleaseDelete } from '@/api/reportTemplate'
+import { dailyReportList, dailyReportListV2, reportreleaseList, reportdelivertestList, reportreleaseDelete, reportdelivertestDelete, reportdelivertestUpdate } from '@/api/reportTemplate'
 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' // 老提测报告
@@ -260,11 +259,18 @@ export default {
 
     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)
+        const data = {
+          id: this.report_data.id,
+          moduleId: this.report_data.moduleId,
+          bizId: this.report_data.bizId,
+          taskIds: this.report_data.taskIds,
+          reportName: this.report_data.reportName,
+          returnReason: this.report_from.reason,
+          status: this.report_from.statusString === '打回' ? 2 : this.report_from.statusString === '通过' ? 1 : ''
+        }
+        const res = await reportdelivertestUpdate(data)
         if (res.code === 200) {
           this.getList()
           this.$message({ message: res.msg, type: 'success', offset: 150 })
@@ -280,7 +286,7 @@ export default {
             })
             break
           case '准出报告':
-            reportreleaseDelete(userData, this.report_data.id).then(res => {
+            reportreleaseDelete(this.userData, this.report_data.id).then(res => {
               if (res.code === 200) {
                 this.$message({ type: 'success', message: '删除成功' })
                 this.getList()
@@ -288,7 +294,7 @@ export default {
             })
             break
           case '提测报告':
-            launchTestDelete(this.userData, this.report_data.id).then(res => {
+            reportdelivertestDelete({}, this.report_data.id).then(res => {
               if (res.code === 200) {
                 this.$message({ type: 'success', message: '删除成功' })
                 this.getList()
@@ -432,10 +438,7 @@ export default {
           this.$router.push({ name: '准出详情', query: { id: ele.id }})
           break
         case '提测报告':
-          this.dialogVisible1 = true
-          this.$nextTick(() => {
-            this.$refs.TestReport.init(3, ele)
-          })
+          this.$router.push({ name: '提测详情', query: { id: ele.id }})
           break
       }
     },