dedsudiyu 2 years ago
parent
commit
1dfa11666d

+ 16 - 36
src/App.vue

@@ -1,41 +1,26 @@
 <template>
 <template>
-  <!--<dv-full-screen-container style="display: flex;flex-direction: column;height:1080px;width:1920px;">-->
-  <div id="app">
-    <router-view />
-  </div>
+  <!--<dv-full-screen-container style="display: flex;flex-direction: column;flex:1;">-->
+    <div id="app">
+      <router-view />
+    </div>
   <!--</dv-full-screen-container>-->
   <!--</dv-full-screen-container>-->
 </template>
 </template>
 
 
 <script>
 <script>
+  import DevicePixelRatio from '@/utils/devicePixelRatio'
   export default  {
   export default  {
     name:  'App',
     name:  'App',
-    data() {
-      return {
-        windowHeight:"",
-        desktopHeight:"",
-        desktopWidth:"",
-      }
-    },
     metaInfo() {
     metaInfo() {
-      return {
-        title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
-        titleTemplate: title => {
-          return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
-        },
-      }
-    },
-    mounted(){
-      document.getElementById('app').style.transform = `scale(${document.body.clientWidth / 1920})`;
-      document.getElementById('app').style.height = (window.innerHeight/(document.body.clientWidth / 1920*100))*100+'px';
-      // console.log("document.getElementById('app').style.height",document.getElementById('app').style.height)
-      window.onresize = () => {
-        return (() => {
-          document.getElementById('app').style.transform = `scale(${document.body.clientWidth / 1920})`;
-          document.getElementById('app').style.height = (window.innerHeight/(document.body.clientWidth / 1920*100))*100+'px';
-          // console.log("document.getElementById('app').style.height",document.getElementById('app').style.height)
-        })();
-      };
+        return {
+            title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
+            titleTemplate: title => {
+                return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
+            }
+        }
     },
     },
+    created() {
+      new DevicePixelRatio().init()
+    }
   }
   }
 </script>
 </script>
 <style>
 <style>
@@ -43,14 +28,9 @@
     margin:0;
     margin:0;
     height:100%;
     height:100%;
     width:100%;
     width:100%;
-    overflow: hidden;
   }
   }
   #app{
   #app{
-    /*height:1080px;*/
-    width:1920px;
-    transform-origin: left top;
-    display: flex;
-    flex-direction: column;
-    flex:1;
+    height:100%!important;
+    width:100%!important;
   }
   }
 </style>
 </style>

+ 3 - 3
src/views/home.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div class="home" :class="userType != 22&&initPage == 'true' ? 'home-class' : ''">
   <div class="home" :class="userType != 22&&initPage == 'true' ? 'home-class' : ''">
     <!--<div class="button-max-box" v-if="userType != '22'">-->
     <!--<div class="button-max-box" v-if="userType != '22'">-->
-    <!--<dv-full-screen-container v-if="userType != '22'&&initPage == 'true'" style="display: flex;flex-direction: column;flex:1;">-->
+    <dv-full-screen-container v-if="userType != '22'&&initPage == 'true'" style="display: flex;flex-direction: column;flex:1;">
       <home-navbar />
       <home-navbar />
       <div class="max-big-home-box">
       <div class="max-big-home-box">
         <div class="max-home-button-box">
         <div class="max-home-button-box">
@@ -162,8 +162,8 @@
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
-      <!--<div class="bottom-null-box"></div>-->
-    <!--</dv-full-screen-container>-->
+      <div class="bottom-null-box"></div>
+    </dv-full-screen-container>
     <backAnimation v-if="userType != '22'&&initPage == 'true'"></backAnimation>
     <backAnimation v-if="userType != '22'&&initPage == 'true'"></backAnimation>
   </div>
   </div>
 </template>
 </template>

+ 8 - 0
src/views/medicUniversity-3_1/chemicalManagement/deviceManagement/smartAlarm/index.vue

@@ -157,6 +157,9 @@
     <!--新增/编辑-->
     <!--新增/编辑-->
     <el-dialog :title="dialogTitle" :visible.sync="addDialogType" v-if="addDialogType" width="550px" append-to-body class="add-dialog-box">
     <el-dialog :title="dialogTitle" :visible.sync="addDialogType" v-if="addDialogType" width="550px" append-to-body class="add-dialog-box">
       <el-form ref="form" :model="form" :rules="rules" label-width="140px">
       <el-form ref="form" :model="form" :rules="rules" label-width="140px">
+        <el-form-item label="智能报警器名称:" prop="name">
+          <el-input v-model="form.name" placeholder="请输入智能报警器名称" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" maxlength="30" style="width:360px;"/>
+        </el-form-item>
         <el-form-item label="智能报警器编号:" prop="hardwareNum">
         <el-form-item label="智能报警器编号:" prop="hardwareNum">
           <el-input v-model="form.hardwareNum" placeholder="最大20个字符,包含大小写字母、数字" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" maxlength="30" style="width:360px;"/>
           <el-input v-model="form.hardwareNum" placeholder="最大20个字符,包含大小写字母、数字" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" maxlength="30" style="width:360px;"/>
         </el-form-item>
         </el-form-item>
@@ -331,6 +334,10 @@
         selectListData:[],
         selectListData:[],
         relayNum: "",
         relayNum: "",
         rules:{
         rules:{
+          name: [
+            { required: true, message: "请输入智能报警器名称", trigger: "blur" },
+            { required: true, message: "请输入智能报警器名称", validator: this.spaceJudgment, trigger: "blur" }
+          ],
           hardwareNum: [
           hardwareNum: [
             { required: true, trigger: "blur", message: "最大20个字符,包含大小写字母、数字" },
             { required: true, trigger: "blur", message: "最大20个字符,包含大小写字母、数字" },
             { required: true, message: "最大20个字符,包含大小写字母、数字", validator: this.spaceJudgment, trigger: "blur" }
             { required: true, message: "最大20个字符,包含大小写字母、数字", validator: this.spaceJudgment, trigger: "blur" }
@@ -467,6 +474,7 @@
           // 编辑
           // 编辑
           this.dialogTitle = '编辑';
           this.dialogTitle = '编辑';
           let obj = {
           let obj = {
+            name:item.name,
             id:item.id,
             id:item.id,
             subjectId:item.subjectId,
             subjectId:item.subjectId,
             hardwareNum:item.hardwareNum,
             hardwareNum:item.hardwareNum,