|
|
@ -2,49 +2,11 @@ |
|
|
<div class="address_edit"> |
|
|
<div class="address_edit"> |
|
|
<div class="warp_body"> |
|
|
<div class="warp_body"> |
|
|
|
|
|
|
|
|
<div style="background-color: white; border-radius: 5%;" v-html="data.noticeContent"></div> |
|
|
<div style="padding: 10px;background-color: white; border-radius: 5%;" v-html="data.noticeContent"></div> |
|
|
|
|
|
|
|
|
<!-- <van-divider class="divdsty"/> --> |
|
|
<div v-for="(item, index) in data.fileList" :key="index"> |
|
|
<div class="file-upload"> |
|
|
<div class="item-text"> |
|
|
<div class="file-upload-center"> |
|
|
<p><label class="card_box_label">附 件:</label> <span> <a @click="toPdfView(null==item?'':item.fileUrl)">{{ null==item?'':item.fileName }}</a></span></p> |
|
|
<label>附 件</label> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="zoom"> |
|
|
|
|
|
|
|
|
|
|
|
<div v-for="(ite, index) in data.images" > |
|
|
|
|
|
<!-- <img alt="预览文件" :src="ite" @click="handleViewPdf(ite)"/>--> |
|
|
|
|
|
<!-- <van-uploader @click="handleViewPdf(ite)" title="pdf预览" v-model="data.fileList"/>--> |
|
|
|
|
|
<van-icon @click="handleViewPdf(ite)" name="newspaper-o" title="pdf预览" size="50"></van-icon>{{data.imagesName[index]}} |
|
|
|
|
|
</div> |
|
|
|
|
|
<!-- pdf预览 --> |
|
|
|
|
|
<van-popup v-model:show="pdfOpen" title="'pdf预览'" style="width:80%" > |
|
|
|
|
|
<div style="min-height: 439px" > |
|
|
|
|
|
<vue-pdf-embed ref="pdfRef" v-if="!pdfFail" :source="pdfSrc" @rendered="handleDocumentRender" @loading-failed="handlePdfFaid" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<a :href="data.pdfSource" class="loadPdf" target="_blank"> |
|
|
|
|
|
<van-button type="primary" icon="Download" plain>下载</van-button> |
|
|
|
|
|
</a> |
|
|
|
|
|
<van-button @click="pdfOpen = false" type="primary" class="closePdf">关 闭</van-button> |
|
|
|
|
|
|
|
|
|
|
|
</van-popup> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <img--> |
|
|
|
|
|
<!-- v-for="(ite, index) in data.images"--> |
|
|
|
|
|
<!-- class="img"--> |
|
|
|
|
|
<!-- :src="ite"--> |
|
|
|
|
|
<!-- alt="预览图片"--> |
|
|
|
|
|
<!-- @click="imagePreview(index)"--> |
|
|
|
|
|
<!-- :key="index"--> |
|
|
|
|
|
<!-- />--> |
|
|
|
|
|
<!-- <van-image-preview--> |
|
|
|
|
|
<!-- v-model:show="data.show"--> |
|
|
|
|
|
<!-- :images="data.imageList"--> |
|
|
|
|
|
<!-- @change="onChange"--> |
|
|
|
|
|
<!-- ref="imagePre"--> |
|
|
|
|
|
<!-- >--> |
|
|
|
|
|
<!-- <template v-slot:index>第{{ indexImg + 1 }}页</template>--> |
|
|
|
|
|
<!-- </van-image-preview>--> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
@ -53,21 +15,12 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup name="register"> |
|
|
<script setup name="register"> |
|
|
import VuePdfEmbed from "vue-pdf-embed"; |
|
|
import { queryEnforceSystemNoticeDetail } from "@/api/enforce"; |
|
|
import {showSuccessToast, showImagePreview} from "vant"; |
|
|
import {reactive, ref} from "vue"; |
|
|
import { |
|
|
|
|
|
queryEnforcementRegistrationById, |
|
|
|
|
|
getAttr, queryEnforceSystemNoticeDetail, |
|
|
|
|
|
} from "@/api/enforce"; |
|
|
|
|
|
import {reactive, ref, nextTick} from "vue"; |
|
|
|
|
|
import {uploadFile} from "@/util/fileUpload"; |
|
|
|
|
|
import {queryLinkageById} from "@/api/linkage"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import {baseUrl} from "@/config/env"; |
|
|
import {baseUrl} from "@/config/env"; |
|
|
//用户筛选弹窗 |
|
|
|
|
|
// import Popup from './userFilter.vue'; |
|
|
|
|
|
|
|
|
|
|
|
const {useMy} = $globalStore; |
|
|
const {useMy} = $globalStore; |
|
|
|
|
|
|
|
|
@ -86,7 +39,7 @@ const data = reactive({ |
|
|
imgstr: "", |
|
|
imgstr: "", |
|
|
lawList: [{text: "", id: ""}], |
|
|
lawList: [{text: "", id: ""}], |
|
|
lawCer: [{text: "", id: ""}], |
|
|
lawCer: [{text: "", id: ""}], |
|
|
imageList: [], |
|
|
fileList: [], |
|
|
show: ref(false), |
|
|
show: ref(false), |
|
|
show2: ref(false), |
|
|
show2: ref(false), |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
@ -156,161 +109,22 @@ const submitData = reactive({ |
|
|
problem5: 0, |
|
|
problem5: 0, |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const pdfOpen = ref(false); |
|
|
|
|
|
const isLoading = ref(true); |
|
|
|
|
|
const pdfSrc = ref(''); |
|
|
|
|
|
const pdfFail = ref(false); |
|
|
|
|
|
|
|
|
|
|
|
// pdf加载 |
|
|
|
|
|
function handleDocumentRender(val) { |
|
|
|
|
|
isLoading.value = false; |
|
|
|
|
|
pdfFail.value = false; |
|
|
|
|
|
} |
|
|
|
|
|
// pdf加载失败,或者404 |
|
|
|
|
|
function handlePdfFaid(val) { |
|
|
|
|
|
isLoading.value = false; |
|
|
|
|
|
pdfFail.value = true; |
|
|
|
|
|
console.log('文档加载失败'); |
|
|
|
|
|
} |
|
|
|
|
|
// 点击 预览 |
|
|
|
|
|
function handleViewPdf(file) { |
|
|
|
|
|
isLoading.value = true; |
|
|
|
|
|
pdfOpen.value = true; |
|
|
|
|
|
// pdfSrc.value = file; |
|
|
|
|
|
pdfSrc.value = file; |
|
|
|
|
|
pdfFail.value = false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const tapGood = () => { |
|
|
|
|
|
data.good = "#7FFFD4"; |
|
|
|
|
|
data.bad = "#D3D3D3"; |
|
|
|
|
|
submitData.reslut = 0; |
|
|
|
|
|
}; |
|
|
|
|
|
const tapBad = () => { |
|
|
|
|
|
data.good = "#D3D3D3"; |
|
|
|
|
|
data.bad = "#7FFFD4"; |
|
|
|
|
|
submitData.reslut = 1; |
|
|
|
|
|
}; |
|
|
|
|
|
const indexImg = ref(0); |
|
|
|
|
|
const indexImg2 = ref(0); |
|
|
|
|
|
const imagePreview = (newIndex) => { |
|
|
|
|
|
var imgstrArr = data.imgstr.split(","); |
|
|
|
|
|
|
|
|
|
|
|
nextTick(() => { |
|
|
|
|
|
// console.log(this.$refs.testRef) |
|
|
|
|
|
// this.$refs.imagePre.change(newIndex) |
|
|
|
|
|
// const imagePre = ref("imagePre"); |
|
|
|
|
|
// imagePre.change(newIndex); |
|
|
|
|
|
}); |
|
|
|
|
|
data.show = ref(true); |
|
|
|
|
|
}; |
|
|
|
|
|
const imagePreview2 = (newIndex) => { |
|
|
|
|
|
var imgstrArr = data.imgstr.split(","); |
|
|
|
|
|
|
|
|
|
|
|
nextTick(() => { |
|
|
|
|
|
// console.log(this.$refs.testRef) |
|
|
|
|
|
// this.$refs.imagePre.change(newIndex) |
|
|
|
|
|
// const imagePre = ref("imagePre"); |
|
|
|
|
|
// imagePre.change(newIndex); |
|
|
|
|
|
}); |
|
|
|
|
|
data.show2 = ref(true); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const setLinkageItem = (id) => { |
|
|
|
|
|
queryLinkageById( |
|
|
|
|
|
{id: id}, |
|
|
|
|
|
(success) => { |
|
|
|
|
|
submitData.lawEnforcementItem = success.title; |
|
|
|
|
|
}, |
|
|
|
|
|
(error) => { |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
}; |
|
|
|
|
|
const setLinkageGA = (id) => { |
|
|
|
|
|
queryLinkageById( |
|
|
|
|
|
{id: id}, |
|
|
|
|
|
(success) => { |
|
|
|
|
|
submitData.lawEnforcementBasis = success.title; |
|
|
|
|
|
}, |
|
|
|
|
|
(error) => { |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const setAttr = () => { |
|
|
|
|
|
// 查询检查要求字典信息 |
|
|
|
|
|
getAttr( |
|
|
|
|
|
route?.query?.id, |
|
|
|
|
|
(success) => { |
|
|
|
|
|
if (success.data.filePreview != null) { |
|
|
|
|
|
if (success.data.filePreview.fileList != null) { |
|
|
|
|
|
for (var i = 0; i < success.data.filePreview.fileList.length; i++) { |
|
|
|
|
|
data.imgstr += success.data.filePreview.fileList[i] + ","; |
|
|
|
|
|
} |
|
|
|
|
|
data.imgstr = data.imgstr.substring(0, data.imgstr.length - 1); |
|
|
|
|
|
} |
|
|
|
|
|
data.imageList = success.data.filePreview.fileList; |
|
|
|
|
|
success.data.filePreview.fileList; |
|
|
|
|
|
for (const key in success.data.filePreview.fileList) { |
|
|
|
|
|
console.log(success.data.filePreview.fileList[key]); |
|
|
|
|
|
data.imageList[key] = success.data.filePreview.fileList[key]; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
(error) => { |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
}; |
|
|
|
|
|
const setEvaluateFile = (id) => { |
|
|
|
|
|
// 查询检查要求字典信息 |
|
|
|
|
|
getAttr( |
|
|
|
|
|
id, |
|
|
|
|
|
(success) => { |
|
|
|
|
|
if (success.data.filePreview != null) { |
|
|
|
|
|
if (success.data.filePreview.fileList != null) { |
|
|
|
|
|
for (var i = 0; i < success.data.filePreview.fileList.length; i++) { |
|
|
|
|
|
data.imgstr += success.data.filePreview.fileList[i] + ","; |
|
|
|
|
|
} |
|
|
|
|
|
data.imgstr = data.imgstr.substring(0, data.imgstr.length - 1); |
|
|
|
|
|
} |
|
|
|
|
|
data.evaluateImageList = success.data.filePreview.fileList; |
|
|
|
|
|
success.data.filePreview.fileList; |
|
|
|
|
|
for (const key in success.data.filePreview.fileList) { |
|
|
|
|
|
console.log(success.data.filePreview.fileList[key]); |
|
|
|
|
|
data.evaluateImageList[key] = |
|
|
|
|
|
baseUrl + success.data.filePreview.fileList[key]; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
(error) => { |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const onChange = (newIndex) => { |
|
|
|
|
|
indexImg.value = newIndex; |
|
|
|
|
|
}; |
|
|
|
|
|
const onChange2 = (newIndex) => { |
|
|
|
|
|
indexImg2.value = newIndex; |
|
|
|
|
|
}; |
|
|
|
|
|
//3a0096181c184e5aa56f70923680856d$6e74ceda1463c165fd43eeeadce4f7cd |
|
|
//3a0096181c184e5aa56f70923680856d$6e74ceda1463c165fd43eeeadce4f7cd |
|
|
//初始化参数,获取扫码的企业统一信用编码 |
|
|
//初始化参数,获取扫码的企业统一信用编码 |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
|
|
|
|
|
|
queryRegUniteById(); |
|
|
queryRegUniteById(); |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const toPdfView = (url) => { |
|
|
const showArrays = (item) => { |
|
|
console.log(url) |
|
|
if (item.downShow) { |
|
|
router.push( |
|
|
item.downShow = false; |
|
|
{ |
|
|
data.arrayLength = data.regList.length; |
|
|
path: "/pdfView", |
|
|
} else { |
|
|
query: { |
|
|
data.regList[0].downShow = true; |
|
|
url: url |
|
|
data.arrayLength = 1; |
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const queryRegUniteById = () => { |
|
|
const queryRegUniteById = () => { |
|
|
queryEnforceSystemNoticeDetail( |
|
|
queryEnforceSystemNoticeDetail( |
|
|
@ -331,6 +145,7 @@ const convertReg = (regs) => { |
|
|
data.noticeContent = regs.noticeContent; |
|
|
data.noticeContent = regs.noticeContent; |
|
|
data.bureauDeptNames = regs.bureauDeptNames; |
|
|
data.bureauDeptNames = regs.bureauDeptNames; |
|
|
data.createTime = regs.createTime; |
|
|
data.createTime = regs.createTime; |
|
|
|
|
|
data.fileList = regs.fileObjects; |
|
|
if (regs.objectType != null) { |
|
|
if (regs.objectType != null) { |
|
|
if (regs.objectType == 1) { |
|
|
if (regs.objectType == 1) { |
|
|
data.objectType = "监督端"; |
|
|
data.objectType = "监督端"; |
|
|
@ -343,100 +158,8 @@ const convertReg = (regs) => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 附件 |
|
|
|
|
|
getAttr( |
|
|
|
|
|
data.id, |
|
|
|
|
|
(success) => { |
|
|
|
|
|
if (success.data.filePreview != null) { |
|
|
|
|
|
let images = []; |
|
|
|
|
|
let imagesName = []; |
|
|
|
|
|
for (const key in success.data.filePreview.fileList) { |
|
|
|
|
|
images[key] = baseUrl + success.data.filePreview.fileList[key]; |
|
|
|
|
|
data.imageList.push( |
|
|
|
|
|
baseUrl + success.data.filePreview.fileList[key] |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
for (const key in success.data.filePreview.previewRespDTOS) { |
|
|
|
|
|
imagesName[key] = success.data.filePreview.previewRespDTOS[key].caption; |
|
|
|
|
|
} |
|
|
|
|
|
data.imagesName = imagesName; |
|
|
|
|
|
data.images = images; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(data.imageList); |
|
|
|
|
|
}, |
|
|
|
|
|
(error) => { |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 返回 |
|
|
|
|
|
const goBack = () => { |
|
|
|
|
|
router.go(-1); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const uploadFiles = (file) => { |
|
|
|
|
|
uploadFile(file, (res) => { |
|
|
|
|
|
console.log(res); |
|
|
|
|
|
submitData.fileList.push(res.url); |
|
|
|
|
|
console.log(submitData.fileList); |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const deleteFile = (file, index) => { |
|
|
|
|
|
console.log(index); |
|
|
|
|
|
submitData.fileListObj.filter((item, indexs) => { |
|
|
|
|
|
if (index.index == indexs) { |
|
|
|
|
|
submitData.fileListObj.splice(indexs, 1); //splice 删除 |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
submitData.fileList.filter((item, indexs) => { |
|
|
|
|
|
if (index.index == indexs) { |
|
|
|
|
|
submitData.fileList.splice(indexs, 1); //splice 删除 |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
console.log(submitData.fileList); |
|
|
|
|
|
return true; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const submit = () => { |
|
|
|
|
|
addEnforcementRegistration( |
|
|
|
|
|
submitData, |
|
|
|
|
|
(success) => { |
|
|
|
|
|
//跳转首页 |
|
|
|
|
|
if (success.success) { |
|
|
|
|
|
showSuccessToast("登记成功"); |
|
|
|
|
|
router.push({path: "/home"}); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
(error) => { |
|
|
|
|
|
console.log("登记失败"); |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const showPopup = () => { |
|
|
|
|
|
data.popupVisible = true; |
|
|
|
|
|
}; |
|
|
|
|
|
const showPopup2 = () => { |
|
|
|
|
|
data.popupVisible2 = true; |
|
|
|
|
|
}; |
|
|
|
|
|
const closePopup = () => { |
|
|
|
|
|
data.popupVisible = false; |
|
|
|
|
|
data.popupVisible2 = false; |
|
|
|
|
|
}; |
|
|
|
|
|
const reciveData = (item) => { |
|
|
|
|
|
submitData.lawEnforcerTwo = item.userName; |
|
|
|
|
|
submitData.lawEnforcerIdTwo = item.userId; |
|
|
|
|
|
}; |
|
|
|
|
|
const reciveData2 = (item) => { |
|
|
|
|
|
submitData.subsidiaryer = item.userName; |
|
|
|
|
|
submitData.subsidiaryerId = item.userId; |
|
|
|
|
|
}; |
|
|
|
|
|
</script> |
|
|
</script> |
|
|
<script> |
|
|
<script> |
|
|
export default { |
|
|
export default { |
|
|
|