Commit 34077b51 authored by honghy's avatar honghy Committed by wux

bug157【(生产)订单-列表】点击<显示搜索>按钮,输入筛选条件,再点击<隐藏搜索>时,列表可展示数据变少

parent 0882ee8f
...@@ -910,6 +910,12 @@ export default { ...@@ -910,6 +910,12 @@ export default {
} }
}, },
computed: { computed: {
isMobile() {
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
// 匹配常见的移动设备标识
const mobileIdentifiers = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Windows Phone'];
return mobileIdentifiers.some(identifier => userAgent.includes(identifier));
},
path() { path() {
return this.$route.path return this.$route.path
}, },
...@@ -1538,6 +1544,7 @@ export default { ...@@ -1538,6 +1544,7 @@ export default {
}, },
//表格高度自适应 //表格高度自适应
getHeight() { getHeight() {
if(!this.isMobile) {
this.$refs.multipleTable.doLayout() this.$refs.multipleTable.doLayout()
let getHeightFromBottom = (element, variableHeight) => { let getHeightFromBottom = (element, variableHeight) => {
const elementRect = element.getBoundingClientRect().top; const elementRect = element.getBoundingClientRect().top;
...@@ -1548,7 +1555,8 @@ export default { ...@@ -1548,7 +1555,8 @@ export default {
} }
const element = document.getElementById('dataTable'); const element = document.getElementById('dataTable');
const variableHeight = 70; // 给定的变量高度 一般留于分页器高度 const variableHeight = 70; // 给定的变量高度 一般留于分页器高度
this.autoHeight =getHeightFromBottom(element, variableHeight) ; this.autoHeight =getHeightFromBottom(element, variableHeight);
}
}, },
} }
} }
......
...@@ -444,6 +444,12 @@ export default { ...@@ -444,6 +444,12 @@ export default {
CustomerSetting CustomerSetting
}, },
computed: { computed: {
isMobile() {
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
// 匹配常见的移动设备标识
const mobileIdentifiers = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Windows Phone'];
return mobileIdentifiers.some(identifier => userAgent.includes(identifier));
},
isChinese() { isChinese() {
return this.$i18n.locale === "zh_CN" return this.$i18n.locale === "zh_CN"
}, },
...@@ -975,6 +981,7 @@ export default { ...@@ -975,6 +981,7 @@ export default {
}, },
//表格高度自适应 //表格高度自适应
getHeight() { getHeight() {
if(!this.isMobile) {
this.$refs.multipleTable.doLayout() this.$refs.multipleTable.doLayout()
let getHeightFromBottom = (element, variableHeight) => { let getHeightFromBottom = (element, variableHeight) => {
const elementRect = element.getBoundingClientRect().top; const elementRect = element.getBoundingClientRect().top;
...@@ -985,7 +992,8 @@ export default { ...@@ -985,7 +992,8 @@ export default {
} }
const element = document.getElementById('dataTable'); const element = document.getElementById('dataTable');
const variableHeight = 70; // 给定的变量高度 一般留于分页器高度 const variableHeight = 70; // 给定的变量高度 一般留于分页器高度
this.autoHeight =getHeightFromBottom(element, variableHeight) ; this.autoHeight =getHeightFromBottom(element, variableHeight);
}
}, },
}, },
watch: { watch: {
......
...@@ -703,6 +703,12 @@ export default { ...@@ -703,6 +703,12 @@ export default {
} }
}, },
computed: { computed: {
isMobile() {
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
// 匹配常见的移动设备标识
const mobileIdentifiers = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Windows Phone'];
return mobileIdentifiers.some(identifier => userAgent.includes(identifier));
},
isChinese() { isChinese() {
return this.$i18n.locale === "zh_CN"; return this.$i18n.locale === "zh_CN";
}, },
...@@ -1078,6 +1084,7 @@ export default { ...@@ -1078,6 +1084,7 @@ export default {
}, },
//表格高度自适应 //表格高度自适应
getHeight() { getHeight() {
if(!this.isMobile) {
this.$refs.multipleTable.doLayout() this.$refs.multipleTable.doLayout()
let getHeightFromBottom = (element, variableHeight) => { let getHeightFromBottom = (element, variableHeight) => {
const elementRect = element.getBoundingClientRect().top; const elementRect = element.getBoundingClientRect().top;
...@@ -1088,7 +1095,8 @@ export default { ...@@ -1088,7 +1095,8 @@ export default {
} }
const element = document.getElementById('dataTable'); const element = document.getElementById('dataTable');
const variableHeight = 70; // 给定的变量高度 一般留于分页器高度 const variableHeight = 70; // 给定的变量高度 一般留于分页器高度
this.autoHeight =getHeightFromBottom(element, variableHeight) ; this.autoHeight =getHeightFromBottom(element, variableHeight);
}
}, },
}, },
}; };
......
...@@ -199,7 +199,7 @@ export default { ...@@ -199,7 +199,7 @@ export default {
nextTime: ["", ""], nextTime: ["", ""],
customerCreateTime: ["", ""] customerCreateTime: ["", ""]
}, },
autoHeight: 500 autoHeight: null
} }
}, },
created() { created() {
...@@ -219,6 +219,12 @@ export default { ...@@ -219,6 +219,12 @@ export default {
// return t.join(":") // return t.join(":")
// } // }
// }, // },
isMobile() {
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
// 匹配常见的移动设备标识
const mobileIdentifiers = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Windows Phone'];
return mobileIdentifiers.some(identifier => userAgent.includes(identifier));
},
isChinese() { isChinese() {
return this.$i18n.locale === "zh_CN" return this.$i18n.locale === "zh_CN"
}, },
...@@ -338,6 +344,7 @@ export default { ...@@ -338,6 +344,7 @@ export default {
}, },
//表格高度自适应 //表格高度自适应
getHeight() { getHeight() {
if(!this.isMobile) {
this.$refs.multipleTable.doLayout() this.$refs.multipleTable.doLayout()
let getHeightFromBottom = (element, variableHeight) => { let getHeightFromBottom = (element, variableHeight) => {
const elementRect = element.getBoundingClientRect().top; const elementRect = element.getBoundingClientRect().top;
...@@ -348,7 +355,8 @@ export default { ...@@ -348,7 +355,8 @@ export default {
} }
const element = document.getElementById('dataTable'); const element = document.getElementById('dataTable');
const variableHeight = 70; // 给定的变量高度 一般留于分页器高度 const variableHeight = 70; // 给定的变量高度 一般留于分页器高度
this.autoHeight =getHeightFromBottom(element, variableHeight) ; this.autoHeight =getHeightFromBottom(element, variableHeight);
}
}, },
} }
} }
......
...@@ -844,7 +844,7 @@ export default { ...@@ -844,7 +844,7 @@ export default {
key: "eqPickRatio", key: "eqPickRatio",
value: "" value: ""
}, },
autoHeight: 500 autoHeight: null
} }
}, },
watch: { watch: {
...@@ -1000,6 +1000,12 @@ export default { ...@@ -1000,6 +1000,12 @@ export default {
} }
}, },
computed: { computed: {
isMobile() {
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
// 匹配常见的移动设备标识
const mobileIdentifiers = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Windows Phone'];
return mobileIdentifiers.some(identifier => userAgent.includes(identifier));
},
// 导出的权限字符串 // 导出的权限字符串
exportPermiString() { exportPermiString() {
let arr = ["ecw:order:export"] let arr = ["ecw:order:export"]
...@@ -1508,6 +1514,7 @@ export default { ...@@ -1508,6 +1514,7 @@ export default {
}, },
//表格高度自适应 //表格高度自适应
getHeight() { getHeight() {
if(!this.isMobile) {
this.$refs.dataTable.doLayout() this.$refs.dataTable.doLayout()
let getHeightFromBottom = (element, variableHeight) => { let getHeightFromBottom = (element, variableHeight) => {
const elementRect = element.getBoundingClientRect().top; const elementRect = element.getBoundingClientRect().top;
...@@ -1519,6 +1526,7 @@ export default { ...@@ -1519,6 +1526,7 @@ export default {
const element = document.getElementById('dataTable'); const element = document.getElementById('dataTable');
const variableHeight = 70; // 给定的变量高度 一般留于分页器高度 const variableHeight = 70; // 给定的变量高度 一般留于分页器高度
this.autoHeight =getHeightFromBottom(element, variableHeight) ; this.autoHeight =getHeightFromBottom(element, variableHeight) ;
}
}, },
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment