From 5e75a6a49fab5e644f46c01707020f46b6d54016 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 26 十一月 2024 23:09:55 +0800
Subject: [PATCH] 上传文件筛选文件类型
---
src/views/projectEngineering/projectLibrary/projectDetails.vue | 83 ++++++++++++++++++++++++++++-------------
1 files changed, 56 insertions(+), 27 deletions(-)
diff --git a/src/views/projectEngineering/projectLibrary/projectDetails.vue b/src/views/projectEngineering/projectLibrary/projectDetails.vue
index 0cd0d7e..39a6a44 100644
--- a/src/views/projectEngineering/projectLibrary/projectDetails.vue
+++ b/src/views/projectEngineering/projectLibrary/projectDetails.vue
@@ -1,6 +1,6 @@
<template>
<el-card class="card-container">
- <div class="flex justify-between mb-4">
+ <div class="flex-container mb-4">
<el-tabs v-model="currentTab" @tab-click="handleClick">
<el-tab-pane
v-for="item in TABS_DATA"
@@ -8,28 +8,33 @@
:label="item.label"
:name="item.value"
>
- <template slot="label">
- <div class="text-sm">{{ item.label }}</div>
+ <template slot-scope="item">
+ <div class="tab-label">{{ item.label }}</div>
</template>
</el-tab-pane>
</el-tabs>
</div>
- <component :is="componentName" ref="childRef" :disabled="disabled" class="w-full h-[calc(100%-55px)]" />
- <div v-if="!disabled" class="mt-[3%] ml-[3%] flex">
- <el-button class="w-[72px]" type="primary" @click="submit">淇濆瓨</el-button>
- <el-button class="w-[72px]" @click="reset">閲嶇疆</el-button>
- <!-- <el-button v-else class="w-[72px]" @click="cancel">鍙栨秷</el-button> -->
+ <component
+ :is="componentName"
+ ref="childRef"
+ :disabled="disabled"
+ class="full-width custom-height"
+ />
+ <div v-if="!disabled" class="button-container">
+ <el-button class="save-button" type="primary" @click="submit">淇濆瓨</el-button>
+ <el-button class="reset-button" @click="reset">閲嶇疆</el-button>
+ <!-- <el-button v-else class="cancel-button" @click="cancel">鍙栨秷</el-button> -->
</div>
</el-card>
</template>
<script>
import BasicInfo from '@/views/projectEngineering/projectLibrary/component/BasicInfo';
-// import InvestInfo from '@/components/InvestInfo.vue';
-// import InvestmentFunds from '@/components/investmentFunds.vue';
-// import LegalPerson from '@/components/legalPerson.vue';
-// import PolicyInfo from '@/components/PolicyInfo.vue';
-// import DocumentsInfo from '@/components/DocumentsInfo.vue';
+import InvestInfo from '@/views/projectEngineering/projectLibrary/component/InvestInfo';
+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 '@/views/projectEngineering/projectLibrary/component/DocumentsInfo';
import { addProject, getProject, updateProject, getProjectCode } from '@/api/projectInfo';
export default {
@@ -38,7 +43,7 @@
currentTab: '椤圭洰绠$悊鍩虹淇℃伅',
id: this.$route.query.id || '',
disabled: false,
- componentName: 'BasicInfo',
+ componentName: BasicInfo,
TABS_DATA: [
{
label: '椤圭洰绠$悊鍩虹淇℃伅',
@@ -48,32 +53,30 @@
{
label: '鎶曡祫绠$悊鍩虹淇℃伅',
value: '浠诲姟涓嬪彂',
- componentName: 'InvestInfo'
+ componentName: InvestInfo
},
{
label: ' 椤圭洰鎶曡祫鍙婅祫閲戞潵婧�',
value: '椤圭洰鎶曡祫鍙婅祫閲戞潵婧�',
- componentName: 'InvestmentFunds'
+ componentName: InvestmentFunds
},
{
label: '椤圭洰(娉曚汉)鍗曚綅鐧昏淇℃伅',
value: '椤圭洰(娉曚汉)鍗曚綅鐧昏淇℃伅',
- componentName: 'LegalPerson'
+ componentName: LegalPerson
},
{
label: '鎶曡祫椤圭洰浜т笟鏀跨瓥绗﹀悎鎯呭喌',
value: '鎶曡祫椤圭洰浜т笟鏀跨瓥绗﹀悎鎯呭喌',
- componentName: 'PolicyInfo'
+ componentName: PolicyInfo
},
{
label: '鐩稿叧鏂囦功',
value: '鐩稿叧鏂囦功',
- componentName: 'DocumentsInfo'
+ componentName: DocumentsInfo
}
],
childRef: null,
- // 鍋囪杩欎簺鐘舵�佹槸浠� Vuex 涓幏鍙栫殑锛屾垨鑰呬綘鍙互鐩存帴鍦� data 涓畾涔夊畠浠�
- // projectForm, investment, investmentFunds, legalPerson, resetPlanLibrary, investmentProjectPolicyComplianceDTO, fileIdList, documentsInfoList, projectList, fileList
};
},
methods: {
@@ -165,7 +168,6 @@
this.getProjectInfo(this.id);
} else {
this.getProjectCodeApi();
- // 鍋囪 resetPlanLibrary 鏄竴涓柟娉曪紝鐢ㄤ簬閲嶇疆鐘舵��
this.resetPlanLibrary();
this.fileList = [];
this.fileIdList = [];
@@ -184,8 +186,6 @@
}
});
},
- // 鍋囪 resetPlanLibrary 鏄粠鏌愪釜鍦版柟寮曞叆鎴栧畾涔夌殑锛屼綘闇�瑕佺‘淇濆畠鍦ㄤ綘鐨勭粍浠朵腑鍙敤
- // resetPlanLibrary() { ... }
},
created() {
// 鍦ㄧ粍浠跺垱寤烘椂鑾峰彇椤圭洰淇℃伅锛屽鏋� id 瀛樺湪
@@ -193,8 +193,6 @@
this.getProjectInfo(this.id);
} else {
this.getProjectCodeApi();
- // 鍒濆鍖栨垨閲嶇疆鐘舵��
- // this.resetPlanLibrary();
}
},
@@ -202,5 +200,36 @@
</script>
<style scoped>
-/* 浣犵殑鏍峰紡 */
+
+::v-deep .el-tabs__nav-wrap::after {
+ background-color: rgba(0, 0, 0, 0) !important;
+}
+.flex-container {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 16px;
+}
+
+.tab-label {
+ font-size: 14px;
+}
+
+.full-width {
+ width: 100%;
+}
+
+.custom-height {
+ height: calc(100% - 55px);
+}
+
+.button-container {
+ margin-top: 3%;
+ margin-left: 3%;
+ display: flex;
+}
+
+.save-button,
+.reset-button {
+ width: 72px;
+}
</style>
--
Gitblit v1.8.0