Commit 876c229d authored by xinzhedeai's avatar xinzhedeai

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

parent 4d2f2c3c
...@@ -372,4 +372,12 @@ iframe{ ...@@ -372,4 +372,12 @@ 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() {
...@@ -62,14 +62,14 @@ window.addEventListener("load", function() { ...@@ -62,14 +62,14 @@ window.addEventListener("load", function() {
}) })
setTimeout(() => { setTimeout(() => {
http2.post({ http2.post({
serviceId: API_KEY_MAP['no-page']['id'], serviceId: API_KEY_MAP['no-page']['id'],
interfacePublicKey: API_KEY_MAP['no-page']['publicKey'], interfacePublicKey: API_KEY_MAP['no-page']['publicKey'],
interfacePrivateKey: API_KEY_MAP['no-page']['privateKey'], interfacePrivateKey: API_KEY_MAP['no-page']['privateKey'],
reqParams: { reqParams: {
sign: 35, sign: 35,
merId: gemhoUtil.getParameter('merId') || '', merId: gemhoUtil.getParameter('merId') || '',
},
}, },
},
(res) => { (res) => {
if (res) { if (res) {
var result = JSON.parse(res) var result = JSON.parse(res)
...@@ -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'],
...@@ -203,12 +217,12 @@ window.addEventListener("load", function() { ...@@ -203,12 +217,12 @@ window.addEventListener("load", function() {
// 发送HTTP POST请求 // 发送HTTP POST请求
fetch(BASE_URL + '/common/upload', { fetch(BASE_URL + '/common/upload', {
method: 'POST', method: 'POST',
body: formData, body: formData,
headers: { headers: {
'Authorization': gemhoUtil.getCookie('token'), 'Authorization': gemhoUtil.getCookie('token'),
} }
}) })
.then(response => { .then(response => {
if (response.ok) { if (response.ok) {
return response.json(); return response.json();
...@@ -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,34 +272,34 @@ window.addEventListener("load", function() { ...@@ -258,34 +272,34 @@ 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"
} }
console.log('请求接口i偶路径', pam1) console.log('请求接口i偶路径', pam1)
chooseFileUploadTest(pam1) chooseFileUploadTest(pam1)
// setTimeout('onHidePreloaders()', 2000); // setTimeout('onHidePreloaders()', 2000);
}, },
fail: function(data) { fail: function (data) {
console.log(data); console.log(data);
} }
}); });
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)
...@@ -419,15 +433,15 @@ window.addEventListener("load", function() { ...@@ -419,15 +433,15 @@ window.addEventListener("load", function() {
}) })
setTimeout(() => { setTimeout(() => {
http2.post({ http2.post({
serviceId: API_KEY_MAP['no-page']['id'], serviceId: API_KEY_MAP['no-page']['id'],
interfacePublicKey: API_KEY_MAP['no-page']['publicKey'], interfacePublicKey: API_KEY_MAP['no-page']['publicKey'],
interfacePrivateKey: API_KEY_MAP['no-page']['privateKey'], interfacePrivateKey: API_KEY_MAP['no-page']['privateKey'],
reqParams: { reqParams: {
sign: 33, sign: 33,
specialWorkId: this.id, specialWorkId: this.id,
sort: 'lawId,desc', sort: 'lawId,desc',
},
}, },
},
(res) => { (res) => {
console.log('res', JSON.parse(res)) console.log('res', JSON.parse(res))
if (!res) { if (!res) {
......
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