diff --git a/src/api/enterpriseinspections/index.ts b/src/api/enterpriseinspections/index.ts index e3d2451..aefadb7 100644 --- a/src/api/enterpriseinspections/index.ts +++ b/src/api/enterpriseinspections/index.ts @@ -55,5 +55,22 @@ export const EnterpriseInspectionsApi = { // 变更人员ID passOn: async (data: any) => { return await request.post({ url: `/system/enterprise-inspections/passOn`, data }) - } + }, + /** + * 查询企业执法记录 + */ + getListByEnterpriseId: async (params: any) => { + return await request.get({ + url: `/system/enterprise-inspections/inspectionsByEnterpriseId`, + params + }) + }, + /** + * 获取执法记录日志详情 + */ + getLogDetail:async (id: any) => { + return await request.get({ + url: `/system/inspections-log/get?id=${id}`, + }) + }, } diff --git a/src/components/UploadFile/src/FileUploader.vue b/src/components/UploadFile/src/FileUploader.vue index 6418993..668a412 100644 --- a/src/components/UploadFile/src/FileUploader.vue +++ b/src/components/UploadFile/src/FileUploader.vue @@ -27,11 +27,11 @@
- - 查看 + + 放大
- + 删除
@@ -82,7 +82,8 @@ const props = defineProps({ fileType: propTypes.array.def(['image/jpeg', 'image/png', 'image/gif']), // 图片类型限制 ==> 非必传(默认为 ["image/jpeg", "image/png", "image/gif"]) height: propTypes.string.def('150px'), // 组件高度 ==> 非必传(默认为 150px) width: propTypes.string.def('150px'), // 组件宽度 ==> 非必传(默认为 150px) - borderRadius: propTypes.string.def('8px') // 组件边框圆角 ==> 非必传(默认为 8px) + borderRadius: propTypes.string.def('8px'), // 组件边框圆角 ==> 非必传(默认为 8px) + disable: propTypes.bool.def(false) }) const showPlus = ref(false) const { uploadUrl, httpRequest } = useUpload() @@ -138,6 +139,16 @@ watch( { immediate: true, deep: true } ) +watch( + () => props.disable, + (val) => { + if (val) { + showPlus.value = true + } + }, + { immediate: true, deep: true } +) + const emitUpdateModelValue = (fileList: any) => { emit('update:modelValue', fileList) } @@ -284,6 +295,7 @@ defineExpose({ align-items: center; justify-content: center; color: aliceblue; + font-size: 14px; &:hover { color: var(--el-color-primary); transition: var(--el-transition-duration-fast); diff --git a/src/views/enterpriseinspections/EnterpriseInspectionsForm.vue b/src/views/enterpriseinspections/EnterpriseInspectionsForm.vue index 94106b3..91d2e75 100644 --- a/src/views/enterpriseinspections/EnterpriseInspectionsForm.vue +++ b/src/views/enterpriseinspections/EnterpriseInspectionsForm.vue @@ -22,16 +22,21 @@ @@ -454,6 +609,41 @@ onMounted(() => { border-radius: 8px; overflow: hidden; padding: 12px; + .image-wrapper { + position: relative; + height: 130px; + margin-bottom: 12px; + border-radius: 6px; + overflow: hidden; + &:hover { + .operation { + opacity: 1; + } + } + .operation { + cursor: pointer; + opacity: 0; + position: absolute; + inset: 0; + background-color: rgba(0, 0, 0, 0.7); + display: flex; + justify-content: center; + align-items: center; + gap: 20px; + color: #fff; + font-size: 14px; + transition: var(--el-transition-time); + .item { + display: flex; + flex-flow: column nowrap; + align-items: center; + gap: 8px; + &:hover { + color: var(--el-color-primary); + } + } + } + } } .add-prove { width: 200px;