fix : 重新提交页面初始化

This commit is contained in:
2024-05-20 17:56:38 +08:00
parent a663b84fab
commit e648faba69
8 changed files with 270 additions and 60 deletions

View File

@@ -221,7 +221,7 @@
</el-form>
<AttachmentUpload ref="attachment" label="需求申请书附件" :showTable="showTable" :otherFileList="otherFileList"
@getAttachment="getAttachment"
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData" :preview="router.currentRoute.value.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>
@@ -250,13 +250,13 @@ const cacheStore = useCacheStore()
const processStore = useProcessStore()
const router = useRouter()
const route = useRoute()
const attachment = ref()
const name=ref(router.currentRoute.value.name)
const loading = ref(false)
const processDiagramViewer = ref(false)
const tagsViewStore = useTagsView()
const companyOption = ref([])
const summaryForm = ref()
const attachment = ref()
const deploymentId = ref()
const showTable = ref(true)
const otherFileList = ref([])
@@ -412,6 +412,7 @@ const handleResubmit = () => {
fileArray.forEach(item => {
otherFiles.push(getFileParam(item))
})
//todo requirementId
let params={
...formData.value,
deploymentId: deploymentId.value,
@@ -421,14 +422,16 @@ const handleResubmit = () => {
}
console.log('重新提交params',params)
resubmitReported(params).then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
ElMessage.success(res.msg)
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
router.push({
name: 'Summary'
})
} else {
ElMessage.error(res.msg)
}
})
}

View File

@@ -121,11 +121,11 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'},{label: '编辑', func: () => handleEdit(row), type: 'primary'},{label: '上报', func: () => handleAdd(row), type: 'primary'}]
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
// if (row.state === '3') {
// btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
// } else if (row.state === '0') {
// btn.push({label: '上报', func: () => handleAdd(row), type: 'primary'})
btn.push({label: '上报', func: () => handleAdd(row), type: 'primary'})
// }
return (
<div style={{width: '100%'}}>
@@ -169,7 +169,6 @@ const handleAdd = (row) => {
router.push({
name: 'Summary/add',
query: {
isAdd: 1,
id:row.requirementId
}
})