|
|
@ -11,6 +11,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
<!-- 中间 --> |
|
|
<!-- 中间 --> |
|
|
<div class="warp_body"> |
|
|
<div class="warp_body"> |
|
|
|
|
|
<van-form @failed="onFailed"> |
|
|
<van-cell-group> |
|
|
<van-cell-group> |
|
|
<van-field |
|
|
<van-field |
|
|
v-model="submitData.planYear" |
|
|
v-model="submitData.planYear" |
|
|
@ -81,7 +82,8 @@ |
|
|
<div class="file-upload-center"> |
|
|
<div class="file-upload-center"> |
|
|
文件上传 <span>(不多于9张)</span> |
|
|
文件上传 <span>(不多于9张)</span> |
|
|
</div> |
|
|
</div> |
|
|
<van-uploader v-model="data.fileListObj" max-count="9" class="file" :after-read="uploadFiles" multiple @oversize="onOversize" :before-delete="deleteFile" accept=".pdf"> |
|
|
<van-uploader v-model="data.fileListObj" max-count="9" class="file" :after-read="uploadFiles" |
|
|
|
|
|
multiple @oversize="onOversize" :before-delete="deleteFile" accept=".pdf"> |
|
|
<template #preview-cover="{ file }"> |
|
|
<template #preview-cover="{ file }"> |
|
|
<div class="preview-cover van-ellipsis">{{ file.name }}</div> |
|
|
<div class="preview-cover van-ellipsis">{{ file.name }}</div> |
|
|
</template> |
|
|
</template> |
|
|
@ -89,8 +91,9 @@ |
|
|
</div> |
|
|
</div> |
|
|
</van-cell-group> |
|
|
</van-cell-group> |
|
|
<van-action-bar> |
|
|
<van-action-bar> |
|
|
<van-action-bar-button text="提交" @click="submit" /> |
|
|
<van-button round block type="info" native-type="submit" @click="submit123">提交</van-button> |
|
|
</van-action-bar> |
|
|
</van-action-bar> |
|
|
|
|
|
</van-form> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
@ -103,6 +106,7 @@ import {getDict} from '../../api/Home' |
|
|
import {uploadFile} from '../../util/fileUpload' |
|
|
import {uploadFile} from '../../util/fileUpload' |
|
|
import {reactive, ref} from "vue"; |
|
|
import {reactive, ref} from "vue"; |
|
|
import {showConfirmDialog} from 'vant'; |
|
|
import {showConfirmDialog} from 'vant'; |
|
|
|
|
|
|
|
|
const {useCommon, useMy} = $globalStore; |
|
|
const {useCommon, useMy} = $globalStore; |
|
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
const router = useRouter(); |
|
|
@ -154,6 +158,19 @@ const goBack = () => { |
|
|
router.go(-1); |
|
|
router.go(-1); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const submit123 = () => { |
|
|
|
|
|
addEnforcementInspectionProgram(submitData, success => { |
|
|
|
|
|
console.log(success) |
|
|
|
|
|
//跳转企业二维码地址 |
|
|
|
|
|
if (success.success) { |
|
|
|
|
|
console.log("保存成功"); |
|
|
|
|
|
showSuccessToast('保存成功'); |
|
|
|
|
|
goBack(); |
|
|
|
|
|
} |
|
|
|
|
|
}, error => { |
|
|
|
|
|
console.log("保存失败") |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const submit = () => { |
|
|
const submit = () => { |
|
|
showConfirmDialog({ |
|
|
showConfirmDialog({ |
|
|
@ -191,6 +208,10 @@ const submit = () =>{ |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const onFailed = (errorInfo) => { |
|
|
|
|
|
console.log('failed', errorInfo); |
|
|
|
|
|
}; |
|
|
//消息提醒 |
|
|
//消息提醒 |
|
|
// const toast = showLoadingToast({ |
|
|
// const toast = showLoadingToast({ |
|
|
// duration: 0, |
|
|
// duration: 0, |
|
|
@ -317,6 +338,7 @@ const onEnforcementTimeConfirm = (value)=> { |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
background-color: #f4f4f4; |
|
|
background-color: #f4f4f4; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* vant4的 Toast 和 Popup 样式冲突,会导致 Toast 变成白底 */ |
|
|
/* vant4的 Toast 和 Popup 样式冲突,会导致 Toast 变成白底 */ |
|
|
// .van-popup.van-toast{ |
|
|
// .van-popup.van-toast{ |
|
|
// background: var(--van-toast-background) !important; |
|
|
// background: var(--van-toast-background) !important; |
|
|
@ -333,17 +355,20 @@ const onEnforcementTimeConfirm = (value)=> { |
|
|
height: 165px; |
|
|
height: 165px; |
|
|
position: relative; |
|
|
position: relative; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.file-upload-center { |
|
|
.file-upload-center { |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
height: 20%; |
|
|
height: 20%; |
|
|
top: 10%; |
|
|
top: 10%; |
|
|
left: 2%; |
|
|
left: 2%; |
|
|
font-size: 18px; |
|
|
font-size: 18px; |
|
|
|
|
|
|
|
|
span { |
|
|
span { |
|
|
font-size: 13px; |
|
|
font-size: 13px; |
|
|
color: rgb(221, 229, 227); |
|
|
color: rgb(221, 229, 227); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.file { |
|
|
.file { |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
bottom: 10%; |
|
|
bottom: 10%; |
|
|
@ -374,6 +399,7 @@ const onEnforcementTimeConfirm = (value)=> { |
|
|
border: 0.02667rem solid #1367fe; |
|
|
border: 0.02667rem solid #1367fe; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
:root { |
|
|
:root { |
|
|
--van-dialog-width: 600px; |
|
|
--van-dialog-width: 600px; |
|
|
} |
|
|
} |
|
|
|