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

Merge branch 'http_mock' into qinzhipeng

qinzhipeng_v 5 жил өмнө
parent
commit
e8b0fa55ac

+ 12 - 1
src/components/dialog/normalDialog.vue

@@ -6,12 +6,13 @@
       :width="width"
       :modal-append-to-body="false"
       :close-on-click-modal="false"
+      :top="top"
       @close="cancel()"
     >
       <slot />
       <span slot="footer" class="dialog-footer">
         <el-button @click="cancel()">取 消</el-button>
-        <el-button type="primary" @click="confirm()">确 定</el-button>
+        <el-button type="primary" @click="confirm()">{{ submitButton }}</el-button>
       </span>
     </el-dialog>
   </div>
@@ -19,6 +20,11 @@
 <script>
 export default {
   props: {
+    top: {
+      type: String,
+      default: '15vh',
+      required: false
+    },
     title: {
       type: String,
       default: '',
@@ -33,6 +39,11 @@ export default {
       type: Boolean,
       default: false,
       required: true
+    },
+    submitButton: {// 提交按钮名字
+      type: String,
+      default: '确 定',
+      required: false
     }
   },
   data() {

+ 26 - 13
src/views/projectManage/bugList/details/index.vue

@@ -590,21 +590,25 @@
       <createdBug v-if="modalShow" ref="createdBug" @father="father" />
       <normal-dialog
         :show-dialog="showCopyFile"
-        :title="'复制信息'"
-        :width="'35%'"
+        :title="'上传截图'"
+        :width="'50%'"
+        :submit-button="'上传'"
+        :top="'5vh'"
         @confirm="confirmUpload()"
         @cancel="showCopyFile=false"
       >
         <div class="file-dialog">
-          <el-form ref="form" label-width="80px">
-            <el-form-item label="图片名">
-              <el-col :span="20">
+          <el-form ref="form" label-width="20%">
+            <el-form-item label="图片名">
+              <el-col style="width: 75%">
                 <el-input v-model="imageName" />
               </el-col>
-              <el-col :span="4">.png</el-col>
+              <el-col style="width: 10%">.png</el-col>
             </el-form-item>
           </el-form>
-          <img :src="imageUrl" class="image-url">
+          <div class="image">
+            <img :src="imageUrl" class="image-url">
+          </div>
         </div>
       </normal-dialog>
     </el-container>
@@ -1527,12 +1531,21 @@ export default {
   flex-direction: column;
   align-items: center;
   .el-form {
-    width: 80%;
+    width: 100%;
+  }
+  .image {
+    position: relative;
+    width: 61%;
+    padding-top: 60%;
+    border:1px solid #409EFF;
+    .image-url {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%,-50%);
+      width: 100%;
+      max-height: 100%;
+    }
   }
-}
-.image-url {
-  width: 90%;
-  max-height: 60vh;
-  border:1px solid #EBEEF5;
 }
 </style>

+ 26 - 13
src/views/projectManage/bugList/file/createdBug.vue

@@ -174,21 +174,25 @@
     </el-dialog>
     <normal-dialog
       :show-dialog="showCopyFile"
-      :title="'复制信息'"
-      :width="'35%'"
+      :title="'上传截图'"
+      :width="'50%'"
+      :submit-button="'上传'"
+      :top="'5vh'"
       @confirm="confirmUpload()"
       @cancel="showCopyFile=false"
     >
       <div class="file-dialog">
-        <el-form ref="form" label-width="80px">
-          <el-form-item label="图片名">
-            <el-col :span="20">
+        <el-form ref="form" label-width="20%">
+          <el-form-item label="图片名">
+            <el-col style="width: 75%">
               <el-input v-model="imageName" />
             </el-col>
-            <el-col :span="4">.png</el-col>
+            <el-col style="width: 10%">.png</el-col>
           </el-form-item>
         </el-form>
-        <img :src="imageUrl" class="image-url">
+        <div class="image">
+          <img :src="imageUrl" class="image-url">
+        </div>
       </div>
     </normal-dialog>
     <el-dialog title="附件预览" :modal-append-to-body="false" :visible.sync="dialogVisible">
@@ -589,12 +593,21 @@ export default {
   flex-direction: column;
   align-items: center;
   .el-form {
-    width: 80%;
+    width: 100%;
+  }
+  .image {
+    position: relative;
+    width: 61%;
+    padding-top: 60%;
+    border:1px solid #409EFF;
+    .image-url {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%,-50%);
+      width: 100%;
+      max-height: 100%;
+    }
   }
-}
-.image-url {
-  width: 90%;
-  max-height: 60vh;
-  border:1px solid #EBEEF5;
 }
 </style>