Quellcode durchsuchen

申诉、驳回原因查看窗口适配

liyanyan vor 6 Tagen
Ursprung
Commit
8a029bae28
1 geänderte Dateien mit 20 neuen und 3 gelöschten Zeilen
  1. 20 3
      src/components/appealModal/index.vue

+ 20 - 3
src/components/appealModal/index.vue

@@ -1,6 +1,5 @@
 <template>
 <template>
-    <el-dialog :visible.sync="dialogVisible" custom-class="my-dialog" :modal="false" :title="getDialogTitle()"
-        width="40%">
+    <el-dialog :visible.sync="dialogVisible" class="custom-dialog" :modal="false" :title="getDialogTitle()" :width="dialogWidth">
         <div class="medical-record" style="margin-top: 30px">
         <div class="medical-record" style="margin-top: 30px">
             <el-descriptions>
             <el-descriptions>
                 <el-descriptions-item label="病案号">{{ baseInfo.AAA28 }}</el-descriptions-item>
                 <el-descriptions-item label="病案号">{{ baseInfo.AAA28 }}</el-descriptions-item>
@@ -63,6 +62,7 @@ export default {
       },
       },
       qualityType: '',
       qualityType: '',
       baseInfo: {},
       baseInfo: {},
+      dialogWidth: '50%' // 默认宽度
     };
     };
   },
   },
   computed: {},
   computed: {},
@@ -72,9 +72,18 @@ export default {
   mounted() {
   mounted() {
     const { ZYH, id } = this.$route.query
     const { ZYH, id } = this.$route.query
     this.MEDRECID = this.$route.path === '/whitelist-caseControl' || this.$route.path === '/whitelist-qualityResults'? id : ZYH;
     this.MEDRECID = this.$route.path === '/whitelist-caseControl' || this.$route.path === '/whitelist-qualityResults'? id : ZYH;
+    this.setDialogWidth();
+    window.addEventListener('resize', this.setDialogWidth);
+  },
+  beforeDestroy() {
+    window.removeEventListener('resize', this.setDialogWidth);
   },
   },
 
 
   methods: {
   methods: {
+    setDialogWidth() {
+      const width = window.innerWidth < 768 ? '80%' : '50%'; // 根据屏幕宽度调整宽度
+      this.dialogWidth = width;
+    },
     getDialogTitle() {
     getDialogTitle() {
       if(this.dialogType === 'appeal') {
       if(this.dialogType === 'appeal') {
         return '申诉'
         return '申诉'
@@ -223,10 +232,18 @@ export default {
 ::v-deep .el-dialog__title {
 ::v-deep .el-dialog__title {
   color: #fff;
   color: #fff;
 }
 }
-
+::v-deep .el-descriptions-row {
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: space-between;
+}
 ::v-deep .el-descriptions-item__label {
 ::v-deep .el-descriptions-item__label {
   font-weight: bold;
   font-weight: bold;
   font-size: 15px;
   font-size: 15px;
+  white-space: nowrap;
+}
+::v-deep .el-descriptions-item__content {
+  white-space: nowrap;
 }
 }
 
 
 </style>
 </style>