You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
400 lines
11 KiB
400 lines
11 KiB
<template>
|
|
<div class="detail-task-tab">
|
|
<div class="case-code-bar">
|
|
<span class="case-code-label">案件编号</span>
|
|
<span class="case-code-value">{{ detail.caseCode }}</span>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<div class="section-title">通知/公告</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">附 件</span>
|
|
<div class="detail-value">
|
|
<template v-if="detail.proclamations?.length">
|
|
<div v-for="(proc, index) in detail.proclamations" :key="index" class="detail-value--notice">
|
|
<span class="notice-name">{{ proc.fileName }}</span>
|
|
<van-button
|
|
v-if="proc.filePath"
|
|
class="btn-download"
|
|
size="small"
|
|
plain
|
|
type="primary"
|
|
icon="down"
|
|
@click="onDownloadNotice(proc.filePath)"
|
|
>
|
|
下载
|
|
</van-button>
|
|
</div>
|
|
</template>
|
|
<span v-else>--</span>
|
|
</div>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">任务来源</span>
|
|
<span class="detail-value">{{ detail.taskSource }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<div class="section-title">检查对象</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">{{ detail.taskTypeId != 5 ? '执法单位' : '巡查单位' }}</span>
|
|
<span class="detail-value">{{ detail.enforcementUnit }}</span>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">{{ detail.taskTypeId != 5 ? '执法人员' : '参与人员' }}</span>
|
|
<div class="detail-value">
|
|
<p v-for="(person, index) in detail.enforcementPerson" :key="index" class="detail-text">
|
|
{{ person }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<div class="section-title">{{ detail.taskTypeId != 5 ? '执法信息' : '巡查信息' }}</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">企业名称</span>
|
|
<div class="detail-value">
|
|
<p v-if="detail.enterpriseName" class="detail-text">{{ detail.enterpriseName }}</p>
|
|
<p v-if="detail.enterpriseNumber" class="detail-text">({{ detail.enterpriseNumber }})</p>
|
|
</div>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">类 别</span>
|
|
<span class="detail-value">{{ detail.category }}</span>
|
|
</div>
|
|
<div class="detail-row" v-if="detail.taskTypeId == 1 || detail.taskTypeId == 5">
|
|
<span class="detail-label">{{ detail.taskTypeId == 1 ? '执法事项' : '巡查事项' }}</span>
|
|
<span class="detail-value">{{ detail.enforcementMatter }}</span>
|
|
</div>
|
|
<div v-if="requirementLabel" class="detail-row">
|
|
<span class="detail-label">{{ requirementLabel }}</span>
|
|
<div class="detail-value">
|
|
<ul class="requirement-list">
|
|
<li v-for="(item, index) in detail.materialRequirements" :key="index" class="requirement-item">
|
|
<van-icon name="checked" class="requirement-icon" />
|
|
<span>{{ item.name }}</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">{{detail.taskTypeId != 5 ? '执法依据' : '依 据'}}</span>
|
|
<div class="detail-value">
|
|
<p v-for="(basis, index) in detail.enforcementBases" :key="index" class="detail-text">
|
|
{{ basis }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">开始时间</span>
|
|
<span class="detail-value">{{ detail.startTime }}</span>
|
|
</div>
|
|
<div class="detail-row">
|
|
<span class="detail-label">截止日期</span>
|
|
<span class="detail-value">{{ detail.deadline }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="section" v-if="detail.taskStatus == 4">
|
|
<div class="section-title title-with-btn">
|
|
<span>调查信息</span>
|
|
<van-button size="small" plain class="btn-copy" @click="copyInvestigationInfo">复制</van-button>
|
|
</div>
|
|
<div class="investigation-content">
|
|
<p>
|
|
<template v-if="noticeFileName"><span class="text-nowrap">依据</span>“{{ noticeFileName }}”通知/公告,</template>{{ investigationParagraph1Body }}
|
|
</p>
|
|
<p>{{ investigationParagraph2 }}</p>
|
|
<p>
|
|
{{ investigationParagraph3 }}<br />
|
|
检查时间: {{ formattedCheckTime }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup name="NosDetailTaskTab">
|
|
import { showToast } from 'vant';
|
|
|
|
const CATEGORY_REQUIREMENT_LABEL_MAP = {
|
|
非现场检查: '检查要求',
|
|
云备案: '备案文件',
|
|
云查证: '验证文件',
|
|
云巡查: '巡查要求',
|
|
};
|
|
|
|
const props = defineProps({
|
|
detail: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
});
|
|
|
|
const emit = defineEmits(['download-notice']);
|
|
|
|
const requirementLabel = computed(() => {
|
|
return CATEGORY_REQUIREMENT_LABEL_MAP[props.detail.category] || '';
|
|
});
|
|
|
|
const enforcementPersons = computed(() => {
|
|
return props.detail.enforcementPersonNames?.join('、') || ''
|
|
})
|
|
|
|
const requirementItems = computed(() => {
|
|
return props.detail.materialRequirements?.map((item) => item.name).join('、') || ''
|
|
})
|
|
|
|
const formatDateTimeCn = (dateTime) => {
|
|
if (!dateTime) return ''
|
|
const date = new Date(dateTime)
|
|
if (Number.isNaN(date.getTime())) return dateTime
|
|
const year = date.getFullYear()
|
|
const month = String(date.getMonth() + 1).padStart(2, '0')
|
|
const day = String(date.getDate()).padStart(2, '0')
|
|
const hour = String(date.getHours()).padStart(2, '0')
|
|
const minute = String(date.getMinutes()).padStart(2, '0')
|
|
const second = String(date.getSeconds()).padStart(2, '0')
|
|
return `${year}年${month}月${day}日${hour}时${minute}分${second}秒`
|
|
}
|
|
|
|
const formattedCreateTime = computed(() => formatDateTimeCn(props.detail.createTime))
|
|
const formattedCheckTime = computed(() => formatDateTimeCn(props.detail.checkTime))
|
|
const onDownloadNotice = (url) => {
|
|
emit('download-notice', url);
|
|
};
|
|
|
|
const noticeFileName = computed(() => props.detail.proclamations?.[0]?.fileName || '')
|
|
|
|
const noticeText = computed(() => {
|
|
return noticeFileName.value ? `依据“${noticeFileName.value}”通知/公告,` : ''
|
|
})
|
|
|
|
const investigationParagraph1Body = computed(() => {
|
|
const { detail } = props
|
|
const personType = detail.taskTypeId == 5 ? '巡查人员' : '执法人员'
|
|
|
|
return `在${formattedCreateTime.value}深圳市执法局,${personType}${enforcementPersons.value},对${detail.enterpriseName || ''}进行了${detail.category || ''}。`
|
|
})
|
|
|
|
const investigationParagraph1 = computed(() => {
|
|
return `${noticeText.value}${investigationParagraph1Body.value}`
|
|
})
|
|
|
|
const investigationParagraph2 = computed(() => {
|
|
const { detail } = props
|
|
let text = ''
|
|
|
|
if (detail.taskTypeId == 1 || detail.taskTypeId == 5) {
|
|
const matterType = detail.taskTypeId == 5 ? '巡查事项' : '执法事项'
|
|
text += `${matterType},${detail.enforcementMatter || ''};`
|
|
}
|
|
|
|
text += `${requirementLabel.value}有:${requirementItems.value}。`
|
|
|
|
return text
|
|
})
|
|
|
|
const investigationParagraph3 = computed(() => {
|
|
return `企业已提交材料,经核验,企业通过本次${props.detail.category || ''}。`
|
|
})
|
|
|
|
const getInvestigationText = () => {
|
|
return `${investigationParagraph1.value}\n\n${investigationParagraph2.value}\n\n${investigationParagraph3.value}\n检查时间${formattedCheckTime.value}`
|
|
}
|
|
|
|
const copyInvestigationInfo = async () => {
|
|
try {
|
|
const text = getInvestigationText()
|
|
// 兼容处理剪贴板
|
|
if (navigator.clipboard && window.isSecureContext) {
|
|
await navigator.clipboard.writeText(text)
|
|
showToast('复制成功')
|
|
} else {
|
|
const textArea = document.createElement('textarea')
|
|
textArea.value = text
|
|
textArea.style.position = 'absolute'
|
|
textArea.style.left = '-999999px'
|
|
document.body.prepend(textArea)
|
|
textArea.select()
|
|
try {
|
|
document.execCommand('copy')
|
|
showToast('复制成功')
|
|
} catch (error) {
|
|
showToast('复制失败,请手动复制')
|
|
} finally {
|
|
textArea.remove()
|
|
}
|
|
}
|
|
} catch (err) {
|
|
showToast('复制失败,请手动复制')
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.detail-task-tab {
|
|
padding-bottom: 16px;
|
|
}
|
|
|
|
.case-code-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
gap: 12px;
|
|
padding: 12px 16px;
|
|
margin-bottom: 8px;
|
|
background: #fff;
|
|
font-size: 14px;
|
|
|
|
.case-code-label {
|
|
flex: none;
|
|
width: 88px;
|
|
color: #646566;
|
|
}
|
|
|
|
.case-code-value {
|
|
flex: 1;
|
|
color: #323233;
|
|
font-weight: 500;
|
|
text-align: left;
|
|
}
|
|
}
|
|
|
|
.section {
|
|
background: #fff;
|
|
margin-bottom: 8px;
|
|
padding: 0 16px 4px;
|
|
}
|
|
|
|
.section-title {
|
|
padding: 14px 0 8px;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: #323233;
|
|
}
|
|
|
|
.detail-row {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 10px 0;
|
|
border-bottom: 1px solid #f5f5f5;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
|
|
&:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
&--block {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: 8px;
|
|
}
|
|
}
|
|
|
|
.detail-label {
|
|
flex: none;
|
|
width: 80px;
|
|
color: #646566;
|
|
}
|
|
|
|
.detail-value {
|
|
flex: 1;
|
|
min-width: 0;
|
|
color: #323233;
|
|
text-align: left;
|
|
word-break: break-all;
|
|
|
|
&--notice {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
margin-bottom: 8px;
|
|
&:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.notice-name {
|
|
flex: 1;
|
|
color: #323233;
|
|
text-align: left;
|
|
}
|
|
|
|
.btn-download {
|
|
height: 28px;
|
|
padding: 0 12px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.detail-text {
|
|
margin: 0;
|
|
color: #323233;
|
|
line-height: 1.6;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.requirement-list {
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.requirement-item {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 8px;
|
|
padding: 6px 0;
|
|
color: #323233;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.requirement-icon {
|
|
flex: none;
|
|
margin-top: 2px;
|
|
font-size: 16px;
|
|
color: #2b7de9;
|
|
}
|
|
.title-with-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.btn-copy {
|
|
height: 24px;
|
|
padding: 0 10px;
|
|
font-size: 12px;
|
|
border-radius: 4px;
|
|
border-color: #dcdee0;
|
|
color: #646566;
|
|
}
|
|
|
|
.investigation-content {
|
|
padding: 12px;
|
|
background: #f8f9fa;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
color: #323233;
|
|
line-height: 1.6;
|
|
|
|
p {
|
|
margin: 0 0 12px 0;
|
|
|
|
&:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.text-nowrap {
|
|
white-space: nowrap;
|
|
}
|
|
</style>
|
|
|