fix : 修复项目附件页面细节
This commit is contained in:
@@ -76,6 +76,16 @@ export const addLedger = (data) => {
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export const getTags = (projectId) => {
|
||||
return request({
|
||||
url: '/workflow/mosr/project/implementation/tags',
|
||||
method: "get",
|
||||
params:{
|
||||
projectId:projectId
|
||||
}
|
||||
});
|
||||
};
|
||||
//项目归档
|
||||
export const getConclusionDetail = (ProjectId) => {
|
||||
return request({
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<el-form :model="attachment" inline class="query-form">
|
||||
<el-form-item label="标签" prop="tag">
|
||||
<el-input v-model="attachment.tag" placeholder="请输入标签" clearable style="width: 200px"/>
|
||||
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in tagsOption"
|
||||
:key="item.label"
|
||||
:label="item.value"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
|
||||
@@ -20,7 +27,7 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {getImplementationAttachment} from "@/api/project-manage";
|
||||
import {getImplementationAttachment,getTags} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
@@ -28,6 +35,7 @@ const router = useRouter()
|
||||
const attachment = reactive({
|
||||
tag: ''
|
||||
})
|
||||
const tagsOption = ref([])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -70,7 +78,19 @@ const tableConfig = reactive({
|
||||
})
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
|
||||
const getTagsOption = () => {
|
||||
if (!route.query.id) return
|
||||
getTags(route.query.id).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsOption.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleSearch = () => {
|
||||
let params
|
||||
if (attachment.tag) {
|
||||
@@ -115,6 +135,7 @@ const handleDownload = (row) => {
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
// getTagsOption()
|
||||
handleSearch()
|
||||
</script>
|
||||
|
||||
|
||||
@@ -2,7 +2,15 @@
|
||||
<baseTitle title="标签名称"></baseTitle>
|
||||
<el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">
|
||||
<el-form-item label="标签名称" prop="tagName">
|
||||
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 400px"/>
|
||||
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 400px" v-if="showInput"/>
|
||||
<el-select v-model="formData.tagName" placeholder="请选择标签" clearable filterable style="width: 200px" v-else>
|
||||
<el-option
|
||||
v-for="item in tagsOption"
|
||||
:key="item.label"
|
||||
:label="item.value"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<baseTitle title="其他文件"></baseTitle>
|
||||
@@ -29,6 +37,8 @@ const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const fileList = ref([])
|
||||
const showInput = ref(false)
|
||||
const tagsOption = ref([])
|
||||
const formData = ref({
|
||||
tagName:''
|
||||
})
|
||||
@@ -76,18 +86,29 @@ const name = ref(router.currentRoute.value.name)
|
||||
const rules = reactive({
|
||||
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||
})
|
||||
const getTagsOption = () => {
|
||||
if (!route.query.id) return
|
||||
getTags(route.query.id).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
showInput.value = res.data.length === 0;
|
||||
tagsOption.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const compositeParam = (item) => {
|
||||
let tag = ''
|
||||
if (name.value === 'Implementation/upload') {
|
||||
tag = '项目实施'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
tag: tag,
|
||||
tag: formData.value.tagName,
|
||||
}
|
||||
}
|
||||
const getFile = (val) => {
|
||||
@@ -101,8 +122,7 @@ const getFile = (val) => {
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
tag: item.tag
|
||||
fileId: item.fileId
|
||||
}
|
||||
}
|
||||
const handleSubmit = async (instance) => {
|
||||
@@ -136,6 +156,7 @@ const handleSubmit = async (instance) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
// getTagsOption()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user