报备修改

This commit is contained in:
2025-11-26 09:33:01 +08:00
parent ff0e25cfd0
commit 5eefaa2223

View File

@@ -57,7 +57,7 @@
</div> </div>
</div> </div>
<report-list-item :report-list.sync="reportList" @getReport="getReportHandler" /> <report-list-item :report-list.sync="reportList" @getReport="getReportHandler" />
<van-popup ref="addReportModal" v-model="addReportShow" :close-on-click-overlay="false" closeable duration="0" round position="bottom" :style="{ paddingBottom: keyboardHeight + 'px' }"> <van-popup ref="addReportModal" v-model="addReportShow" :close-on-click-overlay="false" closeable duration="0" round position="bottom">
<div class="dialog_wrap"> <div class="dialog_wrap">
<img class="add_report_bg" src="@/assets/report/add_report_bg.png" alt=""> <img class="add_report_bg" src="@/assets/report/add_report_bg.png" alt="">
<div class="report_content"> <div class="report_content">
@@ -138,8 +138,6 @@
mixins: [myMixins], mixins: [myMixins],
data() { data() {
return { return {
keyboardHeight: 0,
isKeyboardShow: false,
addReportShow: false, addReportShow: false,
remark: '', remark: '',
showDatetime: false, showDatetime: false,
@@ -170,10 +168,6 @@
await this.getDetail(); await this.getDetail();
await this.getRecordList(); await this.getRecordList();
await this.scrollToBottom(); await this.scrollToBottom();
window.addEventListener('resize', this.handleResize);
},
beforeDestroy() {
window.removeEventListener('resize', this.handleResize);
}, },
activated() { activated() {
let addressSession = sessionStorage.getItem('reportAddress'); let addressSession = sessionStorage.getItem('reportAddress');
@@ -186,30 +180,6 @@
} }
}, },
methods: { methods: {
handleResize() {
const windowHeight = window.innerHeight;
const docHeight = document.documentElement.clientHeight;
const diff = docHeight - windowHeight;
if (diff > 100) {
this.keyboardHeight = diff + 20;
this.isKeyboardShow = true;
this.scrollToTextarea();
} else {
this.keyboardHeight = 0;
this.isKeyboardShow = false;
}
},
scrollToTextarea() {
this.$nextTick(() => {
const textarea = document.querySelector('.report_textarea');
if (textarea && this.isKeyboardShow) {
textarea.scrollIntoView({
behavior: 'smooth',
block: 'center'
});
}
});
},
filter(type, options) { filter(type, options) {
if (type === 'minute') { if (type === 'minute') {
return options.filter((option) => option % 5 === 0); return options.filter((option) => option % 5 === 0);
@@ -580,7 +550,7 @@
} }
.report_common_content { .report_common_content {
margin-bottom: 27px; margin-bottom: 27px;
/*.report_textarea { .report_textarea {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
background: #F8FAFC; background: #F8FAFC;
@@ -589,23 +559,6 @@
border: 1px solid #E2EAF6; border: 1px solid #E2EAF6;
padding: 10px; padding: 10px;
font-size: 13px; font-size: 13px;
}*/
.report_textarea {
width: 100%;
box-sizing: border-box;
background: #F8FAFC;
border-radius: 6px;
min-height: 95px;
border: 1px solid #E2EAF6;
padding: 15px;
font-size: 14px;
line-height: 1.6;
resize: none;
outline: none;
&:focus {
border-color: #267EF0;
box-shadow: 0 0 0 2px rgba(38, 126, 240, 0.1);
}
} }
} }
} }
@@ -625,14 +578,4 @@
::v-deep .van-popup__close-icon { ::v-deep .van-popup__close-icon {
color: #0F458E; color: #0F458E;
} }
::v-deep .van-popup--bottom {
position: fixed !important;
bottom: 0 !important;
left: 0 !important;
right: 0 !important;
transform: none !important;
max-height: 80vh !important;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
</style> </style>