diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 7ace708..dfb788d 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -10,7 +10,7 @@ :on-error="handleUploadError" :on-exceed="handleExceed" :on-success="handleUploadSuccess" - :show-file-list="isConstruction" + :show-file-list="showFileList" :headers="headers" class="upload-file-uploader" :list-type="isConstruction ? 'picture-card' : 'text'" @@ -104,6 +104,8 @@ const props = defineProps({ isDarg: propTypes.bool.def(false), // 是否自动上传 autoUpload: propTypes.bool.def(true), + // 是否显示文件列表 + showFileList: propTypes.bool.def(false), // 其他参数 data: propTypes.object.def({}), onUploadSuccess: { diff --git a/src/utils/projectTeam.ts b/src/utils/projectTeam.ts index bf5377e..1134b68 100644 --- a/src/utils/projectTeam.ts +++ b/src/utils/projectTeam.ts @@ -11,6 +11,7 @@ export const getProjectTeam = async () => { isAsc: 'desc', projectId: id }); + const list = res.rows.map((projectTeam: ProjectTeamVO) => ({ value: projectTeam.id, label: projectTeam.teamName diff --git a/src/utils/request.ts b/src/utils/request.ts index 4d4f19b..7844c9c 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -25,6 +25,8 @@ export const globalHeaders = () => { axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'; axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID; +axios.defaults.headers['projectId'] = cache.local.getJSON('selectedProject').id; + // 创建 axios 实例 const service = axios.create({ baseURL: import.meta.env.VITE_APP_BASE_API, diff --git a/src/views/cory/contactformtemplate/index.vue b/src/views/cory/contactformtemplate/index.vue index f96c3b6..7e2a732 100644 --- a/src/views/cory/contactformtemplate/index.vue +++ b/src/views/cory/contactformtemplate/index.vue @@ -87,7 +87,7 @@ - + @@ -100,7 +100,9 @@ ref="fileUploadRef" :data="{ name: form.name, projectId: currentProject.id }" uploadUrl="/cory/contactformtemplate" + :limit="1" :onUploadSuccess="handleUploadSuccess" + showFileList /> 查看附件 - + --> @@ -51,17 +50,17 @@ 详情 - 下载 + 删除 - + - 联系单 + 外部联系单 工程名称:{{ tableDetail.projectName }} 编号:{{ tableDetail.serialNumber }} @@ -110,13 +109,13 @@ > + - - - @@ -207,7 +206,7 @@ const handleDownload = () => { `; const blob = (window as any).htmlDocx.asBlob(html); - saveAs(blob, '工程变更申请单.docx'); + saveAs(blob, '外部联系单.docx'); }; const applyInlineTableStyles = (rootEl: HTMLElement) => { rootEl.querySelectorAll('table').forEach((table) => { @@ -241,4 +240,25 @@ const openFile = async (url: string) => { :deep(.zebra) { background: #f5f7fa; } +.dialog-footer { + height: 100px; + display: flex; + + flex-direction: column; + justify-content: space-between; + position: absolute; + top: 14%; + right: 6%; + background: #fff; + box-shadow: 0 0 10px #ddd; + text-align: center; + padding: 20px 10px; + + .btn-item { + display: flex; + flex-direction: column; + justify-content: center; + cursor: pointer; + } +} diff --git a/src/views/template/components/engineeringChangeApplicationForm.vue b/src/views/cory/template/components/engineeringChangeApplicationForm.vue similarity index 94% rename from src/views/template/components/engineeringChangeApplicationForm.vue rename to src/views/cory/template/components/engineeringChangeApplicationForm.vue index b76804f..d10ae8f 100644 --- a/src/views/template/components/engineeringChangeApplicationForm.vue +++ b/src/views/cory/template/components/engineeringChangeApplicationForm.vue @@ -64,7 +64,7 @@ 详情 - 下载 + 删除 @@ -72,10 +72,10 @@ - + - 工程变更申请单 + 变更单 编号:{{ tableDetail.id }} @@ -174,14 +174,13 @@ + - - - - @@ -290,7 +289,7 @@ const handleDownload = () => { `; const blob = (window as any).htmlDocx.asBlob(html); - saveAs(blob, '工程变更申请单.docx'); + saveAs(blob, '变更单.docx'); }; const applyInlineTableStyles = (rootEl: HTMLElement) => { rootEl.querySelectorAll('table').forEach((table) => { @@ -345,4 +344,25 @@ const applyInlineTableStyles = (rootEl: HTMLElement) => { font-weight: bold; background-color: #f2f2f2; } +.dialog-footer { + height: 100px; + display: flex; + + flex-direction: column; + justify-content: space-between; + position: absolute; + top: 14%; + right: 6%; + background: #fff; + box-shadow: 0 0 10px #ddd; + text-align: center; + padding: 20px 10px; + + .btn-item { + display: flex; + flex-direction: column; + justify-content: center; + cursor: pointer; + } +} diff --git a/src/views/template/index.vue b/src/views/cory/template/index.vue similarity index 82% rename from src/views/template/index.vue rename to src/views/cory/template/index.vue index 1757868..407de8b 100644 --- a/src/views/template/index.vue +++ b/src/views/cory/template/index.vue @@ -49,18 +49,17 @@ - @@ -70,7 +69,7 @@ - + @@ -112,7 +111,7 @@ - + @@ -200,49 +199,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -260,7 +216,6 @@ import { useUserStoreHook } from '@/store/modules/user'; import type { FormInstance, FormRules } from 'element-plus'; import Contactform from './components/contactform.vue'; import EngineeringChangeApplicationForm from './components/engineeringChangeApplicationForm.vue'; -import Notice from './components/notice.vue'; import { listContactTypeformtemplate } from '@/api/cory/contactformtemplate'; import { addContactnotice, delContactnotice, listContactnotice } from '@/api/cory/contactnotice'; @@ -289,11 +244,11 @@ const ids = ref>([]); const projectTypeOptions = ref([ { value: '0', - label: '联系单' + label: '外部联系单' }, { value: '1', - label: '工程变更申请单' + label: '变更单' }, { value: '2', @@ -344,6 +299,7 @@ const data = reactive>({ teamId: undefined, type: undefined, params: {}, + ids: ['1942107830848872449', '1942107931415699457'], projectType: undefined }, rules: { @@ -394,8 +350,6 @@ const changeForeman = (value: string | number) => { const handleQuery = () => {}; const resetQuery = () => {}; const getList = async () => { - console.log(queryParams.value.projectType); - if (!queryParams.value.projectType) { const res = await listContactTypeformtemplate(queryParams.value); projectTypeOptions.value = res.data; diff --git a/src/views/template/components/notice.vue b/src/views/cory/workMessage/components/notice.vue similarity index 58% rename from src/views/template/components/notice.vue rename to src/views/cory/workMessage/components/notice.vue index 38c998f..08c25c1 100644 --- a/src/views/template/components/notice.vue +++ b/src/views/cory/workMessage/components/notice.vue @@ -1,6 +1,6 @@ - + @@ -63,72 +63,98 @@ 通知单 - 工程名称: - 编号:123123123132 + 填报人:{{ safetyInspectionDetail?.creatorName }} + 填报时间:{{ safetyInspectionDetail?.createTime }} - - - - - - - + {{ currentProject?.name }} + + + + + + + {{ safetyInspectionDetail?.checkTime }} + + {{ safetyInspectionDetail?.creatorName }} + + {{ safetyInspectionDetail?.correctorName }} + + + {{ dayjs(safetyInspectionDetail?.rectificationDeadline).format('YYYY 年 MM 月 DD 日') }} + - + {{ safetyInspectionDetail?.hiddenDanger }} + - + + + + + + + + {{ item.originalName }} + + + + - + + + - - - + {{ safetyInspectionDetail?.teamName }} + + {{ safetyInspectionDetail?.rectificationTime }} + + + {{ safetyInspectionDetail?.measure }} + - + + + + + + + + {{ item.originalName }} + + + + - - - + {{ safetyInspectionDetail?.creatorName }} + + {{ safetyInspectionDetail?.reviewTime }} + + {{ safetyInspectionDetail?.review }} + @@ -142,7 +168,33 @@ diff --git a/src/views/drone/components/home/components/AirportInformationDetails/index.vue b/src/views/drone/components/home/components/AirportInformationDetails/index.vue index 6a2b8d9..a335503 100644 --- a/src/views/drone/components/home/components/AirportInformationDetails/index.vue +++ b/src/views/drone/components/home/components/AirportInformationDetails/index.vue @@ -40,7 +40,8 @@