Merge pull request 'fix : 修复页面' (#211) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/211
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
<span>{{ formData.startTime }}</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="companyName">
|
||||
<span>{{ formData.companyName }}</span>
|
||||
@@ -26,11 +31,6 @@
|
||||
<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>
|
||||
@@ -132,13 +132,22 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Array,
|
||||
@@ -153,6 +162,8 @@ const props = defineProps({
|
||||
default: false
|
||||
},
|
||||
})
|
||||
const processInstanceData = ref({})
|
||||
const processDiagramViewer = ref(false)
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
|
||||
@@ -26,7 +26,20 @@
|
||||
<el-date-picker
|
||||
v-model="formData.startTime"
|
||||
type="datetime"
|
||||
placeholder="截止时间"
|
||||
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="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%"
|
||||
/>
|
||||
@@ -35,7 +48,14 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司" prop="affiliatedCompanyId">
|
||||
<el-input v-model="formData.affiliatedCompanyId" placeholder="请输入所属公司" clearable></el-input>
|
||||
<el-select v-model="formData.affiliatedCompanyId" placeholder="请选择所属公司" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in companyOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -55,19 +75,7 @@
|
||||
<el-input v-model="formData.rdSubject" placeholder="请输入研发主体" clearable></el-input>
|
||||
</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>
|
||||
@@ -196,7 +204,7 @@
|
||||
</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-input v-model="formData.specialFundAmount" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
@@ -227,10 +235,12 @@ import {getProcessInfo, requirementReported} from "./api";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
import {getSubCompOpt} from "../../../api/user/user";
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
const router = useRouter()
|
||||
const tagsViewStore = useTagsView()
|
||||
const companyOption = ref([])
|
||||
const summaryForm = ref()
|
||||
const attachment = ref()
|
||||
const deploymentId = ref()
|
||||
@@ -244,7 +254,8 @@ const rules = reactive({
|
||||
projectName: [{required: true, message: '请输入名称', trigger: 'blur'}],
|
||||
specialFund: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
startTime: [{required: true, message: '请选择开始时间', trigger: 'blur'}],
|
||||
companyName: [{required: true, message: '请输入所属公司', trigger: 'blur'}],
|
||||
rdSubject: [{required: true, message: '请输入研发主体', trigger: 'blur'}],
|
||||
affiliatedCompanyId: [{required: true, message: '请输入所属公司', trigger: 'blur'}],
|
||||
projectType: [{required: true, message: '请选择项目类型', trigger: 'blur'}],
|
||||
endTime: [{required: true, message: '请选择结束时间', trigger: 'blur'}],
|
||||
investmentType: [{required: true, message: '请选择出资类型', trigger: 'blur'}],
|
||||
@@ -261,14 +272,14 @@ 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'}]
|
||||
})
|
||||
const compositeParam = (item, type) => {
|
||||
let tag = ''
|
||||
if (router.currentRoute.value.name === 'Summary/add') {
|
||||
tag = '需求汇总'
|
||||
tag = '需求上报'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
@@ -302,14 +313,48 @@ const getFileParam = (item) => {
|
||||
}
|
||||
}
|
||||
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 params = {
|
||||
"specialFund": "2",
|
||||
"projectName": "3",
|
||||
"startTime": "2024-05-24 00:00:00",
|
||||
"endTime": "2024-05-29 00:00:00",
|
||||
"projectType": "3",
|
||||
"investmentType": "3",
|
||||
"businessSegment": "2",
|
||||
"technicalStandard": "2",
|
||||
"governmentDeclaration": "2",
|
||||
"inventionPatent": "3",
|
||||
"newPatent": "3",
|
||||
"economicEstimate": "3",
|
||||
"other": "3",
|
||||
"copyright": "3",
|
||||
"softwareCopyright": "3",
|
||||
"industryUniversityResearch": "2",
|
||||
"intellectualProperty": "00",
|
||||
"resultForm": "3",
|
||||
"projectImpact": "3",
|
||||
"rdSubject": "3",
|
||||
"affiliatedCompanyId": 93,
|
||||
"serviceDescription": "3",
|
||||
"contentDescription": "3",
|
||||
"specialFundAmount": "3",
|
||||
"deploymentId": "e75b2040-15b4-11ef-8cdf-f268fc747b04",
|
||||
"files": [
|
||||
{
|
||||
"fileId": 207,
|
||||
"type": 1
|
||||
},
|
||||
],
|
||||
"requirementId": 102
|
||||
}
|
||||
// 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))
|
||||
@@ -317,12 +362,11 @@ const handleSubmit = async (instance) => {
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
files: files,
|
||||
requirementId:102
|
||||
}
|
||||
// ...formData.value,
|
||||
// deploymentId: deploymentId.value,
|
||||
// files: files,
|
||||
// requirementId:102
|
||||
// }
|
||||
let res = await requirementReported(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -335,9 +379,11 @@ const handleSubmit = async (instance) => {
|
||||
name: 'Summary'
|
||||
})
|
||||
}
|
||||
})
|
||||
// })
|
||||
}
|
||||
const init = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
getProcessInfo().then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { reactive, ref, shallowRef } from 'vue';
|
||||
import {reactive, ref, shallowRef} from 'vue';
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import { useRouter } from 'vue-router';
|
||||
import {useRouter} from 'vue-router';
|
||||
|
||||
const localData = reactive({
|
||||
const localData = reactive({})
|
||||
|
||||
})
|
||||
|
||||
const tableIns= ref()
|
||||
const tableIns = ref()
|
||||
const router = useRouter()
|
||||
|
||||
|
||||
@@ -99,11 +97,6 @@ const tableConfig = reactive({
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'survey',
|
||||
label: '经营概况',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '起止时间',
|
||||
@@ -115,9 +108,9 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if(row.state!==null){
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'demand_collection'} value={row.state}/>)
|
||||
}else {
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
@@ -128,11 +121,27 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
if (row.state === '3') {
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
} else if (row.state === '0') {
|
||||
btn.push({label: '上报', func: () => handleAdd(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<el-button type={'primary'} link onClick={()=>handleDetail(row)} >详情</el-button>
|
||||
<el-button type={'primary'} link onClick={()=>handleAdd(row)} >上报</el-button>
|
||||
</div>
|
||||
<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>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -140,15 +149,14 @@ const tableConfig = reactive({
|
||||
api: '/workflow/mosr/requirement/collect',
|
||||
params: {},
|
||||
btns: [
|
||||
// {name: '新增上报', key: 'add', type: 'primary', auth: ''},
|
||||
{name: '年度计划导出', key: '_export', type: 'primary', auth: ''},
|
||||
{name: '经费预算生成', key: 'preMonty', type: 'primary', auth: ''},
|
||||
{name: '年度计划导出', key: '_export', color: '#DED0B2', auth: ''},
|
||||
{name: '经费预算生成', key: 'preMonty', color: '#DED0B2', auth: ''},
|
||||
]
|
||||
})
|
||||
|
||||
const search = (val) => {
|
||||
let obj = {...val}
|
||||
if(obj.time) {
|
||||
if (obj.time) {
|
||||
obj.startTime = obj.time[0]
|
||||
obj.endTime = obj.time[1]
|
||||
delete obj.dateValue
|
||||
@@ -158,8 +166,9 @@ const search = (val) => {
|
||||
}
|
||||
|
||||
const headBtnClick = (key) => {
|
||||
switch(key) {
|
||||
case 'add': handleAdd()
|
||||
switch (key) {
|
||||
case 'add':
|
||||
handleAdd()
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -174,7 +183,7 @@ const handleDetail = (row) => {
|
||||
router.push({
|
||||
name: 'Summary/detail',
|
||||
query: {
|
||||
id:row.requirementId
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
const compositeParam = (item) => {
|
||||
let tag=''
|
||||
if(!formData.value.collectType&&router.currentRoute.value.name==='Implementation/check'){
|
||||
tag='项目实施'
|
||||
if(router.currentRoute.value.name==='Implementation/check'){
|
||||
tag='项目验收'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
@@ -42,25 +42,59 @@ const compositeParam = (item) => {
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件getAttachment', val)
|
||||
let fileObj = compositeParam(val)
|
||||
// fileList.value.push(fileObj)
|
||||
let fileObj = compositeParam(val, 1)
|
||||
fileList.value.push(fileObj)
|
||||
}
|
||||
const getOtherFile = (val) => {
|
||||
console.log('上传文件getOtherFile', val)
|
||||
showTable.value = false
|
||||
let fileObj = compositeParam(val)
|
||||
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 = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
|
||||
if(fileList.value.length===0){
|
||||
applyForm.value.validate()
|
||||
}else {
|
||||
applyForm.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 = {
|
||||
// deploymentId: deploymentId.value,
|
||||
files: files
|
||||
}
|
||||
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'
|
||||
// })
|
||||
// }
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -121,11 +121,6 @@ const tableConfig = reactive({
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'survey',
|
||||
label: '经营概况',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'time',
|
||||
label: '起止时间',
|
||||
@@ -146,11 +141,12 @@ const tableConfig = reactive({
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
if (row.state === '3') {
|
||||
btn.push({label: '验收', func: () => handleCheck(row), type: 'primary'})
|
||||
} else if (row.state === '4') {
|
||||
btn.push({label: '台账', func: () => handleStandingBook(row), type: 'primary'})
|
||||
btn.push({label: '附件', func: () => handleAttachment(row), type: 'primary'})
|
||||
btn.push({label: '查看分摊', func: () => handleShare(row), type: 'primary'})
|
||||
btn.push(
|
||||
{label: '验收', func: () => handleCheck(row), type: 'primary'},
|
||||
{label: '台账', func: () => handleStandingBook(row), type: 'primary'},
|
||||
{label: '附件', func: () => handleAttachment(row), type: 'primary'},
|
||||
{label: '查看分摊', func: () => handleShare(row), type: 'primary'}
|
||||
)
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
@@ -174,7 +170,7 @@ const tableConfig = reactive({
|
||||
api: '',
|
||||
params: {},
|
||||
btns: [
|
||||
{name: '生成分摊报表', key: '_export', color: '#DED0B2',auth: ''}
|
||||
{name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
|
||||
]
|
||||
})
|
||||
|
||||
@@ -185,11 +181,42 @@ const search = (val) => {
|
||||
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name:'Implementation/detail',
|
||||
name: 'Implementation/detail',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleCheck = (row) => {
|
||||
router.push({
|
||||
name: 'Implementation/check',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleStandingBook = (row) => {
|
||||
router.push({
|
||||
name: 'Implementation/account',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleAttachment = (row) => {
|
||||
router.push({
|
||||
name: 'Implementation/attachment',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleShare = (row) => {
|
||||
router.push({
|
||||
name: 'Implementation/share',
|
||||
query: {
|
||||
id: row.requirementId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -8,26 +8,11 @@
|
||||
<el-input v-model="formData.requirementName" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="项目立项附件" prop="attachment">
|
||||
<file-upload @getFile="getAttachment" :showFileList="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="其他文件">
|
||||
<el-card style="width: 100%">
|
||||
<file-upload @getFile="getOtherFile" :showFileList="true"/>
|
||||
<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>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true"/>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" @click="handleSubmit(applyForm)">提交</el-button>
|
||||
</div>
|
||||
@@ -35,13 +20,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import FileUpload from "@/components/FileUpload.vue";
|
||||
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
const formData = ref({})
|
||||
const rules = reactive({
|
||||
attachment: [{required: true, message: '请上传项目立项附件', trigger: 'blur'}],
|
||||
})
|
||||
const fileList = ref(null)
|
||||
const fileList = ref([])
|
||||
const applyForm = ref()
|
||||
const showTable = ref(true)
|
||||
const otherFileList = ref([])
|
||||
@@ -70,65 +56,91 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
<a style="cursor: pointer;font-size: 14px;color: #2a99ff;" href={row.url}>下载</a>
|
||||
<el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
// {
|
||||
// prop: 'oper',
|
||||
// label: '操作',
|
||||
// align: 'center',
|
||||
// currentRender: ({row, index}) => {
|
||||
// return (
|
||||
// <div>
|
||||
// <a style="cursor: pointer;font-size: 14px;color: #2a99ff;" href={row.url}>下载</a>
|
||||
// <el-button type="primary" size="large" link onClick={() => beforeRemove(row)}>删除</el-button>
|
||||
// </div>
|
||||
// )
|
||||
// }
|
||||
// }
|
||||
]
|
||||
})
|
||||
|
||||
const compositeParam = (item) => {
|
||||
const compositeParam = (item, type) => {
|
||||
let tag = ''
|
||||
if (router.currentRoute.value.name === 'Initiation/apply') {
|
||||
tag = '项目立项申请'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
type: type,
|
||||
originalFileName: item.originalFilename,
|
||||
fileType: item.fileType,
|
||||
url: item.url,
|
||||
processNodeTag: null,
|
||||
tag: formData.value.collectType
|
||||
tag:tag
|
||||
}
|
||||
}
|
||||
const getAttachment = (val) => {
|
||||
console.log('上传文件', 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
|
||||
})
|
||||
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 getOtherFile = () => {
|
||||
|
||||
const getFileParam = (item) => {
|
||||
return {
|
||||
fileId: item.fileId,
|
||||
type: item.type
|
||||
}
|
||||
}
|
||||
const handleSubmit = (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if(fileList.value.length===0){
|
||||
applyForm.value.validate()
|
||||
}else {
|
||||
applyForm.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 = {
|
||||
// deploymentId: deploymentId.value,
|
||||
files: files
|
||||
}
|
||||
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'
|
||||
// })
|
||||
// }
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -93,15 +93,11 @@ const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'requirementName',
|
||||
prop: 'projectName',
|
||||
label: '名称',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'undertaker',
|
||||
label: '承办单位',
|
||||
align: 'center'
|
||||
}, {
|
||||
prop: 'affiliatedCompanyId',
|
||||
label: '所属公司',
|
||||
align: 'center'
|
||||
@@ -121,14 +117,9 @@ const tableConfig = reactive({
|
||||
label: '项目影响',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'survey',
|
||||
label: '经营概况',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '起始时间',
|
||||
label: '起止时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
@@ -136,7 +127,13 @@ const tableConfig = reactive({
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||
currentRender: ({row, index}) =>{
|
||||
if (row.state !== null) {
|
||||
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
@@ -145,11 +142,10 @@ const tableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
if (row.state === '4') {
|
||||
if (row.state === '3') {
|
||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||
} else if (row.state === '20') {
|
||||
btn.push({label: '申请', func: () => handleApply(row), type: 'primary'})
|
||||
} else if (row.state === '4') {
|
||||
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
|
||||
Reference in New Issue
Block a user