fix : 修复专项资金页面功能细节
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
<div v-loading="loading" class="add-block">
|
||||
<baseTitle title="需求征集信息录入"></baseTitle>
|
||||
<el-form :model="formData" inline class="query-form" ref="demandForm" :rules="rules">
|
||||
<div class="left-info">
|
||||
<el-form-item v-if="checkFormPrem('requirementName')" label="名称" prop="requirementName">
|
||||
<el-input v-model="formData.requirementName" placeholder="请输入名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
@@ -30,7 +29,6 @@
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<Tinymce v-if="checkFormPrem('collectExplain') && showTinymce" image-url="/notice/file" file-url="/notice/file"
|
||||
@@ -148,10 +146,10 @@ const tableConfig = reactive({
|
||||
return (
|
||||
<div>
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
<el-button type="primary" size="large" link onClick={() => handleDelete(row)}>删除</el-button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
// <el-button type="primary" size="large" link onClick={() => handleDelete(row)}>删除</el-button>
|
||||
}
|
||||
]
|
||||
})
|
||||
@@ -176,11 +174,13 @@ const handleDownload = (row) => {
|
||||
})
|
||||
}
|
||||
const compositeParam = (item) => {
|
||||
console.log('router.currentRoute.value.path',router.currentRoute.value.path)
|
||||
let name=router.currentRoute.value.name
|
||||
let tag = ''
|
||||
// if (!formData.value.collectType && router.currentRoute.value.path === 'Requirement/add') {
|
||||
// tag = '需求征集'
|
||||
// }
|
||||
if (!formData.value.collectType && name === 'Requirement/add') {
|
||||
tag = '需求征集'
|
||||
}else if(name === 'Requirement/edit'){
|
||||
tag = '需求征集'
|
||||
}
|
||||
return {
|
||||
fileId: item.id,
|
||||
size: item.size,
|
||||
@@ -254,28 +254,32 @@ const handleSubmit = async (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
let res = await addRequirement(submitParam(formData.value))
|
||||
if (res.code === 1000) {
|
||||
ElMessage.success(res.msg)
|
||||
const {msg,code} = await addRequirement(submitParam(formData.value))
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Requirement'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleResubmit = () => {
|
||||
resubmit(submitParam(formData.value)).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: 'Requirement'
|
||||
})
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -148,19 +148,15 @@ const handleAdd = () => {
|
||||
try{
|
||||
router.push({
|
||||
name:'Requirement/add',
|
||||
query: {
|
||||
isAdd: 1
|
||||
}
|
||||
query:{}
|
||||
})
|
||||
}catch (err){
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '该用户无新增权限',
|
||||
type: 'warning'
|
||||
})
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: '该用户无新增权限',
|
||||
// type: 'warning'
|
||||
// })
|
||||
}
|
||||
//新增
|
||||
|
||||
}
|
||||
const handleEdit = (row) => {
|
||||
router.push({
|
||||
|
||||
Reference in New Issue
Block a user