Commit 876c229d authored by xinzhedeai's avatar xinzhedeai

fix: 提醒事项滚动问题处理

parent 4d2f2c3c
...@@ -373,3 +373,11 @@ iframe{ ...@@ -373,3 +373,11 @@ iframe{
.van-field__control:disabled { .van-field__control:disabled {
-webkit-text-fill-color: #737373; -webkit-text-fill-color: #737373;
} }
#fuwenben-wrapper {
max-height: 90%; /* 根据需求设置具体高度 */
height: 90%;
overflow-y: auto; /* 关键:自动显示滚动条 */
overflow-x: hidden;
/* padding: 0.3rem */
}
\ No newline at end of file
...@@ -135,13 +135,19 @@ ...@@ -135,13 +135,19 @@
</div> </div>
<!-- 新增提醒事项弹出层 --> <!-- 新增提醒事项弹出层 -->
<van-popup v-model="showTipPopup" position="center" :style="{ width: '90%', maxHeight: '80%',height: '70vh', }"> <van-popup v-model="showTipPopup" position="center" :style="{ width: '90%', height: '80%', padding: '.3rem'}">
<div style="padding: 0.3rem; overflow-y: auto;"> <div id="fuwenben-wrapper">
<!-- <iframe :src="`_tezhongzuoye_detail-text.html?type=${formData.workType}`"></iframe> <!-- <iframe :src="`_tezhongzuoye_detail-text.html?type=${formData.workType}`"></iframe>
--> -->
<div id="editor-container"></div> <div id="editor-container"></div>
<van-button type="info" size="small" plain style="margin-top: 0.2rem; width: 100%;" @click="showTipPopup = false">关闭</van-button>
</div> </div>
<van-button type="info" size="small" plain
style="margin-top: 0.2rem;
width: 100%;" @click="showTipPopup = false">
关闭
</van-button>
</van-popup> </van-popup>
</div> </div>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
*/ */
var VUE = null var VUE = null
var quill = null var quill = null
window.addEventListener("load", function() { window.addEventListener("load", function () {
VUE = new Vue({ VUE = new Vue({
el: '#app', el: '#app',
data() { data() {
...@@ -131,10 +131,24 @@ window.addEventListener("load", function() { ...@@ -131,10 +131,24 @@ window.addEventListener("load", function() {
}, },
}); });
quill.root.innerHTML = this.detailInfo || '该特种作业类型下暂无提醒事项内容,请联系管理员' quill.root.innerHTML = this.detailInfo || '该特种作业类型下暂无提醒事项内容,请联系管理员'
this.$nextTick(()=>{
// 新增:触发滚动条更新逻辑
this.updateScrollWrapper()
})
} }
}) })
}, },
// 新增:更新滚动容器的布局
updateScrollWrapper() {
const wrapper = document.getElementById('fuwenben-wrapper')
if (wrapper) {
// 强制触发浏览器重排(通过访问布局属性)
const temp = wrapper.offsetHeight
// 可选:动态调整最大高度(如果需要)
// wrapper.style.maxHeight = window.innerHeight * 0.6 + 'px'
}
},
getDict4tab1() { getDict4tab1() {
http2.post({ http2.post({
serviceId: API_KEY_MAP["page"]['id'], serviceId: API_KEY_MAP["page"]['id'],
...@@ -236,7 +250,7 @@ window.addEventListener("load", function() { ...@@ -236,7 +250,7 @@ window.addEventListener("load", function() {
var maxSelectNum = 6; var maxSelectNum = 6;
lightAppJssdk.notification.showMediaAlert({ lightAppJssdk.notification.showMediaAlert({
arg0: data, arg0: data,
success: function(data) { success: function (data) {
console.log('选择菜单的数据', data) console.log('选择菜单的数据', data)
// formData.append('file', file.file); // 通过FormData构建要上传的文件数据 // formData.append('file', file.file); // 通过FormData构建要上传的文件数据
// alert(data); // alert(data);
...@@ -258,7 +272,7 @@ window.addEventListener("load", function() { ...@@ -258,7 +272,7 @@ window.addEventListener("load", function() {
if (data.index == 0) { if (data.index == 0) {
pam1.chooseType = "chooseImageUpload" // pam1.fileKey = "file" pam1.chooseType = "chooseImageUpload" // pam1.fileKey = "file"
} else if (data.index == 1) { } else if (data.index == 1) {
pam1.chooseType ="takingPicturesUpload" // pam1.fileKey = "picfile" pam1.chooseType = "takingPicturesUpload" // pam1.fileKey = "picfile"
} }
...@@ -267,7 +281,7 @@ window.addEventListener("load", function() { ...@@ -267,7 +281,7 @@ window.addEventListener("load", function() {
chooseFileUploadTest(pam1) chooseFileUploadTest(pam1)
// setTimeout('onHidePreloaders()', 2000); // setTimeout('onHidePreloaders()', 2000);
}, },
fail: function(data) { fail: function (data) {
console.log(data); console.log(data);
} }
}); });
...@@ -275,17 +289,17 @@ window.addEventListener("load", function() { ...@@ -275,17 +289,17 @@ window.addEventListener("load", function() {
function chooseFileUploadTest(pam) { function chooseFileUploadTest(pam) {
lightAppJssdk.uploadFile.chooseFileUpload({ lightAppJssdk.uploadFile.chooseFileUpload({
arg0: pam, arg0: pam,
success: function(value) { success: function (value) {
console.log('chooseFileUpload方法', value) console.log('chooseFileUpload方法', value)
if(value){ if (value) {
VUE.formData.attachmentFile.push(...JSON.parse(value).fileNames) VUE.formData.attachmentFile.push(...JSON.parse(value).fileNames)
if(VUE.formData.attachmentFile.length > maxSelectNum){ if (VUE.formData.attachmentFile.length > maxSelectNum) {
const result = VUE.formData.attachmentFile.slice(0, maxSelectNum) const result = VUE.formData.attachmentFile.slice(0, maxSelectNum)
VUE.formData.attachmentFile = result VUE.formData.attachmentFile = result
} }
} }
}, },
fail: function(data1) { fail: function (data1) {
console.log(data1); console.log(data1);
} }
}); });
...@@ -399,7 +413,7 @@ window.addEventListener("load", function() { ...@@ -399,7 +413,7 @@ window.addEventListener("load", function() {
vant.Toast({ vant.Toast({
message: '操作成功', message: '操作成功',
}) })
setTimeout(function() { setTimeout(function () {
history.back() history.back()
}, 300) }, 300)
......
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