feat : 需求上报fileLie 权限控制
This commit is contained in:
@@ -10,7 +10,8 @@
|
|||||||
<el-button type="danger" link @click="deleteOtherFile(singleFile,1)">删除</el-button>
|
<el-button type="danger" link @click="deleteOtherFile(singleFile,1)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="!preview||JSON.stringify(singleFile) === '{}'||singleFile==null">
|
<template v-else-if="!preview||JSON.stringify(singleFile) === '{}'||singleFile==null">
|
||||||
<file-upload @getFile="getAttachment" :showFileList="showFileList" :multiple="false" :maxSize="1" :disabled="isSingleFile" @delete="deleteAttachment"/>
|
<file-upload @getFile="getAttachment" :showFileList="showFileList" :multiple="false" :maxSize="1"
|
||||||
|
:disabled="isSingleFile" @delete="deleteAttachment"/>
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -69,15 +70,28 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
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 (
|
return (
|
||||||
<div>
|
<div style={{width: '100%'}}>
|
||||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// <el-button type="primary" size="large" link onClick={() => deleteOtherFile(row)}>删除</el-button>
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
@@ -91,19 +105,24 @@ const props = defineProps({
|
|||||||
showFileList: {
|
showFileList: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}, label: {
|
},
|
||||||
|
label: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '项目附件'
|
default: '项目附件'
|
||||||
}, showTable: {
|
},
|
||||||
|
showTable: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
}, preview: {
|
},
|
||||||
|
preview: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}, otherFileList: {
|
},
|
||||||
|
otherFileList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
}, formData: {
|
},
|
||||||
|
formData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
}
|
}
|
||||||
@@ -112,34 +131,34 @@ watch(() => props.showTable, (newVal) => {
|
|||||||
props.showTable = newVal
|
props.showTable = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
watch(() => props.otherFileList, (newVal) => {
|
watch(() => props.otherFileList, (newVal) => {
|
||||||
console.log('newotherFileList',newVal)
|
console.log('newotherFileList', newVal)
|
||||||
if (props.preview) {
|
if (props.preview) {
|
||||||
if(props.formData.fileList==null){
|
if (props.formData.fileList == null) {
|
||||||
allFileList.value=newVal
|
allFileList.value = newVal
|
||||||
}else {
|
} else {
|
||||||
newVal?.forEach(item => {
|
newVal?.forEach(item => {
|
||||||
allFileList.value.push(item)
|
allFileList.value.push(item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
allFileList.value=newVal
|
allFileList.value = newVal
|
||||||
}
|
}
|
||||||
}, {deep: true})
|
}, {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) {
|
||||||
newVal?.forEach(item => {
|
newVal?.forEach(item => {
|
||||||
allFileList.value.push(item)
|
allFileList.value.push(item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
watch(() => props.formData.singleFile, (newVal) => {
|
watch(() => props.formData.singleFile, (newVal) => {
|
||||||
console.log('singleFile',newVal)
|
console.log('singleFile', newVal)
|
||||||
singleFile.value = newVal
|
singleFile.value = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
const getAttachment = (val) => {
|
const getAttachment = (val) => {
|
||||||
isSingleFile.value=true
|
isSingleFile.value = true
|
||||||
emit('getAttachment', val)
|
emit('getAttachment', val)
|
||||||
}
|
}
|
||||||
const getOtherFile = (val) => {
|
const getOtherFile = (val) => {
|
||||||
@@ -150,10 +169,10 @@ const deleteAttachment = (val) => {
|
|||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message:"删除成功",
|
message: "删除成功",
|
||||||
type:'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
isSingleFile.value=false
|
isSingleFile.value = false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,8 +124,9 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'">
|
||||||
<el-form-item label="需求上报附件">
|
<el-form-item label="需求上报附件">
|
||||||
|
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
|
||||||
<fvTable style="width: 100%;max-height: 400px;" v-if="processViewer" :tableConfig="tableConfig"
|
<fvTable style="width: 100%;max-height: 400px;" v-if="processViewer" :tableConfig="tableConfig"
|
||||||
:data="localFormData.fileList" :isSettingCol="false" :pagination="false">
|
:data="localFormData.fileList" :isSettingCol="false" :pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
@@ -148,7 +149,7 @@
|
|||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="approval-record">
|
<div class="approval-record" >
|
||||||
<baseTitle title="审批记录"></baseTitle>
|
<baseTitle title="审批记录"></baseTitle>
|
||||||
<div class="process">
|
<div class="process">
|
||||||
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
<operation-render v-if="processViewer" :operation-list="data.operationList"
|
||||||
@@ -187,7 +188,12 @@ const props = defineProps({
|
|||||||
processViewer: {
|
processViewer: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}, loading: {
|
},
|
||||||
|
fileListShow:{
|
||||||
|
type: String,
|
||||||
|
default: 'READ'
|
||||||
|
},
|
||||||
|
loading: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
@@ -222,9 +228,26 @@ const tableConfig = reactive({
|
|||||||
prop: 'oper',
|
prop: 'oper',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
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 (
|
return (
|
||||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -273,10 +296,33 @@ const handleDownload = (row) => {
|
|||||||
a.click()
|
a.click()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const getOtherFile = (val) => {
|
||||||
|
props.processViewer = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
localFormData.value.fileList.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
props.processViewer = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const compositeParam = (item, type) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
|
tag: '需求上报'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
watch(() => props.processViewer, (newVal) => {
|
watch(() => props.processViewer, (newVal) => {
|
||||||
props.processViewer = newVal
|
props.processViewer = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
|
|
||||||
watch(() => props.loading, (newVal) => {
|
watch(() => props.loading, (newVal) => {
|
||||||
props.loading = newVal
|
props.loading = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
@@ -284,6 +330,7 @@ watch(() => props.loading, (newVal) => {
|
|||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
return Object.keys(props.formData).length && (localFormData.value = props.formData)
|
return Object.keys(props.formData).length && (localFormData.value = props.formData)
|
||||||
})
|
})
|
||||||
|
|
||||||
getFundOptions()
|
getFundOptions()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ const compositeParam = (item) => {
|
|||||||
originalFileName: item.originalFilename,
|
originalFileName: item.originalFilename,
|
||||||
fileType: item.fileType,
|
fileType: item.fileType,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
tag: formData.value.tagName,
|
tag: formData.value.tagName,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="checkFormPrem('deadline')" label="截止时间" prop="deadline">
|
<el-form-item label="截止时间" prop="deadline">
|
||||||
<el-config-provider>
|
<el-config-provider>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formData.deadline"
|
v-model="formData.deadline"
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
<file-upload v-if="checkFormPrem('fileList')" @getFile="getFile"/>
|
<file-upload v-if="checkFormPrem('fileList')" @getFile="getFile"/>
|
||||||
<fvTable style="width: 100%;max-height: 600px;height: 600px" v-if="showTable"
|
<fvTable style="width: 100%;max-height: 600px;height: 600px" v-if="showTable"
|
||||||
:tableConfig="tableConfig" :data="formData.fileList"
|
:tableConfig="tableConfig" :data="formData.fileList"
|
||||||
:isSettingCol="false" :pagination="false">
|
:isSettingCol="false" :pagination="false" perm="EDIT">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
</template>
|
</template>
|
||||||
@@ -217,11 +217,11 @@ const compositeParam = (item) => {
|
|||||||
url: item.url,
|
url: item.url,
|
||||||
processNodeTag: null,
|
processNodeTag: null,
|
||||||
tag: tag,
|
tag: tag,
|
||||||
|
newFile: true,
|
||||||
userId: authStore.userinfo.userId
|
userId: authStore.userinfo.userId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getFile = (val) => {
|
const getFile = (val) => {
|
||||||
console.log('上传文件', val)
|
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
let fileObj = compositeParam(val)
|
let fileObj = compositeParam(val)
|
||||||
formData.value.fileList.push(fileObj)
|
formData.value.fileList.push(fileObj)
|
||||||
|
|||||||
@@ -3,22 +3,22 @@
|
|||||||
<el-form :model="formData" ref="demandForm" label-width="auto" :rules="rules">
|
<el-form :model="formData" ref="demandForm" label-width="auto" :rules="rules">
|
||||||
<baseTitle title="需求征集详情"></baseTitle>
|
<baseTitle title="需求征集详情"></baseTitle>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12" v-if="checkFormPrem('requirementName')">
|
<el-col :span="12">
|
||||||
<el-form-item label="名称">
|
<el-form-item label="名称">
|
||||||
<span>{{ formData.requirementName }}</span>
|
<span>{{ formData.requirementName }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="checkFormPrem('companyIds')">
|
<el-col :span="12">
|
||||||
<el-form-item label="所属公司">
|
<el-form-item label="所属公司">
|
||||||
<span>{{ formData.companyIds }}</span>
|
<span>{{ formData.companyIds }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="checkFormPrem('collectType')">
|
<el-col :span="12">
|
||||||
<el-form-item label="征集类型">
|
<el-form-item label="征集类型">
|
||||||
<span>{{ formData.collectType }}</span>
|
<span>{{ formData.collectType }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="checkFormPrem('deadline')">
|
<el-col :span="12">
|
||||||
<el-form-item label="截止时间">
|
<el-form-item label="截止时间">
|
||||||
<span>{{ formData.deadline }}</span>
|
<span>{{ formData.deadline }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<baseTitle title="征集说明"></baseTitle>
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
<el-col :span="24">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-card style="width: 100%">
|
<el-card style="width: 100%">
|
||||||
<div v-html="formData.collectExplain">
|
<div v-html="formData.collectExplain">
|
||||||
@@ -37,11 +37,13 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<baseTitle title="附件列表"></baseTitle>
|
<baseTitle v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" title="附件列表"></baseTitle>
|
||||||
<el-col :span="24" v-if="checkFormPrem('collectExplain')">
|
<el-col :span="24" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
<file-upload v-if="fileListShow === 'EDIT'" @getFile="getFile"/>
|
||||||
<fvTable style="width: 100%;max-height: 600px;height: 600px" v-if="showTable" :tableConfig="tableConfig"
|
<fvTable style="width: 100%;max-height: 600px;height: 600px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
:data="formData.fileList" :isSettingCol="false" :pagination="false">
|
:data="formData.fileList" :isSettingCol="false"
|
||||||
|
:pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
</template>
|
</template>
|
||||||
@@ -84,13 +86,15 @@
|
|||||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import {getInfo, agreeTask, rejectTask, downloadFile} from "@/api/project-demand/index.js";
|
import {getInfo, agreeTask, rejectTask,
|
||||||
|
deleteFile,downloadFile} from "@/api/project-demand/index.js";
|
||||||
import {getSubCompOpt} from '@/api/user/user.js'
|
import {getSubCompOpt} from '@/api/user/user.js'
|
||||||
import {ElNotification} from "element-plus";
|
import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
|
||||||
import {useTagsView} from '@/stores/tagsview.js'
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
import {matterTree} from '@/utils/matterTree.js';
|
import {matterTree} from '@/utils/matterTree.js';
|
||||||
import {getFundOption} from "@/api/special-fund";
|
import {getFundOption} from "@/api/special-fund";
|
||||||
|
|
||||||
|
|
||||||
const tagsViewStore = useTagsView()
|
const tagsViewStore = useTagsView()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@@ -100,8 +104,8 @@ const demandForm = ref()
|
|||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const companyOption = ref([])
|
const companyOption = ref([])
|
||||||
const specialFundOption = ref([])
|
const specialFundOption = ref([])
|
||||||
const formPermMap = ref(new Map());
|
|
||||||
const processInstanceData = ref({})
|
const processInstanceData = ref({})
|
||||||
|
const fileListShow = ref("READ")
|
||||||
const showTable = ref(false)
|
const showTable = ref(false)
|
||||||
const processDiagramViewer = ref(false)
|
const processDiagramViewer = ref(false)
|
||||||
const processTree = ref()
|
const processTree = ref()
|
||||||
@@ -139,29 +143,34 @@ const tableConfig = reactive({
|
|||||||
prop: 'oper',
|
prop: 'oper',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
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 (
|
return (
|
||||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const checkFormPrem = (formKey) => {
|
|
||||||
if (formPermMap.value.hasOwnProperty(formKey)) {
|
|
||||||
let formItem = formPermMap.value[formKey];
|
|
||||||
return formItem.perm === 'READ'
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const fromPrem = (formKey) => {
|
|
||||||
let formItem = formPermMap.value[formKey];
|
|
||||||
return formItem.perm
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
let approve = {
|
let approve = {
|
||||||
@@ -242,9 +251,9 @@ const init = async () => {
|
|||||||
let data = res.data
|
let data = res.data
|
||||||
formData.value = data.formData;
|
formData.value = data.formData;
|
||||||
data.formData.companyIds = getCompanyOptionItem(data.formData.companyIds)
|
data.formData.companyIds = getCompanyOptionItem(data.formData.companyIds)
|
||||||
if(data.formData.specialFund){
|
if (data.formData.specialFund) {
|
||||||
specialFundOption.value.forEach(item => {
|
specialFundOption.value.forEach(item => {
|
||||||
if(data.formData.specialFund==item.value){
|
if (data.formData.specialFund == item.value) {
|
||||||
data.formData.specialFund = item.label
|
data.formData.specialFund = item.label
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -259,6 +268,9 @@ const init = async () => {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
processDiagramViewer.value = true
|
processDiagramViewer.value = true
|
||||||
showTable.value = true
|
showTable.value = true
|
||||||
|
if (data.formPermMap["fileList"]) {
|
||||||
|
fileListShow.value = data.formPermMap["fileList"].perm
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -266,15 +278,66 @@ onMounted(async () => {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
await init()
|
await init()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const getFile = (val) => {
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
formData.value.fileList.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
let tag = ''
|
||||||
|
if (!formData.value.collectType && routerName.value === 'Requirement/add') {
|
||||||
|
tag = '需求征集'
|
||||||
|
}else if(!formData.value.collectType &&routerName.value === 'Requirement/edit'){
|
||||||
|
tag = '需求征集'
|
||||||
|
}if (formData.value.collectType) {
|
||||||
|
tag = formData.value.collectType
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
processNodeTag: null,
|
||||||
|
newFile: true,
|
||||||
|
tag: tag,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDelete = (row) => {
|
||||||
|
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteFile(row.fileId).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
ElMessage.success("删除成功");
|
||||||
|
formData.value.fileList.splice(formData.value.fileList.findIndex((item) => item.id === row.fileId), 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
ElMessage.warning("用户取消删除! ");
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
:deep(.el-empty__description) {
|
:deep(.el-empty__description) {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
:deep(.el-table--fit ){
|
|
||||||
|
:deep(.el-table--fit ) {
|
||||||
height: 600px;
|
height: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-block {
|
.detail-block {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ const compositeParam = (item) => {
|
|||||||
originalFileName: item.originalFilename,
|
originalFileName: item.originalFilename,
|
||||||
fileType: item.fileType,
|
fileType: item.fileType,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
tag:'需求征集'
|
tag:'需求征集'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -318,6 +318,7 @@ const compositeParam = (item, type) => {
|
|||||||
originalFileName: item.originalFilename,
|
originalFileName: item.originalFilename,
|
||||||
fileType: item.fileType,
|
fileType: item.fileType,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
tag: tag
|
tag: tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
|
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
|
||||||
:processViewer="summaryProcessViewer" :loading="loading"/>
|
:processViewer="summaryProcessViewer" :loading="loading"/>
|
||||||
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
|
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
|
||||||
:processViewer="summaryProcessViewer" :loading="loading"/>
|
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow"/>
|
||||||
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData" :processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
||||||
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="summaryData.formData" :data="summaryData"
|
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="summaryData.formData" :data="summaryData"
|
||||||
:processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
:processViewer="summaryProcessViewer" :loading="loading"></ApprovalDetail>
|
||||||
@@ -27,6 +27,7 @@ const route = useRoute()
|
|||||||
const summaryData = ref({})
|
const summaryData = ref({})
|
||||||
const summaryProcessViewer = ref(true)
|
const summaryProcessViewer = ref(true)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
const fileListShow = ref('READ')
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const active = ref(route.query.state)
|
const active = ref(route.query.state)
|
||||||
const showActive = ref()
|
const showActive = ref()
|
||||||
@@ -47,6 +48,9 @@ const getInfo = async (state) => {
|
|||||||
processStore.passList.value = data.passList;
|
processStore.passList.value = data.passList;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
summaryProcessViewer.value = true
|
summaryProcessViewer.value = true
|
||||||
|
if (data.formPermMap["fileList"]) {
|
||||||
|
fileListShow.value = data.formPermMap["fileList"].perm
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}else {
|
}else {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ const compositeParam = (item) => {
|
|||||||
originalFileName: item.originalFilename,
|
originalFileName: item.originalFilename,
|
||||||
fileType: item.fileType,
|
fileType: item.fileType,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
tag:'需求上报',
|
tag:'需求上报',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ const compositeParam = (item) => {
|
|||||||
originalFileName: item.originalFilename,
|
originalFileName: item.originalFilename,
|
||||||
fileType: item.fileType,
|
fileType: item.fileType,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
tag: tag
|
tag: tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ const compositeParam = (item) => {
|
|||||||
originalFileName: item.originalFilename,
|
originalFileName: item.originalFilename,
|
||||||
fileType: item.fileType,
|
fileType: item.fileType,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
tag: '项目归档',
|
tag: '项目归档',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ const compositeParam = (item) => {
|
|||||||
originalFileName: item.originalFilename,
|
originalFileName: item.originalFilename,
|
||||||
fileType: item.fileType,
|
fileType: item.fileType,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
tag: tag
|
tag: tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ const compositeParam = (item) => {
|
|||||||
originalFileName: item.originalFilename,
|
originalFileName: item.originalFilename,
|
||||||
fileType: item.fileType,
|
fileType: item.fileType,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
tag: tag
|
tag: tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ const compositeParam = (item) => {
|
|||||||
originalFileName: item.originalFilename,
|
originalFileName: item.originalFilename,
|
||||||
fileType: item.fileType,
|
fileType: item.fileType,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
tag: formData.value.tagName,
|
tag: formData.value.tagName,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ const compositeParam = (item) => {
|
|||||||
originalFileName: item.originalFilename,
|
originalFileName: item.originalFilename,
|
||||||
fileType: item.fileType,
|
fileType: item.fileType,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
tag: tag
|
tag: tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ const compositeParam = (item) => {
|
|||||||
originalFileName: item.originalFilename,
|
originalFileName: item.originalFilename,
|
||||||
fileType: item.fileType,
|
fileType: item.fileType,
|
||||||
url: item.url,
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
tag: tag
|
tag: tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user