Merge pull request 'fix : 项目归档附件查询功能优化' (#276) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/276
This commit is contained in:
@@ -91,11 +91,10 @@ export const addLedger = (data) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getTags = (params) => {
|
export const getTags = (projectId) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/mosr/project/implementation/option',
|
url: `/workflow/mosr/attachment/option/${projectId}`,
|
||||||
method: "get",
|
method: "get"
|
||||||
params:params
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
//项目归档
|
//项目归档
|
||||||
|
|||||||
@@ -1,34 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<el-form :model="formData" ref="form" class="query-form" label-width="auto">
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
<el-row>
|
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="detailList" style="width: 100%">
|
||||||
<el-col :span="24">
|
<template #empty>
|
||||||
<el-form-item>
|
<el-empty description="暂无数据"/>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
</template>
|
||||||
</el-form-item>
|
</fvTable>
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item>
|
|
||||||
<el-table :data="detailList" style="width: 100%">
|
|
||||||
<el-table-column prop="projectId" label="项目名称" width="180"/>
|
|
||||||
<el-table-column prop="researchPersonnel" label="研发人员" width="180"/>
|
|
||||||
<el-table-column prop="wagesPayable" label="应发工资"/>
|
|
||||||
<el-table-column prop="performance" label="绩效"/>
|
|
||||||
<el-table-column prop="reserveFund" label="公积金"/>
|
|
||||||
<el-table-column prop="socialSecurity" label="社保"/>
|
|
||||||
<el-table-column prop="annuity" label="年金"/>
|
|
||||||
<el-table-column prop="workday" label="工作日(天)"/>
|
|
||||||
<el-table-column prop="researchDuration" label="研发时长(天)"/>
|
|
||||||
</el-table>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
label: '项目名称',
|
label: '项目名称',
|
||||||
@@ -63,16 +44,57 @@ const searchConfig = reactive([
|
|||||||
colProps: {}
|
colProps: {}
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'projectName',
|
||||||
|
label: '项目名称',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'researchPersonnel',
|
||||||
|
label: '研发人员',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'wagesPayable',
|
||||||
|
label: '应发工资',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'performance',
|
||||||
|
label: '绩效',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'reserveFund',
|
||||||
|
label: '公积金',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'socialSecurity',
|
||||||
|
label: '社保',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'annuity',
|
||||||
|
label: '年金',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'workday',
|
||||||
|
label: '工作日(天)',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'researchDuration',
|
||||||
|
label: '研发时长(天)',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
})
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formData: {
|
|
||||||
type: Array,
|
|
||||||
default: []
|
|
||||||
},
|
|
||||||
data: {
|
|
||||||
type: Array,
|
|
||||||
default: []
|
|
||||||
},
|
|
||||||
detailList: {
|
detailList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form :model="attachment" inline>
|
<el-form :model="attachment" inline>
|
||||||
<el-form-item label="关键词" prop="name">
|
<el-form-item label="名称" prop="fileName">
|
||||||
<el-input v-model="attachment.name" placeholder="请输入" clearable filterable style="width: 300px"/>
|
<el-input v-model="attachment.fileName" placeholder="请输入附件名称查询" clearable filterable style="width: 300px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="标签" prop="tag" v-if="type==='3'">
|
<el-form-item label="标签" prop="tag" v-if="type==='40'">
|
||||||
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
|
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in tagsOption"
|
v-for="item in tagsOption"
|
||||||
@@ -35,10 +35,7 @@ import {getTags} from "@/api/project-manage";
|
|||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const attachment = reactive({
|
const attachment = reactive({})
|
||||||
name: '',
|
|
||||||
tag: ''
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['search'])
|
const emit = defineEmits(['search'])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
otherFileList: {
|
otherFileList: {
|
||||||
@@ -47,7 +44,7 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '0'
|
default: '00'
|
||||||
},
|
},
|
||||||
uploadState:{
|
uploadState:{
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -68,12 +65,13 @@ const tableConfig = reactive({
|
|||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'processNodeTag',
|
prop: 'size',
|
||||||
label: '内置标签',
|
label: '文件大小',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'size',
|
prop: 'createTime',
|
||||||
label: '上传时间',
|
label: '上传时间',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
@@ -95,11 +93,7 @@ const tableConfig = reactive({
|
|||||||
const showTable = ref(true)
|
const showTable = ref(true)
|
||||||
const getTagsOption = () => {
|
const getTagsOption = () => {
|
||||||
if (!route.query.id) return
|
if (!route.query.id) return
|
||||||
let params = {
|
getTags(route.query.id).then(res => {
|
||||||
projectId: route.query.id
|
|
||||||
}
|
|
||||||
getTags(params).then(res => {
|
|
||||||
|
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
tagsOption.value = res.data
|
tagsOption.value = res.data
|
||||||
} else {
|
} else {
|
||||||
@@ -127,11 +121,7 @@ const handleDownload = (row) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
watch(() => props.type, (val) => {
|
watch(() => props.type, (val) => {
|
||||||
console.log('va四川省l', val)
|
|
||||||
props.type = val
|
props.type = val
|
||||||
if (val === '3') {
|
|
||||||
getTagsOption()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
watch(() => props.otherFileList, (val) => {
|
watch(() => props.otherFileList, (val) => {
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
@@ -140,12 +130,9 @@ watch(() => props.otherFileList, (val) => {
|
|||||||
})
|
})
|
||||||
props.otherFileList = val
|
props.otherFileList = val
|
||||||
})
|
})
|
||||||
if (props.type === '3') {
|
if (props.type === '40') {
|
||||||
getTagsOption()
|
getTagsOption()
|
||||||
}
|
}
|
||||||
defineExpose({
|
|
||||||
tagsOption
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -15,8 +15,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
<el-tab-pane label="分摊明细" name="first">
|
<el-tab-pane label="分摊明细" name="first">
|
||||||
<expense-detail :formData="shareData.formData" :data="shareData"
|
<expense-detail :processViewer="shareProcessViewer" :detailList="detailList"
|
||||||
:processViewer="shareProcessViewer" :detailList="detailList"
|
|
||||||
:loading="loading"/>
|
:loading="loading"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="分摊汇总" name="second">
|
<el-tab-pane label="分摊汇总" name="second">
|
||||||
@@ -39,6 +38,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import {getAllocationDetail, getAllocationDetailList} from "@/api/expense-manage";
|
import {getAllocationDetail, getAllocationDetailList} from "@/api/expense-manage";
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
<el-tab-pane label="需求征集" name="00">
|
<el-tab-pane label="需求征集" name="00">
|
||||||
<search-files-by-tag v-if="showTable" @search="searchRequirement" @upload="upload"
|
<search-files-by-tag @search="searchRequirement" @upload="upload"
|
||||||
:otherFileList="otherFileList" :uploadState="uploadState"/>
|
:otherFileList="otherFileList" :uploadState="uploadState"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="需求上报" name="10">
|
<el-tab-pane label="需求上报" name="10">
|
||||||
<search-files-by-tag v-if="showTable" @search="searchReport" @upload="upload"
|
<search-files-by-tag @search="searchReport" @upload="upload"
|
||||||
:otherFileList="otherFileList" :uploadState="uploadState"/>
|
:otherFileList="otherFileList" :uploadState="uploadState"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="项目立项" name="20">
|
<el-tab-pane label="项目立项" name="20">
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
:otherFileList="otherFileList" :uploadState="uploadState"/>
|
:otherFileList="otherFileList" :uploadState="uploadState"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="项目实施" name="40">
|
<el-tab-pane label="项目实施" name="40">
|
||||||
<search-files-by-tag type="3" @search="searchImplementation" @upload="upload" ref="implementation"
|
<search-files-by-tag type="40" @search="searchImplementation" @upload="upload" ref="implementation"
|
||||||
:otherFileList="otherFileList" :uploadState="uploadState"/>
|
:otherFileList="otherFileList" :uploadState="uploadState"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="项目归档" name="50">
|
<el-tab-pane label="项目归档" name="50">
|
||||||
@@ -29,20 +29,18 @@ import {ElNotification} from "element-plus";
|
|||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const activeName = ref('4')
|
const activeName = ref('50')
|
||||||
const attachment = ref({})
|
const attachment = ref({})
|
||||||
const showTable = ref(true)
|
|
||||||
const implementation = ref()
|
const implementation = ref()
|
||||||
const uploadState = ref(true)
|
const uploadState = ref(true)
|
||||||
const otherFileList = ref([])
|
const otherFileList = ref([])
|
||||||
const projectId = ref(route.query.id)
|
const projectId = ref(route.query.id)
|
||||||
const requirementId = ref(route.query.requirementId)
|
const requirementId = ref(route.query.requirementId)
|
||||||
const handleClick = (tab) => {
|
const handleClick = (tab) => {
|
||||||
let name = {}
|
switchSearch(tab.props.name)
|
||||||
switchSearch(name, tab.props.name)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const switchSearch = (name, index) => {
|
const switchSearch = (index) => {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case '00':
|
case '00':
|
||||||
searchRequirement({})
|
searchRequirement({})
|
||||||
@@ -88,6 +86,7 @@ const searchInitiation = async (param) => {
|
|||||||
const searchImplementation = async (param) => {
|
const searchImplementation = async (param) => {
|
||||||
param.targetState = '40'
|
param.targetState = '40'
|
||||||
param.targetId = projectId.value
|
param.targetId = projectId.value
|
||||||
|
console.log('param',param)
|
||||||
searchFileList(param).then(res => {
|
searchFileList(param).then(res => {
|
||||||
changeFileList(res)
|
changeFileList(res)
|
||||||
})
|
})
|
||||||
@@ -102,13 +101,9 @@ const searchFiling = async (param) => {
|
|||||||
|
|
||||||
|
|
||||||
const changeFileList = (res) => {
|
const changeFileList = (res) => {
|
||||||
showTable.value = false
|
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
otherFileList.value = res.data.fileList
|
otherFileList.value = res.data.fileList
|
||||||
uploadState.value = res.data.upload
|
uploadState.value = res.data.upload
|
||||||
nextTick(() => {
|
|
||||||
showTable.value = true
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -120,19 +115,19 @@ const changeFileList = (res) => {
|
|||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (activeName.value === '4') {
|
if (activeName.value === '50') {
|
||||||
searchFiling({})
|
searchFiling({})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const upload = () => {
|
const upload = () => {
|
||||||
if (activeName.value === '3') {
|
if (activeName.value === '40') {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'Implementation/upload',
|
name: 'Implementation/upload',
|
||||||
query: {
|
query: {
|
||||||
id: route.query.id,
|
id: route.query.id,
|
||||||
type: '3'
|
type: '40'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -146,15 +141,15 @@ const upload = () => {
|
|||||||
}
|
}
|
||||||
const switchUpload = (index) => {
|
const switchUpload = (index) => {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case '0':
|
case '00':
|
||||||
return 'Requirement/upload';
|
return 'Requirement/upload';
|
||||||
case '1':
|
case '10':
|
||||||
return 'Summary/upload';
|
return 'Summary/upload';
|
||||||
case '2':
|
case '20':
|
||||||
return 'Initiation/upload';
|
return 'Initiation/upload';
|
||||||
case '3':
|
case '40':
|
||||||
return 'Implementation/upload';
|
return 'Implementation/upload';
|
||||||
case '4':
|
case '50':
|
||||||
return 'Filing/upload';
|
return 'Filing/upload';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ const handleSubmit = async (instance) => {
|
|||||||
})
|
})
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
if(route.query.type=='3'){
|
if(route.query.type==='40'){
|
||||||
await router.push({
|
await router.push({
|
||||||
name: 'Filing/attachment',
|
name: 'Filing/attachment',
|
||||||
query:{
|
query:{
|
||||||
|
|||||||
Reference in New Issue
Block a user