Commit db2adeb3 authored by xinzhedeai's avatar xinzhedeai

add: 提醒事项弹窗展示修改

parent d07e002f
......@@ -6,7 +6,6 @@
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewport-fit:cover">
<title>特种作业提醒事项</title>
<script src="../sdk/pdf.js"></script>
<script type="text/javascript" src="../sdk/includeHead.js"></script>
<link href="../sdk/quilljs/quill.snow.css" rel="stylesheet">
<script src="../sdk/quilljs/quill.js"></script>
......
......@@ -356,3 +356,8 @@ select:disabled {
margin-top: 0.25rem;
margin-bottom: 0.15rem;
}
iframe{
height: 58vh;
border: none;
}
\ No newline at end of file
......@@ -21,7 +21,7 @@
<div class="form-item">
<span class="form-label title_require">单位名称</span>
<div class="form-input-wrap" style="font-size: 15px;color: #9b9fab;">
{{ formData.merchantName }}
{{ formData.merName }}
</div>
</div>
......@@ -116,8 +116,8 @@
@cancel="showEndDatePicker = false"
/>
</van-popup>
<div style="margin-top: .1rem;" v-if="flag=='ADD'">
<van-checkbox v-model="formData.check" icon-size="16px" style="color:blue; font-size:.2rem;" >
<div style="margin-top: .2rem;" v-if="flag=='ADD'">
<van-checkbox v-model="formData.check" icon-size="16px" style="color:blue; font-size:.28rem;" >
我已阅读
<span style="color:blue;" @click="showTipPage">《提醒事项》</span>
</van-checkbox>
......@@ -126,6 +126,15 @@
@click="submitForm">提交报备</button>
</div>
</div>
<!-- 新增提醒事项弹出层 -->
<van-popup v-model="showTipPopup" position="center" :style="{ width: '90%', maxHeight: '80%',height: '70vh', }">
<div style="padding: 0.3rem; overflow-y: auto;">
<iframe :src="`_tezhongzuoye_detail-text.html?type=${formData.workType}`"></iframe>
<van-button type="info" size="small" plain style="margin-top: 0.2rem; width: 100%;" @click="showTipPopup = false">关闭</van-button>
</div>
</van-popup>
</div>
</body>
......
......@@ -9,6 +9,7 @@ window.addEventListener("load", function() {
el: '#app',
data() {
return {
showTipPopup: false,
previewUrl: BASE_URL,
flag: 'XQ',
flag: 'ADD',
......@@ -22,15 +23,15 @@ window.addEventListener("load", function() {
// maxDate: new Date(new Date().getFullYear() + 10, 11),
// 新增以下数据
formData: {
merchantName: '',
merchantPhone : '',
merName: '',
attachmentFile: [],
exerciseDate: gemhoUtil.getTargetDateYMD(),
workTypeName: '',
workType: '',
companyName:'',
workerName:'',
startTime: '', // 开始时间字段
endTime: '' // 结束时间字段
workType: '1',
companyName:'2',
workerName:'2',
startTime: '2025-07-24 09:57', // 开始时间字段
endTime: '2025-07-24 10:57' // 结束时间字段
},
id: ''
}
......@@ -45,19 +46,69 @@ window.addEventListener("load", function() {
this.detail() // 获取商户信息
} else {
this.flag = 'ADD'
this.getShopInfo()
}
this.getDict4tab1()
},
methods: {
showTipPage(){
let param = {
type: this.formData.workType,
pageName: '_tezhongzuoye_detail',
getShopInfo() {
vant.Toast.loading({
message: '正在加载...',
forbidClick: true,
loadingType: 'spinner',
})
setTimeout(() => {
http2.post(
{
serviceId: API_KEY_MAP['no-page']['id'],
interfacePublicKey: API_KEY_MAP['no-page']['publicKey'],
interfacePrivateKey: API_KEY_MAP['no-page']['privateKey'],
reqParams: {
sign: 11,
merId: gemhoUtil.getParameter('merId') || '',
sort: 'lawId,desc',
},
},
(res) => {
if (!res) {
// 中台返回为undefined 重新请求
vant.Toast.clear()
this.page = this.page - 1 // 重新请求后,分页数恢复上一次请求的值
setTimeout(() => {
// this.getList()
}, 0)
return
}
if (res) {
var result = JSON.parse(res)
console.log('商户信息', result)
if(result.data){
this.formData.merName = result.data.merName
this.formData.merchantPhone = result.data.merchantPhone
this.formData.merchantName = result.data.merchantName
this.formData.unitName = result.data.unitName
}
let url = gemhoUtil.setParameter('_tezhongzuoye_detail-text.html', param)
console.log(url)
gemhoUtil.navigatePage(url, '跳转中...')
// this.formData.
}
}
)
}, 0)
},
showTipPage(){
this.showTipPopup = true
return
// let param = {
// type: this.formData.workType,
// pageName: '_tezhongzuoye_detail',
// }
// let url = gemhoUtil.setParameter('_tezhongzuoye_detail-text.html', param)
// console.log(url)
// gemhoUtil.navigatePage(url, '跳转中...')
},
getDict4tab1() {
http2.post({
......@@ -211,19 +262,19 @@ window.addEventListener("load", function() {
},
submitForm() {
if (!this.formData.type) {
if (!this.formData.workType) {
vant.Dialog.alert({
message: '特种作业类型不可为空',
})
return;
}
if (!this.formData.participantsNum) {
if (!this.formData.workerName) {
vant.Dialog.alert({
message: '作业人员姓名不可为空',
})
return;
}
if (!this.formData.responsiblePerson) {
if (!this.formData.startTime || !this.formData.endTime) {
vant.Dialog.alert({
message: '作业时间不可为空',
})
......@@ -249,7 +300,7 @@ window.addEventListener("load", function() {
}
reqParam.attachmentFile = this.formData.attachmentFile.join(',')
http3.post('/gaoqu/exercise', reqParam).then((res) => {
http3.post('/gq/special', reqParam).then((res) => {
console.log('添加结果', res)
vant.Toast({
message: res.code === 200 ? '操作成功' : '操作失败',
......
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