kevin_zhangl hace 2 años
padre
commit
24cf6ae8dc

+ 4 - 2
src/utils/index.js

@@ -400,7 +400,8 @@ export function getMedia() {
  * @returns {number}
  */
 export function getScreenWidth() {
-  return window.screen.width
+  // return window.screen.width // 当前屏幕宽度(分辨率值)
+  return window.document.body.offsetWidth  // 返回当前网页宽度
 }
 
 /**
@@ -408,7 +409,8 @@ export function getScreenWidth() {
  * @returns {number}
  */
 export function getScreenHeight() {
-  return window.screen.height
+  // return window.screen.height  // 当前屏幕高度(分辨率值)
+  return window.document.body.offsetHeight  // 返回当前网页高度
 }
 
 /**

+ 8 - 7
src/views/admin/index.vue

@@ -121,7 +121,7 @@ import FilterUser from '@/components/FilterUser'
 import permission from '@/utils/permission'
 import Pagination from '@/components/Pagination'
 import filterHelper from '@/utils/filterHelper'
-import {getOperatingSystem} from "@/utils"
+import {getOperatingSystem, getScreenWidth} from "@/utils"
 
 export default {
   name: 'DecLevel',
@@ -159,12 +159,13 @@ export default {
   },
   mounted() {
     this.getData()
-    let system =  getOperatingSystem()
-    if (system == "Android" || system == 'ios') {
-      this.fixedColumn = false
-    } else {
-      this.fixedColumn = 'right'
-    }
+    // let system =  getOperatingSystem()
+    // if (system == "Android" || system == 'ios') {
+    //   this.fixedColumn = false
+    // } else {
+    //   this.fixedColumn = 'right'
+    // }
+		this.fixedColumn = getScreenWidth() < 500 ? false : 'right'
   },
   methods: {
     checkSelectable(row) {

+ 8 - 7
src/views/admin/role.vue

@@ -75,7 +75,7 @@ import FilterUser from '@/components/FilterUser'
 import permission from '@/utils/permission'
 import Pagination from '@/components/Pagination'
 import filterHelper from '@/utils/filterHelper'
-import {getOperatingSystem} from "@/utils"
+import {getOperatingSystem, getScreenWidth} from "@/utils"
 
 export default {
   name: 'Role',
@@ -109,12 +109,13 @@ export default {
   },
   mounted() {
     this.getData()
-    let system =  getOperatingSystem()
-    if (system == "Android" || system == 'ios') {
-      this.fixedColumn = false
-    } else {
-      this.fixedColumn = 'right'
-    }
+    // let system =  getOperatingSystem()
+    // if (system == "Android" || system == 'ios') {
+    //   this.fixedColumn = false
+    // } else {
+    //   this.fixedColumn = 'right'
+    // }
+		this.fixedColumn = getScreenWidth() < 500 ? false : 'right'
   },
   methods: {
     handleSelectionChange(val) {

+ 4 - 2
src/views/bonus/period.vue

@@ -65,7 +65,7 @@
             <!-- 完成 -->{{ $t('bonus.complete') }}:{{getWatTime(scope.row.SENT_AT)}}
           </template>
         </el-table-column>
-        <el-table-column fixed="right" :label="$t('common.action')" width=""><!-- 操作 -->
+        <el-table-column :fixed="fixed" :label="$t('common.action')" width=""><!-- 操作 -->
           <template slot-scope="scope">
 <!--            <el-button v-if="scope.row.IS_CAN_CLOSE && permission.hasPermission(`bonus/close-period`)" class="button" type="primary"-->
 <!--                       @click.native="trialCalcHandle(scope.row.PERIOD_NUM)" >-->
@@ -170,6 +170,7 @@ import Pagination from '@/components/Pagination'
 import filterHelper from '../../utils/filterHelper'
 import { fetchPeriod,fetchAutoWithdraw,fetchRecordList,fetchAutoCalc,fetchPerfOrderList,fetchInitData,fetchCalcPerfPeriod,fetchPullPerfPeriod,fetchCalcBonus,fetchSyncCalcRecord,fetchPullBonus,fetchClosePeriod,fetchCalcPeriod,fetchPerfPeriod,fetchSendPeriod } from '@/api/bonus'
 import ElementUI from 'element-ui'
+import {getScreenWidth} from "@/utils";
 
 export default {
   name: 'bonus-period',
@@ -241,7 +242,8 @@ export default {
         resource: '',
         desc: ''
       },
-      formLabelWidth: '120px'
+      formLabelWidth: '120px',
+			fixed: getScreenWidth() < 500 ? false : 'right',
     };
 
   },

+ 14 - 15
src/views/finance/balance-audit-list.vue

@@ -148,17 +148,17 @@
       </div>
     </div>
   </template>
-  
+
   <script>
     import tool from '@/utils/tool'
-    import {getOperatingSystem} from "@/utils"
+		import {getOperatingSystem, getScreenWidth} from "@/utils"
     import FilterUser from '@/components/FilterUser'
     import baseInfo from '@/utils/baseInfo'
     import permission from '@/utils/permission'
     import Pagination from '@/components/Pagination'
     import filterHelper from '@/utils/filterHelper'
     import { getChangeBalanceType, balanceAuditList, balanceAuditListExport, balanceAuditDelete, multPoint, balanceAudit, balanceAuditGet, balanceAuditPass } from '@/api/finance'
-  
+
     export default {
       name: 'leo-balance-audit-table',
       components: {FilterUser,Pagination},
@@ -168,13 +168,13 @@
           this.dealTypes = response.data.dealTypes
           this.getData()
         })
-        let system =  getOperatingSystem()
-        if (system == "Android" || system == 'ios') {
-          this.fixedColumn = false
-        } else {
-          this.fixedColumn = 'right'
-        }
-        
+        // let system =  getOperatingSystem()
+        // if (system == "Android" || system == 'ios') {
+        //   this.fixedColumn = false
+        // } else {
+        //   this.fixedColumn = 'right'
+        // }
+				this.fixedColumn = getScreenWidth() < 500 ? false : 'right'
       },
       data() {
         return {
@@ -332,7 +332,7 @@
         },
         // 审核拒绝
         handleAudit(row = null, status, minus = false) {
-          let obj = this  
+          let obj = this
           let title = this.$t('financial.handleAuditDefaultNotice')  //确定要通过审核(会员账户不允许为负数)?备注:
           if (status === 'reject') {
             title = this.$t('financial.handleAuditRejectNotice') //确定要拒绝审核?备注
@@ -403,8 +403,8 @@
                 message: err,
                 type: 'error'
               })
-            })  
-            
+            })
+
           })
         },
         handleSelectionChange(val) {
@@ -467,7 +467,7 @@
       }
     }
   </script>
-  
+
   <style scoped>
   /deep/ .form-dialog .el-input {
     width:100% !important;
@@ -476,4 +476,3 @@
     width:100% !important;
   }
   </style>
-  

+ 16 - 16
src/views/finance/withdraw.vue

@@ -89,7 +89,7 @@
           </el-table-column>
         </el-table>
         <div class="white-box-footer">
-  
+
           <el-dropdown size="small" trigger="click" @command="handleMuli"
                        v-if="filterStatus!=='-1' && filterStatus!=='6' && filterStatus!=='7' && (permission.hasPermission(`finance/withdraw-status`))">
             <el-button type="primary" size="small">
@@ -113,7 +113,7 @@
   <!--            <el-dropdown-item command="3">Batch set to be paid</el-dropdown-item>&lt;!&ndash; 批量设为待付款 &ndash;&gt;-->
   <!--          </el-dropdown-menu>-->
           </el-dropdown>
-  
+
           <el-button type="success" size="small" @click="handleExport"
                      v-show="permission.hasPermission(`finance/transfer-list-export`)">{{ $t('common.exportExcel') }}
           </el-button>
@@ -197,7 +197,7 @@
       </div>
     </div>
   </template>
-  
+
   <script>
   import permission from '@/utils/permission'
   import { withdrawList, withdrawExport, multPoint, postWithdrawStatus } from '@/api/finance'
@@ -206,19 +206,19 @@
   import baseInfo from '@/utils/baseInfo'
   import Pagination from '@/components/Pagination'
   import filterHelper from '@/utils/filterHelper'
-  import {getOperatingSystem} from "@/utils"
+	import {getOperatingSystem, getScreenWidth} from "@/utils"
 
   export default {
     name: 'finance_withdraw',
     components: {FilterUser, Pagination},
-  
+
     data () {
       return {
         fixedColumn:false, // 固定,当手机端不固定,pc固定
         activeName: 'all',
         tableHeaders: null,
         baseDecLevels: baseInfo.decLevels(),
-  
+
         allData: null,
         tableData: null,
         loading: true,
@@ -298,12 +298,13 @@
     },
     mounted () {
       this.getData()
-      let system =  getOperatingSystem()
-      if (system == "Android" || system == 'ios') {
-        this.fixedColumn = false
-      } else {
-        this.fixedColumn = 'right'
-      }
+			this.fixedColumn = getScreenWidth() < 500 ? false : 'right'
+      // let system =  getOperatingSystem()
+      // if (system == "Android" || system == 'ios') {
+      //   this.fixedColumn = false
+      // } else {
+      //   this.fixedColumn = 'right'
+      // }
       // if (permission.hasPermission(`finance/withdraw-7`)) {
       //   this.activeName = 'seven'
       // }
@@ -329,7 +330,7 @@
       //   this.activeName = 'all'
       // }
     },
-  
+
     methods: {
       handleMuli (command) {
         if (this.multipleSelection.length < 1) {
@@ -552,11 +553,10 @@
     }
   }
   </script>
-  
+
   <style scoped>
   /deep/ .el-date-editor.el-input {
     width:100% !important;
   }
- 
+
   </style>
-  

+ 22 - 22
src/views/shop/index.vue

@@ -41,7 +41,7 @@
             </template></el-table-column>-->
         </el-table>
         <div class="white-box-footer">
-  
+
          <!-- <el-dropdown size="small" trigger="click">
               <el-button type="primary" size="small">
                   所选数据<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>
@@ -53,7 +53,7 @@
           <el-button type="primary" size="small" @click="handlestate" icon="el-icon-plus" v-if="permission.hasPermission(`shop/goods-add`)">
             <!-- 商品添加 -->{{ $t('shop.addProduct') }}
           </el-button>
-  
+
           <el-button type="success" size="small" @click="handleExport" v-show="permission.hasPermission(`shop/goods-list-export`)">{{ $t('common.exportExcel') }}</el-button>
           <!-- <el-button-group>
             <el-button type="success" size="mini" @click.native="handleup(scope.row.ID)">上架</el-button>
@@ -138,7 +138,7 @@
             <el-form-item :label="$t('shop.order')"> <!-- 排序 -->
               <el-input v-model="form.sort"></el-input>
             </el-form-item>
-            
+
             <el-form-item :label="$t('shop.uploadImages')"> <!-- 上传图片 -->
               <div class='up_load'>
                 <Upload
@@ -159,9 +159,9 @@
       </el-dialog>
     </div>
   </template>
-  
+
   <script>
-  import {getOperatingSystem} from "@/utils"
+	import {getOperatingSystem, getScreenWidth} from "@/utils"
   import tool from '@/utils/tool'
   import baseInfo from '@/utils/baseInfo'
   import FilterUser from '@/components/FilterUser'
@@ -177,14 +177,15 @@
     mounted () {
       this.getData()
       // this.$refs.up_load.successImageUrl='';
-      let system =  getOperatingSystem()
-      if (system == "Android" || system == 'ios') {
-        this.fixedColumn = false
-      } else {
-        this.fixedColumn = 'right'
-      }
+      // let system =  getOperatingSystem()
+      // if (system == "Android" || system == 'ios') {
+      //   this.fixedColumn = false
+      // } else {
+      //   this.fixedColumn = 'right'
+      // }
+			this.fixedColumn = getScreenWidth() < 500 ? false : 'right'
     },
-  
+
     data () {
       return {
         fixedColumn:false, // 固定,当手机端不固定,pc固定
@@ -321,7 +322,7 @@
             vueObj.form.taxRate = response.data.goodsInfo.TAX_RATE
             vueObj.form.coverOrigin = response.data.goodsInfo.COVER
             vueObj.form.cover = tool.getArImage(response.data.goodsInfo.COVER, '/files/')
-    
+
             this.$forceUpdate()
         }).catch(err => {
 
@@ -340,7 +341,7 @@
         //     }
         // })
         // this.form.sellType=sen_sell;
-  
+
         let sen_gift = []
         this.GiftTypeArr.map((item, index) => {
           if (item.checked) {
@@ -364,7 +365,7 @@
           })
         })
       },
-  
+
       handleDel (id = null) {
         let obj = this
         this.$confirm(this.$t('common.deleteTips'), this.$t('common.hint'), { // '确定删除选定的数据?', '提示'
@@ -447,7 +448,7 @@
             })
         })
       },
-  
+
       handleExport () {
         this.$confirm(this.$t('financial.exportNotice'), this.$t('common.hint'), { // 确定要导出当前数据吗?`, '提示'
           confirmButtonText: this.$t('common.confirm'), // 确定
@@ -485,15 +486,15 @@
       // },
     }
   }
-  
+
   </script>
-  
+
   <style scoped>
       .table-box .el-form-item__label {
           width: 100px;
           color: #99a9bf;
       }
-  
+
       .table-box .el-form-item {
           width: 30%;
           margin-right: 0;
@@ -504,11 +505,10 @@
         text-align: left;
       }
       @media (max-width:862px) {
-        /deep/ img { 
+        /deep/ img {
           width: 100px !important;
           height: 60px !important;
         }
       }
-      
+
   </style>
-  

+ 13 - 13
src/views/shop/order-list.vue

@@ -57,26 +57,27 @@
       </el-dialog>
     </div>
   </template>
-  
+
   <script>
-  import {getOperatingSystem} from "@/utils"
+	import {getOperatingSystem, getScreenWidth} from "@/utils"
   import tool from '@/utils/tool'
   import FilterUser from '@/components/FilterUser'
   import permission from '@/utils/permission'
   import Pagination from '@/components/Pagination'
   import filterHelper from '@/utils/filterHelper'
   import { orderList, orderListExport, orderListExportPdf, deleteOrder } from '@/api/shop'
-  
+
   export default {
     name: 'shop_order-list',
     components: {FilterUser, Pagination},
     mounted () {
-      let system =  getOperatingSystem()
-      if (system == "Android" || system == 'ios') {
-        this.fixedColumn = false
-      } else {
-        this.fixedColumn = 'right'
-      }
+      // let system =  getOperatingSystem()
+      // if (system == "Android" || system == 'ios') {
+      //   this.fixedColumn = false
+      // } else {
+      //   this.fixedColumn = 'right'
+      // }
+			this.fixedColumn = getScreenWidth() < 500 ? false : 'right'
       this.getData()
     },
     data () {
@@ -167,7 +168,7 @@
           })
           return false
         }
-  
+
         // 提取订单ID
         let orderSnList = this.multipleSelection.map((item) => item.SN.value || '')
         // 去重
@@ -179,7 +180,7 @@
           })
           return false
         }
-  
+
         this.$confirm(this.$t('financial.exportNotice'), this.$t('common.hint'), { // `确定要导出当前数据吗?`, '提示'
           confirmButtonText: this.$t('common.confirm'), // 确定
           cancelButtonText: this.$t('common.cancel'), // 取消
@@ -234,7 +235,7 @@
     }
   }
   </script>
-  
+
   <style >
   @media (max-width: 720px) {
   .el-message-box {
@@ -242,4 +243,3 @@
   }
 }
   </style>
-  

+ 4 - 2
src/views/user/member-list.vue

@@ -287,8 +287,10 @@ export default {
 			closeUserData: null,
 			screenWidth: getScreenWidth() > 500 ? '500px' : getScreenWidth() + 'px',
 			labelPosition: getScreenWidth() >= 500 ? 'right' : 'top',
-			leftFixed: ['Android', 'ios'].includes(getOperatingSystem()) ? false : 'left',
-			fixed: ['Android', 'ios'].includes(getOperatingSystem()) ? false : 'right',
+			leftFixed: getScreenWidth() < 500 ? false : 'left',
+			fixed: getScreenWidth() < 500 ? false : 'right',
+			// leftFixed: ['Android', 'ios'].includes(getOperatingSystem()) ? false : 'left',
+			// fixed: ['Android', 'ios'].includes(getOperatingSystem()) ? false : 'right',
 		}
 	},
 	methods: {