Эх сурвалжийг харах

Merge branch 'http_test' into http_mock

qinzhipeng_v@didiglobal.com 4 жил өмнө
parent
commit
8a04e63ce7

+ 20 - 1
src/views/projectManage/taskList/taskIndex.vue

@@ -398,7 +398,16 @@
           <template slot-scope="scope">{{ scope.row.bugCount }}</template>
         </el-table-column>
         <el-table-column label="所属需求" min-width="250" align="center" show-overflow-tooltip>
-          <template slot-scope="scope">{{ scope.row.requireName }}</template>
+          <template slot-scope="scope">
+            <span
+              v-if="scope.row.requireBizName"
+              class="topq"
+              style="font-size: 12px;">
+              {{ scope.row.requireBizName }}
+            </span>
+            <br>
+            {{ scope.row.requireName }}
+          </template>
         </el-table-column>
         <el-table-column label="所属项目" min-width="250" align="center" show-overflow-tooltip>
           <template slot-scope="scope">{{ scope.row.projectName }}</template>
@@ -1009,6 +1018,16 @@ export default {
 }
 </script>
 <style lang="less" scoped>
+.topq {
+  margin-left: 5px;
+  display: inline-block;
+  padding: 1px 5px 0;
+  border-radius: 8px;
+  height: 16px;
+  line-height: 16px;
+  background: rgba(245, 108, 108, 0.17);
+  color: #f56c6c;
+}
 .chartView {
   .chartSearchTitle {
     width: 50px;

+ 1 - 1
src/views/reportManagement/ReleaseReport/newReleaeTemplate.vue

@@ -184,7 +184,7 @@ export default {
           this.releaseType = true
           this.from = { ...this.from, ...newV.from }
           newV.name === '编辑模版' ? this.settingGetReportModuleById(newV.set_up) : ''
-          return false
+          return
         }
         this.releaseType = false
         if (newV.id) { // 编辑

+ 2 - 4
src/views/reportManagement/Testing/newTestingTemplate.vue

@@ -206,7 +206,7 @@ export default {
           this.releaseType = true
           this.from = { ...this.from, ...newV.from }
           newV.name === '编辑模版' ? this.settingGetReportModuleById(newV.repot_up) : ''
-          return false
+          return
         }
         this.releaseType = false
         if (newV.id) { // 编辑
@@ -241,7 +241,6 @@ export default {
     },
 
     setFrom(e) {
-      console.log(e)
       this.$refs.moduleCustom.CustomSet(e)
     },
 
@@ -348,10 +347,9 @@ export default {
         delete newFrom[key]
       })
       this.from = { ...newFrom, ...params }
-      console.log(customs, params, 'customs')
     },
     customDialong() { // 点击自定义字段
-      console.log(this.customList, this.from, '模版组件返回')
+      this.from = { ...this.from }
       this.$emit('setCustom', this.customList, this.from)
     },
 

+ 18 - 6
src/views/reportManagement/components/DailyReport.vue

@@ -46,7 +46,7 @@
       <!-- 第一步 -->
       <el-button v-if="showOne" size="small" type="primary" @click="NextStep()">下一步</el-button>
       <!-- 第二步 -->
-      <el-button v-if="newDailyTemplate" size="small" type="primary" @click="reportReturn">上一步</el-button>
+      <el-button v-if="newDailyTemplate" size="small" type="primary" @click="report_Return">上一步</el-button>
       <el-button v-if="newDailyTemplate" size="small" type="primary" @click="getCreateData">保存, 下一步</el-button>
       <!-- 第三步 -->
       <el-button v-if="dailyPreview" size="small" type="primary" @click="sendReportReturn">上一步</el-button>
@@ -186,6 +186,7 @@ export default {
 
     getCustom(arr) { // 自定义确认
       console.log(arr, this.temporary.name, '结果')
+      // this.templateId = { ...this.temporary.from }
       this.customList = [...arr]
       this.reportHome = this.temporary.name
     },
@@ -201,14 +202,25 @@ export default {
     },
 
     created_out() { // 新建模版
-      if (this.tits === '模版管理') {
-        this.getreportTemplate()
-        this.reportHome = '模版管理'
-        this.showOne = true
-      }
+      // if (this.tits === '模版管理') {
+      //   this.reportHome = '模版管理'
+      //   this.getreportTemplate()
+      //   this.showOne = true
+      // }
       this.$refs.newReportTemplate.getCreateData(3)
     },
 
+    report_Return() {
+      this.fromData.radio = this.selectTemplate[0].id
+      this.reportHome = '测试日报' // 步骤条
+      this.showOne = true // 模版选择
+      this.reportTamplate = false // 编辑区域
+      this.newDailyTemplate = false // 隐藏第二步
+      this.dailyPreview = false // 隐藏第三步
+      this.customList = []
+      this.getreportTemplate()
+    },
+
     reportReturn() { // 新建模版点击返回
       this.fromData.radio = this.selectTemplate[0].id
       this.reportHome = this.tits // 步骤条

+ 19 - 7
src/views/reportManagement/components/ReleaseReport.vue

@@ -47,7 +47,7 @@
         <!-- 第一步 -->
         <el-button v-if="showOne" size="small" type="primary" @click="NextStep()">下一步</el-button>
         <!-- 第二步 -->
-        <el-button v-if="newDailyTemplate" size="small" type="primary" @click="reportReturn">上一步</el-button>
+        <el-button v-if="newDailyTemplate" size="small" type="primary" @click="report_return">上一步</el-button>
         <el-button v-if="newDailyTemplate" size="small" type="primary" @click="getCreateData">保存, 下一步</el-button>
         <!-- 第三步 -->
         <el-button v-if="dailyPreview" size="small" type="primary" @click="sendReportReturn">上一步</el-button>
@@ -170,14 +170,24 @@ export default {
     },
 
     created_out() { // 新建模版
-      if (this.tits === '模版管理') {
-        this.getreportTemplate()
-        this.reportHome = '模版管理'
-        this.showOne = true
-      }
+      // if (this.tits === '模版管理') {
+      //   this.getreportTemplate()
+      //   this.reportHome = '模版管理'
+      //   this.showOne = true
+      // }
       this.$refs.newReleaeTemplate.getCreateData(this.templateId)
     },
 
+    report_return() {
+      this.reportHome = '准出报告' // 步骤条
+      this.showOne = true // 模版选择
+      this.reportTamplate = false // 编辑区域
+      this.newDailyTemplate = false // 隐藏第二步
+      this.dailyPreview = false // 隐藏第三步
+      this.customList = []
+      this.getreportTemplate()
+    },
+
     reportReturn() { // 新建模版点击返回
       this.reportHome = this.tits // 步骤条
       this.showOne = true // 模版选择
@@ -189,7 +199,7 @@ export default {
     },
 
     open_new_template(val, show) { // 点击新建模版
-      !val ? this.templateId = { 'name': '新建模版', from: this.customList.length === 0 ? this.temporary.from : [] } : this.templateId = { 'name': '编辑模版', 'set_up': val.id }
+      !val ? this.templateId = { 'name': '新建模版', from: this.customList.length !== 0 ? this.temporary.from : {}} : this.templateId = { 'name': '编辑模版', 'set_up': val.id }
       this.tits = this.reportHome
       if (this.templateId.name === '新建模版') {
         this.reportTamplate = true // 编辑区域
@@ -224,6 +234,7 @@ export default {
 
     getCustom(arr) { // 自定义确认
       console.log(arr, this.temporary.name, '结果')
+      this.templateId = { 'from': this.temporary.from, 'name': this.temporary.name === '创建准出报告模版' ? '新建模版' : '编辑模版' }
       this.customList = [...arr]
       this.reportHome = this.temporary.name
     },
@@ -260,6 +271,7 @@ export default {
       if (res.code === 200) {
         this.daily_taskIds = null// 关联任务
         this.fromData.radio = res.data // 选择的模块
+        this.customList = res.data.customFields
       }
       this.reportHome = '准出报告' // 步骤条
       this.active = 2 // 步骤条状态第三步

+ 20 - 11
src/views/reportManagement/components/TestingReport.vue

@@ -46,7 +46,7 @@
         <!-- 第一步 -->
         <el-button v-if="showOne" size="small" type="primary" @click="NextStep()">下一步</el-button>
         <!-- 第二步 -->
-        <el-button v-if="newDailyTemplate" size="small" type="primary" @click="reportReturn">上一步</el-button>
+        <el-button v-if="newDailyTemplate" size="small" type="primary" @click="report_return">上一步</el-button>
         <el-button v-if="newDailyTemplate" size="small" type="primary" @click="getCreateData">保存, 下一步</el-button>
         <!-- 第三步 -->
         <el-button v-if="dailyPreview" size="small" type="primary" @click="sendReportReturn">上一步</el-button>
@@ -186,7 +186,8 @@ export default {
     },
 
     getCustom(arr) { // 自定义确认
-      console.log(arr, this.temporary.name, '结果')
+      console.log(arr, this.temporary, '结果')
+      this.templateId = { 'from': this.temporary.from, 'name': this.temporary.name === '创建提测报告模版' ? '新建模版' : '编辑模版' }
       this.customList = [...arr]
       this.reportHome = this.temporary.name
     },
@@ -202,14 +203,22 @@ export default {
     },
 
     created_out() { // 新建模版
-      if (this.tits === '模版管理') {
-        this.getreportTemplate()
-        this.reportHome = '模版管理'
-        this.showOne = true
-        this.$refs.newReportTemplate.getCreateData(this.templateId)
-      } else {
-        this.$refs.newReportTemplate.getCreateData(this.templateId)
-      }
+      // if (this.tits === '模版管理') {
+      //   this.getreportTemplate()
+      //   this.reportHome = '模版管理'
+      //   this.showOne = true
+      //   this.$refs.newReportTemplate.getCreateData(this.templateId)
+      // } else {
+      this.$refs.newReportTemplate.getCreateData(this.templateId)
+      // }
+    },
+    report_return() { // 新建模版点击返回
+      this.reportHome = '提测报告' // 步骤条
+      this.showOne = true // 模版选择
+      this.newDailyTemplate = false // 隐藏第二步
+      this.dailyPreview = false // 隐藏第三步
+      this.customList = []
+      this.getreportTemplate()
     },
 
     reportReturn() { // 新建模版点击返回
@@ -222,7 +231,7 @@ export default {
     },
 
     open_new_template(val, show) { // 点击新建模版
-      !val ? this.templateId = { 'name': '新建模版', from: this.customList.length === 0 ? this.temporary.from : [] } : this.templateId = { 'name': '编辑模版', 'repot_up': val.id }
+      !val ? this.templateId = { 'name': '新建模版', from: this.customList.length === 0 ? {} : this.temporary.from } : this.templateId = { 'name': '编辑模版', 'repot_up': val.id }
       this.tits = this.reportHome
       if (this.templateId.name === '新建模版') {
         this.reportHome = `创建提测报告模版` // 步骤条

+ 1 - 1
src/views/reportManagement/components/template/customTemplate.vue

@@ -173,6 +173,6 @@ export default {
   .Layout {
     display: flex;
     flex-wrap: wrap;
-    justify-content: space-between;
+    // justify-content: space-between;
   }
 </style>

+ 3 - 1
src/views/reportManagement/daily/newReportTemplate.vue

@@ -101,6 +101,7 @@ export default {
   watch: {
     templateId: {
       handler(newV) {
+        console.log(newV)
         this.tpltId = newV
         this.tpltId ? this.settingGetReportModuleById(newV) : ''
       },
@@ -176,7 +177,6 @@ export default {
     getCreateData(e) {
       this.$refs['fromCreateData'].validate(async(valid) => {
         if (valid) {
-          this.fromCreateData = { ...this.fromCreateData, bizId: this.bizId, type: e, customFields: this.customList }
           this.loading = true
           try {
             this.fromCreateData.content = await getContainImgHTMLNode(this.fromCreateData.content)
@@ -185,6 +185,8 @@ export default {
             throw error
           }
           this.loading = false
+          this.fromCreateData = { ...this.fromCreateData, bizId: this.bizId, type: e, customFields: this.customList }
+          console.log(this.tpltId, 'kankan')
           if (this.tpltId) {
             settingUpdateReportModule(this.fromCreateData).then(res => {
               if (res.code === 200) {

+ 3 - 2
src/views/reportManagement/testPresentation.vue

@@ -250,17 +250,18 @@ export default {
       switch (Number(tab.index)) {
         case 0:
           this.title = '测试日报'
+          this.screenForm = { ...this.screenForm, status: '', passStatus: '', isDelay: '' }
           this.history ? this.getList() : this.gethistoryData()
           break
         case 1:
           this.title = '准出报告'
-          this.screenForm = { ...this.screenForm, status: '', passStatus: '' }
+          this.screenForm = { ...this.screenForm, status: '', passStatus: '', isDelay: '' }
           this.reportStatusLists = [{ code: 0, name: '通过' }, { code: 1, name: '不通过' }]
           this.history ? this.getList() : this.gethistoryData()
           break
         case 2:
           this.title = '提测报告'
-          this.screenForm = { ...this.screenForm, status: '', passStatus: '' }
+          this.screenForm = { ...this.screenForm, status: '', passStatus: '', isDelay: '' }
           this.reportStatusList = [{ code: 1, name: '通过' }, { code: 2, name: '打回' }]
           this.history ? this.getList() : this.gethistoryData()
           break