Merge pull request 'master' (#870) from master into prod

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/870
This commit is contained in:
2024-10-25 12:21:03 +00:00
2 changed files with 23 additions and 11 deletions

View File

@@ -8,6 +8,13 @@ export const searchFileList = (params) => {
params: params params: params
}); });
}; };
export const searchAllFileList = (params) => {
return request({
url: '/workflow/mosr/attachment/all',
method: "get",
params: params
});
};
export const uploadFileList = (data) => { export const uploadFileList = (data) => {
return request({ return request({
url: '/workflow/mosr/attachment/upload', url: '/workflow/mosr/attachment/upload',

View File

@@ -12,14 +12,11 @@
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import {searchFileList} from "@/api/project-manage/attachment.js"; import {searchFileList,searchAllFileList} from "@/api/project-manage/attachment.js";
import {ElNotification} from "element-plus"; import {ElNotification} from "element-plus";
import {computed, ref} from "vue"; import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api"; import {getBaseInfoApi} from "@/components/steps/api";
import {useCacheStore} from '@/stores/cache.js' import {useCacheStore} from '@/stores/cache.js'
import {toThousands} from '@/utils/changePrice.js' import {toThousands} from '@/utils/changePrice.js'
const cacheStore = useCacheStore() const cacheStore = useCacheStore()
const route = useRoute() const route = useRoute()
@@ -260,7 +257,7 @@ const baseForm = ref()
const paneList = ref([ const paneList = ref([
{ {
label: '全部', label: '全部',
name: '111' name: 'all'
}, },
{ {
label: '需求征集', label: '需求征集',
@@ -329,12 +326,20 @@ const handleClick = (tab) => {
} }
const search = async (param) => { const search = async (param) => {
param.targetId = projectId.value if( activeName.value=='all'){
param.targetState = activeName.value param.targetId = projectId.value
searchFileList(param).then(res => { searchAllFileList(param).then(res => {
loading.value = false loading.value = false
changeFileList(res) changeFileList(res)
}) })
}else {
param.targetId = projectId.value
param.targetState = activeName.value
searchFileList(param).then(res => {
loading.value = false
changeFileList(res)
})
}
} }
const changeFileList = (res) => { const changeFileList = (res) => {