fix : 修复项目实施/归档上传附件显示,
This commit is contained in:
@@ -20,7 +20,7 @@ const router = useRouter()
|
||||
const activeName = ref('50')
|
||||
const attachment = ref({})
|
||||
const loading = ref(false)
|
||||
const uploadState = ref(true)
|
||||
const uploadState = ref(false)
|
||||
const fileList = ref([])
|
||||
const projectId = ref(route.query.id)
|
||||
const requirementId = ref(route.query.requirementId)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {switchAttachmentState} from "@/api/project-manage/attachment";
|
||||
|
||||
const router = useRouter()
|
||||
const shortcuts = [
|
||||
@@ -244,6 +245,12 @@ const tableConfig = reactive({
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑', prem: ['project:management:filing:conclusion'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("openFileSwitch")) {
|
||||
btn.push({label: '开启上传', prem: ['project:management:filing:conclusion'], func: () => handleOpenUpload(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("closeFileSwitch")) {
|
||||
btn.push({label: '关闭上传', prem: ['project:management:filing:conclusion'], func: () => handleCloseUpload(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
@@ -316,4 +323,24 @@ const handleEdit = (row) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleOpenUpload=(row)=>{
|
||||
let params={
|
||||
open: true,
|
||||
projectId: row.projectId
|
||||
}
|
||||
switchAttachmentState(params).then(res=>{
|
||||
console.log('res',res)
|
||||
tableIns.value.refresh()
|
||||
})
|
||||
}
|
||||
const handleCloseUpload=(row)=>{
|
||||
let params={
|
||||
open: false,
|
||||
projectId: row.projectId
|
||||
}
|
||||
switchAttachmentState(params).then(res=>{
|
||||
console.log('res',res)
|
||||
tableIns.value.refresh()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -29,15 +29,14 @@
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {searchFileList} from "@/api/project-manage/attachment.js";
|
||||
import {getTags} from "@/api/project-manage";
|
||||
import {ElLoading, ElNotification} from "element-plus";
|
||||
import {computed, ref} from "vue";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {searchImplementationFileList} from "@/api/project-manage/attachment";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const uploadState = ref(true)
|
||||
const uploadState = ref(false)
|
||||
const attachment = reactive({
|
||||
tag: ''
|
||||
})
|
||||
@@ -140,7 +139,7 @@ const handleSearch = () => {
|
||||
})
|
||||
params.tag = attachment.tag
|
||||
}
|
||||
searchFileList(params).then(res => {
|
||||
searchImplementationFileList(params).then(res => {
|
||||
showTable.value = false
|
||||
if (res.code === 1000) {
|
||||
otherFileList.value = res.data.fileList
|
||||
|
||||
Reference in New Issue
Block a user