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

是否ios系统判断样式问题解决

cz 1 жил өмнө
parent
commit
9a822586f1

+ 1 - 1
src/store/device.js

@@ -5,7 +5,7 @@ const useDeviceStore = defineStore(
   'device', {
     state: () => ({
       deviceId: '', //极光推送注册的设备id
-
+      isIosSysteme: false
     }),
     actions: {}
   })

+ 14 - 10
src/views/main.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="main" id="main">
+  <div class="main" id="main" :style="{paddingBottom:isIosSysteme?'65px':'50px'}">
     <!-- <KeepAlive>
 			<router-view />
     	</KeepAlive> -->
@@ -10,26 +10,26 @@
     </router-view>
 
   </div>
-  <van-tabbar v-model="tabType" v-if="routerName != '/main/processDtl'" :style="isIos() ? 'height:65px' : ''">
-    <van-tabbar-item to="/main/message" :badge="msgCount" :style="isIos() ? 'padding-bottom:15px' : ''">
+  <van-tabbar v-model="tabType" v-if="routerName != '/main/processDtl'" :style="isIosSysteme ? 'height:65px' : ''">
+    <van-tabbar-item to="/main/message" :badge="msgCount" :style="isIosSysteme ? 'padding-bottom:15px' : ''">
       {{$t('common.message')}}
       <template #icon="props">
         <i class="icon iconfont icon-btn_shengc_gray1 footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
       </template>
     </van-tabbar-item>
-    <van-tabbar-item to="/main/working" :style="isIos() ? 'padding-bottom:15px' : ''">
+    <van-tabbar-item to="/main/working" :style="isIosSysteme? 'padding-bottom:15px' : ''">
       {{$t('common.workbench')}}
       <template #icon="props">
         <i class="icon iconfont icon-btn_gongz footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
       </template>
     </van-tabbar-item>
-    <van-tabbar-item :style="isIos() ? 'padding-bottom:15px' : ''"
+    <!-- <van-tabbar-item :style="isIosSysteme? 'padding-bottom:15px' : ''"
                      :to="tenantId == 'smt' ? '/main/xiamenList' : '/main/equipment'">{{$t('common.things')}}
       <template #icon="props">
         <i class="icon iconfont icon-btn_wulw footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
       </template>
-    </van-tabbar-item>
-    <van-tabbar-item icon="setting-o" to="/main/home" :style="isIos() ? 'padding-bottom:15px' : ''">
+    </van-tabbar-item> -->
+    <van-tabbar-item icon="setting-o" to="/main/home" :style="isIosSysteme ? 'padding-bottom:15px' : ''">
       {{$t('common.mine')}}
       <template #icon="props">
         <i class="icon iconfont icon-btn_mine footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
@@ -48,6 +48,8 @@ import "vant/lib/index.css";
 import axios from "axios";
 import { uploadDdRightBtn } from "@/utils/ddAdapter";
 import { showDialog, showNotify } from "vant";
+import useDeviceStore from "@/store/device";
+const deviceStore = useDeviceStore();
 const tenantId = getUserInfo().tenantId;
 const proxy = getCurrentInstance().proxy;
 const tabType = ref("home");
@@ -114,11 +116,13 @@ const socketInit = () => {
 socketInit();
 
 //判断是否是ios系统
+const isIosSysteme = ref(false);
 const isIos = () => {
   const u = navigator.userAgent;
-  const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
-  return isIOS;
+  isIosSysteme.value = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
+  deviceStore.isIosSysteme = isIosSysteme.value;
 };
+isIos();
 
 //判断是否为开发环境.如果是开发环境,则同步前后台中文配置表
 // const isDev = process.env.NODE_ENV === 'development'
@@ -176,7 +180,7 @@ watch(router.currentRoute, (to, from) => {
   left: 0;
   right: 0;
   bottom: 0;
-  padding-bottom: 65px;
+  // padding-bottom: 50px;
   overflow-y: auto;
   z-index: 1000;
 }

+ 4 - 2
src/views/message/index.vue

@@ -148,8 +148,10 @@ proxy
   })
   .then((res) => {
     announcementData.value = res.data;
-    announcementTime = timesFun(res.data.rows[0].createTime).timesString;
-    //计算a距离现在的时间
+    if (res.data.rows && res.data.rows.length > 0) {
+      announcementTime = timesFun(res.data.rows[0].createTime).timesString;
+      //计算a距离现在的时间
+    }
   });
 
 const toRouter = (routerName) => {

+ 8 - 10
src/views/purchase-sales/inbound-outbound/waitInbound/add.vue

@@ -28,21 +28,18 @@
           <thead>
             <tr>
               <th style="width:46%;text-align:left;">物品信息</th>
-              <th style="width:13%">采购
-                <br>数量
+              <th style="width:13%">采购<div style="width:0px;height:0px"></div>数量
               </th>
-              <th style="width:13%">本次
-                <br>发货
+              <th style="width:13%">本次<div style="width:0px;height:0px"></div>发货
               </th>
               <th style="width:15%">已入库</th>
-              <th style="width:13%">累计
-                <br>
-                清点
+              <th style="width:13%">累计<div style="width:0px;height:0px"></div>清点
               </th>
             </tr>
           </thead>
         </table>
-        <div style="height:calc(100vh - 300px);overflow-y:auto">
+        <div style="height:calc(100vh - 280px);overflow-y:auto"
+             :style="{height:!deviceStore.isIosSysteme?'calc(100vh - 280px)':'calc(100vh - 300px)'}">
           <table class="table" v-if="!keyword">
             <tbody>
               <template v-for="(row,index) in formData.stockWaitDetailsList" :key="row.id">
@@ -185,7 +182,7 @@
         </div>
       </van-cell-group>
 
-      <div style="margin: 5px">
+      <div style="margin-top: 5px">
         <van-button round block type="primary" native-type="submit" style="height:30px">
           {{$t('common.submit')}}
         </van-button>
@@ -200,7 +197,8 @@ import { ref, getCurrentInstance, onMounted } from "vue";
 import { showSuccessToast, showFailToast } from "vant";
 import { useRoute } from "vue-router";
 import { parseTime } from "@/utils/ruoyi";
-
+import useDeviceStore from "@/store/device";
+const deviceStore = useDeviceStore();
 const proxy = getCurrentInstance().proxy;
 const active = ref(0);
 const route = useRoute();

+ 2 - 3
src/views/purchase-sales/inbound-outbound/waitInbound/index.vue

@@ -6,7 +6,7 @@
   <van-pull-refresh v-model="loading" @refresh="onRefresh">
     <div class="list">
       <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="onLoad" style="margin-bottom: 60px">
-        <commonList :data="listData" @onClick="toDtl" :config="listConfig" :showMore="false">
+        <commonList :data="listData" :config="listConfig" :showMore="false">
           <template #businessType="{row}">
             <div style="width:100%">
               {{dictValueLabel(row.businessType,businessType)}}
@@ -22,7 +22,6 @@
 
           <template #status="{row}">
             <div style="width:100%">
-
               <span :class="{'aa':row.status=='1'}"> {{dictValueLabel(row.status,statusData)}}</span>
             </div>
           </template>
@@ -70,7 +69,7 @@ const listConfig = ref([
   {
     type: "slot",
     slotName: "logistics",
-    label: "物流/快递信息",
+    label: "物流信息",
   },
   {
     label: "仓库名称",

+ 5 - 2
src/views/purchase-sales/inbound-outbound/waitInbound/manyGoods.vue

@@ -35,8 +35,9 @@
             </tr>
           </thead>
         </table>
-        <!-- style="height:calc(100vh - 495px);overflow-y:auto" -->
-        <div>
+
+        <div style="height:calc(100vh - 445px);overflow-y:auto"
+             :style="{height:!deviceStore.isIosSysteme?'calc(100vh - 445px)':'calc(100vh - 465px)'}">
           <table class="table">
             <tbody>
               <template v-for="(row,index) in formData.productList" :key="row.id">
@@ -129,6 +130,8 @@ import { parseTime } from "@/utils/ruoyi";
 import useSelectGoodStore from "@/store/manyGood";
 const selectGoodStore = useSelectGoodStore();
 import $bus from "@/bus/index.js";
+import useDeviceStore from "@/store/device";
+const deviceStore = useDeviceStore();
 
 const proxy = getCurrentInstance().proxy;
 const active = ref(0);

+ 4 - 2
src/views/purchase-sales/inventory-management/Inventory/index.vue

@@ -24,7 +24,8 @@
       </thead>
     </table>
   </div>
-  <div style="overflow-y:auto" :style="{height:active!='three'?'calc(100vh - 275px)':'calc(100vh - 210px)'}">
+  <div style="overflow-y:auto"
+       :style="{height:active!='three'? !deviceStore.isIosSysteme?'calc(100vh - 258px)':'calc(100vh - 278px)':!deviceStore.isIosSysteme?'calc(100vh - 194px)':'calc(100vh - 214px)'}">
     <van-pull-refresh v-model="loading" @refresh="onRefresh">
       <div class="list">
         <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="getList" style="margin-bottom: 60px">
@@ -116,7 +117,8 @@ import { ref, getCurrentInstance } from "vue";
 import commonList from "@/components/common-list.vue";
 import { showSuccessToast, showFailToast } from "vant";
 import { parseTime } from "@/utils/ruoyi";
-
+import useDeviceStore from "@/store/device";
+const deviceStore = useDeviceStore();
 const proxy = getCurrentInstance().proxy;
 const onClickLeft = () => proxy.$router.push("/main/working");
 const req = ref({