Merge pull request 'fix : 修复页面细节' (#247) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/247
This commit is contained in:
@@ -21,13 +21,13 @@
|
|||||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
</template>
|
</template>
|
||||||
</fvTable>
|
</fvTable>
|
||||||
<div class="approval-record">
|
<div class="approval-record">
|
||||||
<baseTitle title="流程"></baseTitle>
|
<baseTitle title="流程"></baseTitle>
|
||||||
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
<process-diagram-viewer mode="view" v-if="processDiagramViewer"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="oper-page-btn">
|
<div class="oper-page-btn">
|
||||||
<el-button color="#DED0B2" @click="handleSubmit(fundForm)">提交</el-button>
|
<el-button color="#DED0B2" v-if="routerName === 'Fund/add'" @click="handleSubmit(fundForm)">提交</el-button>
|
||||||
<el-button color="#DED0B2" @click="handleResubmit">重新提交</el-button>
|
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
|
||||||
<el-button @click="handleBack">返回</el-button>
|
<el-button @click="handleBack">返回</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,11 +35,12 @@
|
|||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
import {addFund, resubmitFund,getFundDetail} from "@/api/special-fund";
|
import {addFund, resubmitFund, getFundDetail} from "@/api/special-fund";
|
||||||
import {useRouter} from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
import {useTagsView} from '@/stores/tagsview.js'
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
|
||||||
const tagsViewStore = useTagsView()
|
const tagsViewStore = useTagsView()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@@ -96,7 +97,7 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
const routerName = ref(router.currentRoute.value.name)
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
name: [{required: true, message: '请输入专项资金名称', trigger: 'blur'}],
|
name: [{required: true, message: '请输入专项资金名称', trigger: 'blur'}],
|
||||||
fundAmount: [{required: true, message: '请输入金额', trigger: 'blur'}],
|
fundAmount: [{required: true, message: '请输入金额', trigger: 'blur'}],
|
||||||
@@ -104,9 +105,8 @@ const rules = reactive({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const compositeParam = (item) => {
|
const compositeParam = (item) => {
|
||||||
let name=router.currentRoute.value.name
|
|
||||||
let tag = ''
|
let tag = ''
|
||||||
if (name === 'Fund/add'||name === 'Fund/edit') {
|
if (routerName.value === 'Fund/add' || routerName.value === 'Fund/edit') {
|
||||||
tag = '专项资金'
|
tag = '专项资金'
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@@ -152,7 +152,7 @@ const handleSubmit = async (instance) => {
|
|||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
const {msg,code} = await addFund(submitParam(formData.value))
|
const {msg, code} = await addFund(submitParam(formData.value))
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: msg,
|
message: msg,
|
||||||
@@ -167,9 +167,9 @@ const handleSubmit = async (instance) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleResubmit = () => {
|
const handleResubmit = () => {
|
||||||
if(!route.query.id)return
|
if (!route.query.id) return
|
||||||
let params={
|
let params = {
|
||||||
id:route.query.id,
|
id: route.query.id,
|
||||||
...submitParam(formData.value)
|
...submitParam(formData.value)
|
||||||
}
|
}
|
||||||
resubmitFund(params).then(res => {
|
resubmitFund(params).then(res => {
|
||||||
|
|||||||
Reference in New Issue
Block a user