From 582e789719561672e6c55a4b23219cb278a5d5d6 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 26 十一月 2024 22:53:39 +0800
Subject: [PATCH] 相关文书页面
---
src/views/projectEngineering/projectLibrary/projectDetails.vue | 10 +----
src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue | 89 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 91 insertions(+), 8 deletions(-)
diff --git a/src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue b/src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue
new file mode 100644
index 0000000..f599c38
--- /dev/null
+++ b/src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue
@@ -0,0 +1,89 @@
+<template>
+ <div class="policy-info">
+ <el-form ref="demoFormRef" :disabled="disabled" :model="fileIdList" class="dialog_form">
+ <el-row :gutter="0">
+ <el-col :span="20">
+ <el-form-item label="闄勪欢:" label-width="100px" prop="appendix" style="width: 100%">
+ <div style="display: flex;gap: 10px">
+ <file-upload v-model="documentsInfoList"
+ :fileType="accept"
+ :isShowTip="false"/>
+ <div v-if="documentsInfoList.length === 0" style="color: #a9afbc">鏀寔涓婁紶PDF鏍煎紡鏂囦欢</div>
+ </div>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ </div>
+</template>
+
+<script>
+
+export default {
+ props: {
+ disabled: {
+ required: true,
+ type: Boolean,
+ default: false
+ }
+ },
+ data() {
+ return {
+ fileIdList: [],
+ documentsInfoList: [],
+ accept: ['pdf', 'docx', 'xlsx', 'jpg','jpeg'],
+ };
+ },
+ watch: {
+ // 鐩戝惉 documentsInfoList 鐨勫彉鍖栵紝骞舵洿鏂� fileIdList
+ documentsInfoList(newVal) {
+ this.fileIdList = newVal.map(item => item.fileId);
+ }
+ },
+ methods: {
+ handleRemove(file) {
+ if (file) {
+ this.fileIdList = this.documentsInfoList.map(item => item.fileId);
+ localStorage.setItem('fileIdList', JSON.stringify(file));
+ }
+ },
+ handleAdd(file) {
+ if (file && file.length > 0) {
+ localStorage.setItem('fileIdList', JSON.stringify(file));
+ }
+ }
+ },
+
+ mounted() {
+ }
+};
+</script>
+
+<style lang="scss" scoped>
+.item {
+ width: 100%;
+}
+
+.documents-info-items {
+ display: inline-block;
+ width: 100%;
+ height: 130px;
+ border: 1px solid #dbdeea;
+ background-color: #f3f7fc;
+
+ .upload-files-items {
+ margin-top: 10px;
+ margin-left: 50px;
+ }
+}
+
+.input-row {
+ display: flex;
+ width: 100%;
+
+ .input-item {
+ width: 100%;
+ }
+}
+
+</style>
diff --git a/src/views/projectEngineering/projectLibrary/projectDetails.vue b/src/views/projectEngineering/projectLibrary/projectDetails.vue
index c319965..39a6a44 100644
--- a/src/views/projectEngineering/projectLibrary/projectDetails.vue
+++ b/src/views/projectEngineering/projectLibrary/projectDetails.vue
@@ -34,7 +34,7 @@
import InvestmentFunds from '@/views/projectEngineering/projectLibrary/component/investmentFunds';
import LegalPerson from '@/views/projectEngineering/projectLibrary/component/legalPerson';
import PolicyInfo from '@/views/projectEngineering/projectLibrary/component/PolicyInfo';
-// import DocumentsInfo from '@/components/DocumentsInfo.vue';
+import DocumentsInfo from '@/views/projectEngineering/projectLibrary/component/DocumentsInfo';
import { addProject, getProject, updateProject, getProjectCode } from '@/api/projectInfo';
export default {
@@ -73,12 +73,10 @@
{
label: '鐩稿叧鏂囦功',
value: '鐩稿叧鏂囦功',
- componentName: 'DocumentsInfo'
+ componentName: DocumentsInfo
}
],
childRef: null,
- // 鍋囪杩欎簺鐘舵�佹槸浠� Vuex 涓幏鍙栫殑锛屾垨鑰呬綘鍙互鐩存帴鍦� data 涓畾涔夊畠浠�
- // projectForm, investment, investmentFunds, legalPerson, resetPlanLibrary, investmentProjectPolicyComplianceDTO, fileIdList, documentsInfoList, projectList, fileList
};
},
methods: {
@@ -188,8 +186,6 @@
}
});
},
- // 鍋囪 resetPlanLibrary 鏄粠鏌愪釜鍦版柟寮曞叆鎴栧畾涔夌殑锛屼綘闇�瑕佺‘淇濆畠鍦ㄤ綘鐨勭粍浠朵腑鍙敤
- // resetPlanLibrary() { ... }
},
created() {
// 鍦ㄧ粍浠跺垱寤烘椂鑾峰彇椤圭洰淇℃伅锛屽鏋� id 瀛樺湪
@@ -197,8 +193,6 @@
this.getProjectInfo(this.id);
} else {
this.getProjectCodeApi();
- // 鍒濆鍖栨垨閲嶇疆鐘舵��
- // this.resetPlanLibrary();
}
},
--
Gitblit v1.8.0