浏览代码

Merge branch 'http_test' into qz_daily_0.0.6

qinzhipeng_v@didiglobal.com 4 年之前
父节点
当前提交
56bfbff12b

+ 95 - 0
src/components/modal/index.vue

@@ -0,0 +1,95 @@
+<template>
+  <!-- <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task report-dialog" :title="reportHome ? '测试日报' : `${tipName}测试日报模版`" :close-on-click-modal="false" :destroy-on-close="true" :before-close="handleClose"> -->
+  <div v-if="visible" class="dialogbox">
+    <div class="box">
+      <div class="title">
+        <span v-show="showline" class="line" />
+        <span class="name">{{ title }}</span>
+        <i class="el-icon-close icon" @click="$emit('close')" />
+      </div>
+      <div class="body">
+        <slot />
+      </div>
+      <div class="footer">
+        <slot name="footer" />
+      </div>
+    </div>
+    <div class="bg" />
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    visible: { type: Boolean, default: false, required: false },
+    title: { type: String, default: '', required: false },
+    showline: { type: Boolean, default: true, required: false }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.dialogbox {
+  .box {
+    position: fixed;
+    top:10vh;
+    left: 15%;
+    width: 70%;
+    height: 80vh;
+    // overflow: auto;
+    background: #fff;
+    z-index: 1000;
+    display: flex;
+    flex-direction: column;
+    .title {
+      padding: 20px 20px 10px;
+      border-bottom: 1px solid #eee;
+      position: relative;
+      .line {
+        display: inline-block;
+        width: 4px;
+        height: 18px;
+        background: #409eff;
+        border-radius: 1px;
+        vertical-align: text-top;
+      }
+      .name {
+        font-size: 16px;
+        color: #303133;
+        padding-left: 6px;
+      }
+      .icon {
+        position: absolute;
+        top: 20px;
+        right: 20px;
+        font-size: 16px;
+        color: #909399;
+      }
+    }
+    .body {
+      padding: 30px 20px;
+      color: #606266;
+      font-size: 14px;
+      word-break: break-all;
+      height: calc(80vh - 118px);
+      overflow: auto;
+    }
+    .footer {
+      padding: 15px 20px;
+      text-align: right;
+      border-top: 1px solid #eee;
+      background: #fff;
+    }
+  }
+  .bg {
+    background: rgba(000, 000, 000, 0.5);
+    position: fixed;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    z-index: 100;
+  }
+}
+
+</style>

+ 14 - 9
src/views/projectManage/bugList/file/createdBug.vue

@@ -1,9 +1,10 @@
 <template>
   <div class="Parent">
-    <el-dialog :visible.sync="modalShow" :title="titleName" class="public_task" width="70%" :close-on-click-modal="false" :destroy-on-close="true" :modal-append-to-body="false" @close="modalClose">
+    <!-- <el-dialog :visible.sync="modalShow" :title="titleName" class="public_task" width="70%" :close-on-click-modal="false" :destroy-on-close="true" :modal-append-to-body="false" @close="modalClose"> -->
+    <modal :visible="modalShow" :title="titleName" @close="modalClose">
       <div class="blueStripe" />
       <el-form ref="formInline" label-position="left" :model="formInline" :rules="rules" label-width="90px">
-        <div id="soll" style="height: 460px; overflow:scroll; overflow-x: hidden">
+        <div id="soll">
           <div>
             <el-row style="margin: 0 4%;">
               <el-col :span="24">
@@ -138,7 +139,7 @@
                       id="buglist_file_tinymce"
                       :value.sync="formInline.bugDescribe"
                       :height="200"
-                      :full-position-style="{ left:'0', bottom: '30px' }"
+                      :full-position-style="{ top:'20px',left:'15%', right: '15%' }"
                     />
                   </el-col>
                 </el-row>
@@ -156,13 +157,15 @@
             </div>
           </div>
         </div>
-        <el-form-item style="text-align: right;margin: 15px 0% 0;">
-          <el-button @click="modalShow = false">取 消</el-button>
-          <el-button :disabled="dis" type="primary" @click="bug_created(formInline)">创 建</el-button>
-        </el-form-item>
+        <!-- <el-form-item style="text-align: right;margin: 15px 0% 0;">
+        </el-form-item> -->
       </el-form>
       <el-button id="pasteUpload" type="primary" style="display: none" @click.stop="pasteUpload">upload</el-button>
-    </el-dialog>
+      <div slot="footer">
+        <el-button @click="modalShow = false">取 消</el-button>
+        <el-button :disabled="dis" type="primary" @click="bug_created(formInline)">创 建</el-button>
+      </div>
+    </modal>
     <normal-dialog :show-dialog="showCopyFile" :title="'上传截图'" :width="'40%'" :submit-button="'上传'" :top="'5vh'" @confirm="confirmUpload()" @cancel="showCopyFile=false">
       <div class="file-dialog">
         <el-form ref="imageForm" label-width="20%" :rules="imageRules" :model="imageName">
@@ -205,6 +208,7 @@ import '@/views/projectManage/bugList/css/index.css'
 import '@/styles/PublicStyle/index.scss'
 import normalArea from '@/components/input/normalArea' // 富文本
 import 'tinymce/plugins/table'// 插入表格插件
+import modal from '@/components/modal'
 import axios from 'axios'
 
 document.body.onpaste = function(event) {
@@ -226,7 +230,8 @@ export default {
   name: 'Createdbug',
   components: {
     normalDialog,
-    normalArea
+    normalArea,
+    modal
   },
   filters: {
     limit(e, limit) {

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

@@ -6,9 +6,7 @@
     element-loading-text="数据上传中,请稍后"
     element-loading-spinner="el-icon-loading"
   >
-
     <el-form ref="fromCreateData" :model="from">
-
       <div v-if="!releaseType" style=" margin-bottom: 10px;">
         <span style="color: #f56b6c">*</span>
         <span class="backStyle"> 关联任务</span><br>
@@ -102,7 +100,7 @@
         id="report-template-1"
         :value.sync="fromData.content"
         :height="500"
-        :full-position-style="{ top:'20px',left:'14.5%', right: '15.5%' }"
+        :full-position-style="{ top:'20px',left:'15%', right: '15%' }"
       />
     </el-form>
     <div class="backStyle">缺陷统计</div>

+ 1 - 1
src/views/reportManagement/Testing/newTestingTemplate.vue

@@ -127,7 +127,7 @@
       id="report-template-2"
       :value.sync="fromCreateData.content"
       :height="500"
-      :full-position-style="{ top:'20px',left:'14.5%', right: '15.5%' }"
+      :full-position-style="{ top:'20px',left:'15%', right: '15%' }"
     />
   </div>
 </template>

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

@@ -1,5 +1,7 @@
 <template>
-  <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task report-dialog" :title="reportHome ? '测试日报' : `${tipName}测试日报模版`" :close-on-click-modal="false" :destroy-on-close="true" :before-close="handleClose">
+  <!-- <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task report-dialog" :title="reportHome ? '测试日报' : `${tipName}测试日报模版`" :close-on-click-modal="false" :destroy-on-close="true" :before-close="handleClose"> -->
+  <modal :visible="dialogDaliy" :title="reportHome ? '测试日报' : `${tipName}测试日报模版`" :showline="reportHome" @close="handleClose">
+    <!-- <div class="box"> -->
     <div v-if="reportHome" class="blueStripe" />
     <i v-if="!reportHome" class="el-icon-arrow-left report-return didi-hover" @click="reportReturn" />
 
@@ -16,7 +18,7 @@
           <el-col :span="5" class="creator" style="margin-right: 17px;"> 创建人 </el-col>
         </el-row>
 
-        <div ref="refName" style="max-height: 260px; overflow:scroll; overflow-x: hidden; margin: 20px 0;">
+        <div ref="refName" style="margin: 20px 0;">
           <el-row v-for="(item, index) in selectTemplate" :key="index" type="flex" justify="center" style="padding-right: 15px;">
             <el-col :span="19">
               <el-radio v-model="fromData.radio" class="creatorList" :label="item.id">{{ item.moduleName }}</el-radio>
@@ -73,8 +75,9 @@
       <el-button v-if="dailyPreview" size="small" type="primary" @click="sendReportReturn">上一步</el-button>
       <el-button v-if="dailyPreview" size="small" type="primary" :loading="loading" @click="sendReport">发送</el-button>
     </div>
-
-  </el-dialog>
+    <!-- </div> -->
+    <!-- <div class="bg" /> -->
+  </modal>
 </template>
 
 <script>
@@ -84,12 +87,13 @@ import { settingQueryReportModuleList, settingDeleteReportModule, dailyReportGet
 import dailyTemplate from '@/views/reportManagement/daily/dailyTemplate.vue'
 import newReportTemplate from '@/views/reportManagement/daily/newReportTemplate.vue'
 import dailyPreview from '@/views/reportManagement/daily/dailyPreview.vue'
-
+import modal from '@/components/modal'
 export default {
   components: {
     dailyTemplate,
     newReportTemplate,
-    dailyPreview
+    dailyPreview,
+    modal
   },
   data() {
     return {
@@ -125,6 +129,9 @@ export default {
       immediate: true
     }
   },
+  mounted() {
+    console.log(this.dialogDaliy)
+  },
   methods: {
     async getreportTemplate() { // 获取模版list
       const res = await settingQueryReportModuleList({ bizId: this.bizId, type: 3 }) // 3 日报
@@ -139,6 +146,7 @@ export default {
 
     init(index, newData) {
       this.dialogDaliy = true
+      console.log(this.dialogDaliy)
       switch (index) {
         case 2: // 编辑
           dailyReportGetV2(newData.id).then(res => {
@@ -297,6 +305,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+
 .report-leftRight {
   margin: 20px 9% 0%;
   >>> .el-row .el-col {
@@ -381,11 +390,11 @@ export default {
   color:rgba(51,51,51,1);
   opacity:1;
 }
-.daily {
-   max-height: 460px;
-   overflow:scroll;
-   overflow-x: hidden
-}
+// .daily {
+  //  max-height: 460px;
+  //  overflow:scroll;
+  //  overflow-x: hidden
+// }
 
 .blur-column {
   width:4px;

+ 12 - 10
src/views/reportManagement/components/ReleaseReport.vue

@@ -1,5 +1,6 @@
 <template>
-  <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task report-dialog" :title="reportHome ? '准出报告' : `${tipName}准出报告模版`" :close-on-click-modal="false" :destroy-on-close="true" :before-close="handleClose">
+  <!-- <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task report-dialog" :title="reportHome ? '准出报告' : `${tipName}准出报告模版`" :close-on-click-modal="false" :destroy-on-close="true" :before-close="handleClose"> -->
+  <modal :visible="dialogDaliy" :title="reportHome ? '准出报告' : `${tipName}准出报告模版`" :showline="reportHome" @close="handleClose">
     <div v-if="reportHome" class="blueStripe" />
     <i v-if="!reportHome" class="el-icon-arrow-left report-return didi-hover" @click="reportReturn" />
 
@@ -16,7 +17,7 @@
           <el-col :span="5" class="creator">创建人</el-col>
         </el-row>
 
-        <div ref="refName" style="max-height: 260px; overflow:scroll; overflow-x: hidden; margin: 15px 0;">
+        <div ref="refName" style="margin: 15px 0;">
           <el-row v-for="(item, index) in selectTemplate" :key="index" type="flex" justify="center" @mouseover.native="item.operation = true" @mouseleave.native="item.operation = false">
             <el-col :span="19">
               <el-radio v-model="fromData.radio" class="creatorList" :label="item.id">{{ item.moduleName }}</el-radio>
@@ -72,7 +73,7 @@
       <el-button v-if="dailyPreview" size="small" type="primary" :loading="loading" @click="sendReport">发送</el-button>
     </div>
 
-  </el-dialog>
+  </modal>
 </template>
 
 <script>
@@ -81,11 +82,12 @@ import '@/styles/PublicStyle/index.scss'
 import { settingQueryReportModuleList, settingDeleteReportModule, reportreleaseGetReportById } from '@/api/reportTemplate'
 import newReleaeTemplate from '@/views/reportManagement/ReleaseReport/newReleaeTemplate.vue'
 import releaePreview from '@/views/reportManagement/ReleaseReport/releaePreview.vue'
-
+import modal from '@/components/modal'
 export default {
   components: {
     releaePreview,
-    newReleaeTemplate
+    newReleaeTemplate,
+    modal
   },
   data() {
     return {
@@ -362,11 +364,11 @@ export default {
   color:rgba(51,51,51,1);
   opacity:1;
 }
-.daily {
-   max-height: 460px;
-   overflow:scroll;
-   overflow-x: hidden
-}
+// .daily {
+//    max-height: 460px;
+//    overflow:scroll;
+//    overflow-x: hidden
+// }
 
 .blur-column {
   width:4px;

+ 12 - 10
src/views/reportManagement/components/TestingReport.vue

@@ -1,5 +1,6 @@
 <template>
-  <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task report-dialog" :title="reportHome ? '提测报告' : `${tipName}提测报告模版`" :close-on-click-modal="false" :destroy-on-close="true" :before-close="handleClose">
+  <!-- <el-dialog :visible.sync="dialogDaliy" width="70vw" class="public_task report-dialog" :title="reportHome ? '提测报告' : `${tipName}提测报告模版`" :close-on-click-modal="false" :destroy-on-close="true" :before-close="handleClose"> -->
+  <modal :visible="dialogDaliy" :title="reportHome ? '提测报告' : `${tipName}提测报告模版`" :showline="reportHome" @close="handleClose">
     <div v-if="reportHome" class="blueStripe" />
     <i v-if="!reportHome" class="el-icon-arrow-left report-return didi-hover" @click="reportReturn" />
 
@@ -16,7 +17,7 @@
           <el-col :span="5" class="creator">创建人</el-col>
         </el-row>
 
-        <div ref="refName" style="max-height: 260px; overflow:scroll; overflow-x: hidden; margin: 15px 0;">
+        <div ref="refName" style="margin: 15px 0;">
           <el-row v-for="(item, index) in selectTemplate" :key="index" type="flex" justify="center" @mouseover.native="item.operation = true" @mouseleave.native="item.operation = false">
             <el-col :span="19">
               <el-radio v-model="fromData.radio" class="creatorList" :label="item.id">{{ item.moduleName }}</el-radio>
@@ -72,7 +73,7 @@
       <el-button v-if="dailyPreview" size="small" type="primary" :loading="loading" @click="sendReport">发送</el-button>
     </div>
 
-  </el-dialog>
+  </modal>
 </template>
 
 <script>
@@ -81,11 +82,12 @@ import '@/styles/PublicStyle/index.scss'
 import { settingQueryReportModuleList, settingDeleteReportModule, reportdelivertestGetReportById } from '@/api/reportTemplate'
 import newTestingTemplate from '@/views/reportManagement/Testing/newTestingTemplate.vue'
 import TestingPreview from '@/views/reportManagement/Testing/TestingPreview.vue'
-
+import modal from '@/components/modal'
 export default {
   components: {
     newTestingTemplate,
-    TestingPreview
+    TestingPreview,
+    modal
   },
   data() {
     return {
@@ -381,11 +383,11 @@ export default {
   color:rgba(51,51,51,1);
   opacity:1;
 }
-.daily {
-   max-height: 460px;
-   overflow:scroll;
-   overflow-x: hidden
-}
+// .daily {
+//    max-height: 460px;
+//    overflow:scroll;
+//    overflow-x: hidden
+// }
 
 .blur-column {
   width:4px;

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

@@ -31,7 +31,7 @@
           id="report-template-4"
           :value.sync="fromCreateData.content"
           :height="500"
-          :full-position-style="{ top:'20px',left:'14.5%', right: '15.5%' }"
+          :full-position-style="{ top:'20px',left:'15%', right: '15%' }"
         />
       </el-form-item>
     </el-form>

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

@@ -14,7 +14,7 @@
           id="report-template-3"
           :value.sync="fromCreateData.content"
           :height="500"
-          :full-position-style="{ top:'20px',left:'14.5%', right: '15.5%' }"
+          :full-position-style="{ top:'20px',left:'15%', right: '15%' }"
         />
       </el-form-item>
     </el-form>

+ 1 - 0
src/views/reportManagement/testPresentation.vue

@@ -447,6 +447,7 @@ export default {
           if (res.code === 200) {
             this.centerDialogVisible = false
             this.dialogDaily = true
+            console.log(1111)
             this.$nextTick(() => {
               this.$refs.DailyReport.init(7, [vel])
             })