fix : 修复页面

This commit is contained in:
2024-05-19 18:00:48 +08:00
parent 1fc0ae6ac0
commit 08a609e2a8
7 changed files with 291 additions and 156 deletions

View File

@@ -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>

View File

@@ -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>