Merge branches 'master' and 'master' of http://git.feashow.cn/clay/mosr-web
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<el-form-item label="其他文件">
|
||||
<el-card style="width: 100%">
|
||||
<file-upload @getFile="getOtherFile" :showFileList="false"/>
|
||||
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
@@ -72,8 +72,9 @@ const tableConfig = reactive({
|
||||
]
|
||||
})
|
||||
const rules = reactive({
|
||||
attachment: [{required: true, message: '请上传附件', trigger: 'blur'}],
|
||||
attachment: [{required: true, message: '请上传附件', trigger: ['blur','change']}],
|
||||
})
|
||||
const applyForm=ref()
|
||||
const props = defineProps({
|
||||
showFileList: {
|
||||
type: Boolean,
|
||||
@@ -117,7 +118,7 @@ const deleteOtherFile = (row) => {
|
||||
deleteFile(row.fileId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success("删除成功");
|
||||
otherFileList.value.splice(otherFileList.value.findIndex((item) => item.id === row.fileId), 1);
|
||||
props.otherFileList.splice(props.otherFileList.findIndex((item) => item.id === row.fileId), 1);
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
@@ -133,6 +134,14 @@ const handleDownload = (row) => {
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
validate(){
|
||||
return applyForm.value.validate()
|
||||
},
|
||||
clearValidate(){
|
||||
return applyForm.value.clearValidate()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,36 +1,70 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<fvForm v-if="showForm" ref="form" :schema="schame">
|
||||
</fvForm>
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<el-card style="width: 100%">
|
||||
<div v-html="formData.collectExplain">
|
||||
<el-form :model="formData" ref="form" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司">
|
||||
<span>{{ formData.companyIds }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="征集类型">
|
||||
<span>{{ formData.collectType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="截止时间">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-card style="width: 100%">
|
||||
<div v-html="formData.collectExplain">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="附件列表"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height: 200px" v-if="processViewer" :tableConfig="tableConfig"
|
||||
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="formData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
v-model="formData.auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<baseTitle title="附件列表"></baseTitle>
|
||||
<fvTable style="width: 100%;max-height: 200px" v-if="processViewer" :tableConfig="tableConfig"
|
||||
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
v-model="formData.auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -38,8 +72,9 @@
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {matterTree} from '@/utils/matterTree.js';
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const emit = defineEmits(['getInfo','download'])
|
||||
const emit = defineEmits(['getInfo'])
|
||||
const form = ref()
|
||||
const showForm = ref(true)
|
||||
const loading = ref(false)
|
||||
@@ -64,36 +99,6 @@ const props = defineProps({
|
||||
default: []
|
||||
},
|
||||
})
|
||||
const schame = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '名称',
|
||||
prop: 'requirementName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '所属公司',
|
||||
prop: 'companyIds',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
}, {
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
}, {
|
||||
label: '截止时间',
|
||||
prop: 'deadline',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
@@ -132,15 +137,17 @@ const tableConfig = reactive({
|
||||
]
|
||||
})
|
||||
|
||||
const init = (newVal) => {
|
||||
newVal.companyIds = getDataSourceOptionItem(newVal.companyIds)
|
||||
form.value.setValues(newVal)
|
||||
}
|
||||
const getInfo = () => {
|
||||
emit('getInfo')
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
emit('download',row)
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const getDataSourceOptionItem = (val) => {
|
||||
if (val instanceof Array) {
|
||||
@@ -155,7 +162,8 @@ watch(() => props.companyOption, (newVal) => {
|
||||
}, {deep: true})
|
||||
watch(() => props.formData, (newVal) => {
|
||||
if (newVal) {
|
||||
init(newVal)
|
||||
newVal.companyIds = getDataSourceOptionItem(newVal.companyIds)
|
||||
props.formData=newVal
|
||||
}
|
||||
}, {deep: true})
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
|
||||
210
src/components/DetailComponent/SummaryDetail.vue
Normal file
210
src/components/DetailComponent/SummaryDetail.vue
Normal file
@@ -0,0 +1,210 @@
|
||||
<template>
|
||||
<el-form :model="formData" ref="summaryForm">
|
||||
<el-row gutter="50">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" prop="requirementName">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专项资金" prop="specialFund">
|
||||
<span>{{ formData.specialFund }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<span>{{ formData.startTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司" prop="companyName">
|
||||
<span>{{ formData.companyName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<span>{{ formData.projectType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<span>{{ formData.endTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出资类型" prop="investmentType">
|
||||
<span>{{ formData.investmentType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目影响" prop="projectImpact">
|
||||
<span>{{ formData.projectImpact }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属业务板块" prop="businessSegment">
|
||||
<span>{{ formData.businessSegment }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预期成果形式" prop="resultForm">
|
||||
<span>{{ formData.resultForm }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预期技术标准制定" prop="technicalStandard">
|
||||
<span>{{ formData.technicalStandard }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||
<span>{{ formData.industryUniversityResearch }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||
<span>{{ formData.governmentDeclaration }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="知识产权状况" prop="intellectualProperty">
|
||||
<span>{{ formData.intellectualProperty }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="发明专利(项)" prop="inventionPatent">
|
||||
<span>{{ formData.inventionPatent }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="实用性新型专利(项)" prop="newPatent">
|
||||
<span>{{ formData.newPatent }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="软件著作权(项)" prop="softwareCopyright">
|
||||
<span>{{ formData.softwareCopyright }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="著作权(项)" prop="copyright">
|
||||
<span>{{ formData.copyright }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="其他(项)" prop="other">
|
||||
<span>{{ formData.other }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="经济概算(万元)" prop="economicEstimate">
|
||||
<span>{{ formData.economicEstimate }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(万元)" prop="specialFundAmount">
|
||||
<span>{{ formData.specialFundAmount }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="现有业务描述" prop="serviceDescription">
|
||||
<span>{{ formData.serviceDescription }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="研发项目关键内容描述" prop="contentDescription">
|
||||
<span>{{ formData.contentDescription }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="需求上报申请书">
|
||||
<el-button type="primary" link @click="handleDownload(formData.fileList)">{{formData.fileList}}</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="需求上报附件">
|
||||
<fvTable style="width: 100%;max-height: 400px;" v-if="processViewer" :tableConfig="tableConfig"
|
||||
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
data: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
processViewer: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
})
|
||||
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',
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
const handleDownload = (fileList) => {
|
||||
// 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()
|
||||
// })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.el-table--fit) {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -12,9 +12,10 @@
|
||||
<component :is="user.icon"/>
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>{{user.operationTime}}
|
||||
</div>
|
||||
<div class="username" v-if="user.auditOpinion">
|
||||
<Tooltip :content="user.auditOpinion" placement="bottom-start" width="90"/>
|
||||
<div style="margin-bottom: 10px;color: #909399">{{user.operationTime}}</div>
|
||||
<Tooltip :content="user.auditOpinion" placement="bottom-start" width="150"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -61,10 +61,17 @@
|
||||
<script setup lang="jsx">
|
||||
import {useAuthStore} from '@/stores/userstore.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getWorkflowInfo, addRequirement, getFormInfo, resubmit, deleteFile,downloadFile} from "@/api/project-demand/index.js";
|
||||
import {
|
||||
getWorkflowInfo,
|
||||
addRequirement,
|
||||
getFormInfo,
|
||||
resubmit,
|
||||
deleteFile,
|
||||
downloadFile
|
||||
} from "@/api/project-demand/index.js";
|
||||
import FileUpload from "@/components/FileUpload.vue";
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {ElMessage, ElMessageBox,ElNotification} from "element-plus";
|
||||
import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
|
||||
import {useRoute, useRouter} from 'vue-router'
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
@@ -151,15 +158,15 @@ const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href=URL.createObjectURL(blob)
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
let tag=''
|
||||
if(!formData.value.collectType&&router.currentRoute.value.name==='Collection/add'){
|
||||
tag='需求征集'
|
||||
let tag = ''
|
||||
if (!formData.value.collectType && router.currentRoute.value.name === 'Collection/add') {
|
||||
tag = '需求征集'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
@@ -191,7 +198,7 @@ const init = async () => {
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if(res.code === 1000){
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
processInstanceData.value = data
|
||||
processStore.setDesign(data)
|
||||
@@ -203,19 +210,26 @@ const init = async () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
}
|
||||
})
|
||||
}
|
||||
const submitParam=(item)=>{
|
||||
const submitParam = (item) => {
|
||||
let files = []
|
||||
item.fileList.forEach(item => {
|
||||
let obj = {
|
||||
fileId: item.fileId,
|
||||
}
|
||||
files.push(obj)
|
||||
})
|
||||
return {
|
||||
collectExplain: item.collectExplain,
|
||||
collectType: item.collectType,
|
||||
companyIds: item.companyIds,
|
||||
deadline: item.deadline,
|
||||
requirementId: item.requirementId?item.requirementId:0,
|
||||
requirementId: item.requirementId ? item.requirementId : 0,
|
||||
requirementName: item.requirementName,
|
||||
files: item.fileList,
|
||||
files: files,
|
||||
deploymentId: processInstanceData.value.deploymentId
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,221 +1,223 @@
|
||||
<template>
|
||||
<baseTitle title="需求上报"></baseTitle>
|
||||
<el-form :model="formData" ref="summaryForm" :rules="rules">
|
||||
<el-row gutter="50">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" prop="projectName">
|
||||
<el-input v-model="formData.projectName" placeholder="请输入名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专项资金" prop="specialFund">
|
||||
<el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-config-provider>
|
||||
<el-date-picker
|
||||
v-model="formData.startTime"
|
||||
type="datetime"
|
||||
placeholder="截止时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司" prop="companyName">
|
||||
<el-input v-model="formData.companyName" placeholder="请输入所属公司" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-config-provider>
|
||||
<el-date-picker
|
||||
v-model="formData.endTime"
|
||||
type="datetime"
|
||||
placeholder="截止时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出资类型" prop="investmentType">
|
||||
<el-select v-model="formData.investmentType" placeholder="请选择出资类型" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目影响" prop="projectImpact">
|
||||
<el-select v-model="formData.projectImpact" placeholder="请选择项目影响" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属业务板块" prop="businessSegment">
|
||||
<el-select v-model="formData.businessSegment" placeholder="请选择所属业务板块" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预期成果形式" prop="resultForm">
|
||||
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预期技术标准制定" prop="technicalStandard">
|
||||
<el-select v-model="formData.technicalStandard" placeholder="请选择预期技术标准制定" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||
<el-select v-model="formData.industryUniversityResearch" placeholder="请选择产学研联合" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||
<el-select v-model="formData.governmentDeclaration" placeholder="请选择开展政府申报" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="知识产权状况" prop="intellectualProperty">
|
||||
<el-select v-model="formData.intellectualProperty" placeholder="请选择知识产权状况" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="发明专利(项)" prop="inventionPatent">
|
||||
<el-input v-model="formData.inventionPatent" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="实用性新型专利(项)" prop="newPatent">
|
||||
<el-input v-model="formData.newPatent" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="软件著作权(项)" prop="softwareCopyright">
|
||||
<el-input v-model="formData.softwareCopyright" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="著作权(项)" prop="copyright">
|
||||
<el-input v-model="formData.copyright" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="其他(项)" prop="other">
|
||||
<el-input v-model="formData.other" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="经济概算(万元)" prop="economicEstimate">
|
||||
<el-input v-model="formData.economicEstimate" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(万元)" prop="specialFundAmount">
|
||||
<el-input v-model="formData.specialFundAmount" clearable :disabled="formData.specialFund===null"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="现有业务描述" prop="serviceDescription">
|
||||
<el-input v-model="formData.serviceDescription" type="textarea" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="研发项目关键内容描述" prop="contentDescription">
|
||||
<el-input v-model="formData.contentDescription" type="textarea" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- <fvForm :schema="schame" @getInstance="getInstance"></fvForm>-->
|
||||
<div class="oper-page-btn">
|
||||
<el-button type="primary" @click="staging">存为草稿</el-button>
|
||||
<el-button type="primary" @click="handleSubmit(summaryForm)">发布</el-button>
|
||||
<div class="detail-block">
|
||||
<baseTitle title="需求上报"></baseTitle>
|
||||
<el-form :model="formData" ref="summaryForm" :rules="rules">
|
||||
<el-row gutter="50">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" prop="projectName">
|
||||
<el-input v-model="formData.projectName" placeholder="请输入名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专项资金" prop="specialFund">
|
||||
<el-select v-model="formData.specialFund" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-config-provider>
|
||||
<el-date-picker
|
||||
v-model="formData.startTime"
|
||||
type="datetime"
|
||||
placeholder="截止时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司" prop="companyName">
|
||||
<el-input v-model="formData.companyName" placeholder="请输入所属公司" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-config-provider>
|
||||
<el-date-picker
|
||||
v-model="formData.endTime"
|
||||
type="datetime"
|
||||
placeholder="截止时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出资类型" prop="investmentType">
|
||||
<el-select v-model="formData.investmentType" placeholder="请选择出资类型" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目影响" prop="projectImpact">
|
||||
<el-select v-model="formData.projectImpact" placeholder="请选择项目影响" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属业务板块" prop="businessSegment">
|
||||
<el-select v-model="formData.businessSegment" placeholder="请选择所属业务板块" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预期成果形式" prop="resultForm">
|
||||
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预期技术标准制定" prop="technicalStandard">
|
||||
<el-select v-model="formData.technicalStandard" placeholder="请选择预期技术标准制定" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||
<el-select v-model="formData.industryUniversityResearch" placeholder="请选择产学研联合" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||
<el-select v-model="formData.governmentDeclaration" placeholder="请选择开展政府申报" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="知识产权状况" prop="intellectualProperty">
|
||||
<el-select v-model="formData.intellectualProperty" placeholder="请选择知识产权状况" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('todo_type')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="发明专利(项)" prop="inventionPatent">
|
||||
<el-input v-model="formData.inventionPatent" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="实用性新型专利(项)" prop="newPatent">
|
||||
<el-input v-model="formData.newPatent" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="软件著作权(项)" prop="softwareCopyright">
|
||||
<el-input v-model="formData.softwareCopyright" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="著作权(项)" prop="copyright">
|
||||
<el-input v-model="formData.copyright" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="其他(项)" prop="other">
|
||||
<el-input v-model="formData.other" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="经济概算(万元)" prop="economicEstimate">
|
||||
<el-input v-model="formData.economicEstimate" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(万元)" prop="specialFundAmount">
|
||||
<el-input v-model="formData.specialFundAmount" clearable :disabled="formData.specialFund===null"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="现有业务描述" prop="serviceDescription">
|
||||
<el-input v-model="formData.serviceDescription" type="textarea" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="研发项目关键内容描述" prop="contentDescription">
|
||||
<el-input v-model="formData.contentDescription" type="textarea" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true"/>
|
||||
<!-- <fvForm :schema="schame" @getInstance="getInstance"></fvForm>-->
|
||||
<div class="oper-page-btn">
|
||||
<el-button type="primary" @click="staging">存为草稿</el-button>
|
||||
<el-button type="primary" @click="handleSubmit(summaryForm)">发布</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {markRaw} from 'vue';
|
||||
import FileUpload from './components/FileUpload.vue';
|
||||
import {getProcessInfo, requirementReported} from "./api";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
@@ -225,9 +227,13 @@ const cacheStore = useCacheStore()
|
||||
const router = useRouter()
|
||||
const tagsViewStore = useTagsView()
|
||||
const summaryForm = ref()
|
||||
const attachment = ref()
|
||||
const deploymentId = ref()
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const fileList = ref([])
|
||||
const formData = ref({
|
||||
specialFund:null
|
||||
specialFund: null
|
||||
})
|
||||
const rules = reactive({
|
||||
projectName: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||
@@ -250,302 +256,66 @@ const rules = reactive({
|
||||
copyright: [{required: true, message: '请输入著作权', trigger: 'blur'}],
|
||||
other: [{required: true, message: '请输入其他', trigger: 'blur'}],
|
||||
economicEstimate: [{required: true, message: '请输入经济概算', trigger: 'blur'}],
|
||||
specialFundAmount: [{required: true, message: '请输入专项资金', trigger: 'blur'}],
|
||||
// specialFundAmount: [{required: true, message: '请输入专项资金', trigger: 'blur'}],
|
||||
serviceDescription: [{required: true, message: '请输入现有业务描述', trigger: 'blur'}],
|
||||
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}],
|
||||
contentDescription: [{required: true, message: '请输入研发项目关键内容描述', trigger: 'blur'}]
|
||||
})
|
||||
const schame = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '名称',
|
||||
prop: 'projectName',
|
||||
component: 'el-input',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '专项资金',
|
||||
prop: 'specialFund',
|
||||
component: markRaw(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择专项资金',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
cacheKey: 'todo_type'
|
||||
},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
type: 'datetime',
|
||||
format: 'YYYY-MM-DD HH:mm:ss'
|
||||
},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '所属公司',
|
||||
prop: 'companyName',
|
||||
component: 'el-input',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
component: markRaw(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
cacheKey: 'todo_type'
|
||||
},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
type: 'datetime',
|
||||
format: 'YYYY-MM-DD HH:mm:ss'
|
||||
},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'investmentType',
|
||||
component: markRaw(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
cacheKey: 'todo_type'
|
||||
},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectImpact',
|
||||
component: markRaw(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
cacheKey: 'todo_type'
|
||||
},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'businessSegment',
|
||||
component: markRaw(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
cacheKey: 'todo_type'
|
||||
},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '预期成果形式',
|
||||
prop: 'resultForm',
|
||||
component: markRaw(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
cacheKey: 'todo_type'
|
||||
},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '预期技术标准制定',
|
||||
prop: 'technicalStandard',
|
||||
component: markRaw(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
cacheKey: 'todo_type'
|
||||
},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'industryUniversityResearch',
|
||||
component: markRaw(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
cacheKey: 'todo_type'
|
||||
},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'governmentDeclaration',
|
||||
component: markRaw(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
cacheKey: 'todo_type'
|
||||
},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '知识产权状况',
|
||||
prop: 'intellectualProperty',
|
||||
component: markRaw(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择项目类型',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
cacheKey: 'todo_type'
|
||||
},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
label: '发明专利',
|
||||
prop: 'inventionPatent',
|
||||
component: 'el-input',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '实用性新型专利',
|
||||
prop: 'newPatent',
|
||||
component: 'el-input',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '软件著作权',
|
||||
prop: 'softwareCopyright',
|
||||
component: 'el-input',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '著作权',
|
||||
prop: 'copyright',
|
||||
component: 'el-input',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '其他',
|
||||
prop: 'other',
|
||||
component: 'el-input',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}, {
|
||||
label: '经济概算',
|
||||
prop: 'economicEstimate',
|
||||
component: 'el-input',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
}, {
|
||||
label: '申请公司总部科技创新专项资金',
|
||||
prop: 'specialFundAmount',
|
||||
component: 'el-input',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
label: '现有业务描述',
|
||||
prop: 'serviceDescription',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
type: 'textarea'
|
||||
},
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '研发项目关键内容描述',
|
||||
prop: 'contentDescription',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
type: 'textarea'
|
||||
},
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
}
|
||||
// {
|
||||
// label: '',
|
||||
// prop: 'fileList',
|
||||
// component: markRaw(FileUpload),
|
||||
// props: {
|
||||
// url: '',
|
||||
// tip: '上传txt文件'
|
||||
// },
|
||||
// colProps: {
|
||||
// span: 24
|
||||
// }
|
||||
// }
|
||||
]
|
||||
})
|
||||
|
||||
const compositeParam = (item, type) => {
|
||||
let tag = ''
|
||||
if (router.currentRoute.value.name === 'Summary/add') {
|
||||
tag = '需求汇总'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
type: type,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
processNodeTag: null,
|
||||
tag: tag
|
||||
}
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
let fileObj = compositeParam(val, 1)
|
||||
fileList.value.push(fileObj)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val, 2)
|
||||
otherFileList.value.push(fileObj)
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
type: item.type
|
||||
}
|
||||
}
|
||||
const handleSubmit = async (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid, fields) => {
|
||||
if(fileList.value.length===0){
|
||||
attachment.value.validate()
|
||||
}else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (!valid) return
|
||||
let files = []
|
||||
fileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value
|
||||
deploymentId: deploymentId.value,
|
||||
files: files
|
||||
}
|
||||
let res = await requirementReported(params)
|
||||
ElNotification({
|
||||
@@ -578,3 +348,15 @@ init()
|
||||
const staging = async () => {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.detail-block {
|
||||
overflow: hidden;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
:deep(.el-table--fit) {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
35
src/views/project-demand/summary/detail.vue
Normal file
35
src/views/project-demand/summary/detail.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<summary-detail :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getInfo} from "@/api/project-demand";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
const route = useRoute()
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const getDemandSummaryInfo = async () => {
|
||||
// if (!route.query.id) return
|
||||
// await getCompanyOption()
|
||||
summaryProcessViewer.value = false
|
||||
getInfo(101).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
|
||||
})
|
||||
})
|
||||
}
|
||||
getDemandSummaryInfo()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -49,7 +49,7 @@ const searchConfig = reactive([
|
||||
},
|
||||
{
|
||||
label: '起止时间',
|
||||
prop: 'time',
|
||||
prop: 'startTime',
|
||||
component: 'el-date-picker',
|
||||
props: {},
|
||||
colProps: {}
|
||||
@@ -80,22 +80,22 @@ const tableConfig = reactive({
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'companyINames',
|
||||
label: '所属公司',
|
||||
prop: 'undertaker',
|
||||
label: '承办单位',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'collectType',
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'productMainBody',
|
||||
prop: 'rdSubject',
|
||||
label: '研发主体',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectEffect',
|
||||
prop: 'projectImpact',
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
},
|
||||
@@ -105,24 +105,27 @@ const tableConfig = reactive({
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'deadline',
|
||||
prop: 'startTime',
|
||||
label: '起止时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '发布状态',
|
||||
align: 'center'
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'demand_collection'} value={row.state}/>)
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type={'primary'} link onClick={()=>{}} >详情</el-button>
|
||||
<el-button type={'primary'} link onClick={()=>{}} >上报</el-button>
|
||||
<el-button type={'primary'} link onClick={()=>handleDetail()} >详情</el-button>
|
||||
<el-button type={'primary'} link onClick={()=>handleAdd()} >上报</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -131,7 +134,7 @@ const tableConfig = reactive({
|
||||
api: '/workflow/mosr/requirement/collect',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '新增上报', key: 'add', type: 'primary', auth: ''},
|
||||
// {name: '新增上报', key: 'add', type: 'primary', auth: ''},
|
||||
{name: '年度计划导出', key: '_export', type: 'primary', auth: ''},
|
||||
{name: '经费预算生成', key: 'preMonty', type: 'primary', auth: ''},
|
||||
]
|
||||
@@ -161,6 +164,12 @@ const handleAdd = () => {
|
||||
query: {}
|
||||
})
|
||||
}
|
||||
const handleDetail = () => {
|
||||
router.push({
|
||||
name: 'Summary/detail',
|
||||
query: {}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -7,10 +7,13 @@
|
||||
@tab-click="handleClick"
|
||||
>
|
||||
<el-tab-pane label="需求征集" name="first">
|
||||
<collection-detail :formData="collectionData.formData" :data="collectionData" :processViewer="processViewer"
|
||||
:companyOption="companyOption" @getInfo="getDemandCollectionInfo" @download="downloadDetailFile"/>
|
||||
<collection-detail :formData="collectionData.formData" :data="collectionData"
|
||||
:processViewer="collectionProcessViewer"
|
||||
:companyOption="companyOption" @getInfo="getDemandCollectionInfo"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="需求上报" name="second">
|
||||
<summary-detail :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="需求上报" name="second"></el-tab-pane>
|
||||
<el-tab-pane label="项目立项" name="third" :disabled="true"></el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
@@ -22,14 +25,19 @@ import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import SummaryDetail from "@/components/DetailComponent/SummaryDetail.vue";
|
||||
|
||||
const route = useRoute()
|
||||
const activeName = ref('first')
|
||||
const collectionData = ref({})
|
||||
const processViewer = ref(false)
|
||||
const summaryData = ref({})
|
||||
const collectionProcessViewer = ref(true)
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const companyOption = ref([])
|
||||
|
||||
const rules = reactive({
|
||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||
})
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
@@ -38,6 +46,7 @@ const getCompanyOption = async () => {
|
||||
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;
|
||||
@@ -48,23 +57,35 @@ const getDemandCollectionInfo = async () => {
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
processViewer.value = true
|
||||
collectionProcessViewer.value = true
|
||||
})
|
||||
})
|
||||
}
|
||||
const downloadDetailFile = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
const 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.index.value === 0) {
|
||||
if (tab.props.name === 'first') {
|
||||
getDemandCollectionInfo()
|
||||
} else if (tab.props.name === 'second') {
|
||||
getDemandSummaryInfo()
|
||||
}
|
||||
}
|
||||
getDemandCollectionInfo()
|
||||
|
||||
@@ -1,323 +0,0 @@
|
||||
<template>
|
||||
<div v-loading="loading" class="add-block">
|
||||
<baseTitle title="需求征集信息录入"></baseTitle>
|
||||
<el-form :model="formData" inline class="query-form" ref="demandForm" :rules="rules">
|
||||
<div class="left-info">
|
||||
<el-form-item label="名称" prop="requirementName">
|
||||
<el-input v-model="formData.requirementName" placeholder="请输入名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属公司" prop="companyIds">
|
||||
<el-tree-select v-model="formData.companyIds" :data="companyOption" style="width: 100%;"
|
||||
filterable clearable :check-strictly="true" multiple/>
|
||||
</el-form-item>
|
||||
<el-form-item label="征集类型" prop="collectType">
|
||||
<el-select v-model="formData.collectType" placeholder="征集类型" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in typeOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="截止时间" prop="deadline">
|
||||
<el-config-provider>
|
||||
<el-date-picker
|
||||
v-model="formData.deadline"
|
||||
type="datetime"
|
||||
placeholder="截止时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<Tinymce image-url="/notice/file" file-url="/notice/file" v-model:value="formData.collectExplain" height="300" v-if="showTinymce"/>
|
||||
<baseTitle title="申请文件"></baseTitle>
|
||||
<file-upload @getFile="getFile"/>
|
||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig" :data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||
<!-- <div class="process" id="approvalRecord">-->
|
||||
<!-- <process-tree ref="processTree" mode="view" id-name="approvalRecord"/>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(demandForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {useAuthStore} from '@/stores/userstore.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getWorkflowInfo, addRequirement, getFormInfo, resubmit, deleteFile,downloadFile} from "@/api/project-demand/index.js";
|
||||
import FileUpload from "@/components/FileUpload.vue";
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {useRoute, useRouter} from 'vue-router'
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const authStore = useAuthStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const demandForm = ref()
|
||||
const dateValue = ref()
|
||||
const formData = ref({
|
||||
requirementName: '',
|
||||
companyIds: '',
|
||||
collectType: '',
|
||||
deadline: '',
|
||||
collectExplain: ''
|
||||
})
|
||||
const showTinymce = ref(false)
|
||||
const processDiagramViewer = ref(false)
|
||||
const typeOption = ref([
|
||||
{
|
||||
label: "需求征集",
|
||||
value: '需求征集'
|
||||
}
|
||||
])
|
||||
const companyOption = ref([])
|
||||
const form = ref(null)
|
||||
const fileList = ref(null)
|
||||
const loading = ref(false)
|
||||
const showTable = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const processInstanceData = ref()
|
||||
const rules = reactive({
|
||||
requirementName: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||
companyIds: [{required: true, message: '请选择所属公司', trigger: 'blur'}],
|
||||
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
||||
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
|
||||
})
|
||||
|
||||
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',
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
<el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href=URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const compositeParam=(item)=>{
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
processNodeTag: null,
|
||||
tag: formData.value.collectType,
|
||||
userId: authStore.userinfo.userId
|
||||
}
|
||||
}
|
||||
const getFile = (val) => {
|
||||
console.log('上传文件',val)
|
||||
showTable.value = false
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
let fileObj = {}
|
||||
let newFileArray = []
|
||||
if (route.query.isAdd === undefined) {
|
||||
val.forEach(item => {
|
||||
fileObj =compositeParam(item)
|
||||
newFileArray.push(fileObj)
|
||||
formData.value.fileList.push(fileObj)
|
||||
})
|
||||
fileList.value = formData.value.fileList
|
||||
} else {
|
||||
val.forEach(item => {
|
||||
fileObj =compositeParam(item)
|
||||
newFileArray.push(fileObj)
|
||||
})
|
||||
formData.value.fileList = newFileArray
|
||||
fileList.value = newFileArray
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const init = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
getWorkflowInfo().then(res => {
|
||||
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 handleSubmit = async (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
let params = {
|
||||
...formData.value,
|
||||
requirementId: 0,
|
||||
files: fileList.value,
|
||||
deploymentId: processInstanceData.value.deploymentId
|
||||
}
|
||||
let res = await addRequirement(params)
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Collection'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
resubmit({
|
||||
...formData.value,
|
||||
files: fileList.value,
|
||||
deploymentId: processInstanceData.value.deploymentId
|
||||
}).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Collection'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
getFormInfo(route.query.id).then(res => {
|
||||
if (res.code === 1000) {
|
||||
console.log(res)
|
||||
ElMessage.success(res.msg)
|
||||
formData.value = res.data
|
||||
showTinymce.value = false
|
||||
nextTick(() => {
|
||||
showTinymce.value = true
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
const beforeRemove = (row) => {
|
||||
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
handleRemove(row)
|
||||
}).catch(() => {
|
||||
ElMessage.warning("用户取消删除! ");
|
||||
})
|
||||
}
|
||||
|
||||
const handleRemove = (row) => {
|
||||
deleteFile(row.fileId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success("删除成功");
|
||||
fileList.value.splice(fileList.value.findIndex((item) => item.id === row.id), 1);
|
||||
}
|
||||
});
|
||||
};
|
||||
onMounted(async () => {
|
||||
loading.value = true
|
||||
await init()
|
||||
if (route.query.id) {
|
||||
await getDetailInfo()
|
||||
}
|
||||
nextTick(() => {
|
||||
showTable.value = true
|
||||
})
|
||||
loading.value = false
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-empty__description){
|
||||
margin-top: 0;
|
||||
}
|
||||
.add-block {
|
||||
//display: flex;
|
||||
//justify-content: space-between;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
a {
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
color: #2a99ff;
|
||||
}
|
||||
|
||||
.approval-record {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,272 +0,0 @@
|
||||
<template>
|
||||
<div class="detail-block">
|
||||
<el-form :model="formData" ref="demandForm" label-width="auto" :rules="rules">
|
||||
<baseTitle title="需求征集详情"></baseTitle>
|
||||
<div class="left-info">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司">
|
||||
<span>{{ formData.companyIds }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="征集类型">
|
||||
<span>{{ formData.collectType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="截止时间">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<el-card style="width: 100%">
|
||||
<div v-html="formData.collectExplain">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="附件列表"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height: 200px" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="processInstanceData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
v-model="formData.auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<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>
|
||||
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
|
||||
<el-button @click="handleReject(demandForm)">驳回</el-button>
|
||||
<el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getInfo, agreeTask, rejectTask,downloadFile} from "@/api/project-demand/index.js";
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {ElMessage} from "element-plus";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const form = ref();
|
||||
const demandForm = ref()
|
||||
const processStore = useProcessStore()
|
||||
const companyOption = ref([])
|
||||
const processInstanceData = ref({})
|
||||
const showTable = ref(false)
|
||||
const processDiagramViewer = ref(false)
|
||||
const processTree = ref()
|
||||
const companyNameArray = ref([])
|
||||
const formData = ref({})
|
||||
const rules = reactive({
|
||||
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||
})
|
||||
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',
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return ( <el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href=URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const handleSubmit = () => {
|
||||
let approve = {
|
||||
taskId: processInstanceData.value.taskId,
|
||||
auditOpinion: formData.value.auditOpinion,
|
||||
formData: formData.value
|
||||
}
|
||||
agreeTask(approve).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Collection'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleReject = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
let approve = {
|
||||
taskId: processInstanceData.value.taskId,
|
||||
auditOpinion: formData.value.auditOpinion,
|
||||
}
|
||||
rejectTask(approve).then(res => {
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Collection'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
|
||||
const matterTree = (data, id) => {
|
||||
if (id) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].value == id) {
|
||||
companyNameArray.value.push(data[i].label);
|
||||
}
|
||||
if (data[i].children && data[i].children.length > 0) {
|
||||
matterTree(data[i].children)
|
||||
}
|
||||
}
|
||||
return companyNameArray.value;
|
||||
}
|
||||
}
|
||||
|
||||
const getDataSourceOptionItem = (val) => {
|
||||
if (val !== undefined) {
|
||||
val.forEach(item => {
|
||||
matterTree(companyOption.value, item)
|
||||
})
|
||||
}
|
||||
return companyNameArray.value.join(',');
|
||||
}
|
||||
const init = async () => {
|
||||
if (!route.query.id) return;
|
||||
await getCompanyOption()
|
||||
getInfo(route.query.id).then(res => {
|
||||
let data = res.data
|
||||
formData.value = data.formData;
|
||||
data.formData.companyIds = getDataSourceOptionItem(data.formData.companyIds)
|
||||
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
|
||||
showTable.value = true
|
||||
})
|
||||
})
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-empty__description){
|
||||
margin-top: 0;
|
||||
}
|
||||
.detail-block {
|
||||
overflow: hidden;
|
||||
padding-right: 10px;
|
||||
|
||||
.left-info {
|
||||
.info {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
> div {
|
||||
width: 350px;
|
||||
margin-bottom: 15px;
|
||||
margin-right: 10px;
|
||||
|
||||
> span:first-child {
|
||||
color: black;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.approval-record {
|
||||
padding-bottom: 30px;
|
||||
|
||||
.process {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,157 +0,0 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import Tag from '@/components/Tag.vue'
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
|
||||
const router = useRouter()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '需求名称',
|
||||
prop: 'requirementName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入名称查询',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
checkStrictly: true
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '征集类型',
|
||||
prop: 'collectType',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {
|
||||
placeholder: '请选择征集类型',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
cacheKey: 'todo_type'
|
||||
}
|
||||
}
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
type: 'selection',
|
||||
prop: 'selection'
|
||||
},
|
||||
{
|
||||
prop: 'requirementName',
|
||||
label: '需求名称',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'collectType',
|
||||
label: '征集类型',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'approveName',
|
||||
label: '审批人',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'deadline',
|
||||
label: '截止时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'taskNode',
|
||||
label: '当前节点',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
if (row.state === '3' || row.state === '2') {
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
btn.push({label: '删除', func: () => handleDelete(row), type: 'danger'})
|
||||
} else if (row.state === '4') {
|
||||
btn.push({label: '上报', func: () => handleReport(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.auth}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
{item.label}
|
||||
</el-button>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/requirement',
|
||||
btns: [
|
||||
{name: '新增', key: 'add', color: '#DED0B2'},
|
||||
{name: '导出', key: 'export', type: ''},
|
||||
],
|
||||
params: {}
|
||||
})
|
||||
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const handleAdd = () => {
|
||||
router.push({
|
||||
path: '/project/demand/collection/add',
|
||||
query: {
|
||||
isAdd: 1
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
path: '/project/demand/collection/edit',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
path: '/project/demand/collection/detail',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
handleAdd()
|
||||
break;
|
||||
case 'export':
|
||||
handleExport()
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,182 +0,0 @@
|
||||
<template>
|
||||
<fvForm :schema="schame" @getInstance="getInstance"></fvForm>
|
||||
<div class="oper-page-btn">
|
||||
<el-button type="primary" @click="staging">存为草稿</el-button>
|
||||
<el-button type="primary" @click="handleSubmit">发布</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import { markRaw } from 'vue';
|
||||
import FileUpload from './components/FileUpload.vue';
|
||||
|
||||
const localData = reactive({
|
||||
form: null
|
||||
})
|
||||
|
||||
const schame = computed(()=>{
|
||||
let arr = [
|
||||
{
|
||||
label: '名称',
|
||||
prop: 'name',
|
||||
component: 'el-input',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '开始时间',
|
||||
prop: 'startTime',
|
||||
component: 'el-date-picker',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '所属公司',
|
||||
prop: 'company',
|
||||
component: 'el-input',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
component: markRaw(fvSelect),
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '结束时间',
|
||||
prop: 'endTime',
|
||||
component: 'el-date-picker',
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '出资类型',
|
||||
prop: 'monenyType',
|
||||
component: markRaw(fvSelect),
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectEffect',
|
||||
component: markRaw(fvSelect),
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '所属业务板块',
|
||||
prop: 'ywbank',
|
||||
component: markRaw(fvSelect),
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '预期成果形式',
|
||||
prop: 'yuqichengg',
|
||||
component: markRaw(fvSelect),
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '预期技术标准制定',
|
||||
prop: 'yuqizhidingbiaozhu',
|
||||
component: markRaw(fvSelect),
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '产学研联合',
|
||||
prop: 'chanxue',
|
||||
component: markRaw(fvSelect),
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '开展政府申报',
|
||||
prop: 'zhengfushenbao',
|
||||
component: markRaw(fvSelect),
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '知识产权状况',
|
||||
prop: 'zhishichanquan',
|
||||
component: markRaw(fvSelect),
|
||||
props: {},
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '现有业务描述',
|
||||
prop: 'yewudes',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
type: 'textarea'
|
||||
},
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '研发项目关键内容描述',
|
||||
prop: 'contentnesss',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
type: 'textarea'
|
||||
},
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
prop: 'fileList',
|
||||
component: markRaw(FileUpload),
|
||||
props: {
|
||||
url: '',
|
||||
tip: '上传txt文件'
|
||||
},
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
}
|
||||
]
|
||||
return arr
|
||||
})
|
||||
|
||||
const getInstance = (e) => {
|
||||
localData.form = e
|
||||
}
|
||||
|
||||
const handleSubmit = async () => {}
|
||||
|
||||
const staging = async () => {}
|
||||
</script>
|
||||
@@ -1,12 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export const fileUp = (url, data) => {
|
||||
return request({
|
||||
url,
|
||||
method: 'post',
|
||||
data,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
<template>
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
class="upload-demo"
|
||||
v-bind="$attrs"
|
||||
drag
|
||||
:action="url"
|
||||
multiple
|
||||
:on-change="change"
|
||||
:on-progress="progress"
|
||||
:on-remove="remove"
|
||||
:before-remove="beforeRemove"
|
||||
v-model:file-list="fileList"
|
||||
:http-request="uploadRequest"
|
||||
style="width: 50%;"
|
||||
>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">
|
||||
拖拽上传/<em>点击上传</em>
|
||||
</div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip">
|
||||
{{ tip }}
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { reactive, ref } from 'vue';
|
||||
import { fileUp } from '../api';
|
||||
|
||||
const props = defineProps({
|
||||
url: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
tip: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
const fileList = ref([])
|
||||
const uploadRef = ref()
|
||||
|
||||
const localData = reactive({
|
||||
|
||||
})
|
||||
|
||||
const change = (file, files) => {
|
||||
console.log(file, 'file');
|
||||
}
|
||||
|
||||
const progress = (UploadProgressEvent, UploadFile, UploadFiles) => {
|
||||
|
||||
}
|
||||
|
||||
const remove = (file, files) => {}
|
||||
|
||||
const beforeRemove = (file, files) => {}
|
||||
|
||||
const uploadRequest = (UploadRequestOptions) => {
|
||||
console.log(UploadRequestOptions, 'UploadRequestOptions');
|
||||
// UploadRequestOptions.data = {}
|
||||
const formData = new FormData()
|
||||
formData.append('file', UploadRequestOptions.file)
|
||||
// formData.append('params', UploadRequestOptions.data)
|
||||
fileUp(url, formData)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
@@ -1,168 +0,0 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { reactive, ref, shallowRef } from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const localData = reactive({
|
||||
|
||||
})
|
||||
|
||||
const tableIns= ref()
|
||||
const router = useRouter()
|
||||
|
||||
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '名称',
|
||||
prop: 'name',
|
||||
props: {
|
||||
placeholder: '请输入'
|
||||
},
|
||||
component: 'el-input',
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '项目类型',
|
||||
prop: 'projectType',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '研发主体',
|
||||
prop: 'productMainBody',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '项目影响',
|
||||
prop: 'projectEffect',
|
||||
component: shallowRef(fvSelect),
|
||||
props: {},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '起止时间',
|
||||
prop: 'time',
|
||||
component: 'el-date-picker',
|
||||
props: {},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '最小金额',
|
||||
prop: 'minMoney',
|
||||
component: 'el-input',
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '最大金额',
|
||||
prop: 'maxMoney',
|
||||
component: 'el-input',
|
||||
colProps: {}
|
||||
},
|
||||
])
|
||||
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
type: 'selection',
|
||||
prop: 'selection'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '名称',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'company',
|
||||
label: '所属公司',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'productMainBody',
|
||||
label: '研发主体',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectEffect',
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'survey',
|
||||
label: '经营概况',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'time',
|
||||
label: '起止时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '发布状态',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<el-button type={'primary'} link onClick={()=>{}} >详情</el-button>
|
||||
<el-button type={'primary'} link onClick={()=>{}} >上报</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '新增上报', key: 'add', type: 'primary', auth: ''},
|
||||
{name: '年度计划导出', key: '_export', type: 'primary', auth: ''},
|
||||
{name: '经费预算生成', key: 'preMonty', type: 'primary', auth: ''},
|
||||
]
|
||||
})
|
||||
|
||||
const search = (val) => {
|
||||
let obj = {...val}
|
||||
if(obj.time) {
|
||||
obj.startTime = obj.time[0]
|
||||
obj.endTime = obj.time[1]
|
||||
delete obj.dateValue
|
||||
}
|
||||
tableConfig.params = obj
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
|
||||
const headBtnClick = (key) => {
|
||||
switch(key) {
|
||||
case 'add': handleAdd()
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const handleAdd = () => {
|
||||
router.push({
|
||||
name: 'Demandsummaryadd',
|
||||
query: {}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user