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 @@
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -