Merge pull request 'fix : 修复页面细节' (#225) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/225
This commit is contained in:
2024-05-23 09:53:04 +00:00
2 changed files with 24 additions and 26 deletions

View File

@@ -48,14 +48,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="所属公司" prop="affiliatedCompanyId">
<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-tree-select v-model="formData.affiliatedCompanyId" :data="companyOption" style="width: 100%;"
filterable clearable :check-strictly="true" multiple/>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -221,7 +215,8 @@
</el-form>
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
@getAttachment="getAttachment"
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="name === 'Summary/edit'"/>
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
:preview="name === 'Summary/edit'"/>
<!-- <fvForm :schema="schame" @getInstance="getInstance"></fvForm>-->
<div class="approval-record">
<baseTitle title="流程"></baseTitle>
@@ -246,12 +241,13 @@ import {useCacheStore} from '@/stores/cache.js'
import {useProcessStore} from '@/stores/processStore.js';
import {getSubCompOpt} from "@/api/user/user";
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
const cacheStore = useCacheStore()
const processStore = useProcessStore()
const router = useRouter()
const route = useRoute()
const attachment = ref()
const name=ref(router.currentRoute.value.name)
const name = ref(router.currentRoute.value.name)
const loading = ref(false)
const processDiagramViewer = ref(false)
const tagsViewStore = useTagsView()
@@ -290,7 +286,7 @@ const rules = reactive({
})
const compositeParam = (item, type) => {
let tag = ''
if ( name.value=== 'Summary/add'||name.value === 'Summary/edit') {
if (name.value === 'Summary/add' || name.value === 'Summary/edit') {
tag = '需求上报'
}
return {
@@ -302,8 +298,8 @@ const compositeParam = (item, type) => {
tag: tag
}
}
const getEditOtherFile=(val)=>{
console.log('getEditOtherFile',val)
const getEditOtherFile = (val) => {
console.log('getEditOtherFile', val)
}
const getAttachment = (val) => {
console.log('上传文件getAttachment', val)
@@ -369,13 +365,15 @@ const handleSubmit = async (instance) => {
"specialFundAmount": "3",
deploymentId: deploymentId.value,
"singleFile": singleFile,
"files": otherFiles,
"fileList": otherFiles,
"requirementId":route.query.id
}
// ...formData.value,
// let params = {
// ...formData.value,
// deploymentId: deploymentId.value,
// fileList: files,
// requirementId:102
// fileList: otherFiles,
// singleFile: singleFile,
// requirementId: route.query.id
// }
let res = await requirementReported(params)
ElNotification({
@@ -395,31 +393,31 @@ const handleResubmit = () => {
let singleFile = {}
let otherFiles = []
let fileArray
if(name.value === 'Summary/edit'){
if (name.value === 'Summary/edit') {
singleFile = {
fileId: attachment.value.singleFile.fileId
}
fileArray=attachment.value.allFileList
}else {
fileArray = attachment.value.allFileList
} else {
if (file.value.fileId !== undefined) {
singleFile = {
fileId: file.value.fileId
}
}
fileArray=otherFileList.value
fileArray = otherFileList.value
}
fileArray.forEach(item => {
otherFiles.push(getFileParam(item))
})
//todo requirementId
let params={
let params = {
...formData.value,
deploymentId: deploymentId.value,
fileList: otherFiles,
singleFile: singleFile,
requirementId: route.query.id
}
console.log('重新提交params',params)
console.log('重新提交params', params)
resubmitReported(params).then(res => {
ElNotification({
title: '提示',
@@ -443,7 +441,7 @@ const getDetailInfo = async () => {
})
if (res.code === 1000) {
formData.value = res.data.formData
loading.value=false
loading.value = false
}
})
}
@@ -474,7 +472,7 @@ const init = async () => {
onMounted(async () => {
await init()
if (route.query.projectId) {
loading.value=true
loading.value = true
await getDetailInfo()
}
})

View File

@@ -13,7 +13,7 @@ export const fileUp = (url, data) => {
export const requirementReported = (data) => {
return request({
url: '/workflow/mosr/requirement/collect/reported',
url: '/workflow/mosr/requirement/reported',
method: "post",
data: data
});