diff --git a/.env.development b/.env.development index 447579f..4916245 100644 --- a/.env.development +++ b/.env.development @@ -13,8 +13,8 @@ ENV = 'development' # 苏州市应急执法计划管理系统/开发环境 # VUE_APP_BASE_API = 'http://39.101.188.84:9033' -# VUE_APP_BASE_API = 'http://localhost:9033' -VUE_APP_BASE_API = 'http://180.108.205.123:13002' +VUE_APP_BASE_API = 'http://localhost:9033' +# VUE_APP_BASE_API = 'http://180.108.205.123:13002' # 统一登录-内网 VUE_APP_SSO_LOGIN_N = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code' diff --git a/src/utils/detectZoom.js b/src/utils/detectZoom.js new file mode 100644 index 0000000..b954c2a --- /dev/null +++ b/src/utils/detectZoom.js @@ -0,0 +1,20 @@ +let ratio = 0, + screen = window.screen, + ua = navigator.userAgent.toLowerCase() +if (window.devicePixelRatio !== undefined) { + ratio = window.devicePixelRatio +} else if (~ua.indexOf('msie')) { + if (screen.deviceXDPI && screen.logicalXDPI) { + ratio = screen.deviceXDPI / screen.logicalXDPI + } +} else if (window.outerWidth !== undefined && window.innerWidth !== undefined) { + ratio = window.outerWidth / window.innerWidth +} + +if (ratio) { + ratio = Math.round(ratio * 100) +} +// ratio 就是获取到的百分比 +// console.log(ratio); + +export default ratio diff --git a/src/views/yingji/enforcing.vue b/src/views/yingji/enforcing.vue index b8d5b3f..4178a12 100644 --- a/src/views/yingji/enforcing.vue +++ b/src/views/yingji/enforcing.vue @@ -89,7 +89,7 @@ import executive from "./echarts/executive"; +import detectZoom from "@/utils/detectZoom"; + import { businessList, enforcingDetail, @@ -427,13 +429,14 @@ export default { }, ], searchBefore: { - pageSize: 10, + pageSize: 20, pageNum: 1, }, details: {}, addShow: false, detailLoad: true, //区划的禁用 + tableHeight: 400, }; }, created() { @@ -441,6 +444,8 @@ export default { this.searchBefore = { ...this.searchBefore, ...this.form }; this.getList(); + // 设置表格高度 100% 125% + this.tableHeight = detectZoom == 100 ? 700 : 480; }, dicts: ["inspection_method", "check_source", "document_type"], methods: { diff --git a/src/views/yingji/enterprise.vue b/src/views/yingji/enterprise.vue index 2807895..820a6ff 100644 --- a/src/views/yingji/enterprise.vue +++ b/src/views/yingji/enterprise.vue @@ -83,7 +83,7 @@ @@ -231,6 +231,7 @@ import InfoDialog from "./planmanage/components/infoDialog.vue"; import EditDialog from "./planmanage/components/editDialog.vue"; import executive from "./echarts/executive.vue"; import resetPwd from "../system/userc/profile/resetPwd.vue"; +import detectZoom from "@/utils/detectZoom"; export default { components: { @@ -328,7 +329,7 @@ export default { // 查询参数 queryParams: { pageNum: 1, - pageSize: 10, + pageSize: 20, enterpriseId: null, createId: null, updateId: null, @@ -352,6 +353,7 @@ export default { form: {}, // 表单校验 rules: {}, + tableHeight: 400, }; }, methods: { @@ -542,6 +544,8 @@ export default { // 初始化 this.getList(); + // 设置表格高度 100% 125% + this.tableHeight = detectZoom == 100 ? 650 : 450; }, };