fix : 修复实施图片
This commit is contained in:
@@ -1,466 +1,466 @@
|
||||
<template>
|
||||
<div style="padding: 0 30px">
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane v-for="item in paneList" :label="item.label" :name="item.name">
|
||||
<search-files-by-tag @search="search" @upload="upload" :type="item.name==='30'?'30':''" :allFile="item.name=='all'?true:false"
|
||||
:fileList="fileList" :uploadState="uploadState" v-model:loading="loading"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {searchFileList,searchAllFileList} from "@/api/project-manage/attachment.js";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const activeName = ref('50')
|
||||
const attachment = ref({})
|
||||
const loading = ref(false)
|
||||
const uploadState = ref(false)
|
||||
const fileList = ref([])
|
||||
const projectId = ref(route.query.id)
|
||||
const requirementId = ref(route.query.requirementId)
|
||||
const baseFormData = ref([])
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '承办单位',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectType ?
|
||||
<span>{filterDict(cacheStore.getDict('project_type'), baseFormData.value?.projectType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.rdSubject ?
|
||||
<span>{filterDict(cacheStore.getDict('rd_subject'), baseFormData.value?.rdSubject)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'investmentType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.investmentType ?
|
||||
<span>{filterDict(cacheStore.getDict('invest_type'), baseFormData.value?.investmentType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'businessSegment',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.businessSegment ?
|
||||
<span>{filterDict(cacheStore.getDict('business_segment'), baseFormData.value?.businessSegment)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '标准制定',
|
||||
prop: 'technicalStandard',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.technicalStandard ?
|
||||
<span>{filterDict(cacheStore.getDict('technical_standard'), baseFormData.value?.technicalStandard)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectImpact ?
|
||||
<span>{filterDict(cacheStore.getDict('project_impact'), baseFormData.value?.projectImpact)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '预估经费预算(元)',
|
||||
prop: 'economicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}, {
|
||||
label: '实际经费预算(元)',
|
||||
prop: 'actualEconomicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.actualEconomicEstimate ?
|
||||
<span>{toThousands(baseFormData.value?.actualEconomicEstimate)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'industryUniversityResearch',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.industryUniversityResearch ?
|
||||
<span>{filterDict(cacheStore.getDict('industry_university'), baseFormData.value?.industryUniversityResearch)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'governmentDeclaration',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.governmentDeclaration ?
|
||||
<span>{filterDict(cacheStore.getDict('government_declaration'), baseFormData.value?.governmentDeclaration)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属专项资金项目',
|
||||
prop: 'specialFund',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},{
|
||||
label: '预估专项资金(元)',
|
||||
prop: 'forecastSpecialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.forecastSpecialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.forecastSpecialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '实际专项资金(元)',
|
||||
prop: 'specialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.specialFundAmount ?
|
||||
<span>{ toThousands(baseFormData.value?.specialFundAmount )}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '是否在预算内',
|
||||
prop: 'isWithinBudget',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.isWithinBudget!=null ? baseFormData.value?.isWithinBudget?
|
||||
<span>{'预算内'}</span>
|
||||
: <span>{'预算外'}</span>:'--'
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '部门分管领导',
|
||||
prop: 'optionalChargeLeadership',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '主项目',
|
||||
prop: 'masterProjectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const baseForm = ref()
|
||||
const paneList = ref([
|
||||
{
|
||||
label: '全部',
|
||||
name: 'all'
|
||||
},
|
||||
{
|
||||
label: '需求征集',
|
||||
name: '00'
|
||||
},
|
||||
{
|
||||
label: '需求上报',
|
||||
name: '10'
|
||||
},
|
||||
{
|
||||
label: '项目立项',
|
||||
name: '20'
|
||||
},
|
||||
{
|
||||
label: '项目实施',
|
||||
name: '30'
|
||||
},
|
||||
{
|
||||
label: '项目验收',
|
||||
name: '40'
|
||||
},
|
||||
{
|
||||
label: '项目归档',
|
||||
name: '50'
|
||||
}
|
||||
])
|
||||
//匹配字典值,返回对应值的字典标签
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
baseForm.value.setValues(data)
|
||||
baseFormData.value = data
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
const handleClick = (tab) => {
|
||||
activeName.value = tab.props.name
|
||||
loading.value = true
|
||||
search({})
|
||||
}
|
||||
|
||||
const search = async (param) => {
|
||||
if( activeName.value=='all'){
|
||||
let params={
|
||||
targetId:projectId.value,
|
||||
targetState:param.targetState,
|
||||
fileName:param.fileName
|
||||
}
|
||||
// param.targetId = projectId.value
|
||||
searchAllFileList(params).then(res => {
|
||||
loading.value = false
|
||||
changeFileList(res)
|
||||
})
|
||||
}else {
|
||||
let notAllParams={
|
||||
...param,
|
||||
targetId:projectId.value,
|
||||
targetState:activeName.value
|
||||
}
|
||||
// param.targetId = projectId.value
|
||||
// param.targetState = activeName.value
|
||||
searchFileList(notAllParams).then(res => {
|
||||
loading.value = false
|
||||
changeFileList(res)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const changeFileList = (res) => {
|
||||
if (res.code === 1000) {
|
||||
fileList.value = res.data.fileList
|
||||
uploadState.value = res.data.upload
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const upload = () => {
|
||||
if (activeName.value === '30') {
|
||||
router.push({
|
||||
name: 'Implementation/upload',
|
||||
query: {
|
||||
projectId: route.query.id,
|
||||
requirementId: requirementId.value,
|
||||
type: '30'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
router.push({
|
||||
name: 'Filing/upload',
|
||||
query: {
|
||||
id: route.query.id,
|
||||
name: activeName.value,
|
||||
requirementId: requirementId.value
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
watchEffect(() => {
|
||||
if (requirementId.value === '-1') {
|
||||
console.info("🚀 ~method: -----", paneList.value.filter(item=>item.name!=='00'))
|
||||
paneList.value = paneList.value.filter(item=>item.name!=='00')
|
||||
|
||||
}
|
||||
})
|
||||
search({})
|
||||
onActivated(() => {
|
||||
if (route.query.name) {
|
||||
activeName.value = route.query.name
|
||||
search({})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-tabs__header) {
|
||||
margin: 15px 0 30px 0;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.is-active {
|
||||
color: black;
|
||||
//background-color: #DED0B2;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div style="padding: 0 30px">
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane v-for="item in paneList" :label="item.label" :name="item.name">
|
||||
<search-files-by-tag @search="search" @upload="upload" :type="item.name==='30'?'30':''" :allFile="item.name=='all'?true:false"
|
||||
:fileList="fileList" :uploadState="uploadState" v-model:loading="loading"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {searchFileList,searchAllFileList} from "@/api/project-manage/attachment.js";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const activeName = ref('50')
|
||||
const attachment = ref({})
|
||||
const loading = ref(false)
|
||||
const uploadState = ref(false)
|
||||
const fileList = ref([])
|
||||
const projectId = ref(route.query.id)
|
||||
const requirementId = ref(route.query.requirementId)
|
||||
const baseFormData = ref([])
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '承办单位',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectType ?
|
||||
<span>{filterDict(cacheStore.getDict('project_type'), baseFormData.value?.projectType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.rdSubject ?
|
||||
<span>{filterDict(cacheStore.getDict('rd_subject'), baseFormData.value?.rdSubject)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'investmentType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.investmentType ?
|
||||
<span>{filterDict(cacheStore.getDict('invest_type'), baseFormData.value?.investmentType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'businessSegment',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.businessSegment ?
|
||||
<span>{filterDict(cacheStore.getDict('business_segment'), baseFormData.value?.businessSegment)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '标准制定',
|
||||
prop: 'technicalStandard',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.technicalStandard ?
|
||||
<span>{filterDict(cacheStore.getDict('technical_standard'), baseFormData.value?.technicalStandard)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectImpact ?
|
||||
<span>{filterDict(cacheStore.getDict('project_impact'), baseFormData.value?.projectImpact)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '预估经费预算(元)',
|
||||
prop: 'economicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}, {
|
||||
label: '实际经费预算(元)',
|
||||
prop: 'actualEconomicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.actualEconomicEstimate ?
|
||||
<span>{toThousands(baseFormData.value?.actualEconomicEstimate)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'industryUniversityResearch',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.industryUniversityResearch ?
|
||||
<span>{filterDict(cacheStore.getDict('industry_university'), baseFormData.value?.industryUniversityResearch)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'governmentDeclaration',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.governmentDeclaration ?
|
||||
<span>{filterDict(cacheStore.getDict('government_declaration'), baseFormData.value?.governmentDeclaration)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属专项资金项目',
|
||||
prop: 'specialFund',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},{
|
||||
label: '预估专项资金(元)',
|
||||
prop: 'forecastSpecialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.forecastSpecialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.forecastSpecialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '实际专项资金(元)',
|
||||
prop: 'specialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.specialFundAmount ?
|
||||
<span>{ toThousands(baseFormData.value?.specialFundAmount )}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '是否在预算内',
|
||||
prop: 'isWithinBudget',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.isWithinBudget!=null ? baseFormData.value?.isWithinBudget?
|
||||
<span>{'预算内'}</span>
|
||||
: <span>{'预算外'}</span>:'--'
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '部门分管领导',
|
||||
prop: 'optionalChargeLeadership',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '主项目',
|
||||
prop: 'masterProjectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const baseForm = ref()
|
||||
const paneList = ref([
|
||||
{
|
||||
label: '全部',
|
||||
name: 'all'
|
||||
},
|
||||
{
|
||||
label: '需求征集',
|
||||
name: '00'
|
||||
},
|
||||
{
|
||||
label: '需求上报',
|
||||
name: '10'
|
||||
},
|
||||
{
|
||||
label: '项目立项',
|
||||
name: '20'
|
||||
},
|
||||
{
|
||||
label: '项目实施',
|
||||
name: '30'
|
||||
},
|
||||
{
|
||||
label: '项目验收',
|
||||
name: '40'
|
||||
},
|
||||
{
|
||||
label: '项目归档',
|
||||
name: '50'
|
||||
}
|
||||
])
|
||||
//匹配字典值,返回对应值的字典标签
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
baseForm.value.setValues(data)
|
||||
baseFormData.value = data
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
const handleClick = (tab) => {
|
||||
activeName.value = tab.props.name
|
||||
loading.value = true
|
||||
search({})
|
||||
}
|
||||
|
||||
const search = async (param) => {
|
||||
if( activeName.value=='all'){
|
||||
let params={
|
||||
targetId:projectId.value,
|
||||
targetState:param.targetState,
|
||||
fileName:param.fileName
|
||||
}
|
||||
// param.targetId = projectId.value
|
||||
searchAllFileList(params).then(res => {
|
||||
loading.value = false
|
||||
changeFileList(res)
|
||||
})
|
||||
}else {
|
||||
let notAllParams={
|
||||
...param,
|
||||
targetId:projectId.value,
|
||||
targetState:activeName.value
|
||||
}
|
||||
// param.targetId = projectId.value
|
||||
// param.targetState = activeName.value
|
||||
searchFileList(notAllParams).then(res => {
|
||||
loading.value = false
|
||||
changeFileList(res)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const changeFileList = (res) => {
|
||||
if (res.code === 1000) {
|
||||
fileList.value = res.data.fileList
|
||||
uploadState.value = res.data.upload
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const upload = () => {
|
||||
if (activeName.value === '30') {
|
||||
router.push({
|
||||
name: 'Implementation/upload',
|
||||
query: {
|
||||
projectId: route.query.id,
|
||||
requirementId: requirementId.value,
|
||||
type: '30'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
router.push({
|
||||
name: 'Filing/upload',
|
||||
query: {
|
||||
id: route.query.id,
|
||||
name: activeName.value,
|
||||
requirementId: requirementId.value
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
watchEffect(() => {
|
||||
if (requirementId.value === '-1') {
|
||||
console.info("🚀 ~method: -----", paneList.value.filter(item=>item.name!=='00'))
|
||||
paneList.value = paneList.value.filter(item=>item.name!=='00')
|
||||
|
||||
}
|
||||
})
|
||||
search({})
|
||||
onActivated(() => {
|
||||
if (route.query.name) {
|
||||
activeName.value = route.query.name
|
||||
search({})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-tabs__header) {
|
||||
margin: 15px 0 30px 0;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.is-active {
|
||||
color: black;
|
||||
//background-color: #DED0B2;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,483 +1,483 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {switchAttachmentState} from "@/api/project-manage/attachment";
|
||||
import {ElMessageBox, ElNotification} from "element-plus";
|
||||
import { getSubCompOpt } from '@/api/user/user.js';
|
||||
import {filterProjectName} from "@/api/project-manage";
|
||||
import {filterRequirementName} from "@/api/project-demand";
|
||||
|
||||
const router = useRouter()
|
||||
const shortcuts = [
|
||||
{
|
||||
text: '上周',
|
||||
value: () => {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||
return [start, end]
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '上月',
|
||||
value: () => {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
||||
return [start, end]
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '三月前',
|
||||
value: () => {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
||||
return [start, end]
|
||||
},
|
||||
},
|
||||
]
|
||||
const searchConfig = ref([
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请输入征集名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
const res=await filterRequirementName(val)
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
searchConfig.value.find(item => item.prop == 'requirementName').props.options = options
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集公司',
|
||||
prop: 'affiliatedCompanyId',
|
||||
component: 'el-tree-select',
|
||||
props: {
|
||||
placeholder: '请输入征集公司查询',
|
||||
clearable: true,
|
||||
data: [],
|
||||
filterable: true,
|
||||
checkStrictly: true,
|
||||
remote:true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请输入项目名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
const res=await filterProjectName(val,'50')
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
searchConfig.value.find(item => item.prop == 'projectName').props.options = options
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
cacheKey: 'project_type',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
cacheKey: 'project_impact',
|
||||
placeholder: '请选择项目影响',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择研发主体',
|
||||
cacheKey: 'rd_subject',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '起止时间',
|
||||
prop: 'dateValue',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
clearable: true,
|
||||
type: 'daterange',
|
||||
startPlaceholder: '开始日期',
|
||||
endPlaceholder: '结束日期',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
shortcuts: shortcuts
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'state',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择状态',
|
||||
clearable: true,
|
||||
cacheKey: 'project_filing',
|
||||
filterable: true,
|
||||
remote: true
|
||||
}
|
||||
},
|
||||
// {
|
||||
// label: '最小金额',
|
||||
// prop: 'requirementName',
|
||||
// component: 'el-input',
|
||||
// props: {
|
||||
// placeholder: '请输入金额查询',
|
||||
// clearable: true,
|
||||
// filterable: true,
|
||||
// checkStrictly: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '最大金额',
|
||||
// prop: 'requirementName',
|
||||
// component: 'el-input',
|
||||
// props: {
|
||||
// placeholder: '请输入金额查询',
|
||||
// clearable: true,
|
||||
// filterable: true,
|
||||
// checkStrictly: true
|
||||
// }
|
||||
// },
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width:85,
|
||||
index: index => {
|
||||
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
prop: 'processNumber',
|
||||
label: '项目编号',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'requirementName',
|
||||
label: '征集名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'affiliatedCompany',
|
||||
label: '征集公司',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectName',
|
||||
label: '项目名称',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.projectType !== null) {
|
||||
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'rdSubject',
|
||||
label: '研发主体',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.rdSubject !== null) {
|
||||
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'projectImpact',
|
||||
label: '项目影响',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.projectImpact !== null) {
|
||||
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '预估经费预算(元)',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.economicEstimate)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '起止时间',
|
||||
align: 'center',
|
||||
currentRender: ({row}) => {
|
||||
return row.startTime + ' 至 ' + row.endTime
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'approveName',
|
||||
label: '当前审批节点',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
currentRender: ({row, index}) => {
|
||||
if(row.state=='3'||row.state=='4'){
|
||||
return <span>{row.taskNode}</span>
|
||||
}else if(row.state=='1'){
|
||||
return <span>{row.approveName}</span>
|
||||
}else {
|
||||
return <span>--</span>
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (!buttons.has("openFileSwitch")&&row.state!=1) {
|
||||
console.log('row',row)
|
||||
return (<Tag dictType={'project_filing'} value={'0'}/>)
|
||||
}else if (buttons.has("openFileSwitch")) {
|
||||
return (<Tag dictType={'project_filing'} value={'4'}/>)
|
||||
}else{
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_filing'} value={row.state}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
fixed:'right',
|
||||
width: 150,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['project:management:filing:detail'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("attachments")) {
|
||||
btn.push({label: '附件', prem: ['project:management:filing:attachment'], func: () => handleAttachment(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("entry")) {
|
||||
btn.push({label: '结项', prem: ['project:management:filing:conclusion'], func: () => handleConclusion(row), type: 'primary'})
|
||||
}
|
||||
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: ['filing:attachment:switch'], func: () => handleOpenUpload(row,true), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("closeFileSwitch")) {
|
||||
btn.push({label: '关闭上传', prem: ['filing:attachment:switch'], func: () => handleOpenUpload(row,false), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/project/filing',
|
||||
params: {},
|
||||
})
|
||||
|
||||
const search = (val) => {
|
||||
let obj = {...val}
|
||||
if (obj.dateValue) {
|
||||
obj.startTime = obj.dateValue[0]
|
||||
obj.endTime = obj.dateValue[1]
|
||||
delete obj.dateValue
|
||||
}
|
||||
tableConfig.params = obj
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name: 'Implementation/detail',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId,
|
||||
state: row.state,
|
||||
step: '50'
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleAttachment = (row) => {
|
||||
router.push({
|
||||
name: 'Filing/attachment',
|
||||
query: {
|
||||
id: row.projectId,
|
||||
requirementId:row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleConclusion = (row) => {
|
||||
router.push({
|
||||
name: 'Filing/conclusion',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name: 'Filing/edit',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleOpenUpload=(row,flag)=>{
|
||||
console.log('tableIns',tableIns.value)
|
||||
ElMessageBox.confirm(`是否确认${flag?'开启':'关闭'}上传文件?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let params={
|
||||
open: flag,
|
||||
projectId: row.projectId
|
||||
}
|
||||
switchAttachmentState(params).then(res=>{
|
||||
if(res.code==1000){
|
||||
tableIns.value.refresh()
|
||||
}else{
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
const init = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
searchConfig.value.find(item=>item.prop == 'affiliatedCompanyId').props.data = res.data
|
||||
}
|
||||
|
||||
init()
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
margin-left: -25px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
.el-table__cell:first-child {
|
||||
.cell {
|
||||
margin-left: -13px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {switchAttachmentState} from "@/api/project-manage/attachment";
|
||||
import {ElMessageBox, ElNotification} from "element-plus";
|
||||
import { getSubCompOpt } from '@/api/user/user.js';
|
||||
import {filterProjectName} from "@/api/project-manage";
|
||||
import {filterRequirementName} from "@/api/project-demand";
|
||||
|
||||
const router = useRouter()
|
||||
const shortcuts = [
|
||||
{
|
||||
text: '上周',
|
||||
value: () => {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||
return [start, end]
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '上月',
|
||||
value: () => {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
||||
return [start, end]
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '三月前',
|
||||
value: () => {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
||||
return [start, end]
|
||||
},
|
||||
},
|
||||
]
|
||||
const searchConfig = ref([
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请输入征集名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
const res=await filterRequirementName(val)
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
searchConfig.value.find(item => item.prop == 'requirementName').props.options = options
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集公司',
|
||||
prop: 'affiliatedCompanyId',
|
||||
component: 'el-tree-select',
|
||||
props: {
|
||||
placeholder: '请输入征集公司查询',
|
||||
clearable: true,
|
||||
data: [],
|
||||
filterable: true,
|
||||
checkStrictly: true,
|
||||
remote:true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请输入项目名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
const res=await filterProjectName(val,'50')
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
searchConfig.value.find(item => item.prop == 'projectName').props.options = options
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
cacheKey: 'project_type',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
cacheKey: 'project_impact',
|
||||
placeholder: '请选择项目影响',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择研发主体',
|
||||
cacheKey: 'rd_subject',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '起止时间',
|
||||
prop: 'dateValue',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
clearable: true,
|
||||
type: 'daterange',
|
||||
startPlaceholder: '开始日期',
|
||||
endPlaceholder: '结束日期',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
shortcuts: shortcuts
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'state',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择状态',
|
||||
clearable: true,
|
||||
cacheKey: 'project_filing',
|
||||
filterable: true,
|
||||
remote: true
|
||||
}
|
||||
},
|
||||
// {
|
||||
// label: '最小金额',
|
||||
// prop: 'requirementName',
|
||||
// component: 'el-input',
|
||||
// props: {
|
||||
// placeholder: '请输入金额查询',
|
||||
// clearable: true,
|
||||
// filterable: true,
|
||||
// checkStrictly: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '最大金额',
|
||||
// prop: 'requirementName',
|
||||
// component: 'el-input',
|
||||
// props: {
|
||||
// placeholder: '请输入金额查询',
|
||||
// clearable: true,
|
||||
// filterable: true,
|
||||
// checkStrictly: true
|
||||
// }
|
||||
// },
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width:85,
|
||||
index: index => {
|
||||
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
prop: 'processNumber',
|
||||
label: '项目编号',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'requirementName',
|
||||
label: '征集名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'affiliatedCompany',
|
||||
label: '征集公司',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectName',
|
||||
label: '项目名称',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.projectType !== null) {
|
||||
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'rdSubject',
|
||||
label: '研发主体',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.rdSubject !== null) {
|
||||
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'projectImpact',
|
||||
label: '项目影响',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.projectImpact !== null) {
|
||||
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '预估经费预算(元)',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.economicEstimate)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '起止时间',
|
||||
align: 'center',
|
||||
currentRender: ({row}) => {
|
||||
return row.startTime + ' 至 ' + row.endTime
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'approveName',
|
||||
label: '当前审批节点',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
currentRender: ({row, index}) => {
|
||||
if(row.state=='3'||row.state=='4'){
|
||||
return <span>{row.taskNode}</span>
|
||||
}else if(row.state=='1'){
|
||||
return <span>{row.approveName}</span>
|
||||
}else {
|
||||
return <span>--</span>
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (!buttons.has("openFileSwitch")&&row.state!=1) {
|
||||
console.log('row',row)
|
||||
return (<Tag dictType={'project_filing'} value={'0'}/>)
|
||||
}else if (buttons.has("openFileSwitch")) {
|
||||
return (<Tag dictType={'project_filing'} value={'4'}/>)
|
||||
}else{
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_filing'} value={row.state}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
fixed:'right',
|
||||
width: 150,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['project:management:filing:detail'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("attachments")) {
|
||||
btn.push({label: '附件', prem: ['project:management:filing:attachment'], func: () => handleAttachment(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("entry")) {
|
||||
btn.push({label: '结项', prem: ['project:management:filing:conclusion'], func: () => handleConclusion(row), type: 'primary'})
|
||||
}
|
||||
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: ['filing:attachment:switch'], func: () => handleOpenUpload(row,true), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("closeFileSwitch")) {
|
||||
btn.push({label: '关闭上传', prem: ['filing:attachment:switch'], func: () => handleOpenUpload(row,false), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/project/filing',
|
||||
params: {},
|
||||
})
|
||||
|
||||
const search = (val) => {
|
||||
let obj = {...val}
|
||||
if (obj.dateValue) {
|
||||
obj.startTime = obj.dateValue[0]
|
||||
obj.endTime = obj.dateValue[1]
|
||||
delete obj.dateValue
|
||||
}
|
||||
tableConfig.params = obj
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name: 'Implementation/detail',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId,
|
||||
state: row.state,
|
||||
step: '50'
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleAttachment = (row) => {
|
||||
router.push({
|
||||
name: 'Filing/attachment',
|
||||
query: {
|
||||
id: row.projectId,
|
||||
requirementId:row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleConclusion = (row) => {
|
||||
router.push({
|
||||
name: 'Filing/conclusion',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name: 'Filing/edit',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleOpenUpload=(row,flag)=>{
|
||||
console.log('tableIns',tableIns.value)
|
||||
ElMessageBox.confirm(`是否确认${flag?'开启':'关闭'}上传文件?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let params={
|
||||
open: flag,
|
||||
projectId: row.projectId
|
||||
}
|
||||
switchAttachmentState(params).then(res=>{
|
||||
if(res.code==1000){
|
||||
tableIns.value.refresh()
|
||||
}else{
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
const init = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
searchConfig.value.find(item=>item.prop == 'affiliatedCompanyId').props.data = res.data
|
||||
}
|
||||
|
||||
init()
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
margin-left: -25px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
.el-table__cell:first-child {
|
||||
.cell {
|
||||
margin-left: -13px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,463 +1,463 @@
|
||||
<template>
|
||||
<div style="padding: 0 30px">
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left"
|
||||
style="margin-left: 15px"></fvForm>
|
||||
<el-form :model="attachment" inline style="margin-left: 15px">
|
||||
<el-form-item label="标签" prop="tag">
|
||||
<el-select v-model="attachment.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" color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<fvTable style="width: 100%;max-height: 274px" v-if="showTable" height="274" :tableConfig="implementationAttachmentTableConfig"
|
||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
<file-preview ref="filePreviewRef" v-if="filePreviewShow" :fileName="filePreviewParam.fileName" :fileUrl="filePreviewParam.fileUrl"
|
||||
:fileType="filePreviewParam.fileType"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {getTags} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {searchImplementationFileList} from "@/api/project-manage/attachment";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {computed, ref} from "vue";
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const uploadState = ref(false)
|
||||
const attachment = reactive({
|
||||
tag: ''
|
||||
})
|
||||
const baseFormData = ref([])
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '承办单位',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectType ?
|
||||
<span>{filterDict(cacheStore.getDict('project_type'), baseFormData.value?.projectType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.rdSubject ?
|
||||
<span>{filterDict(cacheStore.getDict('rd_subject'), baseFormData.value?.rdSubject)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'investmentType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.investmentType ?
|
||||
<span>{filterDict(cacheStore.getDict('invest_type'), baseFormData.value?.investmentType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'businessSegment',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.businessSegment ?
|
||||
<span>{filterDict(cacheStore.getDict('business_segment'), baseFormData.value?.businessSegment)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '标准制定',
|
||||
prop: 'technicalStandard',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.technicalStandard ?
|
||||
<span>{filterDict(cacheStore.getDict('technical_standard'), baseFormData.value?.technicalStandard)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectImpact ?
|
||||
<span>{filterDict(cacheStore.getDict('project_impact'), baseFormData.value?.projectImpact)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '预估经费预算(元)',
|
||||
prop: 'economicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{toThousands(baseFormData.value?.economicEstimate)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'industryUniversityResearch',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.industryUniversityResearch ?
|
||||
<span>{filterDict(cacheStore.getDict('industry_university'), baseFormData.value?.industryUniversityResearch)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'governmentDeclaration',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.governmentDeclaration ?
|
||||
<span>{filterDict(cacheStore.getDict('government_declaration'), baseFormData.value?.governmentDeclaration)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属专项资金项目',
|
||||
prop: 'specialFund',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '预估专项资金(元)',
|
||||
prop: 'specialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.specialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.specialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '是否在预算内',
|
||||
prop: 'isWithinBudget',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.isWithinBudget!=null ? baseFormData.value?.isWithinBudget?
|
||||
<span>{'预算内'}</span>
|
||||
: <span>{'预算外'}</span>:'--'
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '部门分管领导',
|
||||
prop: 'optionalChargeLeadership',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const baseForm = ref()
|
||||
const tagsOption = ref([])
|
||||
const implementationAttachmentTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '文件名',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (<div style="color: #2a99ff;cursor: pointer;" onClick={()=>clickToPreview(row)}>{row.originalFileName}</div>)
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
label: '文件大小',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const filePreviewParam = ref({
|
||||
fileUrl: '',
|
||||
fileName: '',
|
||||
fileType: 'pdf'
|
||||
})
|
||||
const filePreviewShow = ref(false)
|
||||
const clickToPreview=(row)=>{
|
||||
filePreviewShow.value = false
|
||||
filePreviewParam.value = {
|
||||
fileUrl: row.url,
|
||||
fileName: row.originalFileName,
|
||||
fileType: row.fileType
|
||||
}
|
||||
nextTick(()=>{
|
||||
filePreviewShow.value = true
|
||||
})
|
||||
}
|
||||
//匹配字典值,返回对应值的字典标签
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
baseForm.value.setValues(data)
|
||||
baseFormData.value = data
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
|
||||
const getTagsOption = () => {
|
||||
if (!route.query.id) return
|
||||
getTags(route.query.id).then(res => {
|
||||
if (res.code === 1000) {
|
||||
tagsOption.value = res.data
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleSearch = () => {
|
||||
let params = {
|
||||
targetId: route.query.id,
|
||||
targetState: "40"
|
||||
}
|
||||
if (attachment.tag) {
|
||||
tagsOption.value.forEach(item => {
|
||||
if (item.value === attachment.tag) {
|
||||
attachment.tag = item.label
|
||||
}
|
||||
})
|
||||
params.tag = attachment.tag
|
||||
}
|
||||
searchImplementationFileList(params).then(res => {
|
||||
showTable.value = false
|
||||
if (res.code === 1000) {
|
||||
otherFileList.value = res.data.fileList
|
||||
uploadState.value = res.data.upload
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleUpload = () => {
|
||||
router.push({
|
||||
name: 'Implementation/upload',
|
||||
query: {
|
||||
projectId: route.query.id,
|
||||
type: 'list'
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
|
||||
onActivated(() => {
|
||||
handleSearch()
|
||||
getTagsOption()
|
||||
})
|
||||
handleSearch()
|
||||
getTagsOption()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
margin-left: -25px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
.el-table__cell:first-child {
|
||||
.cell {
|
||||
margin-left: -13px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div style="padding: 0 30px">
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left"
|
||||
style="margin-left: 15px"></fvForm>
|
||||
<el-form :model="attachment" inline style="margin-left: 15px">
|
||||
<el-form-item label="标签" prop="tag">
|
||||
<el-select v-model="attachment.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" color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<fvTable style="width: 100%;max-height: 274px" v-if="showTable" height="274" :tableConfig="implementationAttachmentTableConfig"
|
||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
<file-preview ref="filePreviewRef" v-if="filePreviewShow" :fileName="filePreviewParam.fileName" :fileUrl="filePreviewParam.fileUrl"
|
||||
:fileType="filePreviewParam.fileType"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {getTags} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {searchImplementationFileList} from "@/api/project-manage/attachment";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {computed, ref} from "vue";
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const uploadState = ref(false)
|
||||
const attachment = reactive({
|
||||
tag: ''
|
||||
})
|
||||
const baseFormData = ref([])
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '承办单位',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectType ?
|
||||
<span>{filterDict(cacheStore.getDict('project_type'), baseFormData.value?.projectType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.rdSubject ?
|
||||
<span>{filterDict(cacheStore.getDict('rd_subject'), baseFormData.value?.rdSubject)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'investmentType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.investmentType ?
|
||||
<span>{filterDict(cacheStore.getDict('invest_type'), baseFormData.value?.investmentType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'businessSegment',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.businessSegment ?
|
||||
<span>{filterDict(cacheStore.getDict('business_segment'), baseFormData.value?.businessSegment)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '标准制定',
|
||||
prop: 'technicalStandard',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.technicalStandard ?
|
||||
<span>{filterDict(cacheStore.getDict('technical_standard'), baseFormData.value?.technicalStandard)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectImpact ?
|
||||
<span>{filterDict(cacheStore.getDict('project_impact'), baseFormData.value?.projectImpact)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '预估经费预算(元)',
|
||||
prop: 'economicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{toThousands(baseFormData.value?.economicEstimate)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'industryUniversityResearch',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.industryUniversityResearch ?
|
||||
<span>{filterDict(cacheStore.getDict('industry_university'), baseFormData.value?.industryUniversityResearch)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'governmentDeclaration',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.governmentDeclaration ?
|
||||
<span>{filterDict(cacheStore.getDict('government_declaration'), baseFormData.value?.governmentDeclaration)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属专项资金项目',
|
||||
prop: 'specialFund',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '预估专项资金(元)',
|
||||
prop: 'specialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.specialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.specialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '是否在预算内',
|
||||
prop: 'isWithinBudget',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.isWithinBudget!=null ? baseFormData.value?.isWithinBudget?
|
||||
<span>{'预算内'}</span>
|
||||
: <span>{'预算外'}</span>:'--'
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '部门分管领导',
|
||||
prop: 'optionalChargeLeadership',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const baseForm = ref()
|
||||
const tagsOption = ref([])
|
||||
const implementationAttachmentTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '文件名',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (<div style="color: #2a99ff;cursor: pointer;" onClick={()=>clickToPreview(row)}>{row.originalFileName}</div>)
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
label: '文件大小',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const filePreviewParam = ref({
|
||||
fileUrl: '',
|
||||
fileName: '',
|
||||
fileType: 'pdf'
|
||||
})
|
||||
const filePreviewShow = ref(false)
|
||||
const clickToPreview=(row)=>{
|
||||
filePreviewShow.value = false
|
||||
filePreviewParam.value = {
|
||||
fileUrl: row.url,
|
||||
fileName: row.originalFileName,
|
||||
fileType: row.fileType
|
||||
}
|
||||
nextTick(()=>{
|
||||
filePreviewShow.value = true
|
||||
})
|
||||
}
|
||||
//匹配字典值,返回对应值的字典标签
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
baseForm.value.setValues(data)
|
||||
baseFormData.value = data
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
|
||||
const getTagsOption = () => {
|
||||
if (!route.query.id) return
|
||||
getTags(route.query.id).then(res => {
|
||||
if (res.code === 1000) {
|
||||
tagsOption.value = res.data
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleSearch = () => {
|
||||
let params = {
|
||||
targetId: route.query.id,
|
||||
targetState: "40"
|
||||
}
|
||||
if (attachment.tag) {
|
||||
tagsOption.value.forEach(item => {
|
||||
if (item.value === attachment.tag) {
|
||||
attachment.tag = item.label
|
||||
}
|
||||
})
|
||||
params.tag = attachment.tag
|
||||
}
|
||||
searchImplementationFileList(params).then(res => {
|
||||
showTable.value = false
|
||||
if (res.code === 1000) {
|
||||
otherFileList.value = res.data.fileList
|
||||
uploadState.value = res.data.upload
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleUpload = () => {
|
||||
router.push({
|
||||
name: 'Implementation/upload',
|
||||
query: {
|
||||
projectId: route.query.id,
|
||||
type: 'list'
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
|
||||
onActivated(() => {
|
||||
handleSearch()
|
||||
getTagsOption()
|
||||
})
|
||||
handleSearch()
|
||||
getTagsOption()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
margin-left: -25px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
.el-table__cell:first-child {
|
||||
.cell {
|
||||
margin-left: -13px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<template>
|
||||
<el-button color="#DED0B2" @click="click">
|
||||
{{ modelValue?'更改':'请选择抄送人员' }}
|
||||
</el-button>
|
||||
<div style="margin-left: 10px">{{modelValue}}</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const emit = defineEmits('clickCopyUser')
|
||||
const click=()=>{
|
||||
emit("clickCopyUser")
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<el-button color="#DED0B2" @click="click">
|
||||
{{ modelValue?'更改':'请选择抄送人员' }}
|
||||
</el-button>
|
||||
<div style="margin-left: 10px">{{modelValue}}</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const emit = defineEmits('clickCopyUser')
|
||||
const click=()=>{
|
||||
emit("clickCopyUser")
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,211 +1,211 @@
|
||||
<template>
|
||||
<steps :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail" @stepChange="stepChange" @getBasicData="getBasicData"
|
||||
:reportType="route.query.id==='-1'?'direct':''" :taskId="detailData.taskId" :editShow="editShow" :mode="mode">
|
||||
<template #content v-if="detailShow">
|
||||
<collection-detail :formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
v-if="showActive == '00'"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"
|
||||
/>
|
||||
<summary-detail v-if="showActive == '10'"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow" @ccSend="ccSendRefresh"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="approval" @ccSend="ccSendRefresh"
|
||||
v-if="showActive == '20'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
:preProcessShow="preProcessShow"
|
||||
:basicData="basicData"
|
||||
v-model:value="auditOpinion"/>
|
||||
<div v-if="showActive == '30'&&!editShow">
|
||||
<project-attachment/>
|
||||
</div>
|
||||
<ApprovalDetail type="execute" @ccSend="ccSendRefresh"
|
||||
v-if="showActive == '40'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
:preProcessShow="preProcessShow"
|
||||
:basicData="basicData"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="archivist" @ccSend="ccSendRefresh"
|
||||
v-if="showActive == '50'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
:preProcessShow="preProcessShow"
|
||||
:basicData="basicData"
|
||||
v-model:value="auditOpinion"/>
|
||||
<project-apply :title="applyTitle"
|
||||
v-if="editShow"
|
||||
:mode="mode"
|
||||
:step="showActive"
|
||||
:data="detailData"
|
||||
:basicData="basicData"
|
||||
:preProcessShow="preProcessShow"
|
||||
:formData="detailData.formData"/>
|
||||
</template>
|
||||
</steps>
|
||||
<div style="width: 100%;height: 30px"></div>
|
||||
<opinion v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
|
||||
:taskUserOptionList="detailData.taskUserOptionList"
|
||||
v-model:value="auditOpinion"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||
import {ElLoading, ElNotification} from "element-plus";
|
||||
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||
|
||||
const route = useRoute()
|
||||
const editShow = ref(false)
|
||||
const applyTitle = ref('filing')
|
||||
const basicData = ref([])
|
||||
const loading = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const fileListShow = ref('READ')
|
||||
const preProcessShow = ref('READ')
|
||||
const mode = ref('')
|
||||
const currentStep = ref()
|
||||
const auditOpinion = ref('')
|
||||
// const step = ref(route.query.step)
|
||||
route.query.step == '10' && (currentStep.value = 1)
|
||||
route.query.step == '20' && (currentStep.value = 2)
|
||||
route.query.step == '30' && (currentStep.value = 3)
|
||||
route.query.step == '40' && (currentStep.value = 4)
|
||||
route.query.step == '50' && (currentStep.value = 5)
|
||||
const showActive = ref()
|
||||
const detailShow = ref(false)
|
||||
const detailData = ref({})
|
||||
const commonProvessViewer = ref(true)
|
||||
localStorage.removeItem('singleFile')
|
||||
localStorage.removeItem('otherFileList')
|
||||
localStorage.removeItem('preProcess')
|
||||
localStorage.removeItem('projectChargePersonUserList')
|
||||
localStorage.removeItem('projectPersonUserList')
|
||||
localStorage.removeItem('optionalChargeLeadershipList')
|
||||
localStorage.removeItem('originallySelectedList')
|
||||
|
||||
const ccSendRefresh=()=>{
|
||||
getAllInfo(route.query.step)
|
||||
}
|
||||
const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
detailData.value = {
|
||||
state: "0"
|
||||
}
|
||||
try {
|
||||
detailShow.value = false
|
||||
fileListShow.value = 'READ'
|
||||
preProcessShow.value = 'READ'
|
||||
commonProvessViewer.value = false
|
||||
const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if (code === 1000) {
|
||||
data.formData.preProcess = data.formData.preProcess ? JSON.parse(data.formData.preProcess) : undefined
|
||||
detailData.value = data
|
||||
localStorage.setItem('detailProcess', JSON.stringify(data.formData.preProcess))
|
||||
mode.value = data.formData.mode
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
commonProvessViewer.value = true
|
||||
detailShow.value = true
|
||||
detailData.value = data
|
||||
if (data.formPermMap && data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
if (data.formPermMap && data.formPermMap["preProcess"]) {
|
||||
preProcessShow.value = data.formPermMap["preProcess"].perm
|
||||
}
|
||||
})
|
||||
changeModel(state, mode.value)
|
||||
loading.close()
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
if (msg === '查询结果为空') {
|
||||
detailData.value = []
|
||||
detailData.value.formData = {}
|
||||
}
|
||||
loading.close()
|
||||
}
|
||||
} catch {
|
||||
loading.close()
|
||||
}
|
||||
}
|
||||
const changeModel = (active, mode) => {
|
||||
// console.log('active, mode',active, mode)
|
||||
editShow.value = false
|
||||
nextTick(() => {
|
||||
editShow.value = mode === 'submit' || mode === 'resubmit';
|
||||
// route.query.step === '20' &&
|
||||
if (active === '20') {
|
||||
applyTitle.value = 'apply'
|
||||
} else if (active === '40') {
|
||||
applyTitle.value = 'check'
|
||||
} else if (active === '50') {
|
||||
applyTitle.value = 'filing'
|
||||
}
|
||||
})
|
||||
}
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
if (active == '30') {
|
||||
changeModel(30, 'view')
|
||||
detailShow.value = true
|
||||
return;
|
||||
}
|
||||
getAllInfo(active)
|
||||
}
|
||||
|
||||
const stepChange = (data) => {
|
||||
showActive.value = data.active
|
||||
if (data.active == '30') {
|
||||
changeModel(30, 'view')
|
||||
detailShow.value = true
|
||||
return;
|
||||
}
|
||||
getAllInfo(data.active)
|
||||
}
|
||||
const getBasicData=(data)=>{
|
||||
basicData.value=data
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<steps :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail" @stepChange="stepChange" @getBasicData="getBasicData"
|
||||
:reportType="route.query.id==='-1'?'direct':''" :taskId="detailData.taskId" :editShow="editShow" :mode="mode">
|
||||
<template #content v-if="detailShow">
|
||||
<collection-detail :formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
v-if="showActive == '00'"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"
|
||||
/>
|
||||
<summary-detail v-if="showActive == '10'"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow" @ccSend="ccSendRefresh"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="approval" @ccSend="ccSendRefresh"
|
||||
v-if="showActive == '20'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
:preProcessShow="preProcessShow"
|
||||
:basicData="basicData"
|
||||
v-model:value="auditOpinion"/>
|
||||
<div v-if="showActive == '30'&&!editShow">
|
||||
<project-attachment/>
|
||||
</div>
|
||||
<ApprovalDetail type="execute" @ccSend="ccSendRefresh"
|
||||
v-if="showActive == '40'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
:preProcessShow="preProcessShow"
|
||||
:basicData="basicData"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="archivist" @ccSend="ccSendRefresh"
|
||||
v-if="showActive == '50'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
:preProcessShow="preProcessShow"
|
||||
:basicData="basicData"
|
||||
v-model:value="auditOpinion"/>
|
||||
<project-apply :title="applyTitle"
|
||||
v-if="editShow"
|
||||
:mode="mode"
|
||||
:step="showActive"
|
||||
:data="detailData"
|
||||
:basicData="basicData"
|
||||
:preProcessShow="preProcessShow"
|
||||
:formData="detailData.formData"/>
|
||||
</template>
|
||||
</steps>
|
||||
<div style="width: 100%;height: 30px"></div>
|
||||
<opinion v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
|
||||
:taskUserOptionList="detailData.taskUserOptionList"
|
||||
v-model:value="auditOpinion"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||
import {ElLoading, ElNotification} from "element-plus";
|
||||
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||
|
||||
const route = useRoute()
|
||||
const editShow = ref(false)
|
||||
const applyTitle = ref('filing')
|
||||
const basicData = ref([])
|
||||
const loading = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const fileListShow = ref('READ')
|
||||
const preProcessShow = ref('READ')
|
||||
const mode = ref('')
|
||||
const currentStep = ref()
|
||||
const auditOpinion = ref('')
|
||||
// const step = ref(route.query.step)
|
||||
route.query.step == '10' && (currentStep.value = 1)
|
||||
route.query.step == '20' && (currentStep.value = 2)
|
||||
route.query.step == '30' && (currentStep.value = 3)
|
||||
route.query.step == '40' && (currentStep.value = 4)
|
||||
route.query.step == '50' && (currentStep.value = 5)
|
||||
const showActive = ref()
|
||||
const detailShow = ref(false)
|
||||
const detailData = ref({})
|
||||
const commonProvessViewer = ref(true)
|
||||
localStorage.removeItem('singleFile')
|
||||
localStorage.removeItem('otherFileList')
|
||||
localStorage.removeItem('preProcess')
|
||||
localStorage.removeItem('projectChargePersonUserList')
|
||||
localStorage.removeItem('projectPersonUserList')
|
||||
localStorage.removeItem('optionalChargeLeadershipList')
|
||||
localStorage.removeItem('originallySelectedList')
|
||||
|
||||
const ccSendRefresh=()=>{
|
||||
getAllInfo(route.query.step)
|
||||
}
|
||||
const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
detailData.value = {
|
||||
state: "0"
|
||||
}
|
||||
try {
|
||||
detailShow.value = false
|
||||
fileListShow.value = 'READ'
|
||||
preProcessShow.value = 'READ'
|
||||
commonProvessViewer.value = false
|
||||
const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if (code === 1000) {
|
||||
data.formData.preProcess = data.formData.preProcess ? JSON.parse(data.formData.preProcess) : undefined
|
||||
detailData.value = data
|
||||
localStorage.setItem('detailProcess', JSON.stringify(data.formData.preProcess))
|
||||
mode.value = data.formData.mode
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
commonProvessViewer.value = true
|
||||
detailShow.value = true
|
||||
detailData.value = data
|
||||
if (data.formPermMap && data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
if (data.formPermMap && data.formPermMap["preProcess"]) {
|
||||
preProcessShow.value = data.formPermMap["preProcess"].perm
|
||||
}
|
||||
})
|
||||
changeModel(state, mode.value)
|
||||
loading.close()
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
if (msg === '查询结果为空') {
|
||||
detailData.value = []
|
||||
detailData.value.formData = {}
|
||||
}
|
||||
loading.close()
|
||||
}
|
||||
} catch {
|
||||
loading.close()
|
||||
}
|
||||
}
|
||||
const changeModel = (active, mode) => {
|
||||
// console.log('active, mode',active, mode)
|
||||
editShow.value = false
|
||||
nextTick(() => {
|
||||
editShow.value = mode === 'submit' || mode === 'resubmit';
|
||||
// route.query.step === '20' &&
|
||||
if (active === '20') {
|
||||
applyTitle.value = 'apply'
|
||||
} else if (active === '40') {
|
||||
applyTitle.value = 'check'
|
||||
} else if (active === '50') {
|
||||
applyTitle.value = 'filing'
|
||||
}
|
||||
})
|
||||
}
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
if (active == '30') {
|
||||
changeModel(30, 'view')
|
||||
detailShow.value = true
|
||||
return;
|
||||
}
|
||||
getAllInfo(active)
|
||||
}
|
||||
|
||||
const stepChange = (data) => {
|
||||
showActive.value = data.active
|
||||
if (data.active == '30') {
|
||||
changeModel(30, 'view')
|
||||
detailShow.value = true
|
||||
return;
|
||||
}
|
||||
getAllInfo(data.active)
|
||||
}
|
||||
const getBasicData=(data)=>{
|
||||
basicData.value=data
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,384 +1,384 @@
|
||||
<template>
|
||||
<div style="padding: 0 30px">
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
|
||||
<baseTitle title="阶段变更详情" style="margin-top: -10px"></baseTitle>
|
||||
<div style="color: #606266;font-size: 14px;height:32px;line-height: 32px"><span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">抄送人</span>{{copyName?copyName:'--'}}</div>
|
||||
<div style="color: #606266;font-size: 14px;display: flex;height:40px;line-height: 32px">
|
||||
<span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">阶段变更</span>
|
||||
<!-- {{changeState=='1'?'开发阶段':'研究阶段'}}-->
|
||||
<tag dict-type="fee_stage" :value="changeState"/>
|
||||
</div>
|
||||
<div style="color: #606266;font-size: 14px;display: flex;height:40px;line-height: 32px">
|
||||
<span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">状态变更</span>
|
||||
<tag dict-type="state_change" v-if="stateChange" :value="stateChange"/>
|
||||
<span v-else>--</span>
|
||||
</div>
|
||||
<ApprovalDetail :formData="summaryData.formData" :data="summaryData" type="phase"
|
||||
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId" :taskUserOptionList="summaryData.taskUserOptionList" v-model:value="auditOpinion"></opinion>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getPhaseDetail} from "@/api/project-manage";
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const loading = ref(false)
|
||||
const auditOpinion = ref('')
|
||||
const copyName = ref('')
|
||||
const changeState = ref('')
|
||||
const stateChange = ref('')
|
||||
const fileListShow = ref('READ')
|
||||
const baseFormData = ref([])
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '承办单位',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectType ?
|
||||
<span>{filterDict(cacheStore.getDict('project_type'), baseFormData.value?.projectType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.rdSubject ?
|
||||
<span>{filterDict(cacheStore.getDict('rd_subject'), baseFormData.value?.rdSubject)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'investmentType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.investmentType ?
|
||||
<span>{filterDict(cacheStore.getDict('invest_type'), baseFormData.value?.investmentType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'businessSegment',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.businessSegment ?
|
||||
<span>{filterDict(cacheStore.getDict('business_segment'), baseFormData.value?.businessSegment)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '标准制定',
|
||||
prop: 'technicalStandard',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.technicalStandard ?
|
||||
<span>{filterDict(cacheStore.getDict('technical_standard'), baseFormData.value?.technicalStandard)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectImpact ?
|
||||
<span>{filterDict(cacheStore.getDict('project_impact'), baseFormData.value?.projectImpact)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '预估经费预算(元)',
|
||||
prop: 'economicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},{
|
||||
label: '实际经费预算(元)',
|
||||
prop: 'actualEconomicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.actualEconomicEstimate ?
|
||||
<span>{toThousands(baseFormData.value?.actualEconomicEstimate)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'industryUniversityResearch',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.industryUniversityResearch ?
|
||||
<span>{filterDict(cacheStore.getDict('industry_university'), baseFormData.value?.industryUniversityResearch)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'governmentDeclaration',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.governmentDeclaration ?
|
||||
<span>{filterDict(cacheStore.getDict('government_declaration'), baseFormData.value?.governmentDeclaration)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属专项资金项目',
|
||||
prop: 'specialFund',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}, {
|
||||
label: '预估专项资金(元)',
|
||||
prop: 'forecastSpecialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.forecastSpecialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.forecastSpecialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '实际专项资金(元)',
|
||||
prop: 'specialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.specialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.specialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '是否在预算内',
|
||||
prop: 'isWithinBudget',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.isWithinBudget!=null ? baseFormData.value?.isWithinBudget?
|
||||
<span>{'预算内'}</span>
|
||||
: <span>{'预算外'}</span>:'--'
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '部门分管领导',
|
||||
prop: 'optionalChargeLeadership',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '主项目',
|
||||
prop: 'masterProjectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const baseForm = ref()
|
||||
//匹配字典值,返回对应值的字典标签
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||
baseForm.value.setValues(data)
|
||||
baseFormData.value = data
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
const getInfo = async () => {
|
||||
fileListShow.value = 'READ'
|
||||
const projectId = route.query.projectId
|
||||
summaryProcessViewer.value = false
|
||||
loading.value = true
|
||||
const {code, data, msg} = await getPhaseDetail(projectId)
|
||||
if (code === 1000) {
|
||||
summaryData.value = data;
|
||||
copyName.value= data.formData.userInfoList?.map(item=>item.name).join(',')
|
||||
changeState.value= data.formData.changeState
|
||||
stateChange.value= data.formData.stateChange
|
||||
loading.value = false
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
summaryProcessViewer.value = true
|
||||
if (data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
if (msg === '查询结果为空') {
|
||||
summaryData.value = []
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
getInfo()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<div style="padding: 0 30px">
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
|
||||
<baseTitle title="阶段变更详情" style="margin-top: -10px"></baseTitle>
|
||||
<div style="color: #606266;font-size: 14px;height:32px;line-height: 32px"><span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">抄送人</span>{{copyName?copyName:'--'}}</div>
|
||||
<div style="color: #606266;font-size: 14px;display: flex;height:40px;line-height: 32px">
|
||||
<span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">阶段变更</span>
|
||||
<!-- {{changeState=='1'?'开发阶段':'研究阶段'}}-->
|
||||
<tag dict-type="fee_stage" :value="changeState"/>
|
||||
</div>
|
||||
<div style="color: #606266;font-size: 14px;display: flex;height:40px;line-height: 32px">
|
||||
<span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">状态变更</span>
|
||||
<tag dict-type="state_change" v-if="stateChange" :value="stateChange"/>
|
||||
<span v-else>--</span>
|
||||
</div>
|
||||
<ApprovalDetail :formData="summaryData.formData" :data="summaryData" type="phase"
|
||||
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId" :taskUserOptionList="summaryData.taskUserOptionList" v-model:value="auditOpinion"></opinion>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getPhaseDetail} from "@/api/project-manage";
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const loading = ref(false)
|
||||
const auditOpinion = ref('')
|
||||
const copyName = ref('')
|
||||
const changeState = ref('')
|
||||
const stateChange = ref('')
|
||||
const fileListShow = ref('READ')
|
||||
const baseFormData = ref([])
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '承办单位',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectType ?
|
||||
<span>{filterDict(cacheStore.getDict('project_type'), baseFormData.value?.projectType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.rdSubject ?
|
||||
<span>{filterDict(cacheStore.getDict('rd_subject'), baseFormData.value?.rdSubject)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'investmentType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.investmentType ?
|
||||
<span>{filterDict(cacheStore.getDict('invest_type'), baseFormData.value?.investmentType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'businessSegment',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.businessSegment ?
|
||||
<span>{filterDict(cacheStore.getDict('business_segment'), baseFormData.value?.businessSegment)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '标准制定',
|
||||
prop: 'technicalStandard',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.technicalStandard ?
|
||||
<span>{filterDict(cacheStore.getDict('technical_standard'), baseFormData.value?.technicalStandard)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectImpact ?
|
||||
<span>{filterDict(cacheStore.getDict('project_impact'), baseFormData.value?.projectImpact)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '预估经费预算(元)',
|
||||
prop: 'economicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},{
|
||||
label: '实际经费预算(元)',
|
||||
prop: 'actualEconomicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.actualEconomicEstimate ?
|
||||
<span>{toThousands(baseFormData.value?.actualEconomicEstimate)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'industryUniversityResearch',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.industryUniversityResearch ?
|
||||
<span>{filterDict(cacheStore.getDict('industry_university'), baseFormData.value?.industryUniversityResearch)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'governmentDeclaration',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.governmentDeclaration ?
|
||||
<span>{filterDict(cacheStore.getDict('government_declaration'), baseFormData.value?.governmentDeclaration)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属专项资金项目',
|
||||
prop: 'specialFund',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}, {
|
||||
label: '预估专项资金(元)',
|
||||
prop: 'forecastSpecialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.forecastSpecialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.forecastSpecialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '实际专项资金(元)',
|
||||
prop: 'specialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.specialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.specialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '是否在预算内',
|
||||
prop: 'isWithinBudget',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.isWithinBudget!=null ? baseFormData.value?.isWithinBudget?
|
||||
<span>{'预算内'}</span>
|
||||
: <span>{'预算外'}</span>:'--'
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '部门分管领导',
|
||||
prop: 'optionalChargeLeadership',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '主项目',
|
||||
prop: 'masterProjectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const baseForm = ref()
|
||||
//匹配字典值,返回对应值的字典标签
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||
baseForm.value.setValues(data)
|
||||
baseFormData.value = data
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
const getInfo = async () => {
|
||||
fileListShow.value = 'READ'
|
||||
const projectId = route.query.projectId
|
||||
summaryProcessViewer.value = false
|
||||
loading.value = true
|
||||
const {code, data, msg} = await getPhaseDetail(projectId)
|
||||
if (code === 1000) {
|
||||
summaryData.value = data;
|
||||
copyName.value= data.formData.userInfoList?.map(item=>item.name).join(',')
|
||||
changeState.value= data.formData.changeState
|
||||
stateChange.value= data.formData.stateChange
|
||||
loading.value = false
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
summaryProcessViewer.value = true
|
||||
if (data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
if (msg === '查询结果为空') {
|
||||
summaryData.value = []
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
getInfo()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,446 +1,446 @@
|
||||
<template>
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 15px;margin-bottom: -18px"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
const baseFormData = ref([])
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '承办单位',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectType ?
|
||||
<span>{filterDict(cacheStore.getDict('project_type'), baseFormData.value?.projectType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.rdSubject ?
|
||||
<span>{filterDict(cacheStore.getDict('rd_subject'), baseFormData.value?.rdSubject)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'investmentType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.investmentType ?
|
||||
<span>{filterDict(cacheStore.getDict('invest_type'), baseFormData.value?.investmentType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'businessSegment',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.businessSegment ?
|
||||
<span>{filterDict(cacheStore.getDict('business_segment'), baseFormData.value?.businessSegment)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '标准制定',
|
||||
prop: 'technicalStandard',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.technicalStandard ?
|
||||
<span>{filterDict(cacheStore.getDict('technical_standard'), baseFormData.value?.technicalStandard)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectImpact ?
|
||||
<span>{filterDict(cacheStore.getDict('project_impact'), baseFormData.value?.projectImpact)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '预估经费预算(元)',
|
||||
prop: 'economicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}, {
|
||||
label: '实际经费预算(元)',
|
||||
prop: 'actualEconomicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.actualEconomicEstimate ?
|
||||
<span>{toThousands(baseFormData.value?.actualEconomicEstimate)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'industryUniversityResearch',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.industryUniversityResearch ?
|
||||
<span>{filterDict(cacheStore.getDict('industry_university'), baseFormData.value?.industryUniversityResearch)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'governmentDeclaration',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.governmentDeclaration ?
|
||||
<span>{filterDict(cacheStore.getDict('government_declaration'), baseFormData.value?.governmentDeclaration)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属专项资金项目',
|
||||
prop: 'specialFund',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '预估专项资金(元)',
|
||||
prop: 'forecastSpecialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.forecastSpecialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.forecastSpecialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '实际专项资金(元)',
|
||||
prop: 'specialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.specialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.specialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '是否在预算内',
|
||||
prop: 'isWithinBudget',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.isWithinBudget!=null ? baseFormData.value?.isWithinBudget?
|
||||
<span>{'预算内'}</span>
|
||||
: <span>{'预算外'}</span>:'--'
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '部门分管领导',
|
||||
prop: 'optionalChargeLeadership',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '主项目',
|
||||
prop: 'masterProjectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const baseForm = ref()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '研发人员',
|
||||
prop: 'researchPersonnel',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入研发人员查询',
|
||||
clearable: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '时间',
|
||||
prop: 'time',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
type:'month',
|
||||
placeholder: '请选择月份',
|
||||
clearable: true,
|
||||
format: 'YYYY-MM',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
}
|
||||
}
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'name',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width:'80',
|
||||
index: index => {
|
||||
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'time',
|
||||
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'
|
||||
},
|
||||
{
|
||||
prop: 'subtotal',
|
||||
label: '小计',
|
||||
align: 'center'
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/project/implementation/allocation/info',
|
||||
params: {
|
||||
projectId: route.query.id
|
||||
}
|
||||
})
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val, projectId: route.query.id}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
//匹配字典值,返回对应值的字典标签
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
baseForm.value.setValues(data)
|
||||
baseFormData.value = data
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.search-form{
|
||||
padding-top: 0;
|
||||
}
|
||||
:deep(.el-col-offset-1){
|
||||
margin-left: 48px;
|
||||
}
|
||||
:deep(.el-date-editor.el-input, .el-date-editor.el-input__wrapper ){
|
||||
width: 100%!important;
|
||||
}
|
||||
:deep(.btn-col){
|
||||
margin-left: -28px;
|
||||
}
|
||||
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
margin-left: -25px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
.el-table__cell:first-child {
|
||||
.cell {
|
||||
margin-left: -13px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 15px;margin-bottom: -18px"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
const baseFormData = ref([])
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '承办单位',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectType ?
|
||||
<span>{filterDict(cacheStore.getDict('project_type'), baseFormData.value?.projectType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.rdSubject ?
|
||||
<span>{filterDict(cacheStore.getDict('rd_subject'), baseFormData.value?.rdSubject)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'investmentType',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.investmentType ?
|
||||
<span>{filterDict(cacheStore.getDict('invest_type'), baseFormData.value?.investmentType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'businessSegment',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.businessSegment ?
|
||||
<span>{filterDict(cacheStore.getDict('business_segment'), baseFormData.value?.businessSegment)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '标准制定',
|
||||
prop: 'technicalStandard',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.technicalStandard ?
|
||||
<span>{filterDict(cacheStore.getDict('technical_standard'), baseFormData.value?.technicalStandard)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectImpact ?
|
||||
<span>{filterDict(cacheStore.getDict('project_impact'), baseFormData.value?.projectImpact)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '预估经费预算(元)',
|
||||
prop: 'economicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}, {
|
||||
label: '实际经费预算(元)',
|
||||
prop: 'actualEconomicEstimate',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.actualEconomicEstimate ?
|
||||
<span>{toThousands(baseFormData.value?.actualEconomicEstimate)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'industryUniversityResearch',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.industryUniversityResearch ?
|
||||
<span>{filterDict(cacheStore.getDict('industry_university'), baseFormData.value?.industryUniversityResearch)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'governmentDeclaration',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.governmentDeclaration ?
|
||||
<span>{filterDict(cacheStore.getDict('government_declaration'), baseFormData.value?.governmentDeclaration)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属专项资金项目',
|
||||
prop: 'specialFund',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '预估专项资金(元)',
|
||||
prop: 'forecastSpecialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.forecastSpecialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.forecastSpecialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '实际专项资金(元)',
|
||||
prop: 'specialFundAmount',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.specialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.specialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '是否在预算内',
|
||||
prop: 'isWithinBudget',
|
||||
colProps: {
|
||||
span: 6
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.isWithinBudget!=null ? baseFormData.value?.isWithinBudget?
|
||||
<span>{'预算内'}</span>
|
||||
: <span>{'预算外'}</span>:'--'
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '部门分管领导',
|
||||
prop: 'optionalChargeLeadership',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '主项目',
|
||||
prop: 'masterProjectName',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const baseForm = ref()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '研发人员',
|
||||
prop: 'researchPersonnel',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入研发人员查询',
|
||||
clearable: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '时间',
|
||||
prop: 'time',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
type:'month',
|
||||
placeholder: '请选择月份',
|
||||
clearable: true,
|
||||
format: 'YYYY-MM',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
}
|
||||
}
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'name',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width:'80',
|
||||
index: index => {
|
||||
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'time',
|
||||
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'
|
||||
},
|
||||
{
|
||||
prop: 'subtotal',
|
||||
label: '小计',
|
||||
align: 'center'
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/project/implementation/allocation/info',
|
||||
params: {
|
||||
projectId: route.query.id
|
||||
}
|
||||
})
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val, projectId: route.query.id}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
//匹配字典值,返回对应值的字典标签
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
baseForm.value.setValues(data)
|
||||
baseFormData.value = data
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.search-form{
|
||||
padding-top: 0;
|
||||
}
|
||||
:deep(.el-col-offset-1){
|
||||
margin-left: 48px;
|
||||
}
|
||||
:deep(.el-date-editor.el-input, .el-date-editor.el-input__wrapper ){
|
||||
width: 100%!important;
|
||||
}
|
||||
:deep(.btn-col){
|
||||
margin-left: -28px;
|
||||
}
|
||||
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
margin-left: -25px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
.el-table__cell:first-child {
|
||||
.cell {
|
||||
margin-left: -13px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,179 +1,179 @@
|
||||
<template>
|
||||
<div style="padding: 0 30px">
|
||||
<baseTitle title="表格更新"></baseTitle>
|
||||
<el-form :model="tableForm" ref="form">
|
||||
<el-row gutter="30">
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="projectName" label="项目名称" label-width="95">
|
||||
<span>{{ tableForm.projectName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="projectChargePerson" label="项目负责人">
|
||||
<!-- <el-button color="#DED0B2" @click="showPersonnelPicker" style="margin-right: 10px">-->
|
||||
<!-- {{ tableForm.projectChargePersonName ? '更改' : '请选择项目负责人' }}-->
|
||||
<!-- </el-button>-->
|
||||
{{ tableForm.projectChargePersonName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="startTime" label="项目开始时间">
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="tableForm.startTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- format="YYYY-MM-DD"-->
|
||||
<!-- value-format="YYYY-MM-DD"-->
|
||||
<!-- placeholder="选择项目开始时间"-->
|
||||
<!-- >-->
|
||||
<!-- </el-date-picker>-->
|
||||
<span>{{ tableForm.startTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="endTime" label="项目预计持续时间" :title="!tableForm.startTime?'请先选择项目开始时间!':''">
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="tableForm.endTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- format="YYYY-MM-DD"-->
|
||||
<!-- value-format="YYYY-MM-DD"-->
|
||||
<!-- placeholder="选择项目预计持续时间"-->
|
||||
<!-- :disabled="!tableForm.startTime"-->
|
||||
<!-- :disabled-date="disabledDate"-->
|
||||
<!-- >-->
|
||||
<!-- </el-date-picker>-->
|
||||
<span>{{ tableForm.endTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="projectDevelopmentWay" label="项目开展方式" style="width: 100%">
|
||||
<el-input v-model="tableForm.projectDevelopmentWay" placeholder="请输入项目开展方式" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="projectBudgetDescription" label="项目预算" style="width: 100%" label-width="95">
|
||||
<el-input v-model="tableForm.projectBudgetDescription" placeholder="请输入项目预算" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="projectCompletionRate" label="完成率(%)" label-width="95">
|
||||
<el-input-number v-model="tableForm.projectCompletionRate" placeholder="请输入项目总体完成率" min="0" max="100"
|
||||
:controls="false">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-form-item prop="completeWork" label="已完成工作量">
|
||||
<el-input v-model="tableForm.completeWork" placeholder="请输入已完成工作量" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {updateLedger} from "@/api/project-manage";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {searchUpdateLedgerData} from "@/api/project-manage";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const baseForm = ref()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const tableForm = ref({
|
||||
projectName: '',
|
||||
completeWork: '',
|
||||
endTime: '',
|
||||
projectBudgetDescription: '',
|
||||
projectChargePerson: '',
|
||||
projectChargePersonName: '',
|
||||
projectCompletionRate: '',
|
||||
projectDevelopmentWay: '',
|
||||
projectId: '',
|
||||
startTime: ''
|
||||
})
|
||||
const userPicker = ref()
|
||||
const userList = ref([])
|
||||
|
||||
const showPersonnelPicker = () => {
|
||||
userPicker.value.showUserPicker()
|
||||
}
|
||||
const disabledDate = (time) => {
|
||||
return time.getTime() < new Date(tableForm.value.startTime).getTime();
|
||||
}
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
let params = {
|
||||
...tableForm.value,
|
||||
projectId: route.query.id
|
||||
}
|
||||
updateLedger(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Implementation/account',
|
||||
query: {
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const getBaseInfo = async () => {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
tableForm.value.projectName = data?.projectName || ''
|
||||
}
|
||||
getBaseInfo()
|
||||
const init = async () => {
|
||||
const {code, msg, data} = await searchUpdateLedgerData(route.query.id)
|
||||
tableForm.value = data
|
||||
if (data.projectChargePersonName) {
|
||||
let userObj = {
|
||||
id: data.projectChargePerson,
|
||||
name: data.projectChargePersonName,
|
||||
companyName: data.companyName,
|
||||
accountType: data.accountType,
|
||||
}
|
||||
userList.value.push(userObj)
|
||||
}
|
||||
if (code !== 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
:deep(.el-date-editor--date) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<div style="padding: 0 30px">
|
||||
<baseTitle title="表格更新"></baseTitle>
|
||||
<el-form :model="tableForm" ref="form">
|
||||
<el-row gutter="30">
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="projectName" label="项目名称" label-width="95">
|
||||
<span>{{ tableForm.projectName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="projectChargePerson" label="项目负责人">
|
||||
<!-- <el-button color="#DED0B2" @click="showPersonnelPicker" style="margin-right: 10px">-->
|
||||
<!-- {{ tableForm.projectChargePersonName ? '更改' : '请选择项目负责人' }}-->
|
||||
<!-- </el-button>-->
|
||||
{{ tableForm.projectChargePersonName }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="startTime" label="项目开始时间">
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="tableForm.startTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- format="YYYY-MM-DD"-->
|
||||
<!-- value-format="YYYY-MM-DD"-->
|
||||
<!-- placeholder="选择项目开始时间"-->
|
||||
<!-- >-->
|
||||
<!-- </el-date-picker>-->
|
||||
<span>{{ tableForm.startTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="endTime" label="项目预计持续时间" :title="!tableForm.startTime?'请先选择项目开始时间!':''">
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="tableForm.endTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- format="YYYY-MM-DD"-->
|
||||
<!-- value-format="YYYY-MM-DD"-->
|
||||
<!-- placeholder="选择项目预计持续时间"-->
|
||||
<!-- :disabled="!tableForm.startTime"-->
|
||||
<!-- :disabled-date="disabledDate"-->
|
||||
<!-- >-->
|
||||
<!-- </el-date-picker>-->
|
||||
<span>{{ tableForm.endTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="projectDevelopmentWay" label="项目开展方式" style="width: 100%">
|
||||
<el-input v-model="tableForm.projectDevelopmentWay" placeholder="请输入项目开展方式" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="projectBudgetDescription" label="项目预算" style="width: 100%" label-width="95">
|
||||
<el-input v-model="tableForm.projectBudgetDescription" placeholder="请输入项目预算" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="projectCompletionRate" label="完成率(%)" label-width="95">
|
||||
<el-input-number v-model="tableForm.projectCompletionRate" placeholder="请输入项目总体完成率" min="0" max="100"
|
||||
:controls="false">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-form-item prop="completeWork" label="已完成工作量">
|
||||
<el-input v-model="tableForm.completeWork" placeholder="请输入已完成工作量" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {updateLedger} from "@/api/project-manage";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {searchUpdateLedgerData} from "@/api/project-manage";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const baseForm = ref()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const tableForm = ref({
|
||||
projectName: '',
|
||||
completeWork: '',
|
||||
endTime: '',
|
||||
projectBudgetDescription: '',
|
||||
projectChargePerson: '',
|
||||
projectChargePersonName: '',
|
||||
projectCompletionRate: '',
|
||||
projectDevelopmentWay: '',
|
||||
projectId: '',
|
||||
startTime: ''
|
||||
})
|
||||
const userPicker = ref()
|
||||
const userList = ref([])
|
||||
|
||||
const showPersonnelPicker = () => {
|
||||
userPicker.value.showUserPicker()
|
||||
}
|
||||
const disabledDate = (time) => {
|
||||
return time.getTime() < new Date(tableForm.value.startTime).getTime();
|
||||
}
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
let params = {
|
||||
...tableForm.value,
|
||||
projectId: route.query.id
|
||||
}
|
||||
updateLedger(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Implementation/account',
|
||||
query: {
|
||||
id: route.query.id
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const getBaseInfo = async () => {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
tableForm.value.projectName = data?.projectName || ''
|
||||
}
|
||||
getBaseInfo()
|
||||
const init = async () => {
|
||||
const {code, msg, data} = await searchUpdateLedgerData(route.query.id)
|
||||
tableForm.value = data
|
||||
if (data.projectChargePersonName) {
|
||||
let userObj = {
|
||||
id: data.projectChargePerson,
|
||||
name: data.projectChargePersonName,
|
||||
companyName: data.companyName,
|
||||
accountType: data.accountType,
|
||||
}
|
||||
userList.value.push(userObj)
|
||||
}
|
||||
if (code !== 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
|
||||
.el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
:deep(.el-date-editor--date) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,444 +1,444 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search" searchProp="state" :searchValue="route.query.state" style="margin-left: 16px"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import { getSubCompOpt } from '@/api/user/user.js';
|
||||
import {filterProjectName} from "@/api/project-manage";
|
||||
import {filterRequirementName} from "@/api/project-demand";
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const shortcuts = [
|
||||
{
|
||||
text: '上周',
|
||||
value: () => {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||
return [start, end]
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '上月',
|
||||
value: () => {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
||||
return [start, end]
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '三月前',
|
||||
value: () => {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
||||
return [start, end]
|
||||
},
|
||||
},
|
||||
]
|
||||
const searchConfig = ref([
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请输入征集名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
const res=await filterRequirementName(val)
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
searchConfig.value.find(item => item.prop == 'requirementName').props.options = options
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集公司',
|
||||
prop: 'affiliatedCompanyId',
|
||||
component: 'el-tree-select',
|
||||
props: {
|
||||
placeholder: '请输入征集公司查询',
|
||||
clearable: true,
|
||||
data: [],
|
||||
filterable: true,
|
||||
checkStrictly: true,
|
||||
remote: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请输入项目名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
const res=await filterProjectName(val,'20')
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
searchConfig.value.find(item => item.prop == 'projectName').props.options = options
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
cacheKey: 'project_type',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
cacheKey: 'project_impact',
|
||||
placeholder: '请选择项目影响',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择研发主体',
|
||||
cacheKey: 'rd_subject',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '起止时间',
|
||||
prop: 'dateValue',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
clearable: true,
|
||||
type: 'daterange',
|
||||
startPlaceholder: '开始日期',
|
||||
endPlaceholder: '结束日期',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
shortcuts: shortcuts
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'state',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择状态',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true,
|
||||
cacheKey: 'project_initiation',
|
||||
}
|
||||
},
|
||||
// {
|
||||
// label: '最小金额',
|
||||
// prop: 'requirementName',
|
||||
// component: 'el-input',
|
||||
// props: {
|
||||
// placeholder: '请输入金额查询',
|
||||
// clearable: true,
|
||||
// filterable: true,
|
||||
// checkStrictly: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '最大金额',
|
||||
// prop: 'requirementName',
|
||||
// component: 'el-input',
|
||||
// props: {
|
||||
// placeholder: '请输入金额查询',
|
||||
// clearable: true,
|
||||
// filterable: true,
|
||||
// checkStrictly: true
|
||||
// }
|
||||
// },
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width:85,
|
||||
index: index => {
|
||||
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'processNumber',
|
||||
label: '项目编号',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'requirementName',
|
||||
label: '征集名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'affiliatedCompany',
|
||||
label: '征集公司',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectName',
|
||||
label: '项目名称',
|
||||
align: 'center'
|
||||
},
|
||||
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.projectType !== null) {
|
||||
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'rdSubject',
|
||||
label: '研发主体',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.rdSubject !== null) {
|
||||
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'projectImpact',
|
||||
label: '项目影响',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.projectImpact !== null) {
|
||||
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '预估经费预算(元)',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.economicEstimate)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '起止时间',
|
||||
align: 'center',
|
||||
currentRender: ({row}) => {
|
||||
return row.startTime + ' 至 ' + row.endTime
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'approveName',
|
||||
label: '当前审批节点',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
currentRender: ({row, index}) => {
|
||||
if(row.state=='3'||row.state=='4'){
|
||||
return <span>{row.taskNode}</span>
|
||||
}else if(row.state=='1'){
|
||||
return <span>{row.approveName}</span>
|
||||
}else {
|
||||
return <span>--</span>
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// prop: 'taskNode',
|
||||
// label: '当前节点',
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
fixed:'right',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:approval:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑', prem: ['mosr:approval:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
if (buttons.has("apply")) {
|
||||
btn.push({label: '立项',prem: ['mosr:approval:apply'], func: () => handleApply(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/project/approval',
|
||||
params: {},
|
||||
})
|
||||
|
||||
const search = (val) => {
|
||||
let obj = {...val}
|
||||
if(obj.dateValue) {
|
||||
obj.startTime = obj.dateValue[0]
|
||||
obj.endTime = obj.dateValue[1]
|
||||
delete obj.dateValue
|
||||
}
|
||||
tableConfig.params = obj
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name:'Implementation/detail',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId,
|
||||
state: row.state,
|
||||
step: '20'
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name:'Initiation/edit',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleApply = (row) => {
|
||||
router.push({
|
||||
name:'Initiation/apply',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
const init = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
searchConfig.value.find(item=>item.prop == 'affiliatedCompanyId').props.data = res.data
|
||||
if(route.query.state=='0'){
|
||||
search({state:route.query.state})
|
||||
}else if(route.query.state=='4'){
|
||||
search({state:route.query.state})
|
||||
}
|
||||
}
|
||||
|
||||
init()
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
margin-left: -25px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
.el-table__cell:first-child {
|
||||
.cell {
|
||||
margin-left: -13px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search" searchProp="state" :searchValue="route.query.state" style="margin-left: 16px"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import { getSubCompOpt } from '@/api/user/user.js';
|
||||
import {filterProjectName} from "@/api/project-manage";
|
||||
import {filterRequirementName} from "@/api/project-demand";
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const shortcuts = [
|
||||
{
|
||||
text: '上周',
|
||||
value: () => {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||
return [start, end]
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '上月',
|
||||
value: () => {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
||||
return [start, end]
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '三月前',
|
||||
value: () => {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
||||
return [start, end]
|
||||
},
|
||||
},
|
||||
]
|
||||
const searchConfig = ref([
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请输入征集名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
const res=await filterRequirementName(val)
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
searchConfig.value.find(item => item.prop == 'requirementName').props.options = options
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集公司',
|
||||
prop: 'affiliatedCompanyId',
|
||||
component: 'el-tree-select',
|
||||
props: {
|
||||
placeholder: '请输入征集公司查询',
|
||||
clearable: true,
|
||||
data: [],
|
||||
filterable: true,
|
||||
checkStrictly: true,
|
||||
remote: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请输入项目名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
const res=await filterProjectName(val,'20')
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
let options=[]
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item,
|
||||
label:item
|
||||
}
|
||||
options.push(optionObj)
|
||||
})
|
||||
searchConfig.value.find(item => item.prop == 'projectName').props.options = options
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
cacheKey: 'project_type',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
cacheKey: 'project_impact',
|
||||
placeholder: '请选择项目影响',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择研发主体',
|
||||
cacheKey: 'rd_subject',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '起止时间',
|
||||
prop: 'dateValue',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
clearable: true,
|
||||
type: 'daterange',
|
||||
startPlaceholder: '开始日期',
|
||||
endPlaceholder: '结束日期',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
shortcuts: shortcuts
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'state',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择状态',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
remote: true,
|
||||
cacheKey: 'project_initiation',
|
||||
}
|
||||
},
|
||||
// {
|
||||
// label: '最小金额',
|
||||
// prop: 'requirementName',
|
||||
// component: 'el-input',
|
||||
// props: {
|
||||
// placeholder: '请输入金额查询',
|
||||
// clearable: true,
|
||||
// filterable: true,
|
||||
// checkStrictly: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '最大金额',
|
||||
// prop: 'requirementName',
|
||||
// component: 'el-input',
|
||||
// props: {
|
||||
// placeholder: '请输入金额查询',
|
||||
// clearable: true,
|
||||
// filterable: true,
|
||||
// checkStrictly: true
|
||||
// }
|
||||
// },
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width:85,
|
||||
index: index => {
|
||||
return (tableIns.value.getQuery().pageNum - 1) * tableIns.value.getQuery().pageSize + index + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'processNumber',
|
||||
label: '项目编号',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'requirementName',
|
||||
label: '征集名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'affiliatedCompany',
|
||||
label: '征集公司',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectName',
|
||||
label: '项目名称',
|
||||
align: 'center'
|
||||
},
|
||||
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.projectType !== null) {
|
||||
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'rdSubject',
|
||||
label: '研发主体',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.rdSubject !== null) {
|
||||
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'projectImpact',
|
||||
label: '项目影响',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.projectImpact !== null) {
|
||||
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '预估经费预算(元)',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.economicEstimate)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '起止时间',
|
||||
align: 'center',
|
||||
currentRender: ({row}) => {
|
||||
return row.startTime + ' 至 ' + row.endTime
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'approveName',
|
||||
label: '当前审批节点',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
currentRender: ({row, index}) => {
|
||||
if(row.state=='3'||row.state=='4'){
|
||||
return <span>{row.taskNode}</span>
|
||||
}else if(row.state=='1'){
|
||||
return <span>{row.approveName}</span>
|
||||
}else {
|
||||
return <span>--</span>
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// prop: 'taskNode',
|
||||
// label: '当前节点',
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
fixed:'right',
|
||||
width: 100,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = []
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:approval:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑', prem: ['mosr:approval:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
// if (buttons.has("delete")) {
|
||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||
// }
|
||||
if (buttons.has("apply")) {
|
||||
btn.push({label: '立项',prem: ['mosr:approval:apply'], func: () => handleApply(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/project/approval',
|
||||
params: {},
|
||||
})
|
||||
|
||||
const search = (val) => {
|
||||
let obj = {...val}
|
||||
if(obj.dateValue) {
|
||||
obj.startTime = obj.dateValue[0]
|
||||
obj.endTime = obj.dateValue[1]
|
||||
delete obj.dateValue
|
||||
}
|
||||
tableConfig.params = obj
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name:'Implementation/detail',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId,
|
||||
state: row.state,
|
||||
step: '20'
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
name:'Initiation/edit',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleApply = (row) => {
|
||||
router.push({
|
||||
name:'Initiation/apply',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId
|
||||
}
|
||||
})
|
||||
}
|
||||
const init = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
searchConfig.value.find(item=>item.prop == 'affiliatedCompanyId').props.data = res.data
|
||||
if(route.query.state=='0'){
|
||||
search({state:route.query.state})
|
||||
}else if(route.query.state=='4'){
|
||||
search({state:route.query.state})
|
||||
}
|
||||
}
|
||||
|
||||
init()
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
margin-left: -25px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
.el-table__cell:first-child {
|
||||
.cell {
|
||||
margin-left: -13px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,105 +1,105 @@
|
||||
<template>
|
||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
||||
<el-table ref="table" :data="tableData" style="width: 100%;height: 479px;" :show-summary="true" border
|
||||
:summary-method="getSummaries" v-loading="loading" :header-cell-style="{background:'#f5f7fa'}" :scrollbar-always-on="true">
|
||||
<el-table-column type="index" label="序号" align="center" width="60"/>
|
||||
<el-table-column prop="projectName" label="项目名称" align="center" min-width="170"/>
|
||||
<el-table-column prop="projectCost" label="费用性质" align="center" min-width="100">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.projectCost !== null">
|
||||
<Tag dictType="project_cost" :value="scope.row.projectCost"/>
|
||||
</div>
|
||||
<div v-else>--</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="researchStage" label="研发阶段" align="center" min-width="100">
|
||||
<template #default="scope">
|
||||
<div
|
||||
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">
|
||||
<el-tag effect="plain">{{scope.row.researchStage==1?'开发阶段':'研究阶段'}}</el-tag>
|
||||
</div>
|
||||
<div v-else>--</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="afterTax" label="分摊金额" align="center">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.afterTax !== null">
|
||||
<!-- {{ toThousands(scope.row.afterTax) }}-->
|
||||
{{ scope.row.afterTax }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {exportExcel} from "@/utils/export-excel";
|
||||
import {getAllocationSummaryDetails} from "@/api/expense-manage";
|
||||
|
||||
const tableData = ref([{
|
||||
id: '12987122',
|
||||
name: 'Tom',
|
||||
amount1: '234',
|
||||
amount2: '3.2',
|
||||
amount3: 10,
|
||||
},
|
||||
{
|
||||
id: '12987123',
|
||||
name: 'Tom',
|
||||
amount1: '165',
|
||||
amount2: '4.43',
|
||||
amount3: 12,
|
||||
}])
|
||||
const loading = ref(false)
|
||||
const table = ref()
|
||||
const route = useRoute()
|
||||
const getSummaries = (param) => {
|
||||
const {columns, data} = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '小计'
|
||||
} else if (index === 4) {
|
||||
const values = data.map((item) => Number(item[column.property]))
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
sums[index] = `${values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)}`
|
||||
// sums[index] = toThousands(sums[index])
|
||||
} else {
|
||||
sums[index] = '-'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
const exportTable = () => {
|
||||
const $e = table.value.$el
|
||||
let $table = $e.querySelector('.el-table__fixed')
|
||||
if (!$table) {
|
||||
$table = $e
|
||||
}
|
||||
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目费用分摊表",2)
|
||||
}
|
||||
const init = () => {
|
||||
loading.value = true
|
||||
let params = {
|
||||
allocationId: route.query.id
|
||||
}
|
||||
getAllocationSummaryDetails(params).then(res => {
|
||||
tableData.value = res.data
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
||||
<el-table ref="table" :data="tableData" style="width: 100%;height: 479px;" :show-summary="true" border
|
||||
:summary-method="getSummaries" v-loading="loading" :header-cell-style="{background:'#f5f7fa'}" :scrollbar-always-on="true">
|
||||
<el-table-column type="index" label="序号" align="center" width="60"/>
|
||||
<el-table-column prop="projectName" label="项目名称" align="center" min-width="170"/>
|
||||
<el-table-column prop="projectCost" label="费用性质" align="center" min-width="100">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.projectCost !== null">
|
||||
<Tag dictType="project_cost" :value="scope.row.projectCost"/>
|
||||
</div>
|
||||
<div v-else>--</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="researchStage" label="研发阶段" align="center" min-width="100">
|
||||
<template #default="scope">
|
||||
<div
|
||||
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">
|
||||
<el-tag effect="plain">{{scope.row.researchStage==1?'开发阶段':'研究阶段'}}</el-tag>
|
||||
</div>
|
||||
<div v-else>--</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="afterTax" label="分摊金额" align="center">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.afterTax !== null">
|
||||
<!-- {{ toThousands(scope.row.afterTax) }}-->
|
||||
{{ scope.row.afterTax }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {exportExcel} from "@/utils/export-excel";
|
||||
import {getAllocationSummaryDetails} from "@/api/expense-manage";
|
||||
|
||||
const tableData = ref([{
|
||||
id: '12987122',
|
||||
name: 'Tom',
|
||||
amount1: '234',
|
||||
amount2: '3.2',
|
||||
amount3: 10,
|
||||
},
|
||||
{
|
||||
id: '12987123',
|
||||
name: 'Tom',
|
||||
amount1: '165',
|
||||
amount2: '4.43',
|
||||
amount3: 12,
|
||||
}])
|
||||
const loading = ref(false)
|
||||
const table = ref()
|
||||
const route = useRoute()
|
||||
const getSummaries = (param) => {
|
||||
const {columns, data} = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '小计'
|
||||
} else if (index === 4) {
|
||||
const values = data.map((item) => Number(item[column.property]))
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
sums[index] = `${values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)}`
|
||||
// sums[index] = toThousands(sums[index])
|
||||
} else {
|
||||
sums[index] = '-'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
const exportTable = () => {
|
||||
const $e = table.value.$el
|
||||
let $table = $e.querySelector('.el-table__fixed')
|
||||
if (!$table) {
|
||||
$table = $e
|
||||
}
|
||||
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目费用分摊表",2)
|
||||
}
|
||||
const init = () => {
|
||||
loading.value = true
|
||||
let params = {
|
||||
allocationId: route.query.id
|
||||
}
|
||||
getAllocationSummaryDetails(params).then(res => {
|
||||
tableData.value = res.data
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,216 +1,216 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<el-form :model="formData">
|
||||
<el-row style="margin-left: 15px">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="征集名称">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="征集类型">
|
||||
<span>{{ formData.collectType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="需求上报截止时间">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="formData.isSpecialFund">
|
||||
<el-form-item label="专项资金名称">
|
||||
<span>{{ formData.specialFund }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="type==='singleDetail'">
|
||||
<el-form-item label="征集公司">
|
||||
<span :class="showExpendClass(showMoreCompany,formData.companyIds)">{{
|
||||
getCompanyName(formData.companyIds)
|
||||
}}</span>
|
||||
<div style="color: #2a99ff;text-align: center;width: 100%;font-size: 15px;cursor: pointer"
|
||||
@click="handleExpend">{{ showExpendText }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" style="margin-bottom: -15px">
|
||||
<el-form-item label="征集说明">
|
||||
<div v-if="formData.collectExplain" v-html="formData.collectExplain">
|
||||
</div>
|
||||
<div v-else>--</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24" style="margin-bottom: -15px">-->
|
||||
<!-- <baseTitle title="征集说明"></baseTitle>-->
|
||||
<!-- <el-form-item>-->
|
||||
<!-- <el-card style="width: 100%">-->
|
||||
<!-- <div v-html="formData.collectExplain">-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<baseTitle v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" title="附件文件"></baseTitle>
|
||||
<file-component title="" tag="需求征集" :fullscreen="true" :fileNameTableWidth="150"
|
||||
v-model:value="formData.fileList" :processViewer="processViewer"
|
||||
:file-list-show="fileListShow"/>
|
||||
</el-col>
|
||||
<el-col :span="24" style="margin-top: -15px">
|
||||
<div v-if="data.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="_value">
|
||||
<el-input
|
||||
v-model="_value"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="approval-record" style="margin-top: -15px">
|
||||
<div class="approval-title">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram" :isColumn="true"
|
||||
:operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="collectionProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const emit = defineEmits(['update:value'])
|
||||
const showExpendText = ref('')
|
||||
const showMoreCompany = ref(false)
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
data: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
processViewer: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
companyOption: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
fileListShow: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const changeDiagram = ref(false)
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const getCompanyName = (data) => {
|
||||
if (data) {
|
||||
return data.join(',')
|
||||
}
|
||||
}
|
||||
const handleExpend = () => {
|
||||
showMoreCompany.value = !showMoreCompany.value;
|
||||
showExpendClass(showMoreCompany.value, props.formData.companyIds)
|
||||
}
|
||||
const showExpendClass = (showMoreCompany, data) => {
|
||||
if (!showMoreCompany) {
|
||||
if (data && data.length > 14) {
|
||||
showExpendText.value = '展开'
|
||||
return 'company-style'
|
||||
}
|
||||
} else {
|
||||
showExpendText.value = '收缩'
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
props.processViewer = newVal
|
||||
}, {deep: true})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-empty__description) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.company-style {
|
||||
//width: 98%;
|
||||
min-height: 30px;
|
||||
max-height: 60px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
margin-left: -53px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
.el-table__cell:first-child {
|
||||
.cell {
|
||||
margin-left: -26px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<el-form :model="formData">
|
||||
<el-row style="margin-left: 15px">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="征集名称">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="征集类型">
|
||||
<span>{{ formData.collectType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="需求上报截止时间">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="formData.isSpecialFund">
|
||||
<el-form-item label="专项资金名称">
|
||||
<span>{{ formData.specialFund }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="type==='singleDetail'">
|
||||
<el-form-item label="征集公司">
|
||||
<span :class="showExpendClass(showMoreCompany,formData.companyIds)">{{
|
||||
getCompanyName(formData.companyIds)
|
||||
}}</span>
|
||||
<div style="color: #2a99ff;text-align: center;width: 100%;font-size: 15px;cursor: pointer"
|
||||
@click="handleExpend">{{ showExpendText }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" style="margin-bottom: -15px">
|
||||
<el-form-item label="征集说明">
|
||||
<div v-if="formData.collectExplain" v-html="formData.collectExplain">
|
||||
</div>
|
||||
<div v-else>--</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24" style="margin-bottom: -15px">-->
|
||||
<!-- <baseTitle title="征集说明"></baseTitle>-->
|
||||
<!-- <el-form-item>-->
|
||||
<!-- <el-card style="width: 100%">-->
|
||||
<!-- <div v-html="formData.collectExplain">-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<baseTitle v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" title="附件文件"></baseTitle>
|
||||
<file-component title="" tag="需求征集" :fullscreen="true" :fileNameTableWidth="150"
|
||||
v-model:value="formData.fileList" :processViewer="processViewer"
|
||||
:file-list-show="fileListShow"/>
|
||||
</el-col>
|
||||
<el-col :span="24" style="margin-top: -15px">
|
||||
<div v-if="data.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="_value">
|
||||
<el-input
|
||||
v-model="_value"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="approval-record" style="margin-top: -15px">
|
||||
<div class="approval-title">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram" :isColumn="true"
|
||||
:operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="collectionProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const emit = defineEmits(['update:value'])
|
||||
const showExpendText = ref('')
|
||||
const showMoreCompany = ref(false)
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
data: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
processViewer: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
companyOption: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
fileListShow: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const changeDiagram = ref(false)
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const getCompanyName = (data) => {
|
||||
if (data) {
|
||||
return data.join(',')
|
||||
}
|
||||
}
|
||||
const handleExpend = () => {
|
||||
showMoreCompany.value = !showMoreCompany.value;
|
||||
showExpendClass(showMoreCompany.value, props.formData.companyIds)
|
||||
}
|
||||
const showExpendClass = (showMoreCompany, data) => {
|
||||
if (!showMoreCompany) {
|
||||
if (data && data.length > 14) {
|
||||
showExpendText.value = '展开'
|
||||
return 'company-style'
|
||||
}
|
||||
} else {
|
||||
showExpendText.value = '收缩'
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
props.processViewer = newVal
|
||||
}, {deep: true})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-empty__description) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.company-style {
|
||||
//width: 98%;
|
||||
min-height: 30px;
|
||||
max-height: 60px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
margin-left: -53px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
.el-table__cell:first-child {
|
||||
.cell {
|
||||
margin-left: -26px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,247 +1,247 @@
|
||||
<template>
|
||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
||||
<el-table ref="reportTable" :data="tableData" style="width: 100%;height: 479px"
|
||||
:span-method="objectSpanMethod" v-loading="loading">
|
||||
<!-- <el-table-column label="四川省国有资产经营投资管理有限责任公司-->
|
||||
<!-- 科技创新项目人工成本分摊明细表" align="center">-->
|
||||
<el-table-column v-for="column in columnInfo" :prop="column.prop" :label="column.label" align="center"
|
||||
:width="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') ? 160:130">
|
||||
<template #default="scope">
|
||||
<template v-if="column.children">
|
||||
<el-table-column v-for="childColumn in column.children"
|
||||
:prop="column.prop + '.'+ childColumn.prop"
|
||||
:label="childColumn.label"
|
||||
:width="childColumn.prop === 'subtotal' ? 160 : 130">
|
||||
<template #default="columnScope">
|
||||
<template v-if="(tableData.length -1) !== columnScope.$index">
|
||||
{{
|
||||
columnScope.row[column.prop][childColumn.prop] ? columnScope.row[column.prop][childColumn.prop] : '/'
|
||||
}}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ columnScope.row[column.prop][childColumn.prop] }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!--分摊金额合计与分摊金额总计计算-->
|
||||
<template
|
||||
v-if="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') && (tableData.length -1) !== scope.$index">
|
||||
{{ getTotalSeparation(scope.row, column.prop) }}
|
||||
</template>
|
||||
<template
|
||||
v-else-if="(tableData.length -1) === scope.$index && (column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost')">
|
||||
{{ getTotalSummary(scope.row, column.prop) }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row[column.prop] }}
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getResearchUser, getAllocationDetails} from "@/api/expense-manage";
|
||||
import {exportExcel} from "@/utils/export-excel";
|
||||
|
||||
const route = useRoute()
|
||||
const tableIns = ref()
|
||||
const reportTable = ref({});
|
||||
const columnInfo = ref([])
|
||||
const monthConcat = new Map()
|
||||
const tableData = ref([])
|
||||
const loading = ref(false)
|
||||
const researchOptions = ref([])
|
||||
|
||||
const objectSpanMethod = ({row, column, rowIndex, columnIndex}) => {
|
||||
if (columnIndex === 0) {
|
||||
if (monthConcat.has(rowIndex)) {
|
||||
return {
|
||||
rowspan: monthConcat.get(rowIndex),
|
||||
colspan: 1,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let length = Object.keys(row).length
|
||||
console.log(length)
|
||||
if (length > 5) {
|
||||
if (concatColumn(columnIndex, length, rowIndex)) {
|
||||
if (rowIndex % 5 === 0) {
|
||||
return {
|
||||
rowspan: 5,
|
||||
colspan: 1,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getTotalSeparation = (row, prop) => {
|
||||
let totalSeparation = 0.00
|
||||
for (let key of Object.keys(row)) {
|
||||
if (key.startsWith('personInfo')) {
|
||||
let value = prop === 'totalSeparation' ? (row[key].separationAmount ? row[key].separationAmount : 0) : row[key].subtotal
|
||||
if ("/" !== value) {
|
||||
try {
|
||||
totalSeparation += parseFloat(value)
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (totalSeparation !== 0) {
|
||||
return totalSeparation.toFixed(2);
|
||||
} else {
|
||||
return "/"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getTotalSummary = (row, prop) => {
|
||||
let key;
|
||||
if (prop === 'totalSeparation') {
|
||||
key = 'separationAmount'
|
||||
} else {
|
||||
key = 'subtotal'
|
||||
}
|
||||
let result = 0
|
||||
for (const rowKey of Object.keys(row)) {
|
||||
if (rowKey.startsWith('personInfo')) {
|
||||
let value = row[rowKey][key]
|
||||
if (value && "/" !== value) {
|
||||
try {
|
||||
result += parseFloat(value)
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toFixed(2);
|
||||
}
|
||||
|
||||
const concatColumn = (columnIndex, length, rowIndex) => {
|
||||
if (rowIndex === tableData.value.length - 1) {
|
||||
return false
|
||||
}
|
||||
let columnLength = 5 + (length - 5) * 5
|
||||
if (columnIndex === 1
|
||||
|| columnIndex === columnLength - 1) {
|
||||
return true;
|
||||
}
|
||||
for (let i = 0; i < length - 5; i++) {
|
||||
if (columnIndex === 4 + (i * 5)
|
||||
|| columnIndex === 5 + (i * 5)
|
||||
|| columnIndex === 7 + (i * 5)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const init = () => {
|
||||
loading.value = true
|
||||
getAllocationDetails(route.query.id).then(res => {
|
||||
columnInfo.value = res.data.columns
|
||||
let tableDataLet = res.data.tableData;
|
||||
let personInfoKey = []
|
||||
columnInfo.value.forEach(item => {
|
||||
if (item.prop.startsWith('personInfo')) {
|
||||
personInfoKey.push(item.prop)
|
||||
}
|
||||
})
|
||||
tableData.value = []
|
||||
let rowIndex = 0;
|
||||
let summary = {
|
||||
month: "",
|
||||
salaryType: '',
|
||||
projectName: "合计",
|
||||
totalSeparation: 10,
|
||||
totalSeparationCost: 10
|
||||
}
|
||||
for (const key of personInfoKey) {
|
||||
summary[key] = {
|
||||
researchDuration: "",
|
||||
separationAmount: 0,
|
||||
subtotal: 0,
|
||||
wagesPayable: "",
|
||||
workday: "",
|
||||
}
|
||||
}
|
||||
tableDataLet.forEach((tableDatum) => {
|
||||
let rowspan = tableDatum.rows.length * 5
|
||||
monthConcat.set(rowIndex, rowspan)
|
||||
rowIndex += rowspan
|
||||
for (const tableDatumElement of tableDatum.rows) {
|
||||
tableData.value = tableData.value.concat(tableDatumElement)
|
||||
let row = tableDatumElement[0]
|
||||
for (const key of personInfoKey) {
|
||||
try {
|
||||
if (row[key].subtotal && '/' !== row[key].subtotal) {
|
||||
summary[key].subtotal += parseFloat(row[key].subtotal)
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
for (const row of tableData.value) {
|
||||
for (const key of personInfoKey) {
|
||||
try {
|
||||
if (row[key].separationAmount && '/' !== row[key].separationAmount) {
|
||||
summary[key].separationAmount += parseFloat(row[key].separationAmount)
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const key of personInfoKey) {
|
||||
summary[key].subtotal = summary[key].subtotal.toFixed(2)
|
||||
summary[key].separationAmount = summary[key].separationAmount.toFixed(2)
|
||||
}
|
||||
monthConcat.set(rowIndex, 1)
|
||||
tableData.value.push(summary)
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const getResearchOptions = async () => {
|
||||
const res = await getResearchUser()
|
||||
researchOptions.value = res.data
|
||||
}
|
||||
const search = (val) => {
|
||||
tableConfig.params = {
|
||||
allocationId: route.query.id,
|
||||
...val
|
||||
}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
getResearchOptions()
|
||||
init()
|
||||
|
||||
|
||||
const exportTable = () => {
|
||||
const $e = reportTable.value.$el
|
||||
let $table = $e.querySelector('.el-table__fixed')
|
||||
if (!$table) {
|
||||
$table = $e
|
||||
}
|
||||
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目人工成本分摊明细表", 2)
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
||||
<el-table ref="reportTable" :data="tableData" style="width: 100%;height: 479px"
|
||||
:span-method="objectSpanMethod" v-loading="loading">
|
||||
<!-- <el-table-column label="四川省国有资产经营投资管理有限责任公司-->
|
||||
<!-- 科技创新项目人工成本分摊明细表" align="center">-->
|
||||
<el-table-column v-for="column in columnInfo" :prop="column.prop" :label="column.label" align="center"
|
||||
:width="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') ? 160:130">
|
||||
<template #default="scope">
|
||||
<template v-if="column.children">
|
||||
<el-table-column v-for="childColumn in column.children"
|
||||
:prop="column.prop + '.'+ childColumn.prop"
|
||||
:label="childColumn.label"
|
||||
:width="childColumn.prop === 'subtotal' ? 160 : 130">
|
||||
<template #default="columnScope">
|
||||
<template v-if="(tableData.length -1) !== columnScope.$index">
|
||||
{{
|
||||
columnScope.row[column.prop][childColumn.prop] ? columnScope.row[column.prop][childColumn.prop] : '/'
|
||||
}}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ columnScope.row[column.prop][childColumn.prop] }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!--分摊金额合计与分摊金额总计计算-->
|
||||
<template
|
||||
v-if="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') && (tableData.length -1) !== scope.$index">
|
||||
{{ getTotalSeparation(scope.row, column.prop) }}
|
||||
</template>
|
||||
<template
|
||||
v-else-if="(tableData.length -1) === scope.$index && (column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost')">
|
||||
{{ getTotalSummary(scope.row, column.prop) }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row[column.prop] }}
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getResearchUser, getAllocationDetails} from "@/api/expense-manage";
|
||||
import {exportExcel} from "@/utils/export-excel";
|
||||
|
||||
const route = useRoute()
|
||||
const tableIns = ref()
|
||||
const reportTable = ref({});
|
||||
const columnInfo = ref([])
|
||||
const monthConcat = new Map()
|
||||
const tableData = ref([])
|
||||
const loading = ref(false)
|
||||
const researchOptions = ref([])
|
||||
|
||||
const objectSpanMethod = ({row, column, rowIndex, columnIndex}) => {
|
||||
if (columnIndex === 0) {
|
||||
if (monthConcat.has(rowIndex)) {
|
||||
return {
|
||||
rowspan: monthConcat.get(rowIndex),
|
||||
colspan: 1,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let length = Object.keys(row).length
|
||||
console.log(length)
|
||||
if (length > 5) {
|
||||
if (concatColumn(columnIndex, length, rowIndex)) {
|
||||
if (rowIndex % 5 === 0) {
|
||||
return {
|
||||
rowspan: 5,
|
||||
colspan: 1,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getTotalSeparation = (row, prop) => {
|
||||
let totalSeparation = 0.00
|
||||
for (let key of Object.keys(row)) {
|
||||
if (key.startsWith('personInfo')) {
|
||||
let value = prop === 'totalSeparation' ? (row[key].separationAmount ? row[key].separationAmount : 0) : row[key].subtotal
|
||||
if ("/" !== value) {
|
||||
try {
|
||||
totalSeparation += parseFloat(value)
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (totalSeparation !== 0) {
|
||||
return totalSeparation.toFixed(2);
|
||||
} else {
|
||||
return "/"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getTotalSummary = (row, prop) => {
|
||||
let key;
|
||||
if (prop === 'totalSeparation') {
|
||||
key = 'separationAmount'
|
||||
} else {
|
||||
key = 'subtotal'
|
||||
}
|
||||
let result = 0
|
||||
for (const rowKey of Object.keys(row)) {
|
||||
if (rowKey.startsWith('personInfo')) {
|
||||
let value = row[rowKey][key]
|
||||
if (value && "/" !== value) {
|
||||
try {
|
||||
result += parseFloat(value)
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toFixed(2);
|
||||
}
|
||||
|
||||
const concatColumn = (columnIndex, length, rowIndex) => {
|
||||
if (rowIndex === tableData.value.length - 1) {
|
||||
return false
|
||||
}
|
||||
let columnLength = 5 + (length - 5) * 5
|
||||
if (columnIndex === 1
|
||||
|| columnIndex === columnLength - 1) {
|
||||
return true;
|
||||
}
|
||||
for (let i = 0; i < length - 5; i++) {
|
||||
if (columnIndex === 4 + (i * 5)
|
||||
|| columnIndex === 5 + (i * 5)
|
||||
|| columnIndex === 7 + (i * 5)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const init = () => {
|
||||
loading.value = true
|
||||
getAllocationDetails(route.query.id).then(res => {
|
||||
columnInfo.value = res.data.columns
|
||||
let tableDataLet = res.data.tableData;
|
||||
let personInfoKey = []
|
||||
columnInfo.value.forEach(item => {
|
||||
if (item.prop.startsWith('personInfo')) {
|
||||
personInfoKey.push(item.prop)
|
||||
}
|
||||
})
|
||||
tableData.value = []
|
||||
let rowIndex = 0;
|
||||
let summary = {
|
||||
month: "",
|
||||
salaryType: '',
|
||||
projectName: "合计",
|
||||
totalSeparation: 10,
|
||||
totalSeparationCost: 10
|
||||
}
|
||||
for (const key of personInfoKey) {
|
||||
summary[key] = {
|
||||
researchDuration: "",
|
||||
separationAmount: 0,
|
||||
subtotal: 0,
|
||||
wagesPayable: "",
|
||||
workday: "",
|
||||
}
|
||||
}
|
||||
tableDataLet.forEach((tableDatum) => {
|
||||
let rowspan = tableDatum.rows.length * 5
|
||||
monthConcat.set(rowIndex, rowspan)
|
||||
rowIndex += rowspan
|
||||
for (const tableDatumElement of tableDatum.rows) {
|
||||
tableData.value = tableData.value.concat(tableDatumElement)
|
||||
let row = tableDatumElement[0]
|
||||
for (const key of personInfoKey) {
|
||||
try {
|
||||
if (row[key].subtotal && '/' !== row[key].subtotal) {
|
||||
summary[key].subtotal += parseFloat(row[key].subtotal)
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
for (const row of tableData.value) {
|
||||
for (const key of personInfoKey) {
|
||||
try {
|
||||
if (row[key].separationAmount && '/' !== row[key].separationAmount) {
|
||||
summary[key].separationAmount += parseFloat(row[key].separationAmount)
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const key of personInfoKey) {
|
||||
summary[key].subtotal = summary[key].subtotal.toFixed(2)
|
||||
summary[key].separationAmount = summary[key].separationAmount.toFixed(2)
|
||||
}
|
||||
monthConcat.set(rowIndex, 1)
|
||||
tableData.value.push(summary)
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const getResearchOptions = async () => {
|
||||
const res = await getResearchUser()
|
||||
researchOptions.value = res.data
|
||||
}
|
||||
const search = (val) => {
|
||||
tableConfig.params = {
|
||||
allocationId: route.query.id,
|
||||
...val
|
||||
}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
getResearchOptions()
|
||||
init()
|
||||
|
||||
|
||||
const exportTable = () => {
|
||||
const $e = reportTable.value.$el
|
||||
let $table = $e.querySelector('.el-table__fixed')
|
||||
if (!$table) {
|
||||
$table = $e
|
||||
}
|
||||
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目人工成本分摊明细表", 2)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,236 +1,236 @@
|
||||
<template>
|
||||
<!-- <baseTitle title="审核意见"></baseTitle>-->
|
||||
<!-- <fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>-->
|
||||
<div class="oper-page-btn" style="display: flex">
|
||||
<el-button type="danger" @click="handleReject">驳回</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
||||
</div>
|
||||
<div class="opinion-dialog">
|
||||
<el-dialog v-model="showBackNode" title="请选择退回节点" width="300">
|
||||
<el-table :data="taskUserOptionList" style="width: 100%"
|
||||
:header-cell-style="{background:'#f5f7fa'}">
|
||||
<el-table-column width="55">
|
||||
<template #default="scope">
|
||||
<el-radio
|
||||
class="radio"
|
||||
:label="scope.row"
|
||||
v-model="backNode"
|
||||
>   
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="nodeName"
|
||||
label="节点名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="操作者">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.userInfo" type="success">{{ scope.row.userInfo.name }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="oper" style="display: flex;justify-content: flex-end;margin-top: 10px">
|
||||
<el-button type="danger" @click="rollbackHandler">确定</el-button>
|
||||
<el-button @click="showBackNode=false">取消</el-button>
|
||||
</div>
|
||||
<!-- <el-select v-if="taskUserOptionList?.length>0" v-model="backNode" placeholder="请选择退回节点" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in taskUserOptionList"-->
|
||||
<!-- :key="item.nodeId"-->
|
||||
<!-- :label="item.nodeName + (item.userInfo ? ':' + item.userInfo.name : '')"-->
|
||||
<!-- :value="item.nodeId">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- <el-button type="danger" @click="rollbackHandler">确认</el-button>-->
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from 'element-plus';
|
||||
import {agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
// const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const props = defineProps({
|
||||
taskId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
//退回节点选择框数据
|
||||
taskUserOptionList: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
})
|
||||
|
||||
const backNode = ref({})
|
||||
const showBackNode = ref(false)
|
||||
const form = ref()
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '',
|
||||
prop: 'auditOpinion',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入审核意见',
|
||||
type: 'textarea',
|
||||
rows: 3
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const back = () => {
|
||||
switch (route.name) {
|
||||
case 'Initiation/detail':
|
||||
router.push({name: 'Initiation'})
|
||||
break;
|
||||
case 'Filing/detail':
|
||||
router.push({name: 'Filing'})
|
||||
break;
|
||||
case 'Implementation/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
if (route.query.step === '10') {
|
||||
router.push({name: 'Summary'})
|
||||
} else if (route.query.step === '20') {
|
||||
router.push({name: 'Initiation'})
|
||||
} else if (route.query.step === '40') {
|
||||
router.push({name: 'Implementation'})
|
||||
} else if (route.query.step === '50') {
|
||||
router.push({name: 'Filing'})
|
||||
} else if (route.query.step === '00') {
|
||||
router.push({name: 'Requirement'})
|
||||
}
|
||||
}
|
||||
break;
|
||||
// case 'Summary/detail':
|
||||
// if (route.query.source === 'home') {
|
||||
// router.push('/home')
|
||||
// } else {
|
||||
// router.push({name: 'Summary'})
|
||||
// }
|
||||
// break;
|
||||
case 'Requirement/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Requirement'})
|
||||
}
|
||||
break;
|
||||
case 'Fund/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Fund'})
|
||||
}
|
||||
break;
|
||||
case 'Share/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Expense/share'})
|
||||
}
|
||||
break;
|
||||
case 'Phase/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Implementation'})
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 驳回
|
||||
const handleReject = async () => {
|
||||
showBackNode.value = true
|
||||
backNode.value = {}
|
||||
}
|
||||
|
||||
//回退节点
|
||||
const rollbackHandler = async () => {
|
||||
// const values = form.value.getValues()
|
||||
if (!_value.value) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
const params = {
|
||||
taskId: props.taskId,
|
||||
// ...values
|
||||
auditOpinion: _value.value,
|
||||
rollBackId: backNode.value.nodeId
|
||||
}
|
||||
// console.log('params', params)
|
||||
const res = await rejectTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
location.reload()
|
||||
}
|
||||
}
|
||||
const handleAgree = async () => {
|
||||
if (!_value.value) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
// const values = form.value.getValues()
|
||||
const params = {
|
||||
taskId: props.taskId,
|
||||
formData: props.formData,
|
||||
auditOpinion: _value.value
|
||||
}
|
||||
const res = await agreeTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
location.reload()
|
||||
// back()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.opinion-dialog {
|
||||
.el-dialog__body {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<!-- <baseTitle title="审核意见"></baseTitle>-->
|
||||
<!-- <fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>-->
|
||||
<div class="oper-page-btn" style="display: flex">
|
||||
<el-button type="danger" @click="handleReject">驳回</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
||||
</div>
|
||||
<div class="opinion-dialog">
|
||||
<el-dialog v-model="showBackNode" title="请选择退回节点" width="300">
|
||||
<el-table :data="taskUserOptionList" style="width: 100%"
|
||||
:header-cell-style="{background:'#f5f7fa'}">
|
||||
<el-table-column width="55">
|
||||
<template #default="scope">
|
||||
<el-radio
|
||||
class="radio"
|
||||
:label="scope.row"
|
||||
v-model="backNode"
|
||||
>   
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="nodeName"
|
||||
label="节点名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="操作者">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.userInfo" type="success">{{ scope.row.userInfo.name }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="oper" style="display: flex;justify-content: flex-end;margin-top: 10px">
|
||||
<el-button type="danger" @click="rollbackHandler">确定</el-button>
|
||||
<el-button @click="showBackNode=false">取消</el-button>
|
||||
</div>
|
||||
<!-- <el-select v-if="taskUserOptionList?.length>0" v-model="backNode" placeholder="请选择退回节点" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in taskUserOptionList"-->
|
||||
<!-- :key="item.nodeId"-->
|
||||
<!-- :label="item.nodeName + (item.userInfo ? ':' + item.userInfo.name : '')"-->
|
||||
<!-- :value="item.nodeId">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- <el-button type="danger" @click="rollbackHandler">确认</el-button>-->
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from 'element-plus';
|
||||
import {agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
// const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const props = defineProps({
|
||||
taskId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
//退回节点选择框数据
|
||||
taskUserOptionList: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
})
|
||||
|
||||
const backNode = ref({})
|
||||
const showBackNode = ref(false)
|
||||
const form = ref()
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '',
|
||||
prop: 'auditOpinion',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入审核意见',
|
||||
type: 'textarea',
|
||||
rows: 3
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const back = () => {
|
||||
switch (route.name) {
|
||||
case 'Initiation/detail':
|
||||
router.push({name: 'Initiation'})
|
||||
break;
|
||||
case 'Filing/detail':
|
||||
router.push({name: 'Filing'})
|
||||
break;
|
||||
case 'Implementation/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
if (route.query.step === '10') {
|
||||
router.push({name: 'Summary'})
|
||||
} else if (route.query.step === '20') {
|
||||
router.push({name: 'Initiation'})
|
||||
} else if (route.query.step === '40') {
|
||||
router.push({name: 'Implementation'})
|
||||
} else if (route.query.step === '50') {
|
||||
router.push({name: 'Filing'})
|
||||
} else if (route.query.step === '00') {
|
||||
router.push({name: 'Requirement'})
|
||||
}
|
||||
}
|
||||
break;
|
||||
// case 'Summary/detail':
|
||||
// if (route.query.source === 'home') {
|
||||
// router.push('/home')
|
||||
// } else {
|
||||
// router.push({name: 'Summary'})
|
||||
// }
|
||||
// break;
|
||||
case 'Requirement/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Requirement'})
|
||||
}
|
||||
break;
|
||||
case 'Fund/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Fund'})
|
||||
}
|
||||
break;
|
||||
case 'Share/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Expense/share'})
|
||||
}
|
||||
break;
|
||||
case 'Phase/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Implementation'})
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 驳回
|
||||
const handleReject = async () => {
|
||||
showBackNode.value = true
|
||||
backNode.value = {}
|
||||
}
|
||||
|
||||
//回退节点
|
||||
const rollbackHandler = async () => {
|
||||
// const values = form.value.getValues()
|
||||
if (!_value.value) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
const params = {
|
||||
taskId: props.taskId,
|
||||
// ...values
|
||||
auditOpinion: _value.value,
|
||||
rollBackId: backNode.value.nodeId
|
||||
}
|
||||
// console.log('params', params)
|
||||
const res = await rejectTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
location.reload()
|
||||
}
|
||||
}
|
||||
const handleAgree = async () => {
|
||||
if (!_value.value) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
// const values = form.value.getValues()
|
||||
const params = {
|
||||
taskId: props.taskId,
|
||||
formData: props.formData,
|
||||
auditOpinion: _value.value
|
||||
}
|
||||
const res = await agreeTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
location.reload()
|
||||
// back()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.opinion-dialog {
|
||||
.el-dialog__body {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,448 +1,448 @@
|
||||
<template>
|
||||
<div class="apply-block">
|
||||
<el-form :model="localFormData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="前置流程" prop="requestName">
|
||||
<div v-for="item in localFormData.preProcess" :key="item.requestId">
|
||||
<a :href="item.baseUrl" target="_blank"
|
||||
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ item.requestName }}</a>
|
||||
</div>
|
||||
<el-button color="#DED0B2" @click="handleShowPreTable">
|
||||
{{ localFormData.preProcess ? '更改' : '请选择' }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
|
||||
v-model:otherFileList="otherFileList" :tag="getTitleName(props.title)"
|
||||
@getAttachment="getAttachment" :labelPosition="'top'"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
|
||||
:preview="mode == 'resubmit'"/>
|
||||
<div>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title">
|
||||
<baseTitle title="审批记录" v-if="mode === 'resubmit'"></baseTitle>
|
||||
<div v-else></div>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="mode === 'resubmit'&&!changeDiagram" :operation-list="data.operationList" :isColumn="true"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer mode="view" :idName="title" v-if="processDiagramViewer&&changeDiagram"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" v-if="mode === 'submit'" @click="handleSubmit">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else-if="mode === 'resubmit'" @click="handleSubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
<el-dialog title="前置流程" v-model="showPreTable" width="80%" style="margin-top: 6vh">
|
||||
<el-form :model="preProcessForm" inline>
|
||||
<el-form-item label="请求名称">
|
||||
<el-input v-model="preProcessForm.requestName" placeholder="请输入请求名称" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button color="#DED0B2" @click="searchPreProcess">搜索</el-button>
|
||||
<el-button @click="handleReset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="preProcessList" stripe v-loading="loading"
|
||||
@select="handleSelect" row-key="requestId">
|
||||
<el-table-column type="selection" width="55" :reserve-selection="true"/>
|
||||
<el-table-column prop="requestId" label="请求id"></el-table-column>
|
||||
<el-table-column prop="requestName" label="请求名称"></el-table-column>
|
||||
<el-table-column prop="lastOperatorName" label="最后操作人名称"></el-table-column>
|
||||
<el-table-column prop="lastOperateTime" label="最后操作时间" width="165px"></el-table-column>
|
||||
<el-table-column prop="currentNodeName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="creatorName" label="创建人"></el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" width="165px"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="90px">
|
||||
<template #default="scope">
|
||||
<!-- <el-button type="primary" @click="choosePreProcess(scope.row)" link>选择</el-button>-->
|
||||
<a :href="scope.row.baseUrl" target="_blank" style="color: #2a99ff;margin-left: 10px">查看流程</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination layout="prev, pager, next" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange"/>
|
||||
<!-- <paging :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[10, 20, 30, 40,50]"-->
|
||||
<!-- :total="total" @changeSize="handleSizeChange" @goPage="handleCurrentChange"/>-->
|
||||
<div class="oper">
|
||||
<el-button color="#DED0B2" @click="choosePreProcess">确定</el-button>
|
||||
<el-button @click="handleCancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<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 {
|
||||
getApplyProcess,
|
||||
getPreProcess,
|
||||
getProjectCheckProcess,
|
||||
getProjectConclusionProcess,
|
||||
projectApply,
|
||||
projectCheck,
|
||||
projectConclusion,
|
||||
resubmitApply,
|
||||
resubmitCheck,
|
||||
resubmitConclusion
|
||||
} from "@/api/project-manage";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import Paging from "@/components/pagination/index.vue";
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const changeDiagram = ref(false)
|
||||
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: 'apply'
|
||||
},
|
||||
showTable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: "view"
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
step: {
|
||||
type: String,
|
||||
default: "20"
|
||||
}
|
||||
})
|
||||
const preProcessList = ref([])
|
||||
//暂存数据
|
||||
const currentList = ref([])
|
||||
const preProcessRequired = ref(false)
|
||||
const total = ref(0)
|
||||
const preProcessForm = reactive({
|
||||
requestName: ''
|
||||
})
|
||||
const pageInfo = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
const rules = reactive({
|
||||
requestName: [{required: true, message: '请选择前置流程', trigger: 'blur'}],
|
||||
})
|
||||
// const tagsViewStore = useTagsView()
|
||||
const processStore = useProcessStore()
|
||||
const otherFileList = ref([])
|
||||
const localFormData = ref({
|
||||
preProcess: [
|
||||
// {
|
||||
// requestId: null,
|
||||
// requestName: '',
|
||||
// baseUrl: ''
|
||||
// }
|
||||
]
|
||||
})
|
||||
const attachment = ref()
|
||||
const deploymentData = ref({})
|
||||
const showPreTable = ref(false)
|
||||
const showTable = ref(true)
|
||||
const loading = ref(false)
|
||||
const processDiagramViewer = ref(false)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const deploymentId = ref()
|
||||
const selectRows = ref([])
|
||||
const projectId = ref(route.query.projectId)
|
||||
const getPreProcessUrl = (list) => {
|
||||
// list.map(item => {
|
||||
// item.baseUrl = getPreProcessUrl(item.preProcess)
|
||||
// })
|
||||
// let baseUrl=
|
||||
// list.forEach(item => {
|
||||
// baseUrl=item.baseUrl
|
||||
// })
|
||||
// return baseUrl
|
||||
}
|
||||
const handleSelect = async (selection) => {
|
||||
selectRows.value = selection
|
||||
}
|
||||
const handleCancel = () => {
|
||||
showPreTable.value = false
|
||||
}
|
||||
const searchPreProcess = () => {
|
||||
getPreProcessList()
|
||||
|
||||
}
|
||||
const handleReset = () => {
|
||||
preProcessForm.requestName = ''
|
||||
getPreProcessList()
|
||||
}
|
||||
const handleShowPreTable = () => {
|
||||
showPreTable.value = true
|
||||
getPreProcessList()
|
||||
}
|
||||
const getPreProcessList = () => {
|
||||
loading.value = true
|
||||
getPreProcess().then(res => {
|
||||
loading.value = false
|
||||
let searchArray = []
|
||||
let regexPattern = ("%" + preProcessForm.requestName + "%").replace(/%/g, '.*').replace(/_/g, '.');
|
||||
let regex = new RegExp('^' + regexPattern + '$');
|
||||
res.data.filter((item) => {
|
||||
if (regex.test(item.requestName)) {
|
||||
searchArray.push(item)
|
||||
}
|
||||
})
|
||||
total.value = searchArray.length
|
||||
currentList.value = searchArray
|
||||
preProcessList.value = currentList.value.slice(0, 5)
|
||||
})
|
||||
}
|
||||
const choosePreProcess = () => {
|
||||
let preProcessObj = {}
|
||||
let preProcessArray = []
|
||||
selectRows.value.forEach((item) => {
|
||||
preProcessObj = {
|
||||
requestId: item.requestId,
|
||||
requestName: item.requestName,
|
||||
baseUrl: item.baseUrl
|
||||
}
|
||||
preProcessArray.push(preProcessObj)
|
||||
})
|
||||
localFormData.value.preProcess = preProcessArray
|
||||
// console.log('localFormData.value.preProcess', localFormData.value.preProcess)
|
||||
showPreTable.value = false
|
||||
}
|
||||
|
||||
//切换每页显示条数
|
||||
const handleSizeChange = (val) => {
|
||||
pageInfo.pageSize = val;
|
||||
preProcessList.value = currentList.value.slice((pageInfo.pageNum - 1) * val, pageInfo.pageNum * val)
|
||||
};
|
||||
|
||||
//点击页码进行分页功能
|
||||
const handleCurrentChange = (val) => {
|
||||
pageInfo.pageNum = val;
|
||||
preProcessList.value = currentList.value.slice((val - 1) * pageInfo.pageSize, val * pageInfo.pageSize)
|
||||
};
|
||||
const getTitleName = (type) => {
|
||||
switch (type) {
|
||||
case 'apply':
|
||||
return '项目立项'
|
||||
case 'check':
|
||||
return '项目验收'
|
||||
case 'filing':
|
||||
return '项目归档'
|
||||
}
|
||||
}
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
newFile: true,
|
||||
tag: getTitleName(props.title)
|
||||
}
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
// console.log('上传文件getAttachment', val)
|
||||
localFormData.value.singleFile = compositeParam(val)
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
// console.log('上传文件getOtherFile', val)
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val)
|
||||
otherFileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
if (deploymentData.value.deploymentName === '重大项目立项' || deploymentData.value.deploymentName === '重大项目验收') {
|
||||
if (localFormData.value.preProcess === undefined) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请选择前置流程!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
let files = []
|
||||
if (props.mode === 'resubmit') {
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
} else {
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
// if (localFormData.value.singleFile !== undefined) {
|
||||
// localFormData.value.singleFile = getFileParam(localFormData.value.singleFile)
|
||||
// }
|
||||
// console.log('attachment.value.singleFile', attachment.value, attachment.value.singleFile)
|
||||
// if (localFormData.value.singleFile) {
|
||||
//
|
||||
// } else {
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// }
|
||||
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: attachment.value.singleFile,
|
||||
projectId: projectId.value,
|
||||
preProcess: JSON.stringify(localFormData.value.preProcess)
|
||||
}
|
||||
// console.log('params', params)
|
||||
let res
|
||||
if (props.step === '20') {
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitApply(params)
|
||||
} else {
|
||||
res = await projectApply(params)
|
||||
}
|
||||
} else if (props.step === '40') {
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitCheck(params)
|
||||
} else {
|
||||
res = await projectCheck(params)
|
||||
}
|
||||
} else if (props.step === '50') {
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitConclusion(params)
|
||||
} else {
|
||||
res = await projectConclusion(params)
|
||||
}
|
||||
}
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
location.reload()
|
||||
// if (props.step === '20') {
|
||||
// await router.push({
|
||||
// name: 'Initiation'
|
||||
// })
|
||||
// } else if (props.step === '40') {
|
||||
// await router.push({
|
||||
// name: 'Implementation'
|
||||
// })
|
||||
// } else if (props.step === '50') {
|
||||
// await router.push({
|
||||
// name: 'Filing'
|
||||
// })
|
||||
// }
|
||||
}
|
||||
}
|
||||
const init = async () => {
|
||||
let id = projectId.value
|
||||
if (!id) return;
|
||||
processDiagramViewer.value = false
|
||||
let res
|
||||
if (props.step === '20') {
|
||||
res = await getApplyProcess(id)
|
||||
} else if (props.step === '40') {
|
||||
res = await getProjectCheckProcess(id)
|
||||
} else if (props.step === '50') {
|
||||
res = await getProjectConclusionProcess(id)
|
||||
}
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value = data.deploymentId
|
||||
deploymentData.value = data
|
||||
preProcessRequired.value = data.deploymentName === '重大项目立项' || data.deploymentName === '重大项目验收';
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
watchEffect(() => {
|
||||
return Object.keys(props.formData).length && (localFormData.value = props.formData)
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.oper {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
:deep(.el-upload-list) {
|
||||
width: auto;
|
||||
}
|
||||
:deep(.el-overlay-dialog ){
|
||||
left: 0!important;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="apply-block">
|
||||
<el-form :model="localFormData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="前置流程" prop="requestName">
|
||||
<div v-for="item in localFormData.preProcess" :key="item.requestId">
|
||||
<a :href="item.baseUrl" target="_blank"
|
||||
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ item.requestName }}</a>
|
||||
</div>
|
||||
<el-button color="#DED0B2" @click="handleShowPreTable">
|
||||
{{ localFormData.preProcess ? '更改' : '请选择' }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
|
||||
v-model:otherFileList="otherFileList" :tag="getTitleName(props.title)"
|
||||
@getAttachment="getAttachment" :labelPosition="'top'"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
|
||||
:preview="mode == 'resubmit'"/>
|
||||
<div>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title">
|
||||
<baseTitle title="审批记录" v-if="mode === 'resubmit'"></baseTitle>
|
||||
<div v-else></div>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="mode === 'resubmit'&&!changeDiagram" :operation-list="data.operationList" :isColumn="true"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer mode="view" :idName="title" v-if="processDiagramViewer&&changeDiagram"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" v-if="mode === 'submit'" @click="handleSubmit">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else-if="mode === 'resubmit'" @click="handleSubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
<el-dialog title="前置流程" v-model="showPreTable" width="80%" style="margin-top: 6vh">
|
||||
<el-form :model="preProcessForm" inline>
|
||||
<el-form-item label="请求名称">
|
||||
<el-input v-model="preProcessForm.requestName" placeholder="请输入请求名称" clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button color="#DED0B2" @click="searchPreProcess">搜索</el-button>
|
||||
<el-button @click="handleReset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="preProcessList" stripe v-loading="loading"
|
||||
@select="handleSelect" row-key="requestId">
|
||||
<el-table-column type="selection" width="55" :reserve-selection="true"/>
|
||||
<el-table-column prop="requestId" label="请求id"></el-table-column>
|
||||
<el-table-column prop="requestName" label="请求名称"></el-table-column>
|
||||
<el-table-column prop="lastOperatorName" label="最后操作人名称"></el-table-column>
|
||||
<el-table-column prop="lastOperateTime" label="最后操作时间" width="165px"></el-table-column>
|
||||
<el-table-column prop="currentNodeName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="creatorName" label="创建人"></el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" width="165px"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="90px">
|
||||
<template #default="scope">
|
||||
<!-- <el-button type="primary" @click="choosePreProcess(scope.row)" link>选择</el-button>-->
|
||||
<a :href="scope.row.baseUrl" target="_blank" style="color: #2a99ff;margin-left: 10px">查看流程</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination layout="prev, pager, next" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange"/>
|
||||
<!-- <paging :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[10, 20, 30, 40,50]"-->
|
||||
<!-- :total="total" @changeSize="handleSizeChange" @goPage="handleCurrentChange"/>-->
|
||||
<div class="oper">
|
||||
<el-button color="#DED0B2" @click="choosePreProcess">确定</el-button>
|
||||
<el-button @click="handleCancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<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 {
|
||||
getApplyProcess,
|
||||
getPreProcess,
|
||||
getProjectCheckProcess,
|
||||
getProjectConclusionProcess,
|
||||
projectApply,
|
||||
projectCheck,
|
||||
projectConclusion,
|
||||
resubmitApply,
|
||||
resubmitCheck,
|
||||
resubmitConclusion
|
||||
} from "@/api/project-manage";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import Paging from "@/components/pagination/index.vue";
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const changeDiagram = ref(false)
|
||||
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: 'apply'
|
||||
},
|
||||
showTable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: "view"
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
step: {
|
||||
type: String,
|
||||
default: "20"
|
||||
}
|
||||
})
|
||||
const preProcessList = ref([])
|
||||
//暂存数据
|
||||
const currentList = ref([])
|
||||
const preProcessRequired = ref(false)
|
||||
const total = ref(0)
|
||||
const preProcessForm = reactive({
|
||||
requestName: ''
|
||||
})
|
||||
const pageInfo = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
const rules = reactive({
|
||||
requestName: [{required: true, message: '请选择前置流程', trigger: 'blur'}],
|
||||
})
|
||||
// const tagsViewStore = useTagsView()
|
||||
const processStore = useProcessStore()
|
||||
const otherFileList = ref([])
|
||||
const localFormData = ref({
|
||||
preProcess: [
|
||||
// {
|
||||
// requestId: null,
|
||||
// requestName: '',
|
||||
// baseUrl: ''
|
||||
// }
|
||||
]
|
||||
})
|
||||
const attachment = ref()
|
||||
const deploymentData = ref({})
|
||||
const showPreTable = ref(false)
|
||||
const showTable = ref(true)
|
||||
const loading = ref(false)
|
||||
const processDiagramViewer = ref(false)
|
||||
const name = ref(router.currentRoute.value.name)
|
||||
const deploymentId = ref()
|
||||
const selectRows = ref([])
|
||||
const projectId = ref(route.query.projectId)
|
||||
const getPreProcessUrl = (list) => {
|
||||
// list.map(item => {
|
||||
// item.baseUrl = getPreProcessUrl(item.preProcess)
|
||||
// })
|
||||
// let baseUrl=
|
||||
// list.forEach(item => {
|
||||
// baseUrl=item.baseUrl
|
||||
// })
|
||||
// return baseUrl
|
||||
}
|
||||
const handleSelect = async (selection) => {
|
||||
selectRows.value = selection
|
||||
}
|
||||
const handleCancel = () => {
|
||||
showPreTable.value = false
|
||||
}
|
||||
const searchPreProcess = () => {
|
||||
getPreProcessList()
|
||||
|
||||
}
|
||||
const handleReset = () => {
|
||||
preProcessForm.requestName = ''
|
||||
getPreProcessList()
|
||||
}
|
||||
const handleShowPreTable = () => {
|
||||
showPreTable.value = true
|
||||
getPreProcessList()
|
||||
}
|
||||
const getPreProcessList = () => {
|
||||
loading.value = true
|
||||
getPreProcess().then(res => {
|
||||
loading.value = false
|
||||
let searchArray = []
|
||||
let regexPattern = ("%" + preProcessForm.requestName + "%").replace(/%/g, '.*').replace(/_/g, '.');
|
||||
let regex = new RegExp('^' + regexPattern + '$');
|
||||
res.data.filter((item) => {
|
||||
if (regex.test(item.requestName)) {
|
||||
searchArray.push(item)
|
||||
}
|
||||
})
|
||||
total.value = searchArray.length
|
||||
currentList.value = searchArray
|
||||
preProcessList.value = currentList.value.slice(0, 5)
|
||||
})
|
||||
}
|
||||
const choosePreProcess = () => {
|
||||
let preProcessObj = {}
|
||||
let preProcessArray = []
|
||||
selectRows.value.forEach((item) => {
|
||||
preProcessObj = {
|
||||
requestId: item.requestId,
|
||||
requestName: item.requestName,
|
||||
baseUrl: item.baseUrl
|
||||
}
|
||||
preProcessArray.push(preProcessObj)
|
||||
})
|
||||
localFormData.value.preProcess = preProcessArray
|
||||
// console.log('localFormData.value.preProcess', localFormData.value.preProcess)
|
||||
showPreTable.value = false
|
||||
}
|
||||
|
||||
//切换每页显示条数
|
||||
const handleSizeChange = (val) => {
|
||||
pageInfo.pageSize = val;
|
||||
preProcessList.value = currentList.value.slice((pageInfo.pageNum - 1) * val, pageInfo.pageNum * val)
|
||||
};
|
||||
|
||||
//点击页码进行分页功能
|
||||
const handleCurrentChange = (val) => {
|
||||
pageInfo.pageNum = val;
|
||||
preProcessList.value = currentList.value.slice((val - 1) * pageInfo.pageSize, val * pageInfo.pageSize)
|
||||
};
|
||||
const getTitleName = (type) => {
|
||||
switch (type) {
|
||||
case 'apply':
|
||||
return '项目立项'
|
||||
case 'check':
|
||||
return '项目验收'
|
||||
case 'filing':
|
||||
return '项目归档'
|
||||
}
|
||||
}
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
newFile: true,
|
||||
tag: getTitleName(props.title)
|
||||
}
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
// console.log('上传文件getAttachment', val)
|
||||
localFormData.value.singleFile = compositeParam(val)
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
// console.log('上传文件getOtherFile', val)
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val)
|
||||
otherFileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
if (deploymentData.value.deploymentName === '重大项目立项' || deploymentData.value.deploymentName === '重大项目验收') {
|
||||
if (localFormData.value.preProcess === undefined) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请选择前置流程!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
let files = []
|
||||
if (props.mode === 'resubmit') {
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
} else {
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
// if (localFormData.value.singleFile !== undefined) {
|
||||
// localFormData.value.singleFile = getFileParam(localFormData.value.singleFile)
|
||||
// }
|
||||
// console.log('attachment.value.singleFile', attachment.value, attachment.value.singleFile)
|
||||
// if (localFormData.value.singleFile) {
|
||||
//
|
||||
// } else {
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
// }
|
||||
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: attachment.value.singleFile,
|
||||
projectId: projectId.value,
|
||||
preProcess: JSON.stringify(localFormData.value.preProcess)
|
||||
}
|
||||
// console.log('params', params)
|
||||
let res
|
||||
if (props.step === '20') {
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitApply(params)
|
||||
} else {
|
||||
res = await projectApply(params)
|
||||
}
|
||||
} else if (props.step === '40') {
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitCheck(params)
|
||||
} else {
|
||||
res = await projectCheck(params)
|
||||
}
|
||||
} else if (props.step === '50') {
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitConclusion(params)
|
||||
} else {
|
||||
res = await projectConclusion(params)
|
||||
}
|
||||
}
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
location.reload()
|
||||
// if (props.step === '20') {
|
||||
// await router.push({
|
||||
// name: 'Initiation'
|
||||
// })
|
||||
// } else if (props.step === '40') {
|
||||
// await router.push({
|
||||
// name: 'Implementation'
|
||||
// })
|
||||
// } else if (props.step === '50') {
|
||||
// await router.push({
|
||||
// name: 'Filing'
|
||||
// })
|
||||
// }
|
||||
}
|
||||
}
|
||||
const init = async () => {
|
||||
let id = projectId.value
|
||||
if (!id) return;
|
||||
processDiagramViewer.value = false
|
||||
let res
|
||||
if (props.step === '20') {
|
||||
res = await getApplyProcess(id)
|
||||
} else if (props.step === '40') {
|
||||
res = await getProjectCheckProcess(id)
|
||||
} else if (props.step === '50') {
|
||||
res = await getProjectConclusionProcess(id)
|
||||
}
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value = data.deploymentId
|
||||
deploymentData.value = data
|
||||
preProcessRequired.value = data.deploymentName === '重大项目立项' || data.deploymentName === '重大项目验收';
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
watchEffect(() => {
|
||||
return Object.keys(props.formData).length && (localFormData.value = props.formData)
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.oper {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
:deep(.el-upload-list) {
|
||||
width: auto;
|
||||
}
|
||||
:deep(.el-overlay-dialog ){
|
||||
left: 0!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,282 +1,282 @@
|
||||
<template>
|
||||
<!-- <special-fund-detail :formData="fundData.formData" :data="fundData" :showTable="showTable" :processViewer="fundProcessViewer"-->
|
||||
<!-- :loading="loading"/>-->
|
||||
|
||||
<div v-loading="loading" style="padding: 0 10px;">
|
||||
<baseTitle title="专项资金详情"></baseTitle>
|
||||
<el-form :model="formData" ref="form" label-width="left">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="专项名称">
|
||||
<span>{{ formData.name }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="金额(元)">
|
||||
<span>{{ toThousands(formData.fundAmount) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="剩余金额(元)">
|
||||
<span>{{ toThousands(formData.residualAmount) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <baseTitle title="介绍"></baseTitle>-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <el-form-item>-->
|
||||
<!-- <el-card style="width: 100%">-->
|
||||
<!-- <div v-html="formData.introduce">-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="24">
|
||||
<el-form-item label="专项资金情况说明" >
|
||||
<div style="white-space: pre-wrap">{{formData.introduce}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: -18px;" class="projects">
|
||||
<baseTitle title="关联项目"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height:160px" height="160" v-if="showTable" :scrollbar-always-on="true" :tableConfig="projectTable"
|
||||
:data="formData.projects" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: -18px;" class="projects">
|
||||
<baseTitle title="附件文件"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height: 160px;" height="160" v-if="showTable":scrollbar-always-on="true" :tableConfig="fileTable"
|
||||
:data="formData.files" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="fundData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
v-model="formData.auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="fundProcessViewer && fundData.operationList && fundData.operationList.length > 0&&!changeDiagram" :isColumn="true"
|
||||
:operation-list="fundData.operationList"
|
||||
:state="fundData.state"/>
|
||||
<process-diagram-viewer v-if="fundProcessViewer&&changeDiagram" id-name="fundProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<opinion-moblie v-if="fundData.taskId" :formData="formData" :taskId="fundData.taskId" :taskUserOptionList="fundData.taskUserOptionList"
|
||||
v-model:value="formData.auditOpinion"></opinion-moblie>
|
||||
<file-preview ref="filePreviewRef" :fullscreen="true" v-if="filePreviewShow" :fileName="filePreviewParam.fileName" :fileUrl="filePreviewParam.fileUrl"
|
||||
:fileType="filePreviewParam.fileType"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getFundDetailProcess} from "@/api/special-fund";
|
||||
import OpinionMoblie from "./OpinionMoblie.vue";
|
||||
const processStore = useProcessStore()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const changeDiagram = ref(false)
|
||||
const fundData = ref({})
|
||||
const formData = ref({})
|
||||
const fundProcessViewer = ref(true)
|
||||
const showTable = ref(true)
|
||||
const loading = ref(false)
|
||||
const projectTable = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: 85
|
||||
},
|
||||
{
|
||||
prop: 'projectName',
|
||||
label: '项目名称',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
prop: 'specialFundAmount',
|
||||
label: '项目金额',
|
||||
align: 'center',
|
||||
minWidth: 120,
|
||||
showOverflowTooltip: false,
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.specialFundAmount)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '项目时间',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
},
|
||||
// {
|
||||
// prop: 'oper',
|
||||
// label: '操作',
|
||||
// align: 'center',
|
||||
// // currentRender: ({row, index}) => {
|
||||
// // return (
|
||||
// // <el-button type="primary" link onClick={() => handleView(row)}>查看</el-button>
|
||||
// // )
|
||||
// // }
|
||||
// }
|
||||
]
|
||||
})
|
||||
const fileTable = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: 85,
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '文件名',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<div style="color: #2a99ff;cursor: pointer;" onClick={()=>clickToPreview(row)}>{row.originalFileName}</div>)
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
label: '文件大小',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const filePreviewParam = ref({
|
||||
fileUrl: '',
|
||||
fileName: '',
|
||||
fileType: 'pdf'
|
||||
})
|
||||
const filePreviewShow = ref(false)
|
||||
const clickToPreview=(row)=>{
|
||||
filePreviewShow.value = false
|
||||
filePreviewParam.value = {
|
||||
fileUrl: row.url,
|
||||
fileName: row.originalFileName,
|
||||
fileType: row.fileType
|
||||
}
|
||||
nextTick(()=>{
|
||||
filePreviewShow.value = true
|
||||
})
|
||||
}
|
||||
const handleView=(row)=>{
|
||||
router.push({
|
||||
name: 'Implementation/detail',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId,
|
||||
// step: '40'
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const getDetail = async () => {
|
||||
const specialFundId = route.query.id
|
||||
showTable.value = false
|
||||
loading.value = true
|
||||
fundProcessViewer.value = false
|
||||
const {code, data, msg} = await getFundDetailProcess(specialFundId)
|
||||
|
||||
if (code === 1000) {
|
||||
fundData.value = data
|
||||
formData.value = data.formData
|
||||
loading.value = false
|
||||
if(data.operationList==null)return;
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
fundProcessViewer.value = true
|
||||
showTable.value = true
|
||||
})
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
getDetail()
|
||||
</script>
|
||||
<style scoped>
|
||||
:deep(.el-table--fit ) {
|
||||
height: 300px !important;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<!-- <special-fund-detail :formData="fundData.formData" :data="fundData" :showTable="showTable" :processViewer="fundProcessViewer"-->
|
||||
<!-- :loading="loading"/>-->
|
||||
|
||||
<div v-loading="loading" style="padding: 0 10px;">
|
||||
<baseTitle title="专项资金详情"></baseTitle>
|
||||
<el-form :model="formData" ref="form" label-width="left">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="专项名称">
|
||||
<span>{{ formData.name }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="金额(元)">
|
||||
<span>{{ toThousands(formData.fundAmount) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="剩余金额(元)">
|
||||
<span>{{ toThousands(formData.residualAmount) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <baseTitle title="介绍"></baseTitle>-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <el-form-item>-->
|
||||
<!-- <el-card style="width: 100%">-->
|
||||
<!-- <div v-html="formData.introduce">-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="24">
|
||||
<el-form-item label="专项资金情况说明" >
|
||||
<div style="white-space: pre-wrap">{{formData.introduce}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: -18px;" class="projects">
|
||||
<baseTitle title="关联项目"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height:160px" height="160" v-if="showTable" :scrollbar-always-on="true" :tableConfig="projectTable"
|
||||
:data="formData.projects" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: -18px;" class="projects">
|
||||
<baseTitle title="附件文件"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height: 160px;" height="160" v-if="showTable":scrollbar-always-on="true" :tableConfig="fileTable"
|
||||
:data="formData.files" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="fundData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
v-model="formData.auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="fundProcessViewer && fundData.operationList && fundData.operationList.length > 0&&!changeDiagram" :isColumn="true"
|
||||
:operation-list="fundData.operationList"
|
||||
:state="fundData.state"/>
|
||||
<process-diagram-viewer v-if="fundProcessViewer&&changeDiagram" id-name="fundProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<opinion-moblie v-if="fundData.taskId" :formData="formData" :taskId="fundData.taskId" :taskUserOptionList="fundData.taskUserOptionList"
|
||||
v-model:value="formData.auditOpinion"></opinion-moblie>
|
||||
<file-preview ref="filePreviewRef" :fullscreen="true" v-if="filePreviewShow" :fileName="filePreviewParam.fileName" :fileUrl="filePreviewParam.fileUrl"
|
||||
:fileType="filePreviewParam.fileType"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getFundDetailProcess} from "@/api/special-fund";
|
||||
import OpinionMoblie from "./OpinionMoblie.vue";
|
||||
const processStore = useProcessStore()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const changeDiagram = ref(false)
|
||||
const fundData = ref({})
|
||||
const formData = ref({})
|
||||
const fundProcessViewer = ref(true)
|
||||
const showTable = ref(true)
|
||||
const loading = ref(false)
|
||||
const projectTable = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: 85
|
||||
},
|
||||
{
|
||||
prop: 'projectName',
|
||||
label: '项目名称',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
prop: 'specialFundAmount',
|
||||
label: '项目金额',
|
||||
align: 'center',
|
||||
minWidth: 120,
|
||||
showOverflowTooltip: false,
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.specialFundAmount)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '项目时间',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
},
|
||||
// {
|
||||
// prop: 'oper',
|
||||
// label: '操作',
|
||||
// align: 'center',
|
||||
// // currentRender: ({row, index}) => {
|
||||
// // return (
|
||||
// // <el-button type="primary" link onClick={() => handleView(row)}>查看</el-button>
|
||||
// // )
|
||||
// // }
|
||||
// }
|
||||
]
|
||||
})
|
||||
const fileTable = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: 85,
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '文件名',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<div style="color: #2a99ff;cursor: pointer;" onClick={()=>clickToPreview(row)}>{row.originalFileName}</div>)
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
label: '文件大小',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const filePreviewParam = ref({
|
||||
fileUrl: '',
|
||||
fileName: '',
|
||||
fileType: 'pdf'
|
||||
})
|
||||
const filePreviewShow = ref(false)
|
||||
const clickToPreview=(row)=>{
|
||||
filePreviewShow.value = false
|
||||
filePreviewParam.value = {
|
||||
fileUrl: row.url,
|
||||
fileName: row.originalFileName,
|
||||
fileType: row.fileType
|
||||
}
|
||||
nextTick(()=>{
|
||||
filePreviewShow.value = true
|
||||
})
|
||||
}
|
||||
const handleView=(row)=>{
|
||||
router.push({
|
||||
name: 'Implementation/detail',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId,
|
||||
// step: '40'
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const getDetail = async () => {
|
||||
const specialFundId = route.query.id
|
||||
showTable.value = false
|
||||
loading.value = true
|
||||
fundProcessViewer.value = false
|
||||
const {code, data, msg} = await getFundDetailProcess(specialFundId)
|
||||
|
||||
if (code === 1000) {
|
||||
fundData.value = data
|
||||
formData.value = data.formData
|
||||
loading.value = false
|
||||
if(data.operationList==null)return;
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
fundProcessViewer.value = true
|
||||
showTable.value = true
|
||||
})
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
getDetail()
|
||||
</script>
|
||||
<style scoped>
|
||||
:deep(.el-table--fit ) {
|
||||
height: 300px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,395 +1,395 @@
|
||||
<template>
|
||||
<div class="detail-block" v-loading="loading">
|
||||
<el-form :model="localFormData" ref="summaryForm" :rules="rules">
|
||||
<baseTitle title="预期知识产权"></baseTitle>
|
||||
<el-row gutter="20" style="margin-bottom: -18px;margin-left: 5px">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="知识产权归属" prop="intellectualProperty">
|
||||
<span>{{
|
||||
filterDict(cacheStore.getDict('intellectual_property'), localFormData.intellectualProperty)
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估专利(项)" prop="newPatent">
|
||||
<span>{{ localFormData.newPatent }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估软件著作权(项)" prop="softwareCopyright">
|
||||
<span>{{ localFormData.softwareCopyright }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估技术标准(项)" prop="technicalNorms">
|
||||
<span>{{ localFormData.technicalNorms }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估新产品(项)" prop="newProduct">
|
||||
<span>{{ localFormData.newProduct }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估新工艺(项)" prop="newProcess">
|
||||
<span>{{ localFormData.newProcess }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估新装置(项)" prop="newDevice">
|
||||
<span>{{ localFormData.newDevice }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估新材料(项)" prop="newMaterials">
|
||||
<span>{{ localFormData.newMaterials }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估计算机软件(项)" prop="computerSoftware">
|
||||
<span>{{ localFormData.computerSoftware }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估论文论著(项)" prop="thesis">
|
||||
<span>{{ localFormData.thesis }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估研究报告(项)" prop="researchReport">
|
||||
<span>{{ localFormData.researchReport }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估商标(项)" prop="trademark">
|
||||
<span>{{ localFormData.trademark }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估其他(项)" prop="other">
|
||||
<span style="white-space: pre-wrap">{{ localFormData.other }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<baseTitle title="项目描述"></baseTitle>
|
||||
<el-row gutter="20" style="margin-bottom: -18px;margin-left: 5px;">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="现有业务描述" prop="serviceDescription">
|
||||
<span style="white-space: pre-wrap">{{ localFormData.serviceDescription }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="建设目标描述" prop="contentDescription">
|
||||
<span style="white-space: pre-wrap">{{ localFormData.contentDescription }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<baseTitle title="需求上报申请书" style="margin-bottom: -3px"></baseTitle>
|
||||
<el-row gutter="20" style="margin-bottom: -15px;">
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <single-file-component tag="需求上报" :fileNameTableWidth="300" :fullscreen="true"-->
|
||||
<!-- v-model:value="localFormData.singleFile" :processViewer="processViewer"-->
|
||||
<!-- labelAlign="top"/>-->
|
||||
<!-- <!– <el-form-item label="需求上报申请书" label-position="top" style="display:block;">–>-->
|
||||
<!-- <!– <!– style="font-size: 16px"–>–>-->
|
||||
<!-- <!– <el-button type="primary" link @click="handleDownload(localFormData.singleFile)">–>-->
|
||||
<!-- <!– {{ localFormData.singleFile?.originalFileName }}–>-->
|
||||
<!-- <!– </el-button>–>-->
|
||||
<!-- <!– </el-form-item>–>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="24" style="margin-top: -15px;">-->
|
||||
<!-- <baseTitle title="附件文件" style="margin-bottom: 0"></baseTitle>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="24">
|
||||
<file-component
|
||||
tag="需求上报" :fileNameTableWidth="150" :fullscreen="true"
|
||||
v-model:value="localFormData.fileList"
|
||||
:processViewer="processViewer"
|
||||
:file-list-show="fileListShow"
|
||||
labelAlign="top"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="24" style="margin-top: -15px">
|
||||
<div v-if="data.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="_value">
|
||||
<el-input
|
||||
v-model="_value"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="data.state==='5'" style="margin-bottom: 15px">
|
||||
<baseTitle title="前置流程" v-if="localFormData.preProcess"></baseTitle>
|
||||
<div style="display: flex;align-items: center;flex-wrap: wrap;">
|
||||
<div v-for="(item,index) in localFormData.preProcess" :key="item.requestId">
|
||||
<a :href="item.baseUrl" target="_blank"
|
||||
style="color: #2a99ff;cursor: pointer">{{ item.requestName }}<span
|
||||
v-if="index != localFormData.preProcess.length -1">,</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-perm="['annual:plan:approve']" v-if="data.state==='4'">
|
||||
<!-- <baseTitle title="前置流程"></baseTitle>-->
|
||||
<!-- <select-pre-process :formData="localFormData"/>-->
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="_value">
|
||||
<el-input
|
||||
v-model="_value"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title" style="margin-top: -15px">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
|
||||
:isColumn="true"
|
||||
:operation-list="data.operationList"
|
||||
:step="'report'"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="summaryProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<div class="oper-page-btn" v-perm="['annual:plan:approve']" v-if="data.state==='4'">
|
||||
<el-button type="danger" @click="handleRejectPlan">驳回年度计划</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgreePlan">通过年度计划</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {downloadFile, deleteFile} from "@/api/project-demand";
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
import FileComponent from "@/components/DetailComponent/FileComponent.vue";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {approvePlan} from "@/api/project-demand/summary";
|
||||
|
||||
import SelectPreProcess from "@/components/SelectPreProcess.vue";
|
||||
|
||||
const emit = defineEmits(['update:value'])
|
||||
const tagsViewStore = useTagsView()
|
||||
const cacheStore = useCacheStore()
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default: {
|
||||
state: '1'
|
||||
}
|
||||
},
|
||||
processViewer: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
fileListShow: {
|
||||
type: String,
|
||||
default: 'READ'
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const changeDiagram = ref(false)
|
||||
const localFormData = ref({})
|
||||
const router = useRouter()
|
||||
const fundOption = ref([])
|
||||
const companyOption = ref([])
|
||||
const dictName = ref({})
|
||||
const rules = reactive({
|
||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||
})
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const handleRejectPlan = async () => {
|
||||
// const values = form.value.getValues()
|
||||
// console.log('route',route.query.projectId)
|
||||
if (!_value.value) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
const params = {
|
||||
auditOpinion: _value.value,
|
||||
projectId: parseInt(route.query.projectId),
|
||||
state: false
|
||||
}
|
||||
console.log('params', params)
|
||||
const res = await approvePlan(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
}
|
||||
const handleAgreePlan = async () => {
|
||||
if (!_value.value) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
const params = {
|
||||
auditOpinion: _value.value,
|
||||
projectId: parseInt(route.query.projectId),
|
||||
state: true
|
||||
}
|
||||
console.log('params', params)
|
||||
const res = await approvePlan(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
}
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
const getFundOptions = async () => {
|
||||
const resFund = await getFundOption()
|
||||
fundOption.value = resFund.data
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
const changeName = (option, value) => {
|
||||
let name = ''
|
||||
option.forEach(item => {
|
||||
if (item.value == value) {
|
||||
name = item.label
|
||||
}
|
||||
})
|
||||
return name
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
props.processViewer = newVal
|
||||
}, {deep: true})
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
|
||||
watchEffect(() => {
|
||||
props.formData.singleFile = [props.formData.singleFile]
|
||||
return Object.keys(props.formData).length && (localFormData.value = props.formData)
|
||||
})
|
||||
|
||||
getFundOptions()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.detail-block {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
margin-left: -25px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
.el-table__cell:first-child {
|
||||
.cell {
|
||||
margin-left: -13px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="detail-block" v-loading="loading">
|
||||
<el-form :model="localFormData" ref="summaryForm" :rules="rules">
|
||||
<baseTitle title="预期知识产权"></baseTitle>
|
||||
<el-row gutter="20" style="margin-bottom: -18px;margin-left: 5px">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="知识产权归属" prop="intellectualProperty">
|
||||
<span>{{
|
||||
filterDict(cacheStore.getDict('intellectual_property'), localFormData.intellectualProperty)
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估专利(项)" prop="newPatent">
|
||||
<span>{{ localFormData.newPatent }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估软件著作权(项)" prop="softwareCopyright">
|
||||
<span>{{ localFormData.softwareCopyright }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估技术标准(项)" prop="technicalNorms">
|
||||
<span>{{ localFormData.technicalNorms }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估新产品(项)" prop="newProduct">
|
||||
<span>{{ localFormData.newProduct }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估新工艺(项)" prop="newProcess">
|
||||
<span>{{ localFormData.newProcess }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估新装置(项)" prop="newDevice">
|
||||
<span>{{ localFormData.newDevice }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估新材料(项)" prop="newMaterials">
|
||||
<span>{{ localFormData.newMaterials }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估计算机软件(项)" prop="computerSoftware">
|
||||
<span>{{ localFormData.computerSoftware }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估论文论著(项)" prop="thesis">
|
||||
<span>{{ localFormData.thesis }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估研究报告(项)" prop="researchReport">
|
||||
<span>{{ localFormData.researchReport }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估商标(项)" prop="trademark">
|
||||
<span>{{ localFormData.trademark }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="预估其他(项)" prop="other">
|
||||
<span style="white-space: pre-wrap">{{ localFormData.other }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<baseTitle title="项目描述"></baseTitle>
|
||||
<el-row gutter="20" style="margin-bottom: -18px;margin-left: 5px;">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="现有业务描述" prop="serviceDescription">
|
||||
<span style="white-space: pre-wrap">{{ localFormData.serviceDescription }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="建设目标描述" prop="contentDescription">
|
||||
<span style="white-space: pre-wrap">{{ localFormData.contentDescription }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<baseTitle title="需求上报申请书" style="margin-bottom: -3px"></baseTitle>
|
||||
<el-row gutter="20" style="margin-bottom: -15px;">
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <single-file-component tag="需求上报" :fileNameTableWidth="300" :fullscreen="true"-->
|
||||
<!-- v-model:value="localFormData.singleFile" :processViewer="processViewer"-->
|
||||
<!-- labelAlign="top"/>-->
|
||||
<!-- <!– <el-form-item label="需求上报申请书" label-position="top" style="display:block;">–>-->
|
||||
<!-- <!– <!– style="font-size: 16px"–>–>-->
|
||||
<!-- <!– <el-button type="primary" link @click="handleDownload(localFormData.singleFile)">–>-->
|
||||
<!-- <!– {{ localFormData.singleFile?.originalFileName }}–>-->
|
||||
<!-- <!– </el-button>–>-->
|
||||
<!-- <!– </el-form-item>–>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="24" style="margin-top: -15px;">-->
|
||||
<!-- <baseTitle title="附件文件" style="margin-bottom: 0"></baseTitle>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="24">
|
||||
<file-component
|
||||
tag="需求上报" :fileNameTableWidth="150" :fullscreen="true"
|
||||
v-model:value="localFormData.fileList"
|
||||
:processViewer="processViewer"
|
||||
:file-list-show="fileListShow"
|
||||
labelAlign="top"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="24" style="margin-top: -15px">
|
||||
<div v-if="data.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="_value">
|
||||
<el-input
|
||||
v-model="_value"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="data.state==='5'" style="margin-bottom: 15px">
|
||||
<baseTitle title="前置流程" v-if="localFormData.preProcess"></baseTitle>
|
||||
<div style="display: flex;align-items: center;flex-wrap: wrap;">
|
||||
<div v-for="(item,index) in localFormData.preProcess" :key="item.requestId">
|
||||
<a :href="item.baseUrl" target="_blank"
|
||||
style="color: #2a99ff;cursor: pointer">{{ item.requestName }}<span
|
||||
v-if="index != localFormData.preProcess.length -1">,</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-perm="['annual:plan:approve']" v-if="data.state==='4'">
|
||||
<!-- <baseTitle title="前置流程"></baseTitle>-->
|
||||
<!-- <select-pre-process :formData="localFormData"/>-->
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="_value">
|
||||
<el-input
|
||||
v-model="_value"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title" style="margin-top: -15px">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
|
||||
:isColumn="true"
|
||||
:operation-list="data.operationList"
|
||||
:step="'report'"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="summaryProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<div class="oper-page-btn" v-perm="['annual:plan:approve']" v-if="data.state==='4'">
|
||||
<el-button type="danger" @click="handleRejectPlan">驳回年度计划</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgreePlan">通过年度计划</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {downloadFile, deleteFile} from "@/api/project-demand";
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
import FileComponent from "@/components/DetailComponent/FileComponent.vue";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {approvePlan} from "@/api/project-demand/summary";
|
||||
|
||||
import SelectPreProcess from "@/components/SelectPreProcess.vue";
|
||||
|
||||
const emit = defineEmits(['update:value'])
|
||||
const tagsViewStore = useTagsView()
|
||||
const cacheStore = useCacheStore()
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default: {
|
||||
state: '1'
|
||||
}
|
||||
},
|
||||
processViewer: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
fileListShow: {
|
||||
type: String,
|
||||
default: 'READ'
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const changeDiagram = ref(false)
|
||||
const localFormData = ref({})
|
||||
const router = useRouter()
|
||||
const fundOption = ref([])
|
||||
const companyOption = ref([])
|
||||
const dictName = ref({})
|
||||
const rules = reactive({
|
||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||
})
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const handleRejectPlan = async () => {
|
||||
// const values = form.value.getValues()
|
||||
// console.log('route',route.query.projectId)
|
||||
if (!_value.value) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
const params = {
|
||||
auditOpinion: _value.value,
|
||||
projectId: parseInt(route.query.projectId),
|
||||
state: false
|
||||
}
|
||||
console.log('params', params)
|
||||
const res = await approvePlan(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
}
|
||||
const handleAgreePlan = async () => {
|
||||
if (!_value.value) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
const params = {
|
||||
auditOpinion: _value.value,
|
||||
projectId: parseInt(route.query.projectId),
|
||||
state: true
|
||||
}
|
||||
console.log('params', params)
|
||||
const res = await approvePlan(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
}
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
const getFundOptions = async () => {
|
||||
const resFund = await getFundOption()
|
||||
fundOption.value = resFund.data
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
const changeName = (option, value) => {
|
||||
let name = ''
|
||||
option.forEach(item => {
|
||||
if (item.value == value) {
|
||||
name = item.label
|
||||
}
|
||||
})
|
||||
return name
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
props.processViewer = newVal
|
||||
}, {deep: true})
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
|
||||
watchEffect(() => {
|
||||
props.formData.singleFile = [props.formData.singleFile]
|
||||
return Object.keys(props.formData).length && (localFormData.value = props.formData)
|
||||
})
|
||||
|
||||
getFundOptions()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.detail-block {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
margin-left: -25px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-table__body) {
|
||||
.el-table__cell:first-child {
|
||||
.cell {
|
||||
margin-left: -13px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export const getBaseInfoApi = (projectId) => {
|
||||
return request({
|
||||
url: '/workflow/details/info/'+projectId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export const getMapProjectStateInfo = (projectId, state) => {
|
||||
return request({
|
||||
url: `/workflow/details/${projectId}/${state}`,
|
||||
method: 'get'
|
||||
})
|
||||
import request from '@/utils/request'
|
||||
|
||||
export const getBaseInfoApi = (projectId) => {
|
||||
return request({
|
||||
url: '/workflow/details/info/'+projectId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export const getMapProjectStateInfo = (projectId, state) => {
|
||||
return request({
|
||||
url: `/workflow/details/${projectId}/${state}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -1,201 +1,201 @@
|
||||
<template>
|
||||
<div style="padding: 0 10px;">
|
||||
<StepsMoblie :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail"
|
||||
@stepChange="stepChange"
|
||||
:reportType="route.query.id==='-1'?'direct':''">
|
||||
<template #content v-if="detailShow">
|
||||
<collection-detail :formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
v-if="showActive == '00'"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"
|
||||
/>
|
||||
<summary-detail v-if="showActive == '10'"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="approval"
|
||||
v-if="showActive == '20'"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
:preProcessShow="preProcessShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<div v-if="showActive == '30'">
|
||||
<project-attachment fileNameTableWidth="200" :isLineBtn="true"/>
|
||||
</div>
|
||||
<ApprovalDetail type="execute"
|
||||
v-if="showActive == '40'"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
:preProcessShow="preProcessShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="archivist"
|
||||
v-if="showActive == '50'"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
:preProcessShow="preProcessShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<!-- <project-apply-moblie :title="applyTitle"-->
|
||||
<!-- v-if="editShow"-->
|
||||
<!-- :mode="mode"-->
|
||||
<!-- :step="showActive"-->
|
||||
<!-- :data="detailData"-->
|
||||
<!-- :formData="detailData.formData"/>-->
|
||||
</template>
|
||||
</StepsMoblie>
|
||||
<opinion-moblie v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
|
||||
:taskUserOptionList="detailData.taskUserOptionList"
|
||||
v-model:value="auditOpinion"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {ElLoading, ElNotification} from "element-plus";
|
||||
import ApprovalDetail from './ApprovalDetailMoblie.vue';
|
||||
import CollectionDetail from './CollectionDetailMoblie.vue';
|
||||
import SummaryDetail from './SummaryDetailMoblie.vue';
|
||||
import StepsMoblie from './StepsMoblie.vue';
|
||||
import {getMapProjectStateInfo} from "./api";
|
||||
import OpinionMoblie from '@/views/project-management/mobledetail/OpinionMoblie.vue'
|
||||
// import ProjectApplyMoblie from "./ProjectApplyMoblie.vue";
|
||||
|
||||
|
||||
const route = useRoute()
|
||||
const editShow = ref(false)
|
||||
const applyTitle = ref('apply')
|
||||
const loading = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const fileListShow = ref('READ')
|
||||
const preProcessShow = ref('READ')
|
||||
const detailShow = ref(false)
|
||||
const mode = ref('')
|
||||
const currentStep = ref()
|
||||
const auditOpinion = ref('')
|
||||
route.query.step == '10' && (currentStep.value = 1)
|
||||
route.query.step == '20' && (currentStep.value = 2)
|
||||
route.query.step == '30' && (currentStep.value = 3)
|
||||
route.query.step == '40' && (currentStep.value = 4)
|
||||
route.query.step == '50' && (currentStep.value = 5)
|
||||
const showActive = ref()
|
||||
const detailData = ref({})
|
||||
const commonProvessViewer = ref(true)
|
||||
|
||||
const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
detailData.value = {
|
||||
state: "0"
|
||||
}
|
||||
try {
|
||||
detailShow.value = false
|
||||
fileListShow.value = 'READ'
|
||||
preProcessShow.value = 'READ'
|
||||
commonProvessViewer.value = false
|
||||
const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if (code === 1000) {
|
||||
data.formData.preProcess = data.formData.preProcess ? JSON.parse(data.formData.preProcess) : undefined
|
||||
detailData.value = data
|
||||
mode.value = data.formData.mode
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
commonProvessViewer.value = true
|
||||
detailShow.value = true
|
||||
if (data.formPermMap && data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
if (data.formPermMap && data.formPermMap["preProcess"]) {
|
||||
preProcessShow.value = data.formPermMap["preProcess"].perm
|
||||
}
|
||||
})
|
||||
changeModel(state, mode.value)
|
||||
loading.close()
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
if (msg === '查询结果为空') {
|
||||
detailData.value = []
|
||||
detailData.value.formData = {}
|
||||
}
|
||||
loading.close()
|
||||
}
|
||||
} catch {
|
||||
loading.close()
|
||||
}
|
||||
}
|
||||
const changeModel = (active, mode) => {
|
||||
// editShow.value = false
|
||||
nextTick(() => {
|
||||
// editShow.value = mode === 'submit' || mode === 'resubmit';
|
||||
if (route.query.step === '20' && active === '20') {
|
||||
applyTitle.value = 'apply'
|
||||
} else if (route.query.step === '40' && active === '40') {
|
||||
applyTitle.value = 'check'
|
||||
} else if (route.query.step === '50' && active === '50') {
|
||||
applyTitle.value = 'filing'
|
||||
}
|
||||
})
|
||||
}
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
if (active == '30') {
|
||||
changeModel(30, 'view')
|
||||
detailShow.value = true
|
||||
return;
|
||||
}
|
||||
getAllInfo(active)
|
||||
}
|
||||
|
||||
const stepChange = (data) => {
|
||||
showActive.value = data.active
|
||||
if (data.active == '30') {
|
||||
changeModel(30, 'view')
|
||||
detailShow.value = true
|
||||
return;
|
||||
}
|
||||
getAllInfo(data.active)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.detail-block {
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
//.is-active {
|
||||
// color: black;
|
||||
// //background-color: #DED0B2;
|
||||
//}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div style="padding: 0 10px;">
|
||||
<StepsMoblie :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail"
|
||||
@stepChange="stepChange"
|
||||
:reportType="route.query.id==='-1'?'direct':''">
|
||||
<template #content v-if="detailShow">
|
||||
<collection-detail :formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
v-if="showActive == '00'"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"
|
||||
/>
|
||||
<summary-detail v-if="showActive == '10'"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="approval"
|
||||
v-if="showActive == '20'"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
:preProcessShow="preProcessShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<div v-if="showActive == '30'">
|
||||
<project-attachment fileNameTableWidth="200" :isLineBtn="true"/>
|
||||
</div>
|
||||
<ApprovalDetail type="execute"
|
||||
v-if="showActive == '40'"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
:preProcessShow="preProcessShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="archivist"
|
||||
v-if="showActive == '50'"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
:preProcessShow="preProcessShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<!-- <project-apply-moblie :title="applyTitle"-->
|
||||
<!-- v-if="editShow"-->
|
||||
<!-- :mode="mode"-->
|
||||
<!-- :step="showActive"-->
|
||||
<!-- :data="detailData"-->
|
||||
<!-- :formData="detailData.formData"/>-->
|
||||
</template>
|
||||
</StepsMoblie>
|
||||
<opinion-moblie v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
|
||||
:taskUserOptionList="detailData.taskUserOptionList"
|
||||
v-model:value="auditOpinion"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {ElLoading, ElNotification} from "element-plus";
|
||||
import ApprovalDetail from './ApprovalDetailMoblie.vue';
|
||||
import CollectionDetail from './CollectionDetailMoblie.vue';
|
||||
import SummaryDetail from './SummaryDetailMoblie.vue';
|
||||
import StepsMoblie from './StepsMoblie.vue';
|
||||
import {getMapProjectStateInfo} from "./api";
|
||||
import OpinionMoblie from '@/views/project-management/mobledetail/OpinionMoblie.vue'
|
||||
// import ProjectApplyMoblie from "./ProjectApplyMoblie.vue";
|
||||
|
||||
|
||||
const route = useRoute()
|
||||
const editShow = ref(false)
|
||||
const applyTitle = ref('apply')
|
||||
const loading = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const fileListShow = ref('READ')
|
||||
const preProcessShow = ref('READ')
|
||||
const detailShow = ref(false)
|
||||
const mode = ref('')
|
||||
const currentStep = ref()
|
||||
const auditOpinion = ref('')
|
||||
route.query.step == '10' && (currentStep.value = 1)
|
||||
route.query.step == '20' && (currentStep.value = 2)
|
||||
route.query.step == '30' && (currentStep.value = 3)
|
||||
route.query.step == '40' && (currentStep.value = 4)
|
||||
route.query.step == '50' && (currentStep.value = 5)
|
||||
const showActive = ref()
|
||||
const detailData = ref({})
|
||||
const commonProvessViewer = ref(true)
|
||||
|
||||
const getAllInfo = async (state) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
detailData.value = {
|
||||
state: "0"
|
||||
}
|
||||
try {
|
||||
detailShow.value = false
|
||||
fileListShow.value = 'READ'
|
||||
preProcessShow.value = 'READ'
|
||||
commonProvessViewer.value = false
|
||||
const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||
if (code === 1000) {
|
||||
data.formData.preProcess = data.formData.preProcess ? JSON.parse(data.formData.preProcess) : undefined
|
||||
detailData.value = data
|
||||
mode.value = data.formData.mode
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
commonProvessViewer.value = true
|
||||
detailShow.value = true
|
||||
if (data.formPermMap && data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
if (data.formPermMap && data.formPermMap["preProcess"]) {
|
||||
preProcessShow.value = data.formPermMap["preProcess"].perm
|
||||
}
|
||||
})
|
||||
changeModel(state, mode.value)
|
||||
loading.close()
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
if (msg === '查询结果为空') {
|
||||
detailData.value = []
|
||||
detailData.value.formData = {}
|
||||
}
|
||||
loading.close()
|
||||
}
|
||||
} catch {
|
||||
loading.close()
|
||||
}
|
||||
}
|
||||
const changeModel = (active, mode) => {
|
||||
// editShow.value = false
|
||||
nextTick(() => {
|
||||
// editShow.value = mode === 'submit' || mode === 'resubmit';
|
||||
if (route.query.step === '20' && active === '20') {
|
||||
applyTitle.value = 'apply'
|
||||
} else if (route.query.step === '40' && active === '40') {
|
||||
applyTitle.value = 'check'
|
||||
} else if (route.query.step === '50' && active === '50') {
|
||||
applyTitle.value = 'filing'
|
||||
}
|
||||
})
|
||||
}
|
||||
const setDetail = (active) => {
|
||||
showActive.value = active
|
||||
if (active == '30') {
|
||||
changeModel(30, 'view')
|
||||
detailShow.value = true
|
||||
return;
|
||||
}
|
||||
getAllInfo(active)
|
||||
}
|
||||
|
||||
const stepChange = (data) => {
|
||||
showActive.value = data.active
|
||||
if (data.active == '30') {
|
||||
changeModel(30, 'view')
|
||||
detailShow.value = true
|
||||
return;
|
||||
}
|
||||
getAllInfo(data.active)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.detail-block {
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
//.is-active {
|
||||
// color: black;
|
||||
// //background-color: #DED0B2;
|
||||
//}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,327 +1,327 @@
|
||||
<template>
|
||||
<div style="padding: 0 10px; box-sizing: border-box;">
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left"></fvForm>
|
||||
<baseTitle title="阶段变更详情" style="margin-top: -10px"></baseTitle>
|
||||
<div style="color: #606266;font-size: 14px;height:32px;line-height: 32px"><span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">抄送人</span>{{copyName?copyName:'--'}}</div>
|
||||
<div style="color: #606266;font-size: 14px;display: flex;height:40px;line-height: 32px;margin-bottom: -10px">
|
||||
<span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">变更状态</span>
|
||||
<!-- {{changeState=='1'?'开发阶段':'研究阶段'}}-->
|
||||
<tag dict-type="fee_stage" :value="changeState"/>
|
||||
</div>
|
||||
<ApprovalDetailMoblie :formData="summaryData.formData" :data="summaryData" type="phase"
|
||||
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<opinion-moblie v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId"
|
||||
:taskUserOptionList="summaryData.taskUserOptionList"
|
||||
v-model:value="auditOpinion"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getPhaseDetail} from "@/api/project-manage";
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import ApprovalDetailMoblie from '../mobledetail/ApprovalDetailMoblie.vue'
|
||||
import OpinionMoblie from '@/views/project-management/mobledetail/OpinionMoblie.vue'
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const loading = ref(false)
|
||||
const auditOpinion = ref('')
|
||||
const changeState = ref('')
|
||||
const copyName = ref('')
|
||||
const fileListShow = ref('READ')
|
||||
const baseFormData = ref([])
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '承办单位',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectType ?
|
||||
<span>{filterDict(cacheStore.getDict('project_type'), baseFormData.value?.projectType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.rdSubject ?
|
||||
<span>{filterDict(cacheStore.getDict('rd_subject'), baseFormData.value?.rdSubject)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'investmentType',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.investmentType ?
|
||||
<span>{filterDict(cacheStore.getDict('invest_type'), baseFormData.value?.investmentType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'businessSegment',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.businessSegment ?
|
||||
<span>{filterDict(cacheStore.getDict('business_segment'), baseFormData.value?.businessSegment)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '标准制定',
|
||||
prop: 'technicalStandard',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.technicalStandard ?
|
||||
<span>{filterDict(cacheStore.getDict('technical_standard'), baseFormData.value?.technicalStandard)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectImpact ?
|
||||
<span>{filterDict(cacheStore.getDict('project_impact'), baseFormData.value?.projectImpact)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '预估经费预算(元)',
|
||||
prop: 'economicEstimate',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'industryUniversityResearch',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.industryUniversityResearch ?
|
||||
<span>{filterDict(cacheStore.getDict('industry_university'), baseFormData.value?.industryUniversityResearch)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'governmentDeclaration',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.governmentDeclaration ?
|
||||
<span>{filterDict(cacheStore.getDict('government_declaration'), baseFormData.value?.governmentDeclaration)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属专项资金项目',
|
||||
prop: 'specialFund',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '预估专项资金(元)',
|
||||
prop: 'specialFundAmount',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.specialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.specialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '部门分管领导',
|
||||
prop: 'optionalChargeLeadership',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const baseForm = ref()
|
||||
//匹配字典值,返回对应值的字典标签
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||
baseForm.value.setValues(data)
|
||||
baseFormData.value = data
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
const getInfo = async () => {
|
||||
fileListShow.value = 'READ'
|
||||
const projectId = route.query.projectId
|
||||
summaryProcessViewer.value = false
|
||||
loading.value = true
|
||||
const {code, data, msg} = await getPhaseDetail(projectId)
|
||||
if (code === 1000) {
|
||||
summaryData.value = data;
|
||||
copyName.value= data.formData.userInfoList?.map(item=>item.name).join(',')
|
||||
changeState.value= data.formData.changeState
|
||||
loading.value = false
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
summaryProcessViewer.value = true
|
||||
if (data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
if (msg === '查询结果为空') {
|
||||
summaryData.value = []
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
getInfo()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<template>
|
||||
<div style="padding: 0 10px; box-sizing: border-box;">
|
||||
<baseTitle title="项目基本信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left"></fvForm>
|
||||
<baseTitle title="阶段变更详情" style="margin-top: -10px"></baseTitle>
|
||||
<div style="color: #606266;font-size: 14px;height:32px;line-height: 32px"><span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">抄送人</span>{{copyName?copyName:'--'}}</div>
|
||||
<div style="color: #606266;font-size: 14px;display: flex;height:40px;line-height: 32px;margin-bottom: -10px">
|
||||
<span style="display:inline-block;text-align: right;margin-right: 14px;margin-left: 15px">变更状态</span>
|
||||
<!-- {{changeState=='1'?'开发阶段':'研究阶段'}}-->
|
||||
<tag dict-type="fee_stage" :value="changeState"/>
|
||||
</div>
|
||||
<ApprovalDetailMoblie :formData="summaryData.formData" :data="summaryData" type="phase"
|
||||
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<opinion-moblie v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId"
|
||||
:taskUserOptionList="summaryData.taskUserOptionList"
|
||||
v-model:value="auditOpinion"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getPhaseDetail} from "@/api/project-manage";
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import ApprovalDetailMoblie from '../mobledetail/ApprovalDetailMoblie.vue'
|
||||
import OpinionMoblie from '@/views/project-management/mobledetail/OpinionMoblie.vue'
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
const cacheStore = useCacheStore()
|
||||
const route = useRoute()
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const loading = ref(false)
|
||||
const auditOpinion = ref('')
|
||||
const changeState = ref('')
|
||||
const copyName = ref('')
|
||||
const fileListShow = ref('READ')
|
||||
const baseFormData = ref([])
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '承办单位',
|
||||
prop: 'affiliatedCompany',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectType ?
|
||||
<span>{filterDict(cacheStore.getDict('project_type'), baseFormData.value?.projectType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'rdSubject',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.rdSubject ?
|
||||
<span>{filterDict(cacheStore.getDict('rd_subject'), baseFormData.value?.rdSubject)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'investmentType',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.investmentType ?
|
||||
<span>{filterDict(cacheStore.getDict('invest_type'), baseFormData.value?.investmentType)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'businessSegment',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.businessSegment ?
|
||||
<span>{filterDict(cacheStore.getDict('business_segment'), baseFormData.value?.businessSegment)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '标准制定',
|
||||
prop: 'technicalStandard',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.technicalStandard ?
|
||||
<span>{filterDict(cacheStore.getDict('technical_standard'), baseFormData.value?.technicalStandard)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.projectImpact ?
|
||||
<span>{filterDict(cacheStore.getDict('project_impact'), baseFormData.value?.projectImpact)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '预估经费预算(元)',
|
||||
prop: 'economicEstimate',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.economicEstimate ?
|
||||
<span>{ toThousands(baseFormData.value?.economicEstimate )}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'industryUniversityResearch',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.industryUniversityResearch ?
|
||||
<span>{filterDict(cacheStore.getDict('industry_university'), baseFormData.value?.industryUniversityResearch)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'governmentDeclaration',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.governmentDeclaration ?
|
||||
<span>{filterDict(cacheStore.getDict('government_declaration'), baseFormData.value?.governmentDeclaration)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '所属专项资金项目',
|
||||
prop: 'specialFund',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '预估专项资金(元)',
|
||||
prop: 'specialFundAmount',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
baseFormData.value?.specialFundAmount ?
|
||||
<span>{toThousands(baseFormData.value?.specialFundAmount)}</span>
|
||||
: <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '部门分管领导',
|
||||
prop: 'optionalChargeLeadership',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const baseForm = ref()
|
||||
//匹配字典值,返回对应值的字典标签
|
||||
const filterDict = (data, value) => {
|
||||
if (data === undefined || value === undefined) return;
|
||||
let label = ''
|
||||
let result = []
|
||||
if (value instanceof Array) {
|
||||
value.forEach(item1 => {
|
||||
data.find(item => {
|
||||
if (item.value == item1) {
|
||||
result.push(item.label)
|
||||
}
|
||||
})
|
||||
})
|
||||
label = result.map(item => item).join(',')
|
||||
} else {
|
||||
if (data instanceof Array) {
|
||||
data.find(item => {
|
||||
if (item.value == value) {
|
||||
label = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return label
|
||||
}
|
||||
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||
baseForm.value.setValues(data)
|
||||
baseFormData.value = data
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
const getInfo = async () => {
|
||||
fileListShow.value = 'READ'
|
||||
const projectId = route.query.projectId
|
||||
summaryProcessViewer.value = false
|
||||
loading.value = true
|
||||
const {code, data, msg} = await getPhaseDetail(projectId)
|
||||
if (code === 1000) {
|
||||
summaryData.value = data;
|
||||
copyName.value= data.formData.userInfoList?.map(item=>item.name).join(',')
|
||||
changeState.value= data.formData.changeState
|
||||
loading.value = false
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
summaryProcessViewer.value = true
|
||||
if (data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
if (msg === '查询结果为空') {
|
||||
summaryData.value = []
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
getInfo()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user