Merge pull request 'master' (#415) from master into prod

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/415
This commit is contained in:
2024-06-28 19:37:22 +00:00
24 changed files with 184 additions and 69 deletions

View File

@@ -551,12 +551,13 @@ html, body, #app, .el-container, .el-aside, .el-main {
} }
.approval-record { .approval-record {
padding-top: 10px;
padding-bottom: 30px; padding-bottom: 30px;
position: relative; position: relative;
.approval-title { .approval-title {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; //justify-content: space-between;
.diagram { .diagram {
display: flex; display: flex;
@@ -564,6 +565,7 @@ html, body, #app, .el-container, .el-aside, .el-main {
float: right; float: right;
.base-title { .base-title {
margin-left: 10px;
margin-right: 10px; margin-right: 10px;
} }

View File

@@ -1,8 +1,8 @@
<template> <template>
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules" label-position="top"> <el-form :model="formData" ref="applyForm" :rules="rules" :label-position="labelPosition">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="label" prop="attachment"> <el-form-item :label="label" prop="attachment" label-width="125">
<template v-if="preview&&JSON.stringify(singleFile) !== '{}'&&JSON.stringify(singleFile)!=='null'"> <template v-if="preview&&JSON.stringify(singleFile) !== '{}'&&JSON.stringify(singleFile)!=='null'">
<el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 16px"> <el-button type="primary" link @click="handleDownload(singleFile)" style="font-size: 16px">
{{ singleFile ? singleFile?.originalFileName : formData.singleFile?.originalFileName }} {{ singleFile ? singleFile?.originalFileName : formData.singleFile?.originalFileName }}
@@ -12,22 +12,29 @@
</template> </template>
<template <template
v-else-if="!preview||JSON.stringify(singleFile) == '{}'||singleFile==null||formData.singleFile==null"> v-else-if="!preview||JSON.stringify(singleFile) == '{}'||singleFile==null||formData.singleFile==null">
<file-upload @getFile="getAttachment" :showFileList="showFileList" :multiple="false" :maxSize="1" <file-upload @getFile="getAttachment" :multiple="false" :maxSize="1" :showFileList="showFileList" @delete="deleteAttachment"
:disabled="isSingleFile" @delete="deleteAttachment"/> :disabled="isSingleFile" />
<!-- -->
<!-- <fvTable style="width: 100%;max-height: 80px;" v-if="showSingleTable" :tableConfig="singleTableConfig"-->
<!-- :data="singleFileList" :isSettingCol="false" :pagination="false">-->
<!-- <template #empty>-->
<!-- <el-empty :image-size="90" description="暂无数据" style="padding: 0"/>-->
<!-- </template>-->
<!-- </fvTable>-->
</template> </template>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="其他文件"> <el-form-item label="其他文件" label-width="125">
<el-card style="width: 100%;box-shadow: none"> <file-upload @getFile="getOtherFile"/>
<file-upload @getFile="getOtherFile"/> <!-- <el-card style="width: 100%;box-shadow: none">-->
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable" :tableConfig="tableConfig" <fvTable style="width: 100%;max-height: 300px;" v-if="showTable" :tableConfig="tableConfig"
:data="allFileList" :isSettingCol="false" :pagination="false"> :data="allFileList" :isSettingCol="false" :pagination="false">
<template #empty> <template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/> <el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
</template> </template>
</fvTable> </fvTable>
</el-card> <!-- </el-card>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -50,12 +57,20 @@ const props = defineProps({
}, },
showTable: { showTable: {
type: Boolean, type: Boolean,
default: true default: false
},
showSingleTable: {
type: Boolean,
default: false
}, },
preview: { preview: {
type: Boolean, type: Boolean,
default: false default: false
}, },
singleList: {
type: Array,
default: []
},
otherFileList: { otherFileList: {
type: Array, type: Array,
default: [] default: []
@@ -63,6 +78,10 @@ const props = defineProps({
formData: { formData: {
type: Object, type: Object,
default: {} default: {}
},
labelPosition: {
type: String,
default:''
} }
}) })
const emit = defineEmits(["getAttachment", "getOtherFile"]) const emit = defineEmits(["getAttachment", "getOtherFile"])
@@ -128,6 +147,68 @@ const tableConfig = reactive({
} }
] ]
}) })
const singleTableConfig = 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}) => {
let btn = []
btn.push({label: '下载', func: () => handleDownload(row), type: 'primary'})
// if (row.newFile) {
// btn.push({label: '删除', func: () => handleDelete(row), type: 'primary'})
// }
return (
<div style={{width: '100%'}}>
{
btn.map(item => (
<el-button
type={item.type}
onClick={() => item.func()}
link
>
{item.label}
</el-button>
))
}
{
row.newFile || props.preview || !props.preview ?
<popover-delete name={row.originalFileName} type={'文件'} btnType={'danger'}
// perm={['']}
onDelete={() => handleSingleDelete(row)}/>
: ''
}
</div>
)
}
}
]
})
const rules = reactive({ const rules = reactive({
attachment: [{required: true, message: '请上传附件', trigger: ['blur', 'change']}], attachment: [{required: true, message: '请上传附件', trigger: ['blur', 'change']}],
}) })
@@ -135,9 +216,16 @@ const applyForm = ref()
const singleFile = ref(props.formData.singleFile) const singleFile = ref(props.formData.singleFile)
const isSingleFile = ref(false) const isSingleFile = ref(false)
const allFileList = ref([]) const allFileList = ref([])
const singleFileList = ref([])
if(props.formData.fileList !== null && props.formData.fileList?.length > 0){
allFileList.value = props.formData.fileList
}
watch(() => props.showTable, (newVal) => { watch(() => props.showTable, (newVal) => {
props.showTable = newVal props.showTable = newVal
}, {deep: true}) }, {deep: true})
watch(() => props.showSingleTable, (newVal) => {
props.showSingleTable = newVal
}, {deep: true})
watch(() => props.formData.fileList, (newVal) => { watch(() => props.formData.fileList, (newVal) => {
// console.log('newVal-fileList', newVal) // console.log('newVal-fileList', newVal)
if (props.preview) { if (props.preview) {
@@ -149,7 +237,7 @@ watch(() => props.formData.fileList, (newVal) => {
watch(() => props.otherFileList, (newVal) => { watch(() => props.otherFileList, (newVal) => {
// console.log('newotherFileList', newVal, props.formData) // console.log('newotherFileList', newVal, props.formData)
if (props.preview) { if (props.preview) {
if (props.formData.fileList === null || props.formData.fileList.length === 0) { if (props.formData.fileList === null || props.formData.fileList?.length === 0) {
allFileList.value = newVal allFileList.value = newVal
} else { } else {
newVal?.forEach(item => { newVal?.forEach(item => {
@@ -160,6 +248,10 @@ watch(() => props.otherFileList, (newVal) => {
allFileList.value = newVal allFileList.value = newVal
} }
}, {deep: true}) }, {deep: true})
watch(() => props.singleList, (newVal) => {
// console.log('singleFile', newVal)
singleFileList.value = newVal
}, {deep: true})
watch(() => props.formData.singleFile, (newVal) => { watch(() => props.formData.singleFile, (newVal) => {
// console.log('singleFile', newVal) // console.log('singleFile', newVal)
singleFile.value = newVal singleFile.value = newVal
@@ -167,7 +259,7 @@ watch(() => props.formData.singleFile, (newVal) => {
watch(() => isSingleFile.value, (newVal) => { watch(() => isSingleFile.value, (newVal) => {
isSingleFile.value = newVal isSingleFile.value = newVal
}, {deep: true}) }, {deep: true})
const handleDelete = (row) => { const handleDelete = (row,type) => {
deleteFile(row.fileId).then(res => { deleteFile(row.fileId).then(res => {
ElNotification({ ElNotification({
title: '提示', title: '提示',
@@ -175,11 +267,20 @@ const handleDelete = (row) => {
type: res.code === 1000 ? 'success' : 'error' type: res.code === 1000 ? 'success' : 'error'
}) })
if (res.code === 1000) { if (res.code === 1000) {
allFileList.value.splice(allFileList.value.findIndex((item) => item.id === row.fileId), 1); if(type==='single'){
singleFileList.value.splice(singleFileList.value.findIndex((item) => item.id === row.fileId), 1);
isSingleFile.value = false
}else {
allFileList.value.splice(allFileList.value.findIndex((item) => item.id === row.fileId), 1);
}
} }
}); });
} }
const handleSingleDelete = (row) => {
handleDelete(row,'single')
}
const getAttachment = (val) => { const getAttachment = (val) => {
console.log('getAttachment',val)
isSingleFile.value = true isSingleFile.value = true
emit('getAttachment', val) emit('getAttachment', val)
} }

View File

@@ -24,7 +24,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -69,7 +69,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -29,7 +29,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>
@@ -414,7 +414,6 @@ const init = async () => {
watchEffect(() => { watchEffect(() => {
return Object.keys(props.formData).length && (localFormData.value = props.formData) return Object.keys(props.formData).length && (localFormData.value = props.formData)
}) })
onMounted(async () => { onMounted(async () => {
await init() await init()
}) })

View File

@@ -70,7 +70,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -166,7 +166,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -31,7 +31,6 @@ const props = defineProps({
const tagConfig = ref({}) const tagConfig = ref({})
const filterDict = (data, value) => { const filterDict = (data, value) => {
console.log("🚀 ~ filterDict ~ data:", data)
if (!data || value == null) return if (!data || value == null) return
if (data instanceof Array) { if (data instanceof Array) {
if (value == true || value == false) { if (value == true || value == false) {

View File

@@ -114,11 +114,11 @@
<div class="approval-title"> <div class="approval-title">
<baseTitle title="审批记录" v-if="processDiagramViewer&& opentionData?.operationList"></baseTitle> <baseTitle title="审批记录" v-if="processDiagramViewer&& opentionData?.operationList"></baseTitle>
<div v-else></div> <div v-else></div>
<div style="display: flex;align-items: center;justify-content: flex-end;"> <div style="display: flex;align-items: center;justify-content: flex-start;">
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266;margin-left: 10px" style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -39,7 +39,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -40,7 +40,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -86,11 +86,11 @@
</template> </template>
</fvTable> </fvTable>
<div class="approval-record"> <div class="approval-record">
<div style="display: flex;align-items: center;justify-content: flex-end;"> <div style="display: flex;align-items: center;justify-content: flex-start;">
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266;margin-left: 10px" style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd;margin-left: 10px"
/> />
</div> </div>
<process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/> <process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>
@@ -160,7 +160,7 @@ const form = ref(null)
const expendClass = ref() const expendClass = ref()
const fileList = ref([]) const fileList = ref([])
const loading = ref(false) const loading = ref(false)
const showTable = ref(true) const showTable = ref(false)
const processStore = useProcessStore() const processStore = useProcessStore()
const processInstanceData = ref() const processInstanceData = ref()
const formPermMap = ref(new Map()); const formPermMap = ref(new Map());
@@ -451,6 +451,7 @@ const handleDelete = (row) => {
}) })
if (res.code === 1000) { if (res.code === 1000) {
formData.value.fileList.splice(formData.value.fileList.findIndex((item) => item.id === row.fileId), 1); formData.value.fileList.splice(formData.value.fileList.findIndex((item) => item.id === row.fileId), 1);
showTable.value = formData.value.fileList.length !== 0;
} }
}); });
} }

View File

@@ -68,7 +68,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -4,7 +4,7 @@
<el-form :model="formData" ref="summaryForm" :rules="rules"> <el-form :model="formData" ref="summaryForm" :rules="rules">
<el-row gutter="15"> <el-row gutter="15">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="项目名称" prop="projectName" label-width="105"> <el-form-item label="项目名称" prop="projectName" label-width="125">
<el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable></el-input> <el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -40,7 +40,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="项目类型" prop="projectType" label-width="105"> <el-form-item label="项目类型" prop="projectType" label-width="125">
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable> <el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable>
<el-option <el-option
v-for="item in cacheStore.getDict('project_type')" v-for="item in cacheStore.getDict('project_type')"
@@ -76,7 +76,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="项目影响" prop="projectImpact" label-width="105"> <el-form-item label="项目影响" prop="projectImpact" label-width="125">
<el-select v-model="formData.projectImpact" placeholder="请选择项目影响" clearable filterable> <el-select v-model="formData.projectImpact" placeholder="请选择项目影响" clearable filterable>
<el-option <el-option
v-for="item in cacheStore.getDict('project_impact')" v-for="item in cacheStore.getDict('project_impact')"
@@ -111,8 +111,8 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="route.query.id && formData.isSpecialFund?8:!formData.isSpecialFund?!route.query.id?6:8:6">
<el-form-item label="产学研联合" prop="industryUniversityResearch" label-width="105"> <el-form-item label="产学研联合" prop="industryUniversityResearch" label-width="125">
<el-radio-group v-model="formData.industryUniversityResearch"> <el-radio-group v-model="formData.industryUniversityResearch">
<el-radio v-for="item in cacheStore.getDict('industry_university')" <el-radio v-for="item in cacheStore.getDict('industry_university')"
:key="item.value" :key="item.value"
@@ -121,8 +121,8 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="route.query.id && formData.isSpecialFund?8:!formData.isSpecialFund?route.query.id?8:6:6">
<el-form-item label="开展政府申报" prop="governmentDeclaration"> <el-form-item label="开展政府申报" prop="governmentDeclaration" :label-width="route.query.id && formData.isSpecialFund?145:!formData.isSpecialFund?145:145">
<el-radio-group v-model="formData.governmentDeclaration"> <el-radio-group v-model="formData.governmentDeclaration">
<el-radio v-for="item in cacheStore.getDict('government_declaration')" <el-radio v-for="item in cacheStore.getDict('government_declaration')"
:key="item.value" :key="item.value"
@@ -131,7 +131,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="!route.query.id && formData.isSpecialFund?4:12" v-if="!route.query.id"> <el-col :span="!route.query.id && formData.isSpecialFund?4:!route.query.id?12:12" v-if="!route.query.id">
<el-form-item label="是否专项资金" prop="isSpecialFund" > <el-form-item label="是否专项资金" prop="isSpecialFund" >
<el-radio-group v-model="formData.isSpecialFund" @change="specialFundChange"> <el-radio-group v-model="formData.isSpecialFund" @change="specialFundChange">
<el-radio :label="true"></el-radio> <el-radio :label="true"></el-radio>
@@ -140,7 +140,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" v-if="route.query.id && formData.isSpecialFund"> <el-col :span="8" v-if="route.query.id && formData.isSpecialFund">
<el-form-item label="专项资金名称" prop="specialFundId"> <el-form-item label="专项资金名称" prop="specialFundId" :label-width="route.query.id && formData.isSpecialFund?135:''">
<span>{{ formData.specialFund }}</span> <span>{{ formData.specialFund }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -156,8 +156,8 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8" style="margin-bottom: -18px">
<el-form-item label="知识产权状况" prop="intellectualProperty"> <el-form-item label="知识产权状况" prop="intellectualProperty" :label-width="!formData.isSpecialFund?!route.query.id?125:135:125">
<el-select v-model="formData.intellectualProperty" placeholder="请选择知识产权状况" clearable filterable> <el-select v-model="formData.intellectualProperty" placeholder="请选择知识产权状况" clearable filterable>
<el-option <el-option
v-for="item in cacheStore.getDict('intellectual_property')" v-for="item in cacheStore.getDict('intellectual_property')"
@@ -168,7 +168,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16" style="margin-bottom: -18px">
<el-form-item label="预期成果形式" prop="resultForm" label-width="145"> <el-form-item label="预期成果形式" prop="resultForm" label-width="145">
<el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable> <el-select v-model="formData.resultForm" placeholder="请选择预期成果形式" clearable filterable>
<el-option <el-option
@@ -184,7 +184,7 @@
<baseTitle title="预期知识产权"></baseTitle> <baseTitle title="预期知识产权"></baseTitle>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="发明专利(项)" prop="inventionPatent" label-width="107"> <el-form-item label="发明专利(项)" prop="inventionPatent" label-width="125">
<el-input-number v-model="formData.inventionPatent" placeholder="请输入发明专利" :controls="false"/> <el-input-number v-model="formData.inventionPatent" placeholder="请输入发明专利" :controls="false"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -199,7 +199,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="著作权(项)" prop="copyright" label-width="107"> <el-form-item label="著作权(项)" prop="copyright" label-width="125">
<el-input-number v-model="formData.copyright" placeholder="请输入著作权" :controls="false"/> <el-input-number v-model="formData.copyright" placeholder="请输入著作权" :controls="false"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -219,13 +219,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="现有业务描述" prop="serviceDescription" label-width="107"> <el-form-item label="现有业务描述" prop="serviceDescription" label-width="125">
<el-input v-model="formData.serviceDescription" placeholder="请输入现有业务描述" rows="4" type="textarea" <el-input v-model="formData.serviceDescription" placeholder="请输入现有业务描述" rows="4" type="textarea"
clearable></el-input> clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="研发项目关键内容描述" prop="contentDescription" label-width="107"> <el-form-item label="研发项目关键内容描述" prop="contentDescription" label-width="125">
<el-input v-model="formData.contentDescription" placeholder="请输入研发项目关键内容描述" rows="4" type="textarea" <el-input v-model="formData.contentDescription" placeholder="请输入研发项目关键内容描述" rows="4" type="textarea"
clearable></el-input> clearable></el-input>
</el-form-item> </el-form-item>
@@ -233,15 +233,15 @@
</el-row> </el-row>
</el-form> </el-form>
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList" <AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
@getAttachment="getAttachment" @getAttachment="getAttachment" :singleList="singleList" :showSingleTable="showSingleTable"
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" @getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
:preview="name === 'Summary/edit'"/> :preview="name === 'Summary/edit'"/>
<div class="approval-record"> <div class="approval-record" style="margin-left: 70px">
<div style="display: flex;align-items: center;justify-content: flex-end;"> <div style="display: flex;align-items: center;justify-content: flex-start;">
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266;margin-left: 10px" style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd;margin-left: 10px"
/> />
</div> </div>
<process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/> <process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>
@@ -281,8 +281,10 @@ const companyOption = ref([])
const summaryForm = ref() const summaryForm = ref()
const deploymentId = ref() const deploymentId = ref()
const specialFundOption = ref([]) const specialFundOption = ref([])
const showTable = ref(true) const showTable = ref(false)
const showSingleTable = ref(false)
const otherFileList = ref([]) const otherFileList = ref([])
const singleList = ref([])
const formData = ref({ const formData = ref({
isSpecialFund: false, isSpecialFund: false,
industryUniversityResearch: '0', industryUniversityResearch: '0',
@@ -363,7 +365,12 @@ const compositeParam = (item, type) => {
const getAttachment = (val) => { const getAttachment = (val) => {
// console.log('上传文件getAttachment', val) // console.log('上传文件getAttachment', val)
showSingleTable.value=false
formData.value.singleFile = compositeParam(val) formData.value.singleFile = compositeParam(val)
singleList.value.push( compositeParam(val))
nextTick(() => {
showSingleTable.value = true
})
} }
const getOtherFile = (val) => { const getOtherFile = (val) => {
// console.log('上传文件getOtherFile', val) // console.log('上传文件getOtherFile', val)
@@ -374,6 +381,12 @@ const getOtherFile = (val) => {
showTable.value = true showTable.value = true
}) })
} }
watch(() => otherFileList.value, (newVal) => {
showTable.value = newVal.length !== 0;
}, {deep: true})
watch(() => singleList.value, (newVal) => {
showSingleTable.value = newVal.length !== 0;
}, {deep: true})
const getFileParam = (item) => { const getFileParam = (item) => {
if (item === undefined) return; if (item === undefined) return;
return { return {
@@ -455,7 +468,7 @@ const handleResubmit = debounce(() => {
...formData.value, ...formData.value,
deploymentId: deploymentId.value, deploymentId: deploymentId.value,
fileList: otherFiles, fileList: otherFiles,
requirementId: route.query.id ? route.query.id : '-1' requirementId: route.query.requirementId ? route.query.requirementId : '-1'
} }
// console.log('重新提交params', params, formData.value.specialFund, formData.value.specialFundId) // console.log('重新提交params', params, formData.value.specialFund, formData.value.specialFundId)
resubmitReported(params).then(res => { resubmitReported(params).then(res => {

View File

@@ -304,7 +304,7 @@ const handleEdit = (row) => {
router.push({ router.push({
name: 'Summary/edit', name: 'Summary/edit',
query: { query: {
id: row.requirementId, requirementId: row.requirementId,
projectId: row.projectId projectId: row.projectId
} }
}) })

View File

@@ -13,11 +13,11 @@
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" @getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
:preview="name === 'Phase/edit'"/> :preview="name === 'Phase/edit'"/>
<div class="approval-record"> <div class="approval-record">
<div style="display: flex;align-items: center;justify-content: flex-end;"> <div style="display: flex;align-items: center;justify-content: flex-start;">
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266;margin-left: 10px" style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd;margin-left: 10px"
/> />
</div> </div>
<process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/> <process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>

View File

@@ -2,10 +2,10 @@
<div v-loading="loading"> <div v-loading="loading">
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm> <fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
<el-form :model="formData" label-width="auto"> <el-form :model="formData" label-width="auto">
<file-component <file-component
:title="getTagName(type)+'附件'" :title="getTagName(type)+'附件'"
:tag="getTagName(type)" :tag="getTagName(type)"
v-model:value="formData.fileList" v-model:value="formData.fileList"
:processViewer="processViewer" :processViewer="processViewer"
:file-list-show="fileListShow" :file-list-show="fileListShow"
labelAlign="top" labelAlign="top"
@@ -29,7 +29,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -68,7 +68,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -17,7 +17,7 @@
</el-form> </el-form>
<AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable" <AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
:otherFileList="otherFileList" :otherFileList="otherFileList"
@getAttachment="getAttachment" @getAttachment="getAttachment" :labelPosition="'top'"
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData" @getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
:preview="mode == 'resubmit'"/> :preview="mode == 'resubmit'"/>
<div> <div>
@@ -29,7 +29,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -40,7 +40,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -73,7 +73,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -162,7 +162,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -2,10 +2,10 @@
<div v-loading="loading"> <div v-loading="loading">
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm> <fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
<el-form :model="formData" label-width="auto"> <el-form :model="formData" label-width="auto">
<file-component <file-component
:title="getTagName(type)+'附件'" :title="getTagName(type)+'附件'"
:tag="getTagName(type)" :tag="getTagName(type)"
v-model:value="formData.fileList" v-model:value="formData.fileList"
:processViewer="processViewer" :processViewer="processViewer"
:file-list-show="fileListShow" :file-list-show="fileListShow"
labelAlign="top" labelAlign="top"
@@ -29,7 +29,7 @@
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266" style="--el-switch-on-color:#BEA266; --el-switch-off-color:#cecdcd"
/> />
</div> </div>
</div> </div>

View File

@@ -27,11 +27,11 @@
</template> </template>
</fvTable> </fvTable>
<div class="approval-record"> <div class="approval-record">
<div style="display: flex;align-items: center;justify-content: flex-end;"> <div style="display: flex;align-items: center;justify-content: flex-start;">
<div class="base-title">流程图</div> <div class="base-title">流程图</div>
<el-switch <el-switch
v-model="changeDiagram" v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266;margin-left: 10px" style="--el-switch-on-color:#BEA266 ; --el-switch-off-color:#cecdcd;margin-left: 10px"
/> />
</div> </div>
<process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/> <process-diagram-viewer mode="view" v-if="processDiagramViewer&&changeDiagram"/>