feat(project-management): 更新项目管理相关页面文案并优化附件功能

This commit is contained in:
dj
2025-03-22 23:11:09 +08:00
parent dd75bc6513
commit 53bab74ea9
21 changed files with 257 additions and 157 deletions

View File

@@ -3,25 +3,54 @@
<el-col :span="24">
<baseTitle :title="'项目附件'"></baseTitle>
</el-col>
<el-form :model="attachmentParam" inline style="margin-left: 15px">
<el-form-item label="标签" prop="tag">
<el-select v-model="attachmentParam.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
<el-option
v-for="item in tagsOption"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
<el-button v-if="uploadState&&isLineBtn" color="#DED0B2" @click="handleUpload">上传附件</el-button>
</el-form-item>
</el-form>
<el-col v-if="!isLineBtn" :span="24" style="margin-bottom: 8px;margin-left: 15px">
<!-- <div class="file-tag">-->
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" style="margin-left: 15px;margin-top: -10px">
<el-tab-pane v-for="item in tagsOption"
:key="item.value"
:label="item.label"
:name="item.value">
<div class="tag-title">
<div></div>
{{item.label}}
</div>
</el-tab-pane>
<el-tab-pane name="plus">
<template #label>
<div style="margin-top: 4px;">
<el-icon color="#BEA266">
<Plus/>
</el-icon>
</div>
</template>
</el-tab-pane>
</el-tabs>
<!-- </div>-->
<!-- <el-form :model="attachmentParam" inline style="margin-left: 15px">-->
<!-- <el-form-item label="标签" prop="tag">-->
<!-- <el-select v-model="attachmentParam.tag" placeholder="请选择标签" clearable filterable style="width: 300px">-->
<!-- <el-option-->
<!-- v-for="item in tagsOption"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item>-->
<!-- <el-button @click="handleSearch" color="#DED0B2">搜索</el-button>-->
<!-- <el-button v-if="uploadState&&isLineBtn" color="#DED0B2" @click="handleUpload">上传附件</el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
</el-row>
<el-row style="margin-top:-15px;margin-bottom: 8px;margin-left: 15px">
<el-col v-if="!isLineBtn" :span="2" style="margin-right: -10px">
<el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>
</el-col>
<el-col :span="2" >
<el-button color="#DED0B2" @click="handleEditTag">编辑</el-button>
</el-col>
</el-row>
<fvTable style="width: 100%;min-height:311px;max-height: 311px" v-if="showAttachmentTable" height="311"
:tableConfig="executeTableConfig" class="execute-apply-table"
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
@@ -29,8 +58,8 @@
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
</template>
</fvTable>
</el-row>
<file-preview ref="filePreviewRef" :fullscreen="false" v-if="filePreviewShow" :fileName="filePreviewParam.fileName" :fileUrl="filePreviewParam.fileUrl"
<file-preview ref="filePreviewRef" :fullscreen="false" v-if="filePreviewShow" :fileName="filePreviewParam.fileName"
:fileUrl="filePreviewParam.fileUrl"
:fileType="filePreviewParam.fileType"/>
</template>
@@ -47,6 +76,7 @@ const attachmentParam = reactive({
const uploadState = ref(false)
const tagsOption = ref([])
const showAttachmentTable = ref(true)
const activeName = ref('测试2')
const props = defineProps({
fileNameTableWidth: {
@@ -109,14 +139,14 @@ const filePreviewParam = ref({
fileType: 'pdf'
})
const filePreviewShow = ref(false)
const clickToPreview=(row)=>{
const clickToPreview = (row) => {
filePreviewShow.value = false
filePreviewParam.value = {
fileUrl: row.url,
fileName: row.originalFileName,
fileType: row.fileType
}
nextTick(()=>{
nextTick(() => {
filePreviewShow.value = true
})
}
@@ -158,6 +188,7 @@ const getTagsOption = () => {
getTags(route.query.projectId).then(res => {
if (res.code === 1000) {
tagsOption.value = res.data
activeName.value=res.data[0].value
} else {
ElNotification({
title: '提示',
@@ -180,7 +211,7 @@ const handleUpload = () => {
}
handleSearch()
getTagsOption()
onActivated(()=>{
onActivated(() => {
handleSearch()
getTagsOption()
})
@@ -217,8 +248,44 @@ onActivated(()=>{
}
}
</style>
<style scoped>
<style scoped lang="scss">
.tag-title{
display: flex;
align-items: center;
margin: 10px 0;
margin-top: 15px;
>div{
margin-right: 5px;
width: 4px;
height: 20px;
background-color: #BEA266;
}
}
:deep(.el-table--fit ) {
height: 311px !important;
}
:deep(.el-tabs__nav){
width: 1308px;
}
:deep(.el-tabs__item){
flex: none!important;
}
:deep(.el-tabs__header) {
margin-bottom: 0;
}
:deep(.el-tabs__item.is-active) {
color: #BEA266;
}
:deep(.el-tabs__active-bar) {
background-color: #BEA266;
}
.file-tag {
width: 100%;
display: flex;
border-bottom: 2px solid #f6f6f6;
/*align-items: center;*/
}
</style>