Merge pull request 'master' (#264) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/264
This commit is contained in:
@@ -13,3 +13,9 @@ export const getAllocationDetail = (allocationId) => {
|
|||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const getAllocationProcess = () => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/cost/allocation/process',
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -82,3 +82,18 @@ export const deleteDemand = (id) => {
|
|||||||
method: "delete"
|
method: "delete"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
//需求征集附件列表(归档)
|
||||||
|
export const getRequirementAttachment = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/requirement/attachments',
|
||||||
|
method: "get",
|
||||||
|
params:params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const uploadRequirementAttachment= (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/requirement/upload',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -27,6 +27,20 @@ export const resubmitApply = (data) => {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const getInitiationAttachment = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/approval/attachments',
|
||||||
|
method: "get",
|
||||||
|
params:params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const uploadInitiationAttachment= (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/approval/upload',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
//项目实施
|
//项目实施
|
||||||
export const getCheckDetail = (projectId) => {
|
export const getCheckDetail = (projectId) => {
|
||||||
return request({
|
return request({
|
||||||
@@ -77,13 +91,11 @@ export const addLedger = (data) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getTags = (projectId) => {
|
export const getTags = (params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/mosr/project/implementation/tags',
|
url: '/workflow/mosr/project/implementation/option',
|
||||||
method: "get",
|
method: "get",
|
||||||
params:{
|
params:params
|
||||||
projectId:projectId
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
//项目归档
|
//项目归档
|
||||||
@@ -114,3 +126,17 @@ export const getProjectConclusionProcess = () => {
|
|||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const getFilingAttachment = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/filing/attachments',
|
||||||
|
method: "get",
|
||||||
|
params:params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const uploadFilingAttachment= (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/filing/upload',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -1,11 +1,29 @@
|
|||||||
import request from '@/utils/request.js'
|
import request from '@/utils/request.js'
|
||||||
|
|
||||||
export const getFundDetail = (specialFundId) => {
|
export const getFundDetail = (specialFundId) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/mosr/special/fund/from/${specialFundId}`,
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const getFundDetailProcess = (specialFundId) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/workflow/mosr/special/fund/info/${specialFundId}`,
|
url: `/workflow/mosr/special/fund/info/${specialFundId}`,
|
||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const getFundOption = () => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/special/fund/option',
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const getFundProcess = (specialFundId) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/special/fund/process',
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
export const addFund= (data) => {
|
export const addFund= (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/mosr/special/fund',
|
url: '/workflow/mosr/special/fund',
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<el-button type="danger" link @click="deleteOtherFile(singleFile,1)">删除</el-button>
|
<el-button type="danger" link @click="deleteOtherFile(singleFile,1)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="!preview||JSON.stringify(singleFile) === '{}'||singleFile==null">
|
<template v-else-if="!preview||JSON.stringify(singleFile) === '{}'||singleFile==null">
|
||||||
<file-upload @getFile="getAttachment" :showFileList="showFileList" :maxSize="0" @delete="deleteAttachment"/>
|
<file-upload @getFile="getAttachment" :showFileList="showFileList" :multiple="false" :maxSize="1" :disabled="isSingleFile" @delete="deleteAttachment"/>
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import FileUpload from '@/components/FileUpload.vue'
|
import FileUpload from '@/components/FileUpload.vue'
|
||||||
import {deleteFile, downloadFile} from "../api/project-demand";
|
import {deleteFile, downloadFile} from "@/api/project-demand";
|
||||||
import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
|
import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
|
||||||
|
|
||||||
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
||||||
@@ -63,20 +63,21 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// prop: 'oper',
|
prop: 'oper',
|
||||||
// label: '操作',
|
label: '操作',
|
||||||
// align: 'center',
|
align: 'center',
|
||||||
// showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
// currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
// return (
|
return (
|
||||||
// <div>
|
<div>
|
||||||
// <el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
// <el-button type="primary" size="large" link onClick={() => deleteOtherFile(row)}>删除</el-button>
|
</div>
|
||||||
// </div>
|
)
|
||||||
// )
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
// <el-button type="primary" size="large" link onClick={() => deleteOtherFile(row)}>删除</el-button>
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
@@ -84,6 +85,7 @@ const rules = reactive({
|
|||||||
})
|
})
|
||||||
const applyForm = ref()
|
const applyForm = ref()
|
||||||
const singleFile = ref()
|
const singleFile = ref()
|
||||||
|
const isSingleFile = ref(false)
|
||||||
const allFileList = ref([])
|
const allFileList = ref([])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
showFileList: {
|
showFileList: {
|
||||||
@@ -110,22 +112,34 @@ watch(() => props.showTable, (newVal) => {
|
|||||||
props.showTable = newVal
|
props.showTable = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
watch(() => props.otherFileList, (newVal) => {
|
watch(() => props.otherFileList, (newVal) => {
|
||||||
newVal.forEach(item => {
|
console.log('newotherFileList',newVal)
|
||||||
allFileList.value.push(item)
|
if (props.preview) {
|
||||||
})
|
if(props.formData.fileList==null){
|
||||||
|
allFileList.value=newVal
|
||||||
|
}else {
|
||||||
|
newVal?.forEach(item => {
|
||||||
|
allFileList.value.push(item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}else {
|
||||||
|
allFileList.value=newVal
|
||||||
|
}
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
watch(() => props.formData.fileList, (newVal) => {
|
watch(() => props.formData.fileList, (newVal) => {
|
||||||
|
console.log('newVal-fileList',newVal)
|
||||||
if (props.preview) {
|
if (props.preview) {
|
||||||
newVal.forEach(item => {
|
newVal?.forEach(item => {
|
||||||
allFileList.value.push(item)
|
allFileList.value.push(item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
watch(() => props.formData.singleFile, (newVal) => {
|
watch(() => props.formData.singleFile, (newVal) => {
|
||||||
// singleFile.value = {}
|
console.log('singleFile',newVal)
|
||||||
singleFile.value = newVal
|
singleFile.value = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
const getAttachment = (val) => {
|
const getAttachment = (val) => {
|
||||||
|
isSingleFile.value=true
|
||||||
emit('getAttachment', val)
|
emit('getAttachment', val)
|
||||||
}
|
}
|
||||||
const getOtherFile = (val) => {
|
const getOtherFile = (val) => {
|
||||||
@@ -134,7 +148,12 @@ const getOtherFile = (val) => {
|
|||||||
const deleteAttachment = (val) => {
|
const deleteAttachment = (val) => {
|
||||||
deleteFile(val).then(res => {
|
deleteFile(val).then(res => {
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success("删除成功");
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message:"删除成功",
|
||||||
|
type:'success'
|
||||||
|
})
|
||||||
|
isSingleFile.value=false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,17 +7,17 @@
|
|||||||
<span>{{ formData.requirementName }}</span>
|
<span>{{ formData.requirementName }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">-->
|
||||||
<el-form-item label="所属公司">
|
<!-- <el-form-item label="所属公司">-->
|
||||||
<span>{{ formData.companyIds }}</span>
|
<!-- <span>{{ formData.companyIds }}</span>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="征集类型">
|
<el-form-item label="征集类型">
|
||||||
<span>{{ formData.collectType }}</span>
|
<span>{{ formData.collectType }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="24">
|
||||||
<el-form-item label="截止时间">
|
<el-form-item label="截止时间">
|
||||||
<span>{{ formData.deadline }}</span>
|
<span>{{ formData.deadline }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -71,13 +71,11 @@
|
|||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||||
import {matterTree} from '@/utils/matterTree.js';
|
|
||||||
import {downloadFile} from "@/api/project-demand";
|
import {downloadFile} from "@/api/project-demand";
|
||||||
|
|
||||||
const emit = defineEmits(['getInfo',"update:formData"])
|
const emit = defineEmits(['getInfo',"update:formData"])
|
||||||
const form = ref()
|
const form = ref()
|
||||||
const showTable = ref(false)
|
const showTable = ref(false)
|
||||||
const companyNameArray = ref([])
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formData: {
|
formData: {
|
||||||
@@ -146,28 +144,11 @@ const handleDownload = (row) => {
|
|||||||
a.click()
|
a.click()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const getCompanyOptionItem = (val) => {
|
|
||||||
if (val instanceof Array) {
|
|
||||||
val.forEach(item => {
|
|
||||||
matterTree(companyNameArray.value, props.companyOption, item)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
let uniqueArr = Array.from(new Set(companyNameArray.value));
|
|
||||||
return uniqueArr.join(',');
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(() => props.loading, (newVal) => {
|
watch(() => props.loading, (newVal) => {
|
||||||
props.loading = newVal
|
props.loading = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
|
|
||||||
watch(() => props.companyOption, (newVal) => {
|
|
||||||
props.companyOption = newVal
|
|
||||||
}, {deep: true})
|
|
||||||
watch(() => props.formData, (newVal) => {
|
|
||||||
if(newVal!=null){
|
|
||||||
props.formData.companyIds = getCompanyOptionItem(newVal.companyIds)
|
|
||||||
}
|
|
||||||
}, {deep: true})
|
|
||||||
watch(() => props.processViewer, (newVal) => {
|
watch(() => props.processViewer, (newVal) => {
|
||||||
props.processViewer = newVal
|
props.processViewer = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
|
|||||||
@@ -2,16 +2,16 @@
|
|||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<el-form :model="formData" ref="form" class="query-form" label-width="auto">
|
<el-form :model="formData" ref="form" class="query-form" label-width="auto">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">-->
|
||||||
<el-form-item label="分摊名称">
|
<!-- <el-form-item label="分摊名称">-->
|
||||||
<span>{{ formData.shareName }}</span>
|
<!-- <span>{{ formData.shareName }}</span>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">-->
|
||||||
<el-form-item label="分摊月份">
|
<!-- <el-form-item label="分摊月份">-->
|
||||||
<span>{{ formData.apportionmentMonth }}</span>
|
<!-- <span>{{ formData.apportionmentMonth }}</span>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const schema = computed(() => {
|
|||||||
props: {
|
props: {
|
||||||
placeholder: '请输入审核意见',
|
placeholder: '请输入审核意见',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
maxlength: 140
|
rows: 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -51,7 +51,13 @@ const back = () => {
|
|||||||
router.push({name: 'Filing'})
|
router.push({name: 'Filing'})
|
||||||
break;
|
break;
|
||||||
case 'Implementation/detail':
|
case 'Implementation/detail':
|
||||||
router.push({name: 'Implementation'})
|
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'})
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'Summary/detail':
|
case 'Summary/detail':
|
||||||
router.push({name: 'Summary'})
|
router.push({name: 'Summary'})
|
||||||
@@ -59,6 +65,12 @@ const back = () => {
|
|||||||
case 'Requirement/detail':
|
case 'Requirement/detail':
|
||||||
router.push({name: 'Requirement'})
|
router.push({name: 'Requirement'})
|
||||||
break;
|
break;
|
||||||
|
case 'Fund/detail':
|
||||||
|
router.push({name: 'Fund'})
|
||||||
|
break;
|
||||||
|
case 'Share/detail':
|
||||||
|
router.push({name: 'Expense/share'})
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 驳回
|
// 驳回
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="专项资金" prop="specialFund">
|
<el-form-item label="专项资金" prop="specialFund" v-if="localFormData.specialFund">
|
||||||
<span>{{ localFormData.specialFund }}</span>
|
<span>{{ changeName(fundOption, localFormData.specialFund) }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -22,59 +22,54 @@
|
|||||||
<span>{{ formData.endTime }}</span>
|
<span>{{ formData.endTime }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="所属公司" prop="affiliatedCompanyId">
|
|
||||||
<span>{{ localFormData.affiliatedCompanyId }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目类型" prop="projectType">
|
<el-form-item label="项目类型" prop="projectType">
|
||||||
<span>{{ localFormData.projectType }}</span>
|
<span>{{ filterDict(cacheStore.getDict('project_type'), localFormData.projectType) }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="研发主体" prop="rdSubject">
|
<el-form-item label="研发主体" prop="rdSubject">
|
||||||
<span>{{ localFormData.rdSubject }}</span>
|
<span>{{ filterDict(cacheStore.getDict('rd_subject'), localFormData.rdSubject) }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="出资类型" prop="investmentType">
|
<el-form-item label="出资类型" prop="investmentType">
|
||||||
<span>{{ localFormData.investmentType }}</span>
|
<span>{{ filterDict(cacheStore.getDict('invest_type'), localFormData.investmentType) }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目影响" prop="projectImpact">
|
<el-form-item label="项目影响" prop="projectImpact">
|
||||||
<span>{{ localFormData.projectImpact }}</span>
|
<span>{{ filterDict(cacheStore.getDict('project_impact'), localFormData.projectImpact) }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="所属业务板块" prop="businessSegment">
|
<el-form-item label="所属业务板块" prop="businessSegment">
|
||||||
<span>{{ localFormData.businessSegment }}</span>
|
<span>{{ filterDict(cacheStore.getDict('business_segment'), localFormData.businessSegment) }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="预期成果形式" prop="resultForm">
|
<el-form-item label="预期成果形式" prop="resultForm">
|
||||||
<span>{{ localFormData.resultForm }}</span>
|
<span>{{ filterDict(cacheStore.getDict('result_form'), localFormData.resultForm) }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="预期技术标准制定" prop="technicalStandard">
|
<el-form-item label="预期技术标准制定" prop="technicalStandard">
|
||||||
<span>{{ localFormData.technicalStandard }}</span>
|
<span>{{ filterDict(cacheStore.getDict('technical_standard'), localFormData.technicalStandard)}}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||||
<span>{{ localFormData.industryUniversityResearch }}</span>
|
<span>{{ filterDict(cacheStore.getDict('industry_university'), localFormData.industryUniversityResearch) }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||||
<span>{{ localFormData.governmentDeclaration }}</span>
|
<span>{{ filterDict(cacheStore.getDict('government_declaration'), localFormData.governmentDeclaration) }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="知识产权状况" prop="intellectualProperty">
|
<el-form-item label="知识产权状况" prop="intellectualProperty">
|
||||||
<span>{{ localFormData.intellectualProperty }}</span>
|
<span>{{ filterDict(cacheStore.getDict('intellectual_property'), localFormData.intellectualProperty)}}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -139,32 +134,32 @@
|
|||||||
</fvTable>
|
</fvTable>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<!-- <el-col :span="24">-->
|
||||||
<div v-if="data.taskId">
|
<!-- <div v-if="data.taskId">-->
|
||||||
<baseTitle title="审核意见"></baseTitle>
|
<!-- <baseTitle title="审核意见"></baseTitle>-->
|
||||||
<el-form-item prop="auditOpinion">
|
<!-- <el-form-item prop="auditOpinion">-->
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="localFormData.auditOpinion"
|
<!-- v-model="localFormData.auditOpinion"-->
|
||||||
:rows="3"
|
<!-- :rows="3"-->
|
||||||
type="textarea"
|
<!-- type="textarea"-->
|
||||||
placeholder="请输入审核意见"
|
<!-- placeholder="请输入审核意见"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="approval-record">
|
<div class="approval-record">
|
||||||
<baseTitle title="审批记录"></baseTitle>
|
<baseTitle title="审批记录"></baseTitle>
|
||||||
<div class="process">
|
<div class="process">
|
||||||
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
||||||
:state="data.state"/>
|
:state="data.state"/>
|
||||||
<process-diagram-viewer v-if="processViewer" id-name="summaryProcess"/>
|
<process-diagram-viewer v-if="processViewer" id-name="summaryProcess"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="oper-page-btn" v-if="data.state === '1' && data.taskId">-->
|
<!-- <div class="oper-page-btn" v-if="data.state === '1' && data.taskId">-->
|
||||||
<!-- <el-button @click="handleReject(summaryForm)">驳回</el-button>-->
|
<!-- <el-button @click="handleReject(summaryForm)">驳回</el-button>-->
|
||||||
<!-- <el-button color="#DED0B2" @click="handleAgree">同意</el-button>-->
|
<!-- <el-button color="#DED0B2" @click="handleAgree">同意</el-button>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -173,11 +168,13 @@
|
|||||||
import {downloadFile} from "@/api/project-demand";
|
import {downloadFile} from "@/api/project-demand";
|
||||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||||
import {ElMessage, ElNotification} from "element-plus";
|
|
||||||
import {agreeTask, rejectTask} from "@/api/project-demand";
|
|
||||||
import {useTagsView} from '@/stores/tagsview.js'
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {getFundOption} from "@/api/special-fund";
|
||||||
|
import {useCacheStore} from '@/stores/cache.js'
|
||||||
|
import {getSubCompOpt} from "@/api/user/user";
|
||||||
|
|
||||||
const tagsViewStore = useTagsView()
|
const tagsViewStore = useTagsView()
|
||||||
|
const cacheStore = useCacheStore()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formData: {
|
formData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -234,52 +231,38 @@ const tableConfig = reactive({
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const summaryForm = ref()
|
const fundOption = ref([])
|
||||||
|
const companyOption = ref([])
|
||||||
|
const dictName = ref({})
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||||
})
|
})
|
||||||
const handleReject = (instance) => {
|
const filterDict = (data, value) => {
|
||||||
if (!instance) return
|
if (data === undefined || value === undefined) return;
|
||||||
instance.validate(async (valid) => {
|
let label=''
|
||||||
if (!valid) return
|
if (data instanceof Array) {
|
||||||
let approve = {
|
data.find(item =>{
|
||||||
taskId: props.data.taskId,
|
if( item.value == value){
|
||||||
auditOpinion: localFormData.value.auditOpinion,
|
label= item.label
|
||||||
}
|
|
||||||
rejectTask(approve).then(res => {
|
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
|
||||||
})
|
|
||||||
if (res.code === 1000) {
|
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
|
||||||
router.push({
|
|
||||||
name: 'Summary'
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
const handleAgree = () => {
|
|
||||||
let approve = {
|
|
||||||
taskId: props.data.taskId,
|
|
||||||
auditOpinion: localFormData.value.auditOpinion,
|
|
||||||
formData: localFormData.value
|
|
||||||
}
|
}
|
||||||
agreeTask(approve).then(res => {
|
return label
|
||||||
ElNotification({
|
}
|
||||||
title: '提示',
|
const getFundOptions = async () => {
|
||||||
message: res.msg,
|
const resFund = await getFundOption()
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
fundOption.value = resFund.data
|
||||||
})
|
const res = await getSubCompOpt()
|
||||||
if (res.code === 1000) {
|
companyOption.value = res.data
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
}
|
||||||
router.push({
|
const changeName = (option, value) => {
|
||||||
name: 'Summary'
|
let name = ''
|
||||||
})
|
option.forEach(item => {
|
||||||
|
if (item.value == value) {
|
||||||
|
name = item.label
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
return name
|
||||||
}
|
}
|
||||||
const handleDownload = (row) => {
|
const handleDownload = (row) => {
|
||||||
downloadFile(row.fileId).then(res => {
|
downloadFile(row.fileId).then(res => {
|
||||||
@@ -291,11 +274,6 @@ const handleDownload = (row) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.formData,
|
|
||||||
(val) => {
|
|
||||||
}
|
|
||||||
)
|
|
||||||
watch(() => props.processViewer, (newVal) => {
|
watch(() => props.processViewer, (newVal) => {
|
||||||
props.processViewer = newVal
|
props.processViewer = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
@@ -304,8 +282,9 @@ watch(() => props.loading, (newVal) => {
|
|||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
Object.keys(props.formData).length && (localFormData.value = props.formData)
|
return Object.keys(props.formData).length && (localFormData.value = props.formData)
|
||||||
})
|
})
|
||||||
|
getFundOptions()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
:headers="headers"
|
:headers="headers"
|
||||||
:limit="maxSize"
|
:limit="maxSize"
|
||||||
with-credentials
|
with-credentials
|
||||||
:multiple="maxSize > 0"
|
:multiple="multiple"
|
||||||
:data="uploadParams"
|
:data="uploadParams"
|
||||||
:show-file-list="showFileList"
|
:show-file-list="showFileList"
|
||||||
:auto-upload="true"
|
:auto-upload="true"
|
||||||
@@ -19,8 +19,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {ElMessage,ElMessageBox} from "element-plus";
|
import { ElMessageBox, ElNotification} from "element-plus";
|
||||||
import {getToken} from '@/utils/auth'
|
import {getToken} from '@/utils/auth'
|
||||||
|
|
||||||
const baseURL = import.meta.env.VITE_BASE_URL
|
const baseURL = import.meta.env.VITE_BASE_URL
|
||||||
const uploadFileUrl = ref(baseURL + "/workflow/process/file/upload")
|
const uploadFileUrl = ref(baseURL + "/workflow/process/file/upload")
|
||||||
const headers = reactive({
|
const headers = reactive({
|
||||||
@@ -43,13 +44,16 @@ const props = defineProps({
|
|||||||
showFileList: {
|
showFileList: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},disabled: {
|
}, disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
}, multiple: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(["input", "getFile","delete"])
|
const emit = defineEmits(["input", "getFile", "delete"])
|
||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const _value = computed({
|
const _value = computed({
|
||||||
get() {
|
get() {
|
||||||
@@ -59,7 +63,7 @@ const _value = computed({
|
|||||||
emit("input", val);
|
emit("input", val);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const beforeRemove = (file, fileList) => {
|
const beforeRemove = (file) => {
|
||||||
return ElMessageBox.confirm(`确认删除名称为${file.name}的文件吗?`, '系统提示', {
|
return ElMessageBox.confirm(`确认删除名称为${file.name}的文件吗?`, '系统提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
@@ -67,38 +71,32 @@ const beforeRemove = (file, fileList) => {
|
|||||||
}).then(() => true)
|
}).then(() => true)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleRemove = (file, fileList) => {
|
const handleRemove = (file) => {
|
||||||
emit("delete",file.response.data.id)
|
emit("delete", file.response.data.id)
|
||||||
}
|
}
|
||||||
const beforeUpload = (file) => {
|
const beforeUpload = () => {
|
||||||
// const FileExt = file.name.replace(/.+\./, "");
|
|
||||||
// if (['zip', 'rar', 'pdf', 'doc', 'docx', 'xlsx'].indexOf(FileExt.toLowerCase()) === -1) {
|
|
||||||
// ElMessage.warning('请上传后缀名为pdf、doc、docx、xlsx、zip或rar的文件!');
|
|
||||||
// return false;
|
|
||||||
// } else
|
|
||||||
// if (props.maxSize > 0 && file.size / 1024 / 1024 > props.maxSize) {
|
|
||||||
// ElMessage.warning(`每个文件最大不超过 ${props.maxSize}MB`)
|
|
||||||
// } else {
|
|
||||||
loading.value = true
|
loading.value = true
|
||||||
return true
|
return true
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
const handleUploadSuccess = (res, file) => {
|
const handleUploadSuccess = (res) => {
|
||||||
if (res.code !== 1000) {
|
ElNotification({
|
||||||
loading.value = false
|
title: '提示',
|
||||||
ElMessage.error("上传失败")
|
message: res.code === 1000 ? '上传成功' : '上传失败',
|
||||||
} else {
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
loading.value = false
|
})
|
||||||
ElMessage.success("上传成功")
|
loading.value = false
|
||||||
}
|
|
||||||
showTable.value = true
|
showTable.value = true
|
||||||
let data = res.data
|
let data = res.data
|
||||||
fileList.value.push(data)
|
fileList.value.push(data)
|
||||||
emit("getFile", res.data)
|
emit("getFile", res.data)
|
||||||
}
|
}
|
||||||
const uploadError=(err)=>{
|
const uploadError = () => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
ElMessage.error("上传失败,请稍后再试!")
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: "上传失败,请稍后再试!",
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -108,6 +106,7 @@ a {
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #2a99ff;
|
color: #2a99ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-upload-list) {
|
:deep(.el-upload-list) {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|||||||
148
src/components/SearchFilesByTag.vue
Normal file
148
src/components/SearchFilesByTag.vue
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<template>
|
||||||
|
<el-form :model="attachment" inline>
|
||||||
|
<el-form-item label="关键词" prop="name">
|
||||||
|
<el-input v-model="attachment.name" placeholder="请输入" clearable filterable style="width: 300px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="标签" prop="tag" v-if="type==='3'">
|
||||||
|
<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 color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-card style="width: 100%">
|
||||||
|
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {downloadFile} from "@/api/project-demand";
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import {getTags} from "@/api/project-manage";
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const attachment = reactive({
|
||||||
|
name: '',
|
||||||
|
tag: ''
|
||||||
|
})
|
||||||
|
const emit = defineEmits(['search'])
|
||||||
|
const props = defineProps({
|
||||||
|
otherFileList: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}, type: {
|
||||||
|
type: String,
|
||||||
|
default: '0'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const tagsOption = ref([])
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '附件名称',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '自定义标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'processNodeTag',
|
||||||
|
label: '内置标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '上传时间',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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 getTagsOption = () => {
|
||||||
|
if (!route.query.id) return
|
||||||
|
let params = {
|
||||||
|
projectId: route.query.id
|
||||||
|
}
|
||||||
|
getTags(params).then(res => {
|
||||||
|
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsOption.value = res.data
|
||||||
|
} else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleSearch = () => {
|
||||||
|
emit('search', attachment)
|
||||||
|
}
|
||||||
|
const handleUpload = () => {
|
||||||
|
emit('upload')
|
||||||
|
}
|
||||||
|
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.type, (val) => {
|
||||||
|
console.log('va四川省l',val)
|
||||||
|
props.type = val
|
||||||
|
if (val === '3') {
|
||||||
|
getTagsOption()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(() => props.otherFileList, (val) => {
|
||||||
|
showTable.value = false
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
props.otherFileList = val
|
||||||
|
})
|
||||||
|
if (props.type === '3') {
|
||||||
|
getTagsOption()
|
||||||
|
}
|
||||||
|
defineExpose({
|
||||||
|
tagsOption
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
118
src/components/TagAndFileUpload.vue
Normal file
118
src/components/TagAndFileUpload.vue
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
<template>
|
||||||
|
<baseTitle title="标签名称"></baseTitle>
|
||||||
|
<el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">
|
||||||
|
<el-form-item label="标签名称" prop="tagName">
|
||||||
|
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px" v-if="showInput"/>
|
||||||
|
<el-select v-model="formData.tagName" placeholder="请选择标签" clearable filterable style="width: 300px" v-else>
|
||||||
|
<el-option
|
||||||
|
v-for="item in tagsOption"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.value"
|
||||||
|
:value="item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<baseTitle title="其他文件"></baseTitle>
|
||||||
|
<el-card style="width: 100%;margin: 15px 0">
|
||||||
|
<file-upload @getFile="getFiles"/>
|
||||||
|
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit(tagForm)">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
const props = defineProps({
|
||||||
|
tagsOption: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}, formData: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
}, showInput: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
})
|
||||||
|
const rules = reactive({
|
||||||
|
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const tagForm = ref()
|
||||||
|
const showTable = ref(true)
|
||||||
|
const emits = defineEmits(['getFile'])
|
||||||
|
const fileList = ref([])
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '附件名称',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag: formData.value.tagName,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getFiles = (val) => {
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
// emit("getFile", fileObj)
|
||||||
|
fileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
watch(() => fileList.value, (val) => {
|
||||||
|
fileList.value = val
|
||||||
|
})
|
||||||
|
defineExpose({
|
||||||
|
fileList
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -74,7 +74,7 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
height:{
|
height:{
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 450
|
default: 650
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const content = ref(props.value);
|
const content = ref(props.value);
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
<div class="fv-table-btn" v-if="tableConfig.btns">
|
<div class="fv-table-btn" v-if="tableConfig.btns">
|
||||||
<div class="table-head-btn">
|
<div class="table-head-btn">
|
||||||
<el-button
|
<el-button
|
||||||
v-for="btn in tableConfig.btns"
|
v-for="btn in tableConfig.btns"
|
||||||
:key="btn.key"
|
:key="btn.key"
|
||||||
:type="btn.type || ''"
|
:type="btn.type || ''"
|
||||||
:color="btn.color || ''"
|
:color="btn.color || ''"
|
||||||
v-perm="btn.auth || ['*:*:*']"
|
v-perm="btn.auth || ['*:*:*']"
|
||||||
@click="handleClickBtns(btn.key)"
|
@click="handleClickBtns(btn.key)"
|
||||||
>
|
>
|
||||||
{{ btn.name }}
|
{{ btn.name }}
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -19,7 +19,9 @@
|
|||||||
<div v-if="isSettingCol" style="float: right">
|
<div v-if="isSettingCol" style="float: right">
|
||||||
<el-tooltip effect="dark" content="列配置" placement="bottom">
|
<el-tooltip effect="dark" content="列配置" placement="bottom">
|
||||||
<el-button ref="buttonRef" link>
|
<el-button ref="buttonRef" link>
|
||||||
<el-icon size="18"><Setting /></el-icon>
|
<el-icon size="18">
|
||||||
|
<Setting/>
|
||||||
|
</el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-popover
|
<el-popover
|
||||||
@@ -30,7 +32,8 @@
|
|||||||
virtual-triggering
|
virtual-triggering
|
||||||
trigger="click">
|
trigger="click">
|
||||||
<div class="col-setting-checkall">
|
<div class="col-setting-checkall">
|
||||||
<el-checkbox label="列展示" v-model="localData.allColShow" :indeterminate="localData.indeterminate" @change="changeIsShowAll"></el-checkbox>
|
<el-checkbox label="列展示" v-model="localData.allColShow" :indeterminate="localData.indeterminate"
|
||||||
|
@change="changeIsShowAll"></el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-setting-list">
|
<div class="col-setting-list">
|
||||||
<el-checkbox-group v-model="localData.checkGroup" @change="changeColShow">
|
<el-checkbox-group v-model="localData.checkGroup" @change="changeColShow">
|
||||||
@@ -49,19 +52,19 @@
|
|||||||
<!-- 表格部分 -->
|
<!-- 表格部分 -->
|
||||||
<div class="fv-table">
|
<div class="fv-table">
|
||||||
<el-table
|
<el-table
|
||||||
:data="localData.list"
|
:data="localData.list"
|
||||||
v-loading="localData.loading"
|
v-loading="localData.loading"
|
||||||
:row-key="tableConfig?.rowKey || 'id'"
|
:row-key="tableConfig?.rowKey || 'id'"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
table-layout="auto"
|
table-layout="auto"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
@row-click="rowClick"
|
@row-click="rowClick"
|
||||||
@row-dblclick="rowDblclick"
|
@row-dblclick="rowDblclick"
|
||||||
@cell-click="cellClick"
|
@cell-click="cellClick"
|
||||||
v-tabh
|
v-tabh
|
||||||
ref="tableInstance"
|
ref="tableInstance"
|
||||||
>
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
<fvTableColumn v-for="column in localData.columns" :key="column.prop" :columns="column">
|
<fvTableColumn v-for="column in localData.columns" :key="column.prop" :columns="column">
|
||||||
@@ -82,22 +85,22 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<fvPagination
|
<fvPagination
|
||||||
v-if="pagination"
|
v-if="pagination"
|
||||||
:current-page="localData.query.pageNum"
|
:current-page="localData.query.pageNum"
|
||||||
:page-size="localData.query.pageSize"
|
:page-size="localData.query.pageSize"
|
||||||
:page-sizes="[10, 20, 30, 40,50]"
|
:page-sizes="[10, 20, 30, 40,50]"
|
||||||
:total="localData.total"
|
:total="localData.total"
|
||||||
@changeSize="handleSizeChange"
|
@changeSize="handleSizeChange"
|
||||||
@goPage="handleCurrentChange"
|
@goPage="handleCurrentChange"
|
||||||
>
|
>
|
||||||
</fvPagination>
|
</fvPagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ElMessage } from 'element-plus';
|
import {ElNotification} from 'element-plus';
|
||||||
import { requestList } from '../../api/common';
|
import {requestList} from '../../api/common';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
//表格配置
|
//表格配置
|
||||||
@@ -148,8 +151,8 @@ const handleClickBtns = (key) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const filterColumns = () => {
|
const filterColumns = () => {
|
||||||
localData.columns = props.tableConfig.columns.map(item=>{
|
localData.columns = props.tableConfig.columns.map(item => {
|
||||||
if(item.prop) {
|
if (item.prop) {
|
||||||
return {
|
return {
|
||||||
...item
|
...item
|
||||||
}
|
}
|
||||||
@@ -158,10 +161,10 @@ const filterColumns = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const changeIsShowAll = (val) => {
|
const changeIsShowAll = (val) => {
|
||||||
if(val) {
|
if (val) {
|
||||||
filterColumns()
|
filterColumns()
|
||||||
localData.indeterminate = false
|
localData.indeterminate = false
|
||||||
localData.checkGroup = props.tableConfig.columns.map(item=>item.prop)
|
localData.checkGroup = props.tableConfig.columns.map(item => item.prop)
|
||||||
} else {
|
} else {
|
||||||
localData.columns.length = 0
|
localData.columns.length = 0
|
||||||
localData.checkGroup.length = 0
|
localData.checkGroup.length = 0
|
||||||
@@ -170,10 +173,10 @@ const changeIsShowAll = (val) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const changeColShow = (val) => {
|
const changeColShow = (val) => {
|
||||||
if(val.length == props.tableConfig.columns.length) {
|
if (val.length == props.tableConfig.columns.length) {
|
||||||
localData.indeterminate = false
|
localData.indeterminate = false
|
||||||
localData.allColShow = true
|
localData.allColShow = true
|
||||||
} else if(val.length !== props.tableConfig.columns.length && val.length != 0) {
|
} else if (val.length !== props.tableConfig.columns.length && val.length != 0) {
|
||||||
localData.allColShow = false
|
localData.allColShow = false
|
||||||
localData.indeterminate = true
|
localData.indeterminate = true
|
||||||
} else {
|
} else {
|
||||||
@@ -181,9 +184,9 @@ const changeColShow = (val) => {
|
|||||||
localData.allColShow = false
|
localData.allColShow = false
|
||||||
}
|
}
|
||||||
const template = []
|
const template = []
|
||||||
props.tableConfig.columns.forEach(item=>{
|
props.tableConfig.columns.forEach(item => {
|
||||||
val.forEach(v=>{
|
val.forEach(v => {
|
||||||
if(item.prop == v) {
|
if (item.prop == v) {
|
||||||
template.push(item)
|
template.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -194,22 +197,31 @@ const changeColShow = (val) => {
|
|||||||
filterColumns()
|
filterColumns()
|
||||||
|
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
const { api, params } = props.tableConfig
|
const {api, params} = props.tableConfig
|
||||||
const queryParmas = {...localData.query, ...params}
|
const queryParmas = {...localData.query, ...params}
|
||||||
if(api) {
|
if (api) {
|
||||||
localData.loading = true
|
localData.loading = true
|
||||||
try {
|
try {
|
||||||
const { code, data, msg } = await requestList(api, queryParmas)
|
const {code, data, msg} = await requestList(api, queryParmas)
|
||||||
if ( code === 1000 ) {
|
|
||||||
|
if (code === 1000) {
|
||||||
localData.list = data.rows
|
localData.list = data.rows
|
||||||
localData.total = data.total
|
localData.total = data.total
|
||||||
localData.loading = false
|
localData.loading = false
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(msg)
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
localData.loading = false
|
localData.loading = false
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage.error('请求数据失败')
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请求数据失败',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
localData.loading = false
|
localData.loading = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -246,13 +258,13 @@ const handleCurrentChange = (val) => {
|
|||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
watchEffect(()=>{
|
watchEffect(() => {
|
||||||
if(localData.allColShow) {
|
if (localData.allColShow) {
|
||||||
localData.checkGroup = props.tableConfig.columns.map(item=>item.prop)
|
localData.checkGroup = props.tableConfig.columns.map(item => item.prop)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
//刷新
|
//刷新
|
||||||
const refresh = ({resetPage=false}={}) => {
|
const refresh = ({resetPage = false} = {}) => {
|
||||||
resetPage ? localData.query.pageNum = 1 : null
|
resetPage ? localData.query.pageNum = 1 : null
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
@@ -265,7 +277,7 @@ const getQuery = () => {
|
|||||||
return localData.query
|
return localData.query
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ refresh, updateLoading, getQuery, tableInstance })
|
defineExpose({refresh, updateLoading, getQuery, tableInstance})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList()
|
getList()
|
||||||
@@ -277,20 +289,24 @@ onMounted(() => {
|
|||||||
.col-setting-checkall {
|
.col-setting-checkall {
|
||||||
border-bottom: 1px solid rgb(210, 210, 213);
|
border-bottom: 1px solid rgb(210, 210, 213);
|
||||||
}
|
}
|
||||||
|
|
||||||
.col-setting-list {
|
.col-setting-list {
|
||||||
max-height: 45vh;
|
max-height: 45vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-head-btn {
|
.table-head-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fv-table-btn {
|
.fv-table-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fv-table {
|
.fv-table {
|
||||||
:deep(.el-tooltip) {
|
:deep(.el-tooltip) {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
|
|||||||
@@ -26,9 +26,11 @@ import Breadcrumb from './Breadcrumb.vue';
|
|||||||
import Hamburger from './Hamburger.vue';
|
import Hamburger from './Hamburger.vue';
|
||||||
import {useAuthStore} from '@/stores/userstore.js'
|
import {useAuthStore} from '@/stores/userstore.js'
|
||||||
import {usePermisstionStroe} from '@/stores/permisstion'
|
import {usePermisstionStroe} from '@/stores/permisstion'
|
||||||
|
import { useTagsView } from '@/stores/tagsview';
|
||||||
|
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
const permisstionStore = usePermisstionStroe()
|
const permisstionStore = usePermisstionStroe()
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
const userInfo = ref({})
|
const userInfo = ref({})
|
||||||
const visitedP = ref(false)
|
const visitedP = ref(false)
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@@ -57,6 +59,8 @@ const handleLogout = () => {
|
|||||||
visitedP.value = !visitedP.value
|
visitedP.value = !visitedP.value
|
||||||
authStore.userLogout()
|
authStore.userLogout()
|
||||||
permisstionStore.removeMenu()
|
permisstionStore.removeMenu()
|
||||||
|
permisstionStore.setIsSuccessReq()
|
||||||
|
tagsViewStore.removeAllTagView()
|
||||||
router.push('/login')
|
router.push('/login')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -56,11 +56,16 @@ export const useTagsView = defineStore('tagsView',()=>{
|
|||||||
router.push(lastTagView.path)
|
router.push(lastTagView.path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const removeAllTagView = () => {
|
||||||
|
visitedViews.value.length = 0
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
visitedViews,
|
visitedViews,
|
||||||
addVisitedViews,
|
addVisitedViews,
|
||||||
delVisitedViews,
|
delVisitedViews,
|
||||||
delOtherVisitedViews,
|
delOtherVisitedViews,
|
||||||
delViewAndGoView
|
delViewAndGoView,
|
||||||
|
removeAllTagView
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -97,12 +97,12 @@
|
|||||||
<!-- </el-input>-->
|
<!-- </el-input>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column prop="subtotal" label="小计">
|
<!-- <el-table-column prop="subtotal" label="小计">-->
|
||||||
<template #default="scope">
|
<!-- <template #default="scope">-->
|
||||||
<el-input v-model="scope.row.subtotal" placeholder="请输入小计" clearable>
|
<!-- <el-input v-model="scope.row.subtotal" placeholder="请输入小计" clearable>-->
|
||||||
</el-input>
|
<!-- </el-input>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column prop="oper" label="操作">
|
<el-table-column prop="oper" label="操作">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" @click="handleCopy(scope.row)" link style="font-size: 18px">复制</el-button>
|
<el-button type="primary" @click="handleCopy(scope.row)" link style="font-size: 18px">复制</el-button>
|
||||||
@@ -113,6 +113,10 @@
|
|||||||
<div style="width:100%;text-align: center;padding: 10px">
|
<div style="width:100%;text-align: center;padding: 10px">
|
||||||
<el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button>
|
<el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="流程"></baseTitle>
|
||||||
|
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||||
|
</div>
|
||||||
<div class="oper-page-btn">
|
<div class="oper-page-btn">
|
||||||
<el-button color="#DED0B2" @click="handleSubmit(form)">提交</el-button>
|
<el-button color="#DED0B2" @click="handleSubmit(form)">提交</el-button>
|
||||||
<el-button @click="handleBack">返回</el-button>
|
<el-button @click="handleBack">返回</el-button>
|
||||||
@@ -123,12 +127,17 @@
|
|||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
import {useTagsView} from '@/stores/tagsview.js'
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
import {addAllocation, getAllocationDetail} from "@/api/expense-manage";
|
import {addAllocation, getAllocationDetail,getAllocationProcess} from "@/api/expense-manage";
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
|
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
shareName: [{required: true, message: '请输入分摊名称', trigger: 'blur'}],
|
shareName: [{required: true, message: '请输入分摊名称', trigger: 'blur'}],
|
||||||
apportionmentMonth: [{required: true, message: '请选择月份', trigger: 'blur'}]
|
apportionmentMonth: [{required: true, message: '请选择月份', trigger: 'blur'}]
|
||||||
})
|
})
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const processInstanceData = ref()
|
||||||
|
const processDiagramViewer = ref(false)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@@ -138,7 +147,7 @@ const form = ref()
|
|||||||
const nameOptions = ref([
|
const nameOptions = ref([
|
||||||
{
|
{
|
||||||
label: "某项目",
|
label: "某项目",
|
||||||
value: '2'
|
value: '42'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
const researchOptions = ref([
|
const researchOptions = ref([
|
||||||
@@ -159,7 +168,7 @@ const tableData = ref([
|
|||||||
annuity: '',
|
annuity: '',
|
||||||
workday: '',
|
workday: '',
|
||||||
researchDuration: '',
|
researchDuration: '',
|
||||||
subtotal: '',
|
// subtotal: '',
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
@@ -174,7 +183,7 @@ const handleAdd = () => {
|
|||||||
annuity: '',
|
annuity: '',
|
||||||
workday: '',
|
workday: '',
|
||||||
researchDuration: '',
|
researchDuration: '',
|
||||||
subtotal: '',
|
// subtotal: '',
|
||||||
}
|
}
|
||||||
tableData.value.push(row)
|
tableData.value.push(row)
|
||||||
}
|
}
|
||||||
@@ -190,7 +199,8 @@ const handleSubmit = (instance) => {
|
|||||||
if (!valid) return
|
if (!valid) return
|
||||||
let params = {
|
let params = {
|
||||||
...formData.value,
|
...formData.value,
|
||||||
usrAllocations: tableData.value
|
usrAllocations: tableData.value,
|
||||||
|
deploymentId: processInstanceData.value.deploymentId,
|
||||||
}
|
}
|
||||||
const {code, msg} = await addAllocation(params)
|
const {code, msg} = await addAllocation(params)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -219,11 +229,34 @@ const getDetailInfo = async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const init = async () => {
|
||||||
|
processDiagramViewer.value = false
|
||||||
|
getAllocationProcess().then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
let data = res.data
|
||||||
|
processInstanceData.value = data
|
||||||
|
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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
history.back()
|
history.back()
|
||||||
}
|
}
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// await init()
|
await init()
|
||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
await getDetailInfo()
|
await getDetailInfo()
|
||||||
|
|||||||
@@ -1,23 +1,58 @@
|
|||||||
<template>
|
<template>
|
||||||
<expense-detail :formData="shareData.formData" :data="shareData" :showTable="showTable" :processViewer="shareProcessViewer"
|
<el-form :model="formData" ref="form" class="query-form" label-width="auto">
|
||||||
:loading="loading"/>
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="分摊名称">
|
||||||
|
<span>{{ formData.shareName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="分摊月份">
|
||||||
|
<span>{{ formData.apportionmentMonth }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="分摊明细" name="first">
|
||||||
|
<expense-detail :formData="shareData.formData" :data="shareData" :showTable="showTable"
|
||||||
|
:processViewer="shareProcessViewer"
|
||||||
|
:loading="loading"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="分摊汇总" name="second">
|
||||||
|
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="审批记录"></baseTitle>
|
||||||
|
<div class="process">
|
||||||
|
<operation-render v-if="shareProcessViewer" :operation-list="shareData.operationList"
|
||||||
|
:state="data.state"/>
|
||||||
|
<process-diagram-viewer v-if="shareProcessViewer" id-name="fundProcess"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<opinion v-if="shareData.taskId" :formData="shareData.formData" :taskId="shareData.taskId"></opinion>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import {getAllocationDetail} from "@/api/expense-manage";
|
import {getAllocationDetail} from "@/api/expense-manage";
|
||||||
|
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const shareData = ref({})
|
const shareData = ref({})
|
||||||
|
const formData = ref({})
|
||||||
const shareProcessViewer = ref(true)
|
const shareProcessViewer = ref(true)
|
||||||
const showTable = ref(true)
|
const showTable = ref(true)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
const activeName = ref('first')
|
||||||
const getDetail = async () => {
|
const getDetail = async () => {
|
||||||
// const specialFundId = route.query.id
|
const id = route.query.id
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
|
shareProcessViewer.value = false
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const {code, data, msg} = await getAllocationDetail(12)
|
const {code, data, msg} = await getAllocationDetail(id)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: msg,
|
message: msg,
|
||||||
@@ -25,24 +60,43 @@ const getDetail = async () => {
|
|||||||
})
|
})
|
||||||
if (code === 1000) {
|
if (code === 1000) {
|
||||||
shareData.value = data
|
shareData.value = data
|
||||||
|
formData.value = data.formData
|
||||||
loading.value = false
|
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(() => {
|
nextTick(() => {
|
||||||
|
shareProcessViewer.value = true
|
||||||
showTable.value = true
|
showTable.value = true
|
||||||
})
|
})
|
||||||
// if(data.operationList==null)return;
|
} else {
|
||||||
// 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;
|
|
||||||
|
|
||||||
}else {
|
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getDetail()
|
getDetail()
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-active {
|
||||||
|
color: black;
|
||||||
|
//background-color: #DED0B2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
// import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
@@ -42,16 +42,17 @@ const searchConfig = reactive([
|
|||||||
valueFormat: 'YYYY-MM-DD',
|
valueFormat: 'YYYY-MM-DD',
|
||||||
},
|
},
|
||||||
colProps: {}
|
colProps: {}
|
||||||
}, {
|
|
||||||
label: '状态',
|
|
||||||
prop: 'state',
|
|
||||||
component: shallowRef(fvSelect),
|
|
||||||
props: {
|
|
||||||
placeholder: '请选择状态',
|
|
||||||
clearable: true,
|
|
||||||
cacheKey: 'special_fund'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// label: '状态',
|
||||||
|
// prop: 'state',
|
||||||
|
// component: shallowRef(fvSelect),
|
||||||
|
// props: {
|
||||||
|
// placeholder: '请选择状态',
|
||||||
|
// clearable: true,
|
||||||
|
// cacheKey: 'special_fund'
|
||||||
|
// }
|
||||||
|
// },
|
||||||
])
|
])
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
const tableConfig = reactive({
|
const tableConfig = reactive({
|
||||||
@@ -76,7 +77,7 @@ const tableConfig = reactive({
|
|||||||
label: '状态',
|
label: '状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => (<Tag dictType={'special_fund'} value={row.state}/>)
|
// currentRender: ({row, index}) => (<Tag dictType={'special_fund'} value={row.state}/>)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'oper',
|
prop: 'oper',
|
||||||
@@ -89,28 +90,25 @@ const tableConfig = reactive({
|
|||||||
if(row.buttons){
|
if(row.buttons){
|
||||||
buttons = new Set(Array.from(row.buttons))
|
buttons = new Set(Array.from(row.buttons))
|
||||||
}
|
}
|
||||||
// if (buttons.has("details")) {
|
if (buttons.has("details")) {
|
||||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
// if (buttons.has("edit")) {
|
if (buttons.has("edit")) {
|
||||||
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
// if (buttons.has("delete")) {
|
if (buttons.has("report")) {
|
||||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
|
||||||
// }
|
|
||||||
// if (buttons.has("report")) {
|
|
||||||
btn.push({label: '明细导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
btn.push({label: '明细导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
// if (buttons.has("report")) {
|
if (buttons.has("report")) {
|
||||||
btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
btn.push({label: '汇总导出', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{width: '100%'}}>
|
<div style={{width: '100%'}}>
|
||||||
{
|
{
|
||||||
btn.map(item => (
|
btn.map(item => (
|
||||||
<el-button
|
<el-button
|
||||||
type={item.type}
|
type={item.type}
|
||||||
v-perm={item.prem}
|
// v-perm={item.prem}
|
||||||
onClick={() => item.func()}
|
onClick={() => item.func()}
|
||||||
link
|
link
|
||||||
>
|
>
|
||||||
@@ -119,11 +117,11 @@ const tableConfig = reactive({
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
// buttons.has("delete") ?
|
buttons.has("delete") ?
|
||||||
<popover-delete name={row.requirementName} type={'费用分摊'} btnType={'danger'}
|
<popover-delete name={row.requirementName} type={'费用分摊'} btnType={'danger'}
|
||||||
perm={['mosr:requirement:del']}
|
perm={['mosr:requirement:del']}
|
||||||
onDelete={() => handleDelete(row)}/>
|
onDelete={() => handleDelete(row)}/>
|
||||||
// : ''
|
: ''
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
@@ -151,7 +149,7 @@ const handleDetail = (row) => {
|
|||||||
router.push({
|
router.push({
|
||||||
name: 'Share/detail',
|
name: 'Share/detail',
|
||||||
query: {
|
query: {
|
||||||
id:row.id
|
id:row.allocationId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,13 +29,35 @@
|
|||||||
/>
|
/>
|
||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-form-item label="是否专项资金" prop="isSpecialFund">
|
||||||
|
<el-radio-group v-model="formData.isSpecialFund" size="mini">
|
||||||
|
<el-radio :label="true">是</el-radio>
|
||||||
|
<el-radio :label="false">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" v-if="formData.isSpecialFund">
|
||||||
|
<el-form-item label="专项资金" prop="specialFund">
|
||||||
|
<el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in specialFundOption"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<baseTitle title="征集说明"></baseTitle>
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
<Tinymce v-if="showTinymce" image-url="/notice/file" file-url="/notice/file"
|
<Tinymce v-if="showTinymce" image-url="/notice/file" file-url="/notice/file"
|
||||||
v-model:value="formData.collectExplain" height="300" />
|
v-model:value="formData.collectExplain" />
|
||||||
<baseTitle title="申请文件"></baseTitle>
|
<baseTitle title="申请文件"></baseTitle>
|
||||||
<file-upload v-if="checkFormPrem('fileList')" @getFile="getFile"/>
|
<file-upload v-if="checkFormPrem('fileList')" @getFile="getFile"/>
|
||||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable"
|
<fvTable style="width: 100%;max-height: 600px;height: 600px" v-if="showTable"
|
||||||
:tableConfig="tableConfig" :data="formData.fileList"
|
:tableConfig="tableConfig" :data="formData.fileList"
|
||||||
:isSettingCol="false" :pagination="false">
|
:isSettingCol="false" :pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
@@ -74,6 +96,7 @@ import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
|
|||||||
import {useRoute, useRouter} from 'vue-router'
|
import {useRoute, useRouter} from 'vue-router'
|
||||||
import {getSubCompOpt} from '@/api/user/user.js'
|
import {getSubCompOpt} from '@/api/user/user.js'
|
||||||
import {useTagsView} from '@/stores/tagsview.js'
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {getFundOption} from "@/api/special-fund";
|
||||||
|
|
||||||
const tagsViewStore = useTagsView()
|
const tagsViewStore = useTagsView()
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
@@ -87,7 +110,8 @@ const formData = ref({
|
|||||||
collectType: '',
|
collectType: '',
|
||||||
deadline: '',
|
deadline: '',
|
||||||
collectExplain: '',
|
collectExplain: '',
|
||||||
fileList: []
|
fileList: [],
|
||||||
|
isSpecialFund:false
|
||||||
})
|
})
|
||||||
const showTinymce = ref(true)
|
const showTinymce = ref(true)
|
||||||
const routerName = ref(router.currentRoute.value.name)
|
const routerName = ref(router.currentRoute.value.name)
|
||||||
@@ -99,6 +123,7 @@ const typeOption = ref([
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
const companyOption = ref([])
|
const companyOption = ref([])
|
||||||
|
const specialFundOption = ref([])
|
||||||
const form = ref(null)
|
const form = ref(null)
|
||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
@@ -111,6 +136,7 @@ const rules = reactive({
|
|||||||
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
||||||
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
||||||
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
|
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
|
||||||
|
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||||
})
|
})
|
||||||
|
|
||||||
const tableConfig = reactive({
|
const tableConfig = reactive({
|
||||||
@@ -178,8 +204,10 @@ const compositeParam = (item) => {
|
|||||||
let tag = ''
|
let tag = ''
|
||||||
if (!formData.value.collectType && routerName.value === 'Requirement/add') {
|
if (!formData.value.collectType && routerName.value === 'Requirement/add') {
|
||||||
tag = '需求征集'
|
tag = '需求征集'
|
||||||
}else if(routerName.value === 'Requirement/edit'){
|
}else if(!formData.value.collectType &&routerName.value === 'Requirement/edit'){
|
||||||
tag = '需求征集'
|
tag = '需求征集'
|
||||||
|
}if (formData.value.collectType) {
|
||||||
|
tag = formData.value.collectType
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
fileId: item.id,
|
fileId: item.id,
|
||||||
@@ -205,12 +233,9 @@ const getFile = (val) => {
|
|||||||
const init = async () => {
|
const init = async () => {
|
||||||
const res = await getSubCompOpt()
|
const res = await getSubCompOpt()
|
||||||
companyOption.value = res.data
|
companyOption.value = res.data
|
||||||
|
const resFund = await getFundOption()
|
||||||
|
specialFundOption.value = resFund.data
|
||||||
getWorkflowInfo().then(res => {
|
getWorkflowInfo().then(res => {
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
|
||||||
})
|
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
processInstanceData.value = data
|
processInstanceData.value = data
|
||||||
@@ -226,7 +251,12 @@ const init = async () => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
processDiagramViewer.value = true
|
processDiagramViewer.value = true
|
||||||
})
|
})
|
||||||
} else {
|
}else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -247,7 +277,9 @@ const submitParam = (item) => {
|
|||||||
requirementId: item.requirementId ? item.requirementId : 0,
|
requirementId: item.requirementId ? item.requirementId : 0,
|
||||||
requirementName: item.requirementName,
|
requirementName: item.requirementName,
|
||||||
fileList: files,
|
fileList: files,
|
||||||
deploymentId: processInstanceData.value.deploymentId
|
deploymentId: processInstanceData.value.deploymentId,
|
||||||
|
isSpecialFund:item.isSpecialFund,
|
||||||
|
specialFund:item.specialFund
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
@@ -334,7 +366,9 @@ onMounted(async () => {
|
|||||||
:deep(.el-empty__description) {
|
:deep(.el-empty__description) {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
:deep(.el-table--fit ){
|
||||||
|
height: 600px;
|
||||||
|
}
|
||||||
.add-block {
|
.add-block {
|
||||||
//display: flex;
|
//display: flex;
|
||||||
//justify-content: space-between;
|
//justify-content: space-between;
|
||||||
|
|||||||
@@ -23,6 +23,11 @@
|
|||||||
<span>{{ formData.deadline }}</span>
|
<span>{{ formData.deadline }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="24" v-if="formData.isSpecialFund">
|
||||||
|
<el-form-item label="专项资金">
|
||||||
|
<span>{{ formData.specialFund }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<baseTitle title="征集说明"></baseTitle>
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -35,7 +40,7 @@
|
|||||||
<baseTitle title="附件列表"></baseTitle>
|
<baseTitle title="附件列表"></baseTitle>
|
||||||
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig"
|
<fvTable style="width: 100%;max-height: 600px;height: 600px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
@@ -43,6 +48,16 @@
|
|||||||
</fvTable>
|
</fvTable>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<div class="approval-record">
|
||||||
|
<baseTitle title="审批记录"></baseTitle>
|
||||||
|
<div class="process">
|
||||||
|
<operation-render v-if="processDiagramViewer" :operation-list="processInstanceData.operationList"
|
||||||
|
:state="processInstanceData.state"/>
|
||||||
|
<process-diagram-viewer v-if="processDiagramViewer"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div v-if="processInstanceData.taskId">
|
<div v-if="processInstanceData.taskId">
|
||||||
<baseTitle title="审核意见"></baseTitle>
|
<baseTitle title="审核意见"></baseTitle>
|
||||||
@@ -57,14 +72,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="approval-record">
|
|
||||||
<baseTitle title="审批记录"></baseTitle>
|
|
||||||
<div class="process">
|
|
||||||
<operation-render v-if="processDiagramViewer" :operation-list="processInstanceData.operationList"
|
|
||||||
:state="processInstanceData.state"/>
|
|
||||||
<process-diagram-viewer v-if="processDiagramViewer"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
||||||
<el-button @click="handleReject(demandForm)">驳回</el-button>
|
<el-button @click="handleReject(demandForm)">驳回</el-button>
|
||||||
@@ -79,9 +86,10 @@ import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.v
|
|||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import {getInfo, agreeTask, rejectTask, downloadFile} from "@/api/project-demand/index.js";
|
import {getInfo, agreeTask, rejectTask, downloadFile} from "@/api/project-demand/index.js";
|
||||||
import {getSubCompOpt} from '@/api/user/user.js'
|
import {getSubCompOpt} from '@/api/user/user.js'
|
||||||
import {ElMessage} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
import {useTagsView} from '@/stores/tagsview.js'
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
import {matterTree} from '@/utils/matterTree.js';
|
import {matterTree} from '@/utils/matterTree.js';
|
||||||
|
import {getFundOption} from "@/api/special-fund";
|
||||||
|
|
||||||
const tagsViewStore = useTagsView()
|
const tagsViewStore = useTagsView()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@@ -91,6 +99,7 @@ const loading = ref(false)
|
|||||||
const demandForm = ref()
|
const demandForm = ref()
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const companyOption = ref([])
|
const companyOption = ref([])
|
||||||
|
const specialFundOption = ref([])
|
||||||
const formPermMap = ref(new Map());
|
const formPermMap = ref(new Map());
|
||||||
const processInstanceData = ref({})
|
const processInstanceData = ref({})
|
||||||
const showTable = ref(false)
|
const showTable = ref(false)
|
||||||
@@ -161,14 +170,16 @@ const handleSubmit = () => {
|
|||||||
formData: formData.value
|
formData: formData.value
|
||||||
}
|
}
|
||||||
agreeTask(approve).then(res => {
|
agreeTask(approve).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
router.push({
|
router.push({
|
||||||
name: 'Requirement'
|
name: 'Requirement'
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
ElMessage.error(res.msg)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -181,14 +192,16 @@ const handleReject = (instance) => {
|
|||||||
auditOpinion: formData.value.auditOpinion,
|
auditOpinion: formData.value.auditOpinion,
|
||||||
}
|
}
|
||||||
rejectTask(approve).then(res => {
|
rejectTask(approve).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElMessage.success(res.msg)
|
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
router.push({
|
router.push({
|
||||||
name: 'Requirement'
|
name: 'Requirement'
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
ElMessage.error(res.msg)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -197,8 +210,12 @@ const getCompanyOption = async () => {
|
|||||||
const res = await getSubCompOpt()
|
const res = await getSubCompOpt()
|
||||||
companyOption.value = res.data
|
companyOption.value = res.data
|
||||||
}
|
}
|
||||||
|
const getFundOptions = async () => {
|
||||||
|
const res = await getFundOption()
|
||||||
|
specialFundOption.value = res.data
|
||||||
|
}
|
||||||
|
|
||||||
const getDataSourceOptionItem = (val) => {
|
const getCompanyOptionItem = (val) => {
|
||||||
if (val !== undefined) {
|
if (val !== undefined) {
|
||||||
val.forEach(item => {
|
val.forEach(item => {
|
||||||
matterTree(companyNameArray.value, companyOption.value, item)
|
matterTree(companyNameArray.value, companyOption.value, item)
|
||||||
@@ -219,11 +236,19 @@ const handleDownload = (row) => {
|
|||||||
const init = async () => {
|
const init = async () => {
|
||||||
if (!route.query.id) return;
|
if (!route.query.id) return;
|
||||||
await getCompanyOption()
|
await getCompanyOption()
|
||||||
|
await getFundOptions()
|
||||||
getInfo(route.query.id).then(res => {
|
getInfo(route.query.id).then(res => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
let data = res.data
|
let data = res.data
|
||||||
formData.value = data.formData;
|
formData.value = data.formData;
|
||||||
data.formData.companyIds = getDataSourceOptionItem(data.formData.companyIds)
|
data.formData.companyIds = getCompanyOptionItem(data.formData.companyIds)
|
||||||
|
if(data.formData.specialFund){
|
||||||
|
specialFundOption.value.forEach(item => {
|
||||||
|
if(data.formData.specialFund==item.value){
|
||||||
|
data.formData.specialFund = item.label
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
processInstanceData.value = data
|
processInstanceData.value = data
|
||||||
processStore.setDesign(data)
|
processStore.setDesign(data)
|
||||||
processStore.runningList.value = data.runningList;
|
processStore.runningList.value = data.runningList;
|
||||||
@@ -247,7 +272,9 @@ onMounted(async () => {
|
|||||||
:deep(.el-empty__description) {
|
:deep(.el-empty__description) {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
:deep(.el-table--fit ){
|
||||||
|
height: 600px;
|
||||||
|
}
|
||||||
.detail-block {
|
.detail-block {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
import {useAuthStore} from '@/stores/userstore.js'
|
import {useAuthStore} from '@/stores/userstore.js'
|
||||||
import Tag from '@/components/Tag.vue'
|
import Tag from '@/components/Tag.vue'
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
import {ElMessage, ElNotification} from "element-plus";
|
import { ElNotification} from "element-plus";
|
||||||
import {deleteDemand} from "@/api/project-demand";
|
import {deleteDemand} from "@/api/project-demand";
|
||||||
|
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
@@ -112,11 +112,8 @@ const tableConfig = reactive({
|
|||||||
if (buttons.has("edit")) {
|
if (buttons.has("edit")) {
|
||||||
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: ['mosr:requirement: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("report")) {
|
if (buttons.has("report")) {
|
||||||
btn.push({label: '需求上报',prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
btn.push({label: '需求上报', prem: ['mosr:requirement:info'], func: () => handleReport(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{width: '100%'}}>
|
<div style={{width: '100%'}}>
|
||||||
@@ -134,7 +131,8 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
buttons.has("delete") ?
|
buttons.has("delete") ?
|
||||||
<popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'} perm={['mosr:requirement:del']}
|
<popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'}
|
||||||
|
perm={['mosr:requirement:del']}
|
||||||
onDelete={() => handleDelete(row)}/> : ''
|
onDelete={() => handleDelete(row)}/> : ''
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@@ -154,23 +152,17 @@ const search = (val) => {
|
|||||||
tableConfig.params = {...val}
|
tableConfig.params = {...val}
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
const handleAdd = () => {
|
const handleAdd = (row) => {
|
||||||
try{
|
router.push({
|
||||||
router.push({
|
name: 'Requirement/add',
|
||||||
name:'Requirement/add',
|
query: {
|
||||||
query:{}
|
// id: row.requirementId
|
||||||
})
|
}
|
||||||
}catch (err){
|
})
|
||||||
// ElNotification({
|
|
||||||
// title: '提示',
|
|
||||||
// message: '该用户无新增权限',
|
|
||||||
// type: 'warning'
|
|
||||||
// })
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
const handleEdit = (row) => {
|
const handleEdit = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
name:'Requirement/edit',
|
name: 'Requirement/edit',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId
|
id: row.requirementId
|
||||||
}
|
}
|
||||||
@@ -178,17 +170,17 @@ const handleEdit = (row) => {
|
|||||||
}
|
}
|
||||||
const handleDelete = (row) => {
|
const handleDelete = (row) => {
|
||||||
deleteDemand(row.requirementId).then(res => {
|
deleteDemand(row.requirementId).then(res => {
|
||||||
if (res.code === 1000) {
|
ElNotification({
|
||||||
ElMessage.success(res.msg)
|
title: '提示',
|
||||||
tableIns.value.refresh()
|
message: res.msg,
|
||||||
} else {
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
ElMessage.error(res.msg)
|
})
|
||||||
}
|
tableIns.value.refresh()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleDetail = (row) => {
|
const handleDetail = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
name:'Requirement/detail',
|
name: 'Requirement/detail',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId
|
id: row.requirementId
|
||||||
}
|
}
|
||||||
@@ -196,9 +188,9 @@ const handleDetail = (row) => {
|
|||||||
}
|
}
|
||||||
const handleReport = (row) => {
|
const handleReport = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
name:'Summary/add',
|
name: 'Summary/add',
|
||||||
query: {
|
query: {
|
||||||
id:row.requirementId
|
id: row.requirementId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
132
src/views/project-demand/requirement/upload.vue
Normal file
132
src/views/project-demand/requirement/upload.vue
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<template>
|
||||||
|
<!-- <baseTitle title="标签名称"></baseTitle>-->
|
||||||
|
<!-- <el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">-->
|
||||||
|
<!-- <el-form-item label="标签名称" prop="tagName">-->
|
||||||
|
<!-- <el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
<baseTitle title="上传附件"></baseTitle>
|
||||||
|
<el-card style="width: 100%;margin: 15px 0">
|
||||||
|
<file-upload @getFile="getFile" />
|
||||||
|
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {uploadRequirementAttachment} from "@/api/project-demand";
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const fileList = ref([])
|
||||||
|
const formData = ref({
|
||||||
|
tagName:''
|
||||||
|
})
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '附件名称',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const showTable = ref(true)
|
||||||
|
const name = ref(router.currentRoute.value.name)
|
||||||
|
const rules = reactive({
|
||||||
|
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag:'需求征集'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getFile = (val) => {
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
fileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId,
|
||||||
|
tag:item.tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
let files = []
|
||||||
|
fileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
mosrUserFileDtoList: files,
|
||||||
|
projectId: route.query.id,
|
||||||
|
}
|
||||||
|
console.log('params', params)
|
||||||
|
let res = await uploadRequirementAttachment(params)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
name: 'Filing/attachment',
|
||||||
|
query:{
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -8,11 +8,19 @@
|
|||||||
<el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable></el-input>
|
<el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="5">-->
|
||||||
<el-form-item label="专项资金" prop="specialFund">
|
<!-- <el-form-item label="是否专项资金" prop="isSpecialFund">-->
|
||||||
|
<!-- <el-radio-group v-model="formData.isSpecialFund" >-->
|
||||||
|
<!-- <el-radio :label="true">是</el-radio>-->
|
||||||
|
<!-- <el-radio :label="false">否</el-radio>-->
|
||||||
|
<!-- </el-radio-group>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="专项资金" prop="specialFund" v-if="formData.isSpecialFund">
|
||||||
<el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
|
<el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in cacheStore.getDict('todo_type')"
|
v-for="item in specialFundOption"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@@ -46,12 +54,6 @@
|
|||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-form-item label="所属公司" prop="affiliatedCompanyId">-->
|
|
||||||
<!-- <el-tree-select v-model="formData.affiliatedCompanyId" :data="companyOption" style="width: 100%;"-->
|
|
||||||
<!-- filterable clearable :check-strictly="true"/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col> <el-col :span="12">-->
|
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目类型" prop="projectType">
|
<el-form-item label="项目类型" prop="projectType">
|
||||||
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable>
|
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable>
|
||||||
@@ -139,18 +141,20 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||||
<el-radio-group v-model="formData.industryUniversityResearch">
|
<el-radio-group v-model="formData.industryUniversityResearch">
|
||||||
<el-radio v-for="item in cacheStore.getDict('industry_university')"
|
<el-radio v-for="item in cacheStore.getDict('industry_university')"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.value">{{item.label}}</el-radio>
|
:label="item.value">{{ item.label }}
|
||||||
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||||
<el-radio-group v-model="formData.governmentDeclaration">
|
<el-radio-group v-model="formData.governmentDeclaration">
|
||||||
<el-radio v-for="item in cacheStore.getDict('government_declaration')"
|
<el-radio v-for="item in cacheStore.getDict('government_declaration')"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.value">{{item.label}}</el-radio>
|
:label="item.value">{{ item.label }}
|
||||||
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -230,13 +234,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="oper-page-btn">
|
<div class="oper-page-btn">
|
||||||
<el-button type="info" @click="staging">存为草稿</el-button>
|
<el-button type="info" @click="staging">存为草稿</el-button>
|
||||||
<el-button color="#DED0B2" v-if="name==='Summary/add'" @click="handleSubmit(summaryForm)">发布</el-button>
|
<el-button color="#DED0B2" v-if="name==='Summary/add'" @click="handleSubmit(summaryForm)">发布</el-button>
|
||||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新发布</el-button>
|
<el-button color="#DED0B2" v-else @click="handleResubmit">重新发布</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
import {debounce} from 'lodash'
|
||||||
import {getDetail, getProcessInfo, requirementReported, resubmitReported} from "./api";
|
import {getDetail, getProcessInfo, requirementReported, resubmitReported} from "./api";
|
||||||
import {ElMessage, ElNotification} from "element-plus";
|
import {ElMessage, ElNotification} from "element-plus";
|
||||||
import {useTagsView} from '@/stores/tagsview.js'
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
@@ -244,6 +249,8 @@ import {useCacheStore} from '@/stores/cache.js'
|
|||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import {getSubCompOpt} from "@/api/user/user";
|
import {getSubCompOpt} from "@/api/user/user";
|
||||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
|
import {getFormInfo} from "@/api/project-demand";
|
||||||
|
import {getFundOption} from "@/api/special-fund";
|
||||||
|
|
||||||
const cacheStore = useCacheStore()
|
const cacheStore = useCacheStore()
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
@@ -257,19 +264,19 @@ const tagsViewStore = useTagsView()
|
|||||||
const companyOption = ref([])
|
const companyOption = ref([])
|
||||||
const summaryForm = ref()
|
const summaryForm = ref()
|
||||||
const deploymentId = ref()
|
const deploymentId = ref()
|
||||||
|
const specialFundOption = ref([])
|
||||||
const showTable = ref(true)
|
const showTable = ref(true)
|
||||||
const otherFileList = ref([])
|
const otherFileList = ref([])
|
||||||
const file = ref({})
|
const file = ref({})
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
industryUniversityResearch:'0',
|
industryUniversityResearch: '0',
|
||||||
governmentDeclaration:'0',
|
governmentDeclaration: '0',
|
||||||
})
|
})
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
|
projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
|
||||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||||
startTime: [{required: true, message: '请选择开始时间', trigger: 'blur'}],
|
startTime: [{required: true, message: '请选择开始时间', trigger: 'blur'}],
|
||||||
rdSubject: [{required: true, message: '请输入研发主体', trigger: 'blur'}],
|
rdSubject: [{required: true, message: '请输入研发主体', trigger: 'blur'}],
|
||||||
// affiliatedCompanyId: [{required: true, message: '请输入所属公司', trigger: 'blur'}],
|
|
||||||
projectType: [{required: true, message: '请选择项目类型', trigger: 'blur'}],
|
projectType: [{required: true, message: '请选择项目类型', trigger: 'blur'}],
|
||||||
endTime: [{required: true, message: '请选择结束时间', trigger: 'blur'}],
|
endTime: [{required: true, message: '请选择结束时间', trigger: 'blur'}],
|
||||||
investmentType: [{required: true, message: '请选择出资类型', trigger: 'blur'}],
|
investmentType: [{required: true, message: '请选择出资类型', trigger: 'blur'}],
|
||||||
@@ -290,6 +297,16 @@ const rules = reactive({
|
|||||||
serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}],
|
serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}],
|
||||||
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}]
|
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}]
|
||||||
})
|
})
|
||||||
|
// const getIsFund = async () => {
|
||||||
|
// getFormInfo(route.query.id).then(res => {
|
||||||
|
// if (res.code === 1000) {
|
||||||
|
// formData.value.isSpecialFund = res.data.isSpecialFund
|
||||||
|
// if(res.data.isSpecialFund){
|
||||||
|
// formData.value.specialFund = Number(res.data.specialFund)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
const compositeParam = (item, type) => {
|
const compositeParam = (item, type) => {
|
||||||
let tag = ''
|
let tag = ''
|
||||||
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
|
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
|
||||||
@@ -304,12 +321,11 @@ const compositeParam = (item, type) => {
|
|||||||
tag: tag
|
tag: tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getEditOtherFile = (val) => {
|
|
||||||
console.log('getEditOtherFile', val)
|
|
||||||
}
|
|
||||||
const getAttachment = (val) => {
|
const getAttachment = (val) => {
|
||||||
console.log('上传文件getAttachment', val)
|
console.log('上传文件getAttachment', val)
|
||||||
file.value = compositeParam(val)
|
file.value = compositeParam(val)
|
||||||
|
formData.value.singleFile = compositeParam(val)
|
||||||
}
|
}
|
||||||
const getOtherFile = (val) => {
|
const getOtherFile = (val) => {
|
||||||
console.log('上传文件getOtherFile', val)
|
console.log('上传文件getOtherFile', val)
|
||||||
@@ -326,83 +342,102 @@ const getFileParam = (item) => {
|
|||||||
tag: item.tag
|
tag: item.tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = debounce(async (instance) => {
|
||||||
// if (!instance) return
|
if (!instance) return
|
||||||
// instance.validate(async (valid, fields) => {
|
instance.validate(async (valid, fields) => {
|
||||||
// if(JSON.stringify(file.value) == "{}"){
|
if (!valid) return
|
||||||
// attachment.value.validate()
|
// if (JSON.stringify(file.value) === "{}") {
|
||||||
// } else {
|
// attachment.value.validate()
|
||||||
// attachment.value.clearValidate()
|
// } else {
|
||||||
// }
|
// attachment.value.clearValidate()
|
||||||
// if (!valid) return
|
// }
|
||||||
let singleFile = {}
|
|
||||||
if (file.value.fileId !== undefined) {
|
let singleFile = {}
|
||||||
singleFile = {
|
if (file.value.fileId !== undefined) {
|
||||||
fileId: file.value.fileId
|
singleFile = {
|
||||||
|
fileId: file.value.fileId
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
let otherFiles = []
|
||||||
let otherFiles = []
|
otherFileList.value.forEach(item => {
|
||||||
otherFileList.value.forEach(item => {
|
otherFiles.push(getFileParam(item))
|
||||||
otherFiles.push(getFileParam(item))
|
|
||||||
})
|
|
||||||
// let params = {
|
|
||||||
// "specialFund": "2",
|
|
||||||
// "projectName": "重新提交全流程测试2024520",
|
|
||||||
// "startTime": "2024-05-24 00:00:00",
|
|
||||||
// "endTime": "2024-05-29 00:00:00",
|
|
||||||
// "projectType": "3",
|
|
||||||
// "investmentType": "3",
|
|
||||||
// "businessSegment": "2",
|
|
||||||
// "technicalStandard": "2",
|
|
||||||
// "governmentDeclaration": 0,
|
|
||||||
// "inventionPatent": "3",
|
|
||||||
// "newPatent": "3",
|
|
||||||
// "economicEstimate": "3",
|
|
||||||
// "other": "3",
|
|
||||||
// "copyright": "3",
|
|
||||||
// "softwareCopyright": "3",
|
|
||||||
// "industryUniversityResearch": 0,
|
|
||||||
// "intellectualProperty": "00",
|
|
||||||
// "resultForm": "3",
|
|
||||||
// "projectImpact": "3",
|
|
||||||
// "rdSubject": "3",
|
|
||||||
// // "affiliatedCompanyId": formData.value.affiliatedCompanyId,
|
|
||||||
// "serviceDescription": "3",
|
|
||||||
// "contentDescription": "3",
|
|
||||||
// "specialFundAmount": "3",
|
|
||||||
// deploymentId: deploymentId.value,
|
|
||||||
// "singleFile": singleFile,
|
|
||||||
// "fileList": otherFiles,
|
|
||||||
// "requirementId":route.query.id
|
|
||||||
// }
|
|
||||||
let params = {
|
|
||||||
...formData.value,
|
|
||||||
deploymentId: deploymentId.value,
|
|
||||||
fileList: otherFiles,
|
|
||||||
singleFile: singleFile,
|
|
||||||
requirementId: route.query.id
|
|
||||||
}
|
|
||||||
let res = await requirementReported(params)
|
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
|
||||||
})
|
|
||||||
if (res.code === 1000) {
|
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
|
||||||
await router.push({
|
|
||||||
name: 'Summary'
|
|
||||||
})
|
})
|
||||||
}
|
// let params = {
|
||||||
// })
|
// "specialFund": "2",
|
||||||
}
|
// "projectName": "测试全流程功能-上报",
|
||||||
const handleResubmit = () => {
|
// "startTime": "2024-05-24 00:00:00",
|
||||||
|
// "endTime": "2024-05-29 00:00:00",
|
||||||
|
// "projectType": "3",
|
||||||
|
// "investmentType": "3",
|
||||||
|
// "businessSegment": "2",
|
||||||
|
// "technicalStandard": "2",
|
||||||
|
// "governmentDeclaration": 0,
|
||||||
|
// "inventionPatent": "3",
|
||||||
|
// "newPatent": "3",
|
||||||
|
// "economicEstimate": "3",
|
||||||
|
// "other": "3",
|
||||||
|
// "copyright": "3",
|
||||||
|
// "softwareCopyright": "3",
|
||||||
|
// "industryUniversityResearch": 0,
|
||||||
|
// "intellectualProperty": "00",
|
||||||
|
// "resultForm": "3",
|
||||||
|
// "projectImpact": "3",
|
||||||
|
// "rdSubject": "3",
|
||||||
|
// "serviceDescription": "3",
|
||||||
|
// "contentDescription": "3",
|
||||||
|
// "specialFundAmount": "3",
|
||||||
|
// deploymentId: deploymentId.value,
|
||||||
|
// "singleFile": singleFile,
|
||||||
|
// "fileList": otherFiles,
|
||||||
|
// "requirementId":route.query.id
|
||||||
|
// }
|
||||||
|
let params = {
|
||||||
|
...formData.value,
|
||||||
|
isSpecialFund:false,
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
fileList: otherFiles,
|
||||||
|
singleFile: singleFile,
|
||||||
|
requirementId: route.query.id
|
||||||
|
}
|
||||||
|
if (JSON.stringify(singleFile) === "{}") {
|
||||||
|
attachment.value.validate()
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请上传附件',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
|
console.log('params', params)
|
||||||
|
let res = await requirementReported(params)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
name: 'Summary'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
const handleResubmit = debounce(() => {
|
||||||
let singleFile = {}
|
let singleFile = {}
|
||||||
let otherFiles = []
|
let otherFiles = []
|
||||||
let fileArray
|
let fileArray
|
||||||
if (name.value === 'Summary/edit') {
|
if (name.value === 'Summary/edit') {
|
||||||
|
// console.log('attachment.value', attachment.value.singleFile)
|
||||||
|
// if (attachment.value.singleFile === null) {
|
||||||
|
// attachment.value.validate()
|
||||||
|
// } else {
|
||||||
|
// attachment.value.clearValidate()
|
||||||
|
// }
|
||||||
singleFile = {
|
singleFile = {
|
||||||
fileId: attachment.value.singleFile.fileId
|
fileId: attachment.value.singleFile?.fileId
|
||||||
}
|
}
|
||||||
fileArray = attachment.value.allFileList
|
fileArray = attachment.value.allFileList
|
||||||
} else {
|
} else {
|
||||||
@@ -424,6 +459,17 @@ const handleResubmit = () => {
|
|||||||
singleFile: singleFile,
|
singleFile: singleFile,
|
||||||
requirementId: route.query.id
|
requirementId: route.query.id
|
||||||
}
|
}
|
||||||
|
if (JSON.stringify(singleFile) === "{}") {
|
||||||
|
attachment.value.validate()
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请上传附件',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
console.log('重新提交params', params)
|
console.log('重新提交params', params)
|
||||||
resubmitReported(params).then(res => {
|
resubmitReported(params).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -438,7 +484,8 @@ const handleResubmit = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
})
|
||||||
|
|
||||||
const getDetailInfo = async () => {
|
const getDetailInfo = async () => {
|
||||||
getDetail(route.query.projectId).then(res => {
|
getDetail(route.query.projectId).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -453,14 +500,12 @@ const getDetailInfo = async () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
|
const resFund = await getFundOption()
|
||||||
|
specialFundOption.value = resFund.data
|
||||||
|
// await getIsFund()
|
||||||
const res = await getSubCompOpt()
|
const res = await getSubCompOpt()
|
||||||
companyOption.value = res.data
|
companyOption.value = res.data
|
||||||
getProcessInfo().then(res => {
|
getProcessInfo().then(res => {
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
|
||||||
})
|
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
deploymentId.value = data.deploymentId
|
deploymentId.value = data.deploymentId
|
||||||
@@ -473,6 +518,12 @@ const init = async () => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
processDiagramViewer.value = true
|
processDiagramViewer.value = true
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,3 +38,18 @@ export const resubmitReported = (data) => {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getCollectAttachment = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/requirement/collect/attachments',
|
||||||
|
method: "get",
|
||||||
|
params:params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const uploadCollectAttachment= (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/requirement/collect/upload',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<steps :active="1" @setDetail="setDetail" @stepChange="stepChange">
|
<steps :active="1" @setDetail="setDetail" @stepChange="stepChange">
|
||||||
<template #content>
|
<template #content>
|
||||||
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
|
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
|
||||||
:processViewer="summaryProcessViewer" :companyOption="companyOption" :loading="loading"/>
|
:processViewer="summaryProcessViewer" :loading="loading"/>
|
||||||
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
|
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
|
||||||
:processViewer="summaryProcessViewer" :loading="loading"/>
|
:processViewer="summaryProcessViewer" :loading="loading"/>
|
||||||
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
||||||
@@ -21,34 +21,20 @@ import SummaryDetail from '@/components/DetailComponent/SummaryDetail.vue';
|
|||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import {getMapProjectStateInfo} from '@/components/steps/api';
|
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||||
import {getSubCompOpt} from "@/api/user/user";
|
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const companyOption = ref([])
|
|
||||||
const summaryData = ref({})
|
const summaryData = ref({})
|
||||||
const summaryProcessViewer = ref(true)
|
const summaryProcessViewer = ref(true)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const active = ref(route.query.state)
|
const active = ref(route.query.state)
|
||||||
const showActive = ref()
|
const showActive = ref()
|
||||||
const getCompanyOption = async () => {
|
|
||||||
const res = await getSubCompOpt()
|
|
||||||
companyOption.value = res.data
|
|
||||||
}
|
|
||||||
const getInfo = async (state) => {
|
const getInfo = async (state) => {
|
||||||
const projectId = route.query.projectId
|
const projectId = route.query.projectId
|
||||||
if(showActive == '00'){
|
|
||||||
await getCompanyOption()
|
|
||||||
}
|
|
||||||
summaryProcessViewer.value = false
|
summaryProcessViewer.value = false
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const {code, data,msg} = await getMapProjectStateInfo(projectId, state)
|
const {code, data,msg} = await getMapProjectStateInfo(projectId, state)
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: msg,
|
|
||||||
type: code === 1000 ? 'success' : 'error'
|
|
||||||
})
|
|
||||||
if(data===undefined)return;
|
if(data===undefined)return;
|
||||||
if(code===1000){
|
if(code===1000){
|
||||||
summaryData.value = data;
|
summaryData.value = data;
|
||||||
@@ -62,24 +48,15 @@ const getInfo = async (state) => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
summaryProcessViewer.value = true
|
summaryProcessViewer.value = true
|
||||||
})
|
})
|
||||||
|
}else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// const back = () => {
|
|
||||||
// switch (route.name) {
|
|
||||||
// case 'Summary/detail':
|
|
||||||
// setDetail('1')
|
|
||||||
// break;
|
|
||||||
// case 'Initiation/detail':
|
|
||||||
// setDetail('2')
|
|
||||||
// break;
|
|
||||||
// case 'Implementation/detail':
|
|
||||||
// setDetail('3')
|
|
||||||
// break;
|
|
||||||
// case 'Filing/detail':
|
|
||||||
// setDetail('4')
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
const setDetail = (active) => {
|
const setDetail = (active) => {
|
||||||
showActive.value = active
|
showActive.value = active
|
||||||
getInfo(active)
|
getInfo(active)
|
||||||
@@ -89,7 +66,6 @@ const stepChange = (data) => {
|
|||||||
showActive.value = data.active
|
showActive.value = data.active
|
||||||
getInfo(data.active)
|
getInfo(data.active)
|
||||||
}
|
}
|
||||||
// back()
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -96,17 +96,41 @@ const tableConfig = reactive({
|
|||||||
{
|
{
|
||||||
prop: 'projectType',
|
prop: 'projectType',
|
||||||
label: '项目类型',
|
label: '项目类型',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'rdSubject',
|
prop: 'rdSubject',
|
||||||
label: '研发主体',
|
label: '研发主体',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'projectImpact',
|
prop: 'projectImpact',
|
||||||
label: '项目影响',
|
label: '项目影响',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'startTime',
|
prop: 'startTime',
|
||||||
@@ -143,9 +167,6 @@ const tableConfig = reactive({
|
|||||||
if (buttons.has("edit")) {
|
if (buttons.has("edit")) {
|
||||||
btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
// if (buttons.has("delete")) {
|
|
||||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
|
|
||||||
// }
|
|
||||||
if (buttons.has("report")) {
|
if (buttons.has("report")) {
|
||||||
btn.push({label: '上报', prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'})
|
btn.push({label: '上报', prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
@@ -163,6 +184,12 @@ const tableConfig = reactive({
|
|||||||
</el-button>
|
</el-button>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
buttons.has("delete") ?
|
||||||
|
<popover-delete name={row.requirementName} type={'需求'} btnType={'danger'}
|
||||||
|
perm={['mosr:collect:del']} onDelete={() => handleDelete(row)}/>
|
||||||
|
: ''
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
132
src/views/project-demand/summary/upload.vue
Normal file
132
src/views/project-demand/summary/upload.vue
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<template>
|
||||||
|
<!-- <baseTitle title="标签名称"></baseTitle>-->
|
||||||
|
<!-- <el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">-->
|
||||||
|
<!-- <el-form-item label="标签名称" prop="tagName">-->
|
||||||
|
<!-- <el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
<baseTitle title="上传附件"></baseTitle>
|
||||||
|
<el-card style="width: 100%;margin: 15px 0">
|
||||||
|
<file-upload @getFile="getFile"/>
|
||||||
|
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {uploadCollectAttachment} from "./api";
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const fileList = ref([])
|
||||||
|
const formData = ref({
|
||||||
|
tagName:''
|
||||||
|
})
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '附件名称',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const showTable = ref(true)
|
||||||
|
const name = ref(router.currentRoute.value.name)
|
||||||
|
const rules = reactive({
|
||||||
|
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag:'需求上报',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getFile = (val) => {
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
fileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId,
|
||||||
|
tag:item.tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
let files = []
|
||||||
|
fileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
mosrUserFileDtoList: files,
|
||||||
|
projectId: route.query.id,
|
||||||
|
}
|
||||||
|
console.log('params', params)
|
||||||
|
let res = await uploadCollectAttachment(params)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
name: 'Filing/attachment',
|
||||||
|
query:{
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,83 +1,214 @@
|
|||||||
<template>
|
<template>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
<el-card style="width: 100%">
|
<el-tab-pane label="需求征集" name="0">
|
||||||
<file-upload @getFile="getOtherFile" :showFileList="true"/>
|
<search-files-by-tag @search="searchRequirement" @upload="upload"
|
||||||
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
:otherFileList="otherFileList"/>
|
||||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
</el-tab-pane>
|
||||||
<template #empty>
|
<el-tab-pane label="需求上报" name="1">
|
||||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
<search-files-by-tag @search="searchReport" @upload="upload"
|
||||||
</template>
|
:otherFileList="otherFileList"/>
|
||||||
</fvTable>
|
</el-tab-pane>
|
||||||
</el-card>
|
<el-tab-pane label="项目立项" name="2">
|
||||||
|
<search-files-by-tag @search="searchInitiation" @upload="upload"
|
||||||
|
:otherFileList="otherFileList"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="项目实施" name="3">
|
||||||
|
<search-files-by-tag type="3" @search="searchImplementation" @upload="upload" ref="implementation"
|
||||||
|
:otherFileList="otherFileList"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="项目归档" name="4">
|
||||||
|
<search-files-by-tag @search="searchFiling" @upload="upload"
|
||||||
|
:otherFileList="otherFileList"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import {downloadFile} from "@/api/project-demand";
|
import {ElNotification} from "element-plus";
|
||||||
|
import {getImplementationAttachment} from "@/api/project-manage";
|
||||||
|
import {getRequirementAttachment} from "@/api/project-demand";
|
||||||
|
import {getCollectAttachment} from "@/views/project-demand/summary/api";
|
||||||
|
import {getFilingAttachment, getInitiationAttachment} from "@/api/project-manage";
|
||||||
|
|
||||||
const searchConfig = reactive([
|
const route = useRoute()
|
||||||
{
|
const router = useRouter()
|
||||||
label: '关键词',
|
const activeName = ref('4')
|
||||||
prop: 'collectType',
|
const attachment = ref({})
|
||||||
component: 'el-input',
|
const showTable = ref(true)
|
||||||
props: {
|
const implementation = ref()
|
||||||
placeholder: '请输入',
|
const otherFileList = ref([])
|
||||||
clearable: true,
|
const handleClick = (tab) => {
|
||||||
filterable: true,
|
let name = {}
|
||||||
|
switchSearch(name, tab.index)
|
||||||
|
}
|
||||||
|
const getParams = (param, type) => {
|
||||||
|
let targetId
|
||||||
|
let params
|
||||||
|
if (type === 1) {
|
||||||
|
targetId = route.query.requirementId
|
||||||
|
params = {
|
||||||
|
targetId: targetId,
|
||||||
|
...param
|
||||||
}
|
}
|
||||||
}
|
} else if (type === 2){
|
||||||
])
|
targetId = route.query.id
|
||||||
const tableConfig = reactive({
|
if(JSON.stringify(param) !== '{}'){
|
||||||
columns: [
|
if (param.tag &&!param.name) {
|
||||||
{
|
implementation.value.tagsOption?.forEach(item => {
|
||||||
prop: 'originalFileName',
|
if (item.value === param.tag) {
|
||||||
label: '附件名称',
|
param.tag = item.label
|
||||||
align: 'center',
|
}
|
||||||
},
|
})
|
||||||
{
|
params = {
|
||||||
prop: 'tag',
|
targetId: targetId,
|
||||||
label: '自定义标签',
|
tag:param.tag
|
||||||
align: 'center'
|
}
|
||||||
},
|
}else if(!param.tag &¶m.name){
|
||||||
{
|
params = {
|
||||||
prop: 'tag',
|
targetId: targetId,
|
||||||
label: '内置标签',
|
...param
|
||||||
align: 'center'
|
}
|
||||||
},
|
} else if (!param.tag &&!param.name) {
|
||||||
{
|
params = {
|
||||||
prop: 'tag',
|
targetId: targetId,
|
||||||
label: '上传时间',
|
}
|
||||||
align: 'center'
|
}
|
||||||
},
|
}else {
|
||||||
{
|
params = {
|
||||||
prop: 'oper',
|
targetId: targetId
|
||||||
label: '操作',
|
|
||||||
align: 'center',
|
|
||||||
currentRender: ({row, index}) => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}else {
|
||||||
})
|
targetId = route.query.id
|
||||||
const showTable=ref(true)
|
params = {
|
||||||
const otherFileList = ref([])
|
targetId: targetId,
|
||||||
const getOtherFile = () => {
|
...param
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
const searchRequirement = async (param) => {
|
||||||
|
await search(param)
|
||||||
}
|
}
|
||||||
const handleDownload = (row) => {
|
const search = async (param, type) => {
|
||||||
downloadFile(row.fileId).then(res => {
|
const res = await getRequirementAttachment(getParams(param, type))
|
||||||
const blob = new Blob([res])
|
changeFileList(res)
|
||||||
let a = document.createElement('a')
|
|
||||||
a.href=URL.createObjectURL(blob)
|
|
||||||
a.download = row.originalFileName
|
|
||||||
a.click()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
const searchReport = async (param) => {
|
||||||
|
const res = await getCollectAttachment(getParams(param))
|
||||||
|
changeFileList(res)
|
||||||
|
}
|
||||||
|
const searchInitiation = async (param) => {
|
||||||
|
const res = await getInitiationAttachment(getParams(param))
|
||||||
|
changeFileList(res)
|
||||||
|
}
|
||||||
|
const searchImplementation = async (param) => {
|
||||||
|
const res = await getImplementationAttachment(getParams(param,2))
|
||||||
|
changeFileList(res)
|
||||||
|
}
|
||||||
|
const searchFiling = async (param) => {
|
||||||
|
const res = await getFilingAttachment(getParams(param))
|
||||||
|
changeFileList(res)
|
||||||
|
}
|
||||||
|
const changeFileList = (res) => {
|
||||||
|
showTable.value = false
|
||||||
|
if (res.code === 1000) {
|
||||||
|
otherFileList.value = res.data
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const upload = () => {
|
||||||
|
if(activeName.value==='3'){
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/upload',
|
||||||
|
query: {
|
||||||
|
id: route.query.id,
|
||||||
|
type:'3'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
router.push({
|
||||||
|
name: switchUpload(activeName.value),
|
||||||
|
query: {
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const switchUpload=(index)=>{
|
||||||
|
switch (index) {
|
||||||
|
case '0':
|
||||||
|
return 'Requirement/upload';
|
||||||
|
case '1':
|
||||||
|
return 'Summary/upload';
|
||||||
|
case '2':
|
||||||
|
return 'Initiation/upload';
|
||||||
|
case '3':
|
||||||
|
return 'Implementation/upload';
|
||||||
|
case '4':
|
||||||
|
return 'Filing/upload';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const switchSearch = (name, index) => {
|
||||||
|
switch (index) {
|
||||||
|
case '0':
|
||||||
|
search(name, 1)
|
||||||
|
break
|
||||||
|
case '1':
|
||||||
|
searchReport(name)
|
||||||
|
break
|
||||||
|
case '2':
|
||||||
|
searchInitiation(name)
|
||||||
|
break
|
||||||
|
case '3':
|
||||||
|
searchImplementation(name)
|
||||||
|
break
|
||||||
|
case '4':
|
||||||
|
searchFiling(name)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
if (activeName.value === '4') {
|
||||||
|
let name = {
|
||||||
|
name: ''
|
||||||
|
}
|
||||||
|
searchFiling(name)
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<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>
|
</style>
|
||||||
|
|||||||
@@ -128,11 +128,12 @@ const getFileParam = (item) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
if (JSON.stringify(file.value) === "{}") {
|
// if (JSON.stringify(file.value) === "{}") {
|
||||||
attachment.value.validate()
|
// attachment.value.validate()
|
||||||
} else {
|
// return;
|
||||||
attachment.value.clearValidate()
|
// } else {
|
||||||
}
|
// attachment.value.clearValidate()
|
||||||
|
// }
|
||||||
let files = []
|
let files = []
|
||||||
let singleFile = {}
|
let singleFile = {}
|
||||||
if (file.value.fileId !== undefined) {
|
if (file.value.fileId !== undefined) {
|
||||||
@@ -150,6 +151,17 @@ const handleSubmit = async () => {
|
|||||||
singleFile: singleFile,
|
singleFile: singleFile,
|
||||||
projectId: route.query.projectId,
|
projectId: route.query.projectId,
|
||||||
}
|
}
|
||||||
|
if (JSON.stringify(singleFile) === "{}") {
|
||||||
|
attachment.value.validate()
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请上传附件',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
console.log('params', params)
|
console.log('params', params)
|
||||||
let res = await projectConclusion(params)
|
let res = await projectConclusion(params)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -168,11 +180,12 @@ const handleResubmit = () => {
|
|||||||
let singleFile = {}
|
let singleFile = {}
|
||||||
let otherFiles = []
|
let otherFiles = []
|
||||||
let fileArray
|
let fileArray
|
||||||
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
// if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||||
attachment.value.validate()
|
// attachment.value.validate()
|
||||||
} else {
|
// return;
|
||||||
attachment.value.clearValidate()
|
// } else {
|
||||||
}
|
// attachment.value.clearValidate()
|
||||||
|
// }
|
||||||
if (attachment.value.singleFile !== null && name.value === 'Filing/edit') {
|
if (attachment.value.singleFile !== null && name.value === 'Filing/edit') {
|
||||||
singleFile = {
|
singleFile = {
|
||||||
fileId: attachment.value.singleFile.fileId
|
fileId: attachment.value.singleFile.fileId
|
||||||
@@ -197,6 +210,17 @@ const handleResubmit = () => {
|
|||||||
singleFile: singleFile,
|
singleFile: singleFile,
|
||||||
projectId: route.query.projectId,
|
projectId: route.query.projectId,
|
||||||
}
|
}
|
||||||
|
if (JSON.stringify(singleFile) === "{}") {
|
||||||
|
attachment.value.validate()
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请上传附件',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
console.log('重新提交params', params)
|
console.log('重新提交params', params)
|
||||||
resubmitConclusion(params).then(res => {
|
resubmitConclusion(params).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -227,11 +251,6 @@ const getDetailInfo = async () => {
|
|||||||
}
|
}
|
||||||
const init = () => {
|
const init = () => {
|
||||||
getProjectConclusionProcess().then(res => {
|
getProjectConclusionProcess().then(res => {
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
|
||||||
})
|
|
||||||
processDiagramViewer.value = false
|
processDiagramViewer.value = false
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
@@ -246,6 +265,12 @@ const init = () => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
processDiagramViewer.value = true
|
processDiagramViewer.value = true
|
||||||
})
|
})
|
||||||
|
}else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
:formData="commonForm.formData"
|
:formData="commonForm.formData"
|
||||||
:data="commonForm"
|
:data="commonForm"
|
||||||
:processViewer="commonProvessViewer"
|
:processViewer="commonProvessViewer"
|
||||||
:companyOption="companyOption"
|
|
||||||
v-show="showActive == '00'"
|
v-show="showActive == '00'"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
/>
|
/>
|
||||||
@@ -24,52 +23,35 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import {getInfo} from "@/api/project-demand/index.js";
|
|
||||||
import {getSubCompOpt} from '@/api/user/user.js'
|
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||||
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||||
import {getMapProjectStateInfo} from '@/components/steps/api';
|
import {getMapProjectStateInfo} from '@/components/steps/api';
|
||||||
import {ElLoading} from "element-plus";
|
import {ElLoading, ElNotification} from "element-plus";
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const companyOption = ref([])
|
const showActive = ref()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const activeName = ref('first')
|
const activeName = ref('first')
|
||||||
const handleClick = (tab, event) => {
|
|
||||||
console.log(tab, event)
|
|
||||||
if (tab.index.value === 0) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const getCompanyOption = async () => {
|
|
||||||
const res = await getSubCompOpt()
|
|
||||||
companyOption.value = res.data
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const commonForm = ref({})
|
const commonForm = ref({})
|
||||||
const commonProvessViewer = ref(true)
|
const commonProvessViewer = ref(true)
|
||||||
|
|
||||||
const getAllInfo = async (state) => {
|
const getAllInfo = async (state) => {
|
||||||
const loading = ElLoading.service({fullscreen: true})
|
const loading = ElLoading.service({fullscreen: true})
|
||||||
try {
|
try {
|
||||||
state == '00' && (await getCompanyOption())
|
|
||||||
commonProvessViewer.value = false
|
commonProvessViewer.value = false
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const {data, code} = await getMapProjectStateInfo(route.query.projectId, state)
|
const {data, code,msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||||
// if(state == '00') {
|
|
||||||
// collectionData.value = data;
|
|
||||||
// } else if(state == '10') {
|
|
||||||
// summaryData.value = data;
|
|
||||||
// }
|
|
||||||
if(code===1000){
|
if(code===1000){
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
}else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if(data===undefined)return;
|
if(data===undefined)return;
|
||||||
commonForm.value = data
|
commonForm.value = data
|
||||||
@@ -80,18 +62,14 @@ const getAllInfo = async (state) => {
|
|||||||
processStore.refuseList.value = data.refuseList;
|
processStore.refuseList.value = data.refuseList;
|
||||||
processStore.passList.value = data.passList;
|
processStore.passList.value = data.passList;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// summaryProcessViewer.value = true
|
|
||||||
commonProvessViewer.value = true
|
commonProvessViewer.value = true
|
||||||
})
|
})
|
||||||
loading.close()
|
loading.close()
|
||||||
} catch {
|
} catch {
|
||||||
loading.close()
|
loading.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const showActive = ref()
|
|
||||||
|
|
||||||
const setDetail = (active) => {
|
const setDetail = (active) => {
|
||||||
showActive.value = active
|
showActive.value = active
|
||||||
getAllInfo(active)
|
getAllInfo(active)
|
||||||
|
|||||||
@@ -153,21 +153,45 @@ const tableConfig = reactive({
|
|||||||
{
|
{
|
||||||
prop: 'projectType',
|
prop: 'projectType',
|
||||||
label: '项目类型',
|
label: '项目类型',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'rdSubject',
|
prop: 'rdSubject',
|
||||||
label: '研发主体',
|
label: '研发主体',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'projectImpact',
|
prop: 'projectImpact',
|
||||||
label: '项目影响',
|
label: '项目影响',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'economicEstimate',
|
prop: 'economicEstimate',
|
||||||
label: '经济概况',
|
label: '经济概算(万元)',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -190,7 +214,7 @@ const tableConfig = reactive({
|
|||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
if (row.state !== null) {
|
if (row.state !== null) {
|
||||||
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
return (<Tag dictType={'project_filing'} value={row.state}/>)
|
||||||
} else {
|
} else {
|
||||||
return '--'
|
return '--'
|
||||||
}
|
}
|
||||||
@@ -208,12 +232,7 @@ const tableConfig = reactive({
|
|||||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
if (buttons.has("attachments")) {
|
if (buttons.has("attachments")) {
|
||||||
btn.push({
|
btn.push({label: '附件', prem: ['mosr:requirement:resubmit'], func: () => handleAttachment(row), type: 'primary'})
|
||||||
label: '附件',
|
|
||||||
prem: ['mosr:requirement:resubmit'],
|
|
||||||
func: () => handleAttachment(row),
|
|
||||||
type: 'primary'
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
if (buttons.has("entry")) {
|
if (buttons.has("entry")) {
|
||||||
btn.push({label: '结项', prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'})
|
btn.push({label: '结项', prem: ['mosr:requirement:del'], func: () => handleConclusion(row), type: 'primary'})
|
||||||
@@ -270,8 +289,8 @@ const handleAttachment = (row) => {
|
|||||||
router.push({
|
router.push({
|
||||||
name: 'Filing/attachment',
|
name: 'Filing/attachment',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId,
|
id: row.projectId,
|
||||||
projectId: row.projectId
|
requirementId:row.requirementId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
131
src/views/project-management/filing/upload.vue
Normal file
131
src/views/project-management/filing/upload.vue
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
<template>
|
||||||
|
<!-- <baseTitle title="标签名称"></baseTitle>-->
|
||||||
|
<!-- <el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">-->
|
||||||
|
<!-- <el-form-item label="标签名称" prop="tagName">-->
|
||||||
|
<!-- <el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
<baseTitle title="上传附件"></baseTitle>
|
||||||
|
<el-card style="width: 100%;margin: 15px 0">
|
||||||
|
<file-upload @getFile="getFile" />
|
||||||
|
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {uploadFilingAttachment} from "@/api/project-manage";
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const fileList = ref([])
|
||||||
|
const formData = ref({
|
||||||
|
tagName:''
|
||||||
|
})
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '附件名称',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const showTable = ref(true)
|
||||||
|
const name = ref(router.currentRoute.value.name)
|
||||||
|
const rules = reactive({
|
||||||
|
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag: '项目归档',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getFile = (val) => {
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
fileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId,
|
||||||
|
tag:item.tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
let files = []
|
||||||
|
fileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
mosrUserFileDtoList: files,
|
||||||
|
projectId: route.query.id,
|
||||||
|
}
|
||||||
|
let res = await uploadFilingAttachment(params)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
name: 'Filing/attachment',
|
||||||
|
query:{
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form :model="attachment" inline class="query-form">
|
<el-form :model="attachment" inline style="margin-top: 15px">
|
||||||
<el-form-item label="标签" prop="tag">
|
<el-form-item label="标签" prop="tag">
|
||||||
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 200px">
|
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in tagsOption"
|
v-for="item in tagsOption"
|
||||||
:key="item.label"
|
:key="item.value"
|
||||||
:label="item.value"
|
:label="item.label"
|
||||||
:value="item.label"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import {downloadFile} from "@/api/project-demand";
|
import {downloadFile} from "@/api/project-demand";
|
||||||
import {getImplementationAttachment,getTags} from "@/api/project-manage";
|
import {getTags,getImplementationAttachment} from "@/api/project-manage";
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@@ -80,7 +80,10 @@ const showTable = ref(true)
|
|||||||
const otherFileList = ref([])
|
const otherFileList = ref([])
|
||||||
const getTagsOption = () => {
|
const getTagsOption = () => {
|
||||||
if (!route.query.id) return
|
if (!route.query.id) return
|
||||||
getTags(route.query.id).then(res => {
|
let params={
|
||||||
|
projectId: route.query.id
|
||||||
|
}
|
||||||
|
getTags(params).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
@@ -94,13 +97,18 @@ const getTagsOption = () => {
|
|||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
let params
|
let params
|
||||||
if (attachment.tag) {
|
if (attachment.tag) {
|
||||||
|
tagsOption.value.forEach(item => {
|
||||||
|
if (item.value === attachment.tag) {
|
||||||
|
attachment.tag = item.label
|
||||||
|
}
|
||||||
|
})
|
||||||
params = {
|
params = {
|
||||||
projectId: route.query.id,
|
targetId: route.query.id,
|
||||||
tag: attachment.tag
|
tag: attachment.tag
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
params = {
|
params = {
|
||||||
projectId: route.query.id
|
targetId: route.query.id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getImplementationAttachment(params).then(res => {
|
getImplementationAttachment(params).then(res => {
|
||||||
@@ -135,7 +143,7 @@ const handleDownload = (row) => {
|
|||||||
a.click()
|
a.click()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// getTagsOption()
|
getTagsOption()
|
||||||
handleSearch()
|
handleSearch()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ const handleSubmit = (instance) => {
|
|||||||
if (!valid) return
|
if (!valid) return
|
||||||
if(JSON.stringify(file.value) === "{}"){
|
if(JSON.stringify(file.value) === "{}"){
|
||||||
attachment.value.validate()
|
attachment.value.validate()
|
||||||
|
return;
|
||||||
}else {
|
}else {
|
||||||
attachment.value.clearValidate()
|
attachment.value.clearValidate()
|
||||||
}
|
}
|
||||||
@@ -115,6 +116,17 @@ const handleSubmit = (instance) => {
|
|||||||
singleFile: singleFile,
|
singleFile: singleFile,
|
||||||
projectId:route.query.projectId,
|
projectId:route.query.projectId,
|
||||||
}
|
}
|
||||||
|
if (JSON.stringify(singleFile) === "{}") {
|
||||||
|
attachment.value.validate()
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请上传附件',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
console.log('params-提交',params)
|
console.log('params-提交',params)
|
||||||
let res = await projectCheck(params)
|
let res = await projectCheck(params)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -137,11 +149,12 @@ const handleResubmit = (instance) => {
|
|||||||
let singleFile = {}
|
let singleFile = {}
|
||||||
let otherFiles = []
|
let otherFiles = []
|
||||||
let fileArray
|
let fileArray
|
||||||
if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
// if (JSON.stringify(file.value) === "{}"||attachment.value.singleFile===null) {
|
||||||
attachment.value.validate()
|
// attachment.value.validate()
|
||||||
} else {
|
// return;
|
||||||
attachment.value.clearValidate()
|
// } else {
|
||||||
}
|
// attachment.value.clearValidate()
|
||||||
|
// }
|
||||||
if (attachment.value.singleFile!==null&&name.value === 'Implementation/edit') {
|
if (attachment.value.singleFile!==null&&name.value === 'Implementation/edit') {
|
||||||
singleFile = {
|
singleFile = {
|
||||||
fileId: attachment.value.singleFile.fileId
|
fileId: attachment.value.singleFile.fileId
|
||||||
@@ -166,6 +179,17 @@ const handleResubmit = (instance) => {
|
|||||||
singleFile: singleFile,
|
singleFile: singleFile,
|
||||||
projectId: route.query.projectId,
|
projectId: route.query.projectId,
|
||||||
}
|
}
|
||||||
|
if (JSON.stringify(singleFile) === "{}") {
|
||||||
|
attachment.value.validate()
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请上传附件',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
console.log('重新提交params', params)
|
console.log('重新提交params', params)
|
||||||
resubmitCheck(params).then(res => {
|
resubmitCheck(params).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -197,11 +221,6 @@ const getDetailInfo = async () => {
|
|||||||
}
|
}
|
||||||
const init = () => {
|
const init = () => {
|
||||||
getProjectCheckProcess(route.query.projectId).then(res => {
|
getProjectCheckProcess(route.query.projectId).then(res => {
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
|
||||||
})
|
|
||||||
processDiagramViewer.value = false
|
processDiagramViewer.value = false
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
@@ -216,6 +235,12 @@ const init = () => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
processDiagramViewer.value = true
|
processDiagramViewer.value = true
|
||||||
})
|
})
|
||||||
|
}else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
:formData="commonForm.formData"
|
:formData="commonForm.formData"
|
||||||
:data="commonForm"
|
:data="commonForm"
|
||||||
:processViewer="commonProvessViewer"
|
:processViewer="commonProvessViewer"
|
||||||
:companyOption="companyOption"
|
|
||||||
v-show="showActive == '00'"
|
v-show="showActive == '00'"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
/>
|
/>
|
||||||
@@ -21,65 +20,42 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import {getInfo} from "@/api/project-demand/index.js";
|
|
||||||
import {getSubCompOpt} from '@/api/user/user.js'
|
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||||
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||||
import { getMapProjectStateInfo } from '@/components/steps/api';
|
import { getMapProjectStateInfo } from '@/components/steps/api';
|
||||||
import { ElLoading } from "element-plus";
|
import {ElLoading, ElNotification} from "element-plus";
|
||||||
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||||
|
|
||||||
// const activeName = ref('first')
|
|
||||||
const handleClick = (tab, event) => {
|
|
||||||
console.log(tab, event)
|
|
||||||
if(tab.index.value === 0){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const activeName = ref('first')
|
const activeName = ref('first')
|
||||||
const collectionData = ref({})
|
|
||||||
const summaryData = ref({})
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const collectionProcessViewer = ref(true)
|
|
||||||
const summaryProcessViewer = ref(true)
|
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const companyOption = ref([])
|
|
||||||
const cuurentStep = ref()
|
const cuurentStep = ref()
|
||||||
route.query.step == '10' && (cuurentStep.value = 1)
|
route.query.step == '10' && (cuurentStep.value = 1)
|
||||||
route.query.step == '20' && (cuurentStep.value = 2)
|
route.query.step == '20' && (cuurentStep.value = 2)
|
||||||
route.query.step == '40' && (cuurentStep.value = 3)
|
route.query.step == '40' && (cuurentStep.value = 3)
|
||||||
route.query.step == '50' && (cuurentStep.value = 4)
|
route.query.step == '50' && (cuurentStep.value = 4)
|
||||||
const rules = reactive({
|
const showActive = ref()
|
||||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
|
||||||
})
|
|
||||||
const getCompanyOption = async () => {
|
|
||||||
const res = await getSubCompOpt()
|
|
||||||
companyOption.value = res.data
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const commonForm = ref({})
|
const commonForm = ref({})
|
||||||
const commonProvessViewer = ref(true)
|
const commonProvessViewer = ref(true)
|
||||||
|
|
||||||
const getAllInfo = async (state) => {
|
const getAllInfo = async (state) => {
|
||||||
const loading = ElLoading.service({fullscreen: true})
|
const loading = ElLoading.service({fullscreen: true})
|
||||||
try {
|
try {
|
||||||
state == '00' && ( await getCompanyOption() )
|
|
||||||
commonProvessViewer.value = false
|
commonProvessViewer.value = false
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
|
const { data, code ,msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||||
if(state == '00') {
|
|
||||||
collectionData.value = data;
|
|
||||||
} else if(state == '10') {
|
|
||||||
summaryData.value = data;
|
|
||||||
}
|
|
||||||
if(code===1000){
|
if(code===1000){
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
}else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
loading.close()
|
||||||
}
|
}
|
||||||
if(data===undefined)return;
|
if(data===undefined)return;
|
||||||
commonForm.value = data
|
commonForm.value = data
|
||||||
@@ -90,17 +66,14 @@ const getAllInfo = async (state) => {
|
|||||||
processStore.refuseList.value = data.refuseList;
|
processStore.refuseList.value = data.refuseList;
|
||||||
processStore.passList.value = data.passList;
|
processStore.passList.value = data.passList;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// summaryProcessViewer.value = true
|
|
||||||
commonProvessViewer.value = true
|
commonProvessViewer.value = true
|
||||||
})
|
})
|
||||||
loading.close()
|
loading.close()
|
||||||
} catch {
|
} catch {
|
||||||
loading.close()
|
loading.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const showActive = ref()
|
|
||||||
|
|
||||||
const setDetail = (active) => {
|
const setDetail = (active) => {
|
||||||
showActive.value = active
|
showActive.value = active
|
||||||
|
|||||||
@@ -158,21 +158,45 @@ const tableConfig = reactive({
|
|||||||
{
|
{
|
||||||
prop: 'projectType',
|
prop: 'projectType',
|
||||||
label: '项目类型',
|
label: '项目类型',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'rdSubject',
|
prop: 'rdSubject',
|
||||||
label: '研发主体',
|
label: '研发主体',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'projectImpact',
|
prop: 'projectImpact',
|
||||||
label: '项目影响',
|
label: '项目影响',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'economicEstimate',
|
prop: 'economicEstimate',
|
||||||
label: '经济概况',
|
label: '经济概算(万元)',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -218,12 +242,12 @@ const tableConfig = reactive({
|
|||||||
if (buttons.has("edit")) {
|
if (buttons.has("edit")) {
|
||||||
btn.push({label: '编辑', prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
// if (buttons.has("standing")) {
|
if (buttons.has("standing")) {
|
||||||
btn.push({label: '台账', prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
btn.push({label: '台账', prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
// if (buttons.has("attachments")) {
|
if (buttons.has("attachments")) {
|
||||||
btn.push({label: '附件', prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
btn.push({label: '附件', prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
if (buttons.has("viewAllocation")) {
|
if (buttons.has("viewAllocation")) {
|
||||||
btn.push({label: '查看分摊', prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
|
btn.push({label: '查看分摊', prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,20 +2,21 @@
|
|||||||
<baseTitle title="标签名称"></baseTitle>
|
<baseTitle title="标签名称"></baseTitle>
|
||||||
<el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">
|
<el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">
|
||||||
<el-form-item label="标签名称" prop="tagName">
|
<el-form-item label="标签名称" prop="tagName">
|
||||||
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 400px" v-if="showInput"/>
|
<el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px" v-if="showInput"/>
|
||||||
<el-select v-model="formData.tagName" placeholder="请选择标签" clearable filterable style="width: 200px" v-else>
|
<el-select v-model="formData.tagName" placeholder="请选择标签名称" clearable filterable style="width: 300px" v-else>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in tagsOption"
|
v-for="item in tagsOption"
|
||||||
:key="item.label"
|
:key="item.value"
|
||||||
:label="item.value"
|
:label="item.label"
|
||||||
:value="item.label"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-button type="primary" link @click="changeInput">{{showInput? '选择': '输入'}}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<baseTitle title="其他文件"></baseTitle>
|
<baseTitle title="其他文件"></baseTitle>
|
||||||
<el-card style="width: 100%;margin: 15px 0">
|
<el-card style="width: 100%;margin: 15px 0">
|
||||||
<file-upload @getFile="getFile"/>
|
<file-upload @getFile="getFile" :disabled="!formData.tagName" :title="!formData.tagName?'请先选择/输入标签!':''"/>
|
||||||
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
@@ -29,7 +30,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import {uploadAttachment} from "@/api/project-manage";
|
import {uploadAttachment,getTags} from "@/api/project-manage";
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
import {useTagsView} from '@/stores/tagsview.js'
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
|
||||||
@@ -86,9 +87,16 @@ const name = ref(router.currentRoute.value.name)
|
|||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||||
})
|
})
|
||||||
|
const changeInput=()=>{
|
||||||
|
showInput.value=!showInput.value;
|
||||||
|
formData.value.tagName='';
|
||||||
|
}
|
||||||
const getTagsOption = () => {
|
const getTagsOption = () => {
|
||||||
if (!route.query.id) return
|
if (!route.query.id) return
|
||||||
getTags(route.query.id).then(res => {
|
let params={
|
||||||
|
projectId: route.query.id
|
||||||
|
}
|
||||||
|
getTags(params).then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
@@ -102,6 +110,11 @@ const getTagsOption = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const compositeParam = (item) => {
|
const compositeParam = (item) => {
|
||||||
|
tagsOption.value.forEach(item => {
|
||||||
|
if (item.value == formData.value.tagName) {
|
||||||
|
formData.value.tagName = item.label
|
||||||
|
}
|
||||||
|
})
|
||||||
return {
|
return {
|
||||||
fileId: item.id,
|
fileId: item.id,
|
||||||
size: item.size,
|
size: item.size,
|
||||||
@@ -147,16 +160,25 @@ const handleSubmit = async (instance) => {
|
|||||||
})
|
})
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
await router.push({
|
if(route.query.type=='3'){
|
||||||
name: 'Implementation/attachment',
|
await router.push({
|
||||||
query:{
|
name: 'Filing/attachment',
|
||||||
id: route.query.id
|
query:{
|
||||||
}
|
id: route.query.id
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
await router.push({
|
||||||
|
name: 'Implementation/attachment',
|
||||||
|
query:{
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// getTagsOption()
|
getTagsOption()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="apply-block">
|
<div class="apply-block">
|
||||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||||
<baseTitle title="项目立项申请"></baseTitle>
|
<baseTitle title="项目立项"></baseTitle>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="前置流程">
|
<el-form-item label="前置流程">
|
||||||
@@ -93,7 +93,7 @@ const name = ref(router.currentRoute.value.name)
|
|||||||
const compositeParam = (item) => {
|
const compositeParam = (item) => {
|
||||||
let tag = ''
|
let tag = ''
|
||||||
if (name.value === 'Initiation/apply' || name.value === 'Initiation/edit') {
|
if (name.value === 'Initiation/apply' || name.value === 'Initiation/edit') {
|
||||||
tag = '项目立项申请'
|
tag = '项目立项'
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
fileId: item.id,
|
fileId: item.id,
|
||||||
@@ -128,6 +128,12 @@ const handleSubmit = (instance) => {
|
|||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (JSON.stringify(file.value) === "{}") {
|
if (JSON.stringify(file.value) === "{}") {
|
||||||
attachment.value.validate()
|
attachment.value.validate()
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请上传附件',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
attachment.value.clearValidate()
|
attachment.value.clearValidate()
|
||||||
}
|
}
|
||||||
@@ -142,6 +148,17 @@ const handleSubmit = (instance) => {
|
|||||||
otherFileList.value.forEach(item => {
|
otherFileList.value.forEach(item => {
|
||||||
files.push(getFileParam(item))
|
files.push(getFileParam(item))
|
||||||
})
|
})
|
||||||
|
if (JSON.stringify(singleFile) === "{}") {
|
||||||
|
attachment.value.validate()
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请上传附件',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
let params = {
|
let params = {
|
||||||
deploymentId: deploymentId.value,
|
deploymentId: deploymentId.value,
|
||||||
requirementId: route.query.id,
|
requirementId: route.query.id,
|
||||||
@@ -149,6 +166,7 @@ const handleSubmit = (instance) => {
|
|||||||
singleFile: singleFile,
|
singleFile: singleFile,
|
||||||
projectId: route.query.projectId,
|
projectId: route.query.projectId,
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('params', params)
|
console.log('params', params)
|
||||||
let res = await projectApply(params)
|
let res = await projectApply(params)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -168,11 +186,12 @@ const handleResubmit = async () => {
|
|||||||
let files = []
|
let files = []
|
||||||
let singleFile = {}
|
let singleFile = {}
|
||||||
let fileArray
|
let fileArray
|
||||||
if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
// if (JSON.stringify(file.value) === "{}" || attachment.value.singleFile === null) {
|
||||||
attachment.value.validate()
|
// attachment.value.validate()
|
||||||
} else {
|
// return;
|
||||||
attachment.value.clearValidate()
|
// } else {
|
||||||
}
|
// attachment.value.clearValidate()
|
||||||
|
// }
|
||||||
if (attachment.value.singleFile !== null && name.value === 'Initiation/edit') {
|
if (attachment.value.singleFile !== null && name.value === 'Initiation/edit') {
|
||||||
singleFile = {
|
singleFile = {
|
||||||
fileId: attachment.value.singleFile.fileId
|
fileId: attachment.value.singleFile.fileId
|
||||||
@@ -196,6 +215,17 @@ const handleResubmit = async () => {
|
|||||||
singleFile: singleFile,
|
singleFile: singleFile,
|
||||||
projectId: route.query.projectId,
|
projectId: route.query.projectId,
|
||||||
}
|
}
|
||||||
|
if (JSON.stringify(singleFile) === "{}") {
|
||||||
|
attachment.value.validate()
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请上传附件',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
console.log('params', params)
|
console.log('params', params)
|
||||||
let res = await resubmitApply(params)
|
let res = await resubmitApply(params)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -225,11 +255,6 @@ const getDetailInfo = async () => {
|
|||||||
}
|
}
|
||||||
const init = () => {
|
const init = () => {
|
||||||
getApplyProcess(route.query.projectId).then(res => {
|
getApplyProcess(route.query.projectId).then(res => {
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
|
||||||
})
|
|
||||||
processDiagramViewer.value = false
|
processDiagramViewer.value = false
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
@@ -244,6 +269,12 @@ const init = () => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
processDiagramViewer.value = true
|
processDiagramViewer.value = true
|
||||||
})
|
})
|
||||||
|
}else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
:formData="commonForm.formData"
|
:formData="commonForm.formData"
|
||||||
:data="commonForm"
|
:data="commonForm"
|
||||||
:processViewer="commonProvessViewer"
|
:processViewer="commonProvessViewer"
|
||||||
:companyOption="companyOption"
|
|
||||||
v-show="showActive == '00'"
|
v-show="showActive == '00'"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
/>
|
/>
|
||||||
@@ -22,101 +21,38 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import {getInfo} from "@/api/project-demand/index.js";
|
|
||||||
import {getSubCompOpt} from '@/api/user/user.js'
|
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||||
import {downloadFile} from "@/api/project-demand";
|
|
||||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||||
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
import ApprovalDetail from "@/components/DetailComponent/ApprovalDetail.vue";
|
||||||
import { getMapProjectStateInfo } from '@/components/steps/api';
|
import { getMapProjectStateInfo } from '@/components/steps/api';
|
||||||
import { ElLoading } from "element-plus";
|
import {ElLoading, ElNotification} from "element-plus";
|
||||||
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const activeName = ref('first')
|
const activeName = ref('first')
|
||||||
const collectionData = ref({})
|
|
||||||
const summaryData = ref({})
|
|
||||||
const collectionProcessViewer = ref(true)
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const active = ref(route.query.state)
|
const active = ref(route.query.state)
|
||||||
const summaryProcessViewer = ref(true)
|
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const companyOption = ref([])
|
const showActive = ref()
|
||||||
const rules = reactive({
|
|
||||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
|
||||||
})
|
|
||||||
const getCompanyOption = async () => {
|
|
||||||
const res = await getSubCompOpt()
|
|
||||||
companyOption.value = res.data
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDemandCollectionInfo = async () => {
|
|
||||||
if (!route.query.id) return
|
|
||||||
await getCompanyOption()
|
|
||||||
collectionProcessViewer.value = false
|
|
||||||
getInfo(route.query.id).then(res => {
|
|
||||||
let data = res.data
|
|
||||||
collectionData.value = data;
|
|
||||||
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(() => {
|
|
||||||
collectionProcessViewer.value = true
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const getDemandSummaryInfo = async () => {
|
|
||||||
if (!route.query.id) return
|
|
||||||
// await getCompanyOption()
|
|
||||||
summaryProcessViewer.value = false
|
|
||||||
getInfo(route.query.id).then(res => {
|
|
||||||
let data = res.data
|
|
||||||
summaryData.value = data;
|
|
||||||
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
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleClick = (tab, event) => {
|
|
||||||
console.log(tab, event)
|
|
||||||
if (tab.props.name === 'first') {
|
|
||||||
getDemandCollectionInfo()
|
|
||||||
} else if (tab.props.name === 'second') {
|
|
||||||
getDemandSummaryInfo()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// getDemandCollectionInfo()
|
|
||||||
|
|
||||||
const commonForm = ref({})
|
const commonForm = ref({})
|
||||||
const commonProvessViewer = ref(true)
|
const commonProvessViewer = ref(true)
|
||||||
|
|
||||||
const getAllInfo = async (state) => {
|
const getAllInfo = async (state) => {
|
||||||
const loading = ElLoading.service({fullscreen: true})
|
const loading = ElLoading.service({fullscreen: true})
|
||||||
try {
|
try {
|
||||||
state == '00' && ( await getCompanyOption() )
|
|
||||||
commonProvessViewer.value = false
|
commonProvessViewer.value = false
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const { data, code } = await getMapProjectStateInfo(route.query.projectId, state)
|
const { data, code,msg } = await getMapProjectStateInfo(route.query.projectId, state)
|
||||||
if(state == '00') {
|
|
||||||
collectionData.value = data;
|
|
||||||
} else if(state == '10') {
|
|
||||||
summaryData.value = data;
|
|
||||||
}
|
|
||||||
if(code===1000){
|
if(code===1000){
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
}else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
console.log(data, 'data--22');
|
|
||||||
if(data===undefined)return;
|
if(data===undefined)return;
|
||||||
commonForm.value = data
|
commonForm.value = data
|
||||||
processStore.setDesign(data)
|
processStore.setDesign(data)
|
||||||
@@ -126,17 +62,14 @@ const getAllInfo = async (state) => {
|
|||||||
processStore.refuseList.value = data.refuseList;
|
processStore.refuseList.value = data.refuseList;
|
||||||
processStore.passList.value = data.passList;
|
processStore.passList.value = data.passList;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// summaryProcessViewer.value = true
|
|
||||||
commonProvessViewer.value = true
|
commonProvessViewer.value = true
|
||||||
})
|
})
|
||||||
loading.close()
|
loading.close()
|
||||||
} catch {
|
} catch {
|
||||||
loading.close()
|
loading.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const showActive = ref()
|
|
||||||
|
|
||||||
const setDetail = (active) => {
|
const setDetail = (active) => {
|
||||||
showActive.value = active
|
showActive.value = active
|
||||||
|
|||||||
@@ -152,21 +152,45 @@ const tableConfig = reactive({
|
|||||||
{
|
{
|
||||||
prop: 'projectType',
|
prop: 'projectType',
|
||||||
label: '项目类型',
|
label: '项目类型',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'project_type'} value={row.projectType}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'rdSubject',
|
prop: 'rdSubject',
|
||||||
label: '研发主体',
|
label: '研发主体',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'projectImpact',
|
prop: 'projectImpact',
|
||||||
label: '项目影响',
|
label: '项目影响',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'economicEstimate',
|
prop: 'economicEstimate',
|
||||||
label: '经济概况',
|
label: '经济概算(万元)',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -187,7 +211,7 @@ const tableConfig = reactive({
|
|||||||
label: '状态',
|
label: '状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) =>{
|
currentRender: ({row, index}) => {
|
||||||
if (row.state !== null) {
|
if (row.state !== null) {
|
||||||
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||||
} else {
|
} else {
|
||||||
@@ -207,13 +231,13 @@ const tableConfig = reactive({
|
|||||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
if (buttons.has("edit")) {
|
if (buttons.has("edit")) {
|
||||||
btn.push({label: '编辑',prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: ['mosr:requirement:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
// if (buttons.has("delete")) {
|
// if (buttons.has("delete")) {
|
||||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||||
// }
|
// }
|
||||||
if (buttons.has("apply")) {
|
if (buttons.has("apply")) {
|
||||||
btn.push({label: '申请',prem: ['mosr:requirement:info'], func: () => handleApply(row), type: 'primary'})
|
btn.push({label: '立项',prem: ['mosr:requirement:info'], func: () => handleApply(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{width: '100%'}}>
|
<div style={{width: '100%'}}>
|
||||||
|
|||||||
131
src/views/project-management/initiation/upload.vue
Normal file
131
src/views/project-management/initiation/upload.vue
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
<template>
|
||||||
|
<!-- <baseTitle title="标签名称"></baseTitle>-->
|
||||||
|
<!-- <el-form :model="formData" ref="tagForm" label-width="auto" :rules="rules">-->
|
||||||
|
<!-- <el-form-item label="标签名称" prop="tagName">-->
|
||||||
|
<!-- <el-input v-model="formData.tagName" placeholder="请输入标签名称" style="width: 300px"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
<baseTitle title="上传附件"></baseTitle>
|
||||||
|
<el-card style="width: 100%;margin: 15px 0">
|
||||||
|
<file-upload @getFile="getFile"/>
|
||||||
|
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {uploadInitiationAttachment} from "@/api/project-manage";
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const fileList = ref([])
|
||||||
|
const formData = ref({
|
||||||
|
tagName:''
|
||||||
|
})
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '附件名称',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const showTable = ref(true)
|
||||||
|
const name = ref(router.currentRoute.value.name)
|
||||||
|
const rules = reactive({
|
||||||
|
tagName: [{required: true, message: '请输入标签名称', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
tag: '项目立项',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getFile = (val) => {
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
fileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId,
|
||||||
|
tag:item.tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
let files = []
|
||||||
|
fileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
|
mosrUserFileDtoList: files,
|
||||||
|
projectId: route.query.id,
|
||||||
|
}
|
||||||
|
let res = await uploadInitiationAttachment(params)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
await router.push({
|
||||||
|
name: 'Filing/attachment',
|
||||||
|
query:{
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -5,16 +5,16 @@
|
|||||||
<el-form-item label="专项资金名称" prop="name">
|
<el-form-item label="专项资金名称" prop="name">
|
||||||
<el-input v-model="formData.name" placeholder="请输入专项资金名称" clearable></el-input>
|
<el-input v-model="formData.name" placeholder="请输入专项资金名称" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="金额" prop="fundAmount">
|
<el-form-item label="金额(万元)" prop="fundAmount">
|
||||||
<el-input v-model="formData.fundAmount" placeholder="请输入金额" clearable></el-input>
|
<el-input v-model="formData.fundAmount" placeholder="请输入金额" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<baseTitle title="介绍"></baseTitle>
|
<baseTitle title="介绍"></baseTitle>
|
||||||
<Tinymce image-url="/notice/file" file-url="/notice/file" v-if="showTinymce"
|
<Tinymce image-url="/notice/file" file-url="/notice/file" v-if="showTinymce"
|
||||||
v-model:value="formData.introduce" height="300"/>
|
v-model:value="formData.introduce"/>
|
||||||
<baseTitle title="申请文件"></baseTitle>
|
<baseTitle title="申请文件"></baseTitle>
|
||||||
<file-upload @getFile="getFile"/>
|
<file-upload @getFile="getFile"/>
|
||||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable"
|
<fvTable style="width: 100%;max-height: 650px;" v-if="showTable"
|
||||||
:tableConfig="tableConfig" :data="formData.files"
|
:tableConfig="tableConfig" :data="formData.files"
|
||||||
:isSettingCol="false" :pagination="false">
|
:isSettingCol="false" :pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
@@ -34,11 +34,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
import {addFund, resubmitFund, getFundDetail} from "@/api/special-fund";
|
import {addFund, resubmitFund, getFundDetail,getFundProcess} from "@/api/special-fund";
|
||||||
import {useRouter} from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
import {useTagsView} from '@/stores/tagsview.js'
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
|
||||||
const tagsViewStore = useTagsView()
|
const tagsViewStore = useTagsView()
|
||||||
@@ -145,7 +145,7 @@ const submitParam = (item) => {
|
|||||||
introduce: item.introduce,
|
introduce: item.introduce,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
files: files,
|
files: files,
|
||||||
// deploymentId: processInstanceData.value.deploymentId
|
deploymentId: processInstanceData.value.deploymentId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
@@ -187,7 +187,8 @@ const handleResubmit = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
getWorkflowInfo().then(res => {
|
processDiagramViewer.value = false
|
||||||
|
getFundProcess().then(res => {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
@@ -216,7 +217,7 @@ const getDetailInfo = async () => {
|
|||||||
type: res.code === 1000 ? 'success' : 'error'
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
})
|
})
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
formData.value = res.data.formData
|
formData.value = res.data
|
||||||
showTinymce.value = false
|
showTinymce.value = false
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -228,7 +229,7 @@ const getDetailInfo = async () => {
|
|||||||
}
|
}
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
// await init()
|
await init()
|
||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
await getDetailInfo()
|
await getDetailInfo()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
import {getFundDetail} from "@/api/special-fund";
|
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import {getFundDetailProcess} from "@api/special-fund";
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const fundData = ref({})
|
const fundData = ref({})
|
||||||
@@ -17,7 +17,8 @@ const getDetail = async () => {
|
|||||||
const specialFundId = route.query.id
|
const specialFundId = route.query.id
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const {code, data, msg} = await getFundDetail(specialFundId)
|
fundProcessViewer.value = false
|
||||||
|
const {code, data, msg} = await getFundDetailProcess(specialFundId)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: msg,
|
message: msg,
|
||||||
@@ -26,17 +27,17 @@ const getDetail = async () => {
|
|||||||
if (code === 1000) {
|
if (code === 1000) {
|
||||||
fundData.value = data
|
fundData.value = data
|
||||||
loading.value = false
|
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(() => {
|
nextTick(() => {
|
||||||
|
fundProcessViewer.value = true
|
||||||
showTable.value = true
|
showTable.value = true
|
||||||
})
|
})
|
||||||
// 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;
|
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const searchConfig = reactive([
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '资金金额',
|
label: '资金金额(万元)',
|
||||||
prop: 'fundAmount',
|
prop: 'fundAmount',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
@@ -41,7 +41,7 @@ const searchConfig = reactive([
|
|||||||
placeholder: '请输入资金金额查询'
|
placeholder: '请输入资金金额查询'
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
label: '剩余金额',
|
label: '剩余金额(万元)',
|
||||||
prop: 'residualAmount',
|
prop: 'residualAmount',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
@@ -65,14 +65,19 @@ const tableConfig = reactive({
|
|||||||
label: '专项资金名称',
|
label: '专项资金名称',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'approveName',
|
||||||
|
label: '审批人',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'fundAmount',
|
prop: 'fundAmount',
|
||||||
label: '资金金额',
|
label: '资金金额(万元)',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'residualAmount',
|
prop: 'residualAmount',
|
||||||
label: '剩余金额',
|
label: '剩余金额(万元)',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -80,13 +85,18 @@ const tableConfig = reactive({
|
|||||||
label: '项目数量',
|
label: '项目数量',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'taskNode',
|
||||||
|
label: '当前节点',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'state',
|
prop: 'state',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
if (row.state == undefined) {
|
if (row.state == undefined||row.state == 0) {
|
||||||
return '--'
|
return '--'
|
||||||
} else {
|
} else {
|
||||||
return (<Tag dictType={'special_fund'} value={row.state}/>)
|
return (<Tag dictType={'special_fund'} value={row.state}/>)
|
||||||
@@ -100,13 +110,13 @@ const tableConfig = reactive({
|
|||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let btn = []
|
let btn = []
|
||||||
// let buttons = new Set(Array.from(row.buttons))
|
let buttons = new Set(Array.from(row.buttons))
|
||||||
// if (buttons.has("details")) {
|
if (buttons.has("details")) {
|
||||||
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
|
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
// if (buttons.has("edit")) {
|
if (buttons.has("edit")) {
|
||||||
btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||||
// }
|
}
|
||||||
// if (buttons.has("delete")) {
|
// if (buttons.has("delete")) {
|
||||||
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
// btn.push({label: '删除',prem: ['mosr:requirement:del'], func: () => handleDelete(row), type: 'primary'})
|
||||||
// }
|
// }
|
||||||
@@ -124,6 +134,13 @@ const tableConfig = reactive({
|
|||||||
</el-button>
|
</el-button>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
buttons.has("delete") ?
|
||||||
|
<popover-delete name={row.name} type={'专项资金'} btnType={'danger'}
|
||||||
|
perm={['mosr:requirement:del']}
|
||||||
|
onDelete={() => handleDelete(row)}/>
|
||||||
|
: ''
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
16
src/views/system/department/api/index.js
Normal file
16
src/views/system/department/api/index.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export const getInfoById = (id) => {
|
||||||
|
return request({
|
||||||
|
url: `/admin/mosr/department/info/${id}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const setDeptInfo = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/mosr/department/leader',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<template>
|
||||||
|
<el-button type="primary" link >
|
||||||
|
{{ modelValue || '请选择' }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, watch, watchEffect } from 'vue';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// const emit = defineEmits('update: modelValue')
|
||||||
|
|
||||||
|
const localText = ref('')
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
148
src/views/system/department/edit.vue
Normal file
148
src/views/system/department/edit.vue
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<template>
|
||||||
|
<baseTitle title="基础信息"></baseTitle>
|
||||||
|
<fv-Form :schema="schema" @getInstance="(e)=>form = e"></fv-Form>
|
||||||
|
<UserPicker ref="usrPickershipIds" @ok="editshipIds"></UserPicker>
|
||||||
|
<UserPicker ref="usrPickerHeadIds" @ok="editheadIds"></UserPicker>
|
||||||
|
<UserPicker ref="usrPickerDeputyIds" @ok="editdeputyIds"></UserPicker>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import { getInfoById, setDeptInfo } from './api'
|
||||||
|
import UserPicker from '../../workflow/process/common/UserPicker.vue';
|
||||||
|
import Ttsup from './components/ToolToShowUserPicker.vue'
|
||||||
|
import { reactive, ref } from 'vue';
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
|
const form = ref()
|
||||||
|
const usrPickershipIds = ref()
|
||||||
|
const usrPickerHeadIds = ref()
|
||||||
|
const usrPickerDeputyIds = ref()
|
||||||
|
|
||||||
|
const departmentChargeLeadershipNames = ref()
|
||||||
|
const departmentHeadNames = ref()
|
||||||
|
const departmentalDeputyNames = ref()
|
||||||
|
|
||||||
|
const departmentChargeLeadershipIds = ref()
|
||||||
|
|
||||||
|
const departmentHeadIds = ref()
|
||||||
|
|
||||||
|
const departmentalDeputyIds = ref()
|
||||||
|
|
||||||
|
const schema = reactive([
|
||||||
|
{
|
||||||
|
label: '部门名字:',
|
||||||
|
prop: 'departmentName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '部门标志:',
|
||||||
|
prop: 'departmentMark'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '部门分管领导:',
|
||||||
|
prop: 'departmentChargeLeadershipIds',
|
||||||
|
component: ()=><Ttsup modelValue={departmentChargeLeadershipNames.value} onClick={()=>{usrPickershipIds.value.showUserPicker()} } />
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '部门负责人:',
|
||||||
|
prop: 'departmentHeadIds',
|
||||||
|
component: ()=><Ttsup modelValue={departmentHeadNames.value} onClick={()=>{usrPickerHeadIds.value.showUserPicker()} } />
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '部门副职用户:',
|
||||||
|
prop: 'departmentalDeputyIds',
|
||||||
|
component: ()=><Ttsup modelValue={departmentalDeputyNames.value} onClick={()=>{departmentalDeputyIds.value.showUserPicker()} } />
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '创建时间:',
|
||||||
|
prop: 'createTime'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
const getInfo = async () => {
|
||||||
|
const { data } = await getInfoById(route.query.id)
|
||||||
|
console.log("🚀 ~ getInfo ~ res:", data)
|
||||||
|
const params = {
|
||||||
|
createTime: data.createTime,
|
||||||
|
departmentMark: data.departmentMark,
|
||||||
|
departmentName: data.departmentName
|
||||||
|
}
|
||||||
|
departmentChargeLeadershipIds.value = data.departmentChargeLeadershipIds
|
||||||
|
departmentHeadIds.value = data.departmentHeadIds
|
||||||
|
departmentalDeputyIds.value = data.departmentalDeputyIds
|
||||||
|
params.departmentChargeLeadershipIds = formatIdsToNames(data.departmentChargeLeadershipIds, data.departmentChargeLeadershipInfo, 'userId', 'nickName')
|
||||||
|
departmentChargeLeadershipNames.value = params.departmentChargeLeadershipIds
|
||||||
|
params.departmentHeadIds = formatIdsToNames(data.departmentHeadIds, data.departmentHeadInfo, 'userId', 'nickName')
|
||||||
|
departmentHeadNames.value = params.departmentHeadIds
|
||||||
|
params.departmentalDeputyIds = formatIdsToNames(data.departmentalDeputyIds, data.departmentalDeputyInfo, 'userId', 'nickName')
|
||||||
|
departmentalDeputyNames.value = params.departmentalDeputyIds
|
||||||
|
form.value.setValues(params)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const formatIdsToNames = (ids, infoList, key, viewKey) => {
|
||||||
|
const resArr = []
|
||||||
|
if(!ids?.length) return
|
||||||
|
ids.forEach(item=>{
|
||||||
|
infoList.forEach(v=>{
|
||||||
|
item == v[key] && resArr.push(v[viewKey])
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return resArr.join(',')
|
||||||
|
}
|
||||||
|
|
||||||
|
const editshipIds = (list) => {
|
||||||
|
// console.log("🚀 ~ editshipIds ~ list:", list)
|
||||||
|
const arr = list.map(item=>item.name)
|
||||||
|
departmentChargeLeadershipIds.value = list.map(item=>item.id)
|
||||||
|
departmentChargeLeadershipNames.value = arr.join(',')
|
||||||
|
setDeptmentInfo({
|
||||||
|
departmentChargeLeadershipIds: departmentChargeLeadershipIds.value,
|
||||||
|
departmentalDeputyIds: departmentalDeputyIds.value,
|
||||||
|
departmentHeadIds: departmentHeadIds.value
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const editheadIds = (list) => {
|
||||||
|
// console.log("🚀 ~ editshipIds ~ list:", list)
|
||||||
|
const arr = list.map(item=>item.name)
|
||||||
|
departmentHeadIds.value = list.map(item=>item.id)
|
||||||
|
departmentHeadNames.value = arr.join(',')
|
||||||
|
setDeptmentInfo({
|
||||||
|
departmentChargeLeadershipIds: departmentChargeLeadershipIds.value,
|
||||||
|
departmentalDeputyIds: departmentalDeputyIds.value,
|
||||||
|
departmentHeadIds: departmentHeadIds.value
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const editdeputyIds = (list) => {
|
||||||
|
// console.log("🚀 ~ editshipIds ~ list:", list)
|
||||||
|
const arr = list.map(item=>item.name)
|
||||||
|
departmentalDeputyIds.value = list.map(item=>item.id)
|
||||||
|
departmentalDeputyNames.value = arr.join(',')
|
||||||
|
setDeptmentInfo({
|
||||||
|
departmentChargeLeadershipIds: departmentChargeLeadershipIds.value,
|
||||||
|
departmentalDeputyIds: departmentalDeputyIds.value,
|
||||||
|
departmentHeadIds: departmentHeadIds.value
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const setDeptmentInfo = async ({ departmentChargeLeadershipIds = [], departmentHeadIds = [], departmentalDeputyIds = []}) => {
|
||||||
|
|
||||||
|
const params = {
|
||||||
|
departmentChargeLeadershipIds,
|
||||||
|
departmentHeadIds,
|
||||||
|
departmentalDeputyIds,
|
||||||
|
departmentId: route.query.id
|
||||||
|
}
|
||||||
|
const res = await setDeptInfo(params)
|
||||||
|
console.log(res.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
getInfo()
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -33,18 +33,25 @@
|
|||||||
<el-table-column prop="departmentCode" label="部门编码"/>
|
<el-table-column prop="departmentCode" label="部门编码"/>
|
||||||
<el-table-column prop="departmentName" label="部门名称"/>
|
<el-table-column prop="departmentName" label="部门名称"/>
|
||||||
<el-table-column prop="createTime" label="创建时间"/>
|
<el-table-column prop="createTime" label="创建时间"/>
|
||||||
|
<el-table-column prop="oper" label="操作">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button type="primary" v-perm="['admin:department:update']" link @click="goEdit(row.departmentId)">编辑</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {Search, Refresh,Sort} from "@element-plus/icons-vue";
|
import {Search, Refresh,Sort} from "@element-plus/icons-vue";
|
||||||
import {getDepartmentList} from "@/api/subsidiary";
|
import {getDepartmentList} from "@/api/subsidiary";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
const queryInstance = ref()
|
const queryInstance = ref()
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
departmentCode: '',
|
departmentCode: '',
|
||||||
departmentMark: '',
|
departmentMark: '',
|
||||||
departmentName: ''
|
departmentName: ''
|
||||||
})
|
})
|
||||||
|
const router = useRouter()
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const isExpand = ref(true)
|
const isExpand = ref(true)
|
||||||
const list = ref([])
|
const list = ref([])
|
||||||
@@ -80,6 +87,15 @@ const getList = () => {
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const goEdit = (id) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Mosrdeptedit',
|
||||||
|
query: {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
getList()
|
getList()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -135,18 +135,18 @@ const tableConfig = reactive({
|
|||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let btn = [{label: '修改', auth: auths.edit, func: ()=>handleEdit(row) , type: 'primary'}]
|
let btn = [{label: '修改', auth: auths.edit, func: ()=>handleEdit(row) , type: 'primary'}]
|
||||||
btn.push(
|
// btn.push(
|
||||||
{
|
// {
|
||||||
label: '分配用户',
|
// label: '分配用户',
|
||||||
auth: auths.edit,
|
// auth: auths.edit,
|
||||||
func: ()=>handleAssign(row),
|
// func: ()=>handleAssign(row),
|
||||||
type: 'primary'
|
// type: 'primary'
|
||||||
}
|
// }
|
||||||
)
|
// )
|
||||||
if(authStore.roles.includes('superAdmin')) {
|
if(authStore.roles.includes('superAdmin')) {
|
||||||
btn.push({label: '删除', auth: auths.edit, func: ()=>handleDel(row) , type: 'danger'})
|
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
|
||||||
} else if(!row.template) {
|
} else if(!row.template) {
|
||||||
btn.push({label: '删除', auth: auths.edit, func: ()=>handleDel(row) , type: 'danger'})
|
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -200,7 +200,7 @@ const formatDataScope = (dataScope) => {
|
|||||||
|
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/system/roleadd',
|
name: 'Roleadd',
|
||||||
query: {
|
query: {
|
||||||
isAdd: 1
|
isAdd: 1
|
||||||
}
|
}
|
||||||
@@ -209,7 +209,7 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
const handleEdit = (row) => {
|
const handleEdit = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/system/roleedit',
|
name: 'Roleedit',
|
||||||
query: {
|
query: {
|
||||||
id: row.roleId
|
id: row.roleId
|
||||||
}
|
}
|
||||||
@@ -221,14 +221,14 @@ const handleAssign = (row) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleDel = (row) => {
|
const handleDel = (row) => {
|
||||||
if (!(row.template && authStore.roles.includes('superAdmin'))) {
|
// if (!(row.template && authStore.roles.includes('superAdmin'))) {
|
||||||
ElNotification({
|
// ElNotification({
|
||||||
title: '提示',
|
// title: '提示',
|
||||||
message: '模版角色只能由超级管理员删除!',
|
// message: '模版角色只能由超级管理员删除!',
|
||||||
type: 'warning'
|
// type: 'warning'
|
||||||
})
|
// })
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
ElMessageBox.confirm('确定删除该条数据吗?', '确定删除', {
|
ElMessageBox.confirm('确定删除该条数据吗?', '确定删除', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
|||||||
@@ -119,10 +119,10 @@ const tableConfig = reactive({
|
|||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" link onClick={()=>handleEdit(row)}>编辑</el-button>
|
<el-button type="primary" link onClick={()=>handleEdit(row)} v-perm={['admin:user:edit']}>编辑</el-button>
|
||||||
{
|
{
|
||||||
row.userType != 0 ?
|
row.userType != 0 ?
|
||||||
<el-button type="danger" link onClick={()=>handleDel(row)}>删除</el-button> :
|
<el-button type="danger" link onClick={()=>handleDel(row)} v-perm={['admin:user:del']}>删除</el-button> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
<!-- <form-design ref="formDesign"/>-->
|
<!-- <form-design ref="formDesign"/>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-dialog v-model="validVisible" title="设置项检查">
|
<el-dialog v-model="validVisible" title="设置项检查">
|
||||||
<el-steps align-center :active="validStep" finish-status="success">
|
<el-steps align-center :active="validStep" finish-status="success">
|
||||||
@@ -89,7 +87,10 @@ const validOptions = ref([
|
|||||||
{title: '审批流程', description: '', icon: '', status: ''},
|
{title: '审批流程', description: '', icon: '', status: ''},
|
||||||
// {title: '扩展设置', description: '', icon: '', status: ''}
|
// {title: '扩展设置', description: '', icon: '', status: ''}
|
||||||
])
|
])
|
||||||
|
onActivated(()=>{
|
||||||
|
activeSelect.value = 'processDesign'
|
||||||
|
init()
|
||||||
|
})
|
||||||
|
|
||||||
const errTitle = computed(() => {
|
const errTitle = computed(() => {
|
||||||
if (validResult.finished && !validResult.success) {
|
if (validResult.finished && !validResult.success) {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ const processData = computed(() => {
|
|||||||
return processStore.getDesign()
|
return processStore.getDesign()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const validate = () => {
|
const validate = () => {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,27 +63,27 @@ const nullBlockClick = (e) => {
|
|||||||
disVisible()
|
disVisible()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const addApprovalNode = debounce(() => {
|
const addApprovalNode = () => {
|
||||||
emit('insertNode', "APPROVAL")
|
emit('insertNode', "APPROVAL")
|
||||||
disVisible()
|
disVisible()
|
||||||
})
|
}
|
||||||
|
|
||||||
const addCcNode = debounce(() => {
|
const addCcNode = () => {
|
||||||
emit('insertNode', "CC")
|
emit('insertNode', "CC")
|
||||||
disVisible()
|
disVisible()
|
||||||
})
|
}
|
||||||
const addDelayNode = debounce(() => {
|
const addDelayNode =() => {
|
||||||
emit('insertNode', "DELAY")
|
emit('insertNode', "DELAY")
|
||||||
disVisible()
|
disVisible()
|
||||||
})
|
}
|
||||||
const addConditionsNode = debounce(() => {
|
const addConditionsNode = () => {
|
||||||
emit('insertNode', "CONDITIONS")
|
emit('insertNode', "CONDITIONS")
|
||||||
disVisible()
|
disVisible()
|
||||||
})
|
}
|
||||||
const addConcurrentsNode = debounce(() => {
|
const addConcurrentsNode = () => {
|
||||||
emit('insertNode', "CONCURRENTS")
|
emit('insertNode', "CONCURRENTS")
|
||||||
disVisible()
|
disVisible()
|
||||||
})
|
}
|
||||||
const addTriggerNode = () => {
|
const addTriggerNode = () => {
|
||||||
emit('insertNode', "TRIGGER")
|
emit('insertNode', "TRIGGER")
|
||||||
disVisible()
|
disVisible()
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ const formPermsLoadMosr = (oldPermMap, perms) => {
|
|||||||
old.required = perm.required;
|
old.required = perm.required;
|
||||||
formPerms.value.push(old);
|
formPerms.value.push(old);
|
||||||
} else {
|
} else {
|
||||||
console.log(perm)
|
|
||||||
if (perm.id === 'fileList'){
|
if (perm.id === 'fileList'){
|
||||||
formPerms.value.push({
|
formPerms.value.push({
|
||||||
id: perm.id, //todo ,id 就是字段名称
|
id: perm.id, //todo ,id 就是字段名称
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="getList" :icon="Search">搜索</el-button>
|
<el-button type="primary" @click="getList" :icon="Search">搜索</el-button>
|
||||||
<el-button type="primary" v-perm="['rapid:regular:add']" @click="handleAdd" :icon="Plus">新增</el-button>
|
<el-button type="primary" @click="handleAdd" :icon="Plus">新增</el-button>
|
||||||
<el-button type="primary" @click="handleReset" :icon="Refresh" plain>重置</el-button>
|
<el-button type="primary" @click="handleReset" :icon="Refresh" plain>重置</el-button>
|
||||||
<el-button type="primary" v-perm="['rapid:regular:export']" @click="handleExport" :icon="Download" plain>导出
|
<el-button type="primary" @click="handleExport" :icon="Download" plain>导出
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ export default defineConfig({
|
|||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
// '/api/workflow': {
|
// '/api/workflow': {
|
||||||
// target: 'http://frp.feashow.cn:31800/',
|
// // target: 'http://frp.feashow.cn:31800/',
|
||||||
// // target: 'http://clay.frp.feashow.cn/',
|
// target: 'http://clay.frp.feashow.cn/',
|
||||||
// // target: 'http://192.168.31.175:8000',
|
// // target: 'http://192.168.31.175:8000',
|
||||||
// changeOrigin: true,
|
// changeOrigin: true,
|
||||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
|
|||||||
Reference in New Issue
Block a user