fix : 修复权限按钮细节
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-loading="loading">
|
||||
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||
<!-- <AttachmentUpload></AttachmentUpload> -->
|
||||
<el-form :model="formData" label-width="auto">
|
||||
@@ -24,7 +24,7 @@
|
||||
<process-diagram-viewer v-if="processViewer" :id-name="type"/>
|
||||
</div>
|
||||
</div>
|
||||
<Opinion: v-if="data.taskId" :formData="formData" :taskId="formData.taskId"></Opinion:>
|
||||
<!-- <Opinion: v-if="data.taskId" :formData="formData" :taskId="formData.taskId"></Opinion:>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -60,9 +60,14 @@ const props = defineProps({
|
||||
type: {
|
||||
type: String,
|
||||
default: 'approval'
|
||||
}, loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
const form = ref()
|
||||
|
||||
const localData = reactive({
|
||||
@@ -119,7 +124,22 @@ const schema = computed(()=>{
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
component: ()=>(
|
||||
<div>
|
||||
{
|
||||
props.formData.singleFile?.originalFileName ?
|
||||
<span
|
||||
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
onClick={()=>handleDownload(props.formData.singleFile)}
|
||||
>
|
||||
{props.formData.singleFile?.originalFileName}
|
||||
</span> :
|
||||
<span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
)
|
||||
},
|
||||
]
|
||||
} else {
|
||||
@@ -129,7 +149,22 @@ const schema = computed(()=>{
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
component: ()=>(
|
||||
<div>
|
||||
{
|
||||
props.formData.singleFile?.originalFileName ?
|
||||
<span
|
||||
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
onClick={()=>handleDownload(props.formData.singleFile)}
|
||||
>
|
||||
{props.formData.singleFile?.originalFileName}
|
||||
</span> :
|
||||
<span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
)
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
<template>
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||
<div class="oper">
|
||||
<div class="oper-page-btn">
|
||||
<el-button type="danger" @click="handleReject">驳回</el-button>
|
||||
<el-button type="primary" @click="handleAgree">同意</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { ElLoading, ElNotification } from 'element-plus';
|
||||
import { agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
||||
import {ElNotification} from 'element-plus';
|
||||
import {agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const props = defineProps({
|
||||
taskId: {
|
||||
type: String,
|
||||
@@ -22,10 +25,10 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const form = ref()
|
||||
const schema = computed(()=>{
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '审核意见',
|
||||
label: '',
|
||||
prop: 'auditOpinion',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
@@ -39,16 +42,29 @@ const schema = computed(()=>{
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
// {
|
||||
// "auditOpinion": "统一",
|
||||
// "formData": {"formData":""},
|
||||
// "taskId": "156e69b7-15eb-11ef-a152-f268fc747b04"
|
||||
// }
|
||||
const back = () => {
|
||||
switch (route.name) {
|
||||
case 'Initiation/detail':
|
||||
router.push({name: 'Initiation'})
|
||||
break;
|
||||
case 'Filing/detail':
|
||||
router.push({name: 'Filing'})
|
||||
break;
|
||||
case 'Implementation/detail':
|
||||
router.push({name: 'Implementation'})
|
||||
break;
|
||||
case 'Summary/detail':
|
||||
router.push({name: 'Summary'})
|
||||
break;
|
||||
case 'Requirement/detail':
|
||||
router.push({name: 'Requirement'})
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 驳回
|
||||
const handleReject = async () => {
|
||||
const values = form.value.getValues()
|
||||
if(!values.auditOpinion) {
|
||||
if (!values.auditOpinion) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
@@ -56,12 +72,18 @@ const handleReject = async () => {
|
||||
})
|
||||
return
|
||||
}
|
||||
console.log('values', values)
|
||||
const params = {
|
||||
// taskId: props.taskId,
|
||||
// formData: props.formData,
|
||||
// ...values
|
||||
taskId: props.taskId,
|
||||
...values
|
||||
}
|
||||
const res = await rejectTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
back()
|
||||
}
|
||||
|
||||
const handleAgree = async () => {
|
||||
@@ -72,9 +94,15 @@ const handleAgree = async () => {
|
||||
...values
|
||||
}
|
||||
const res = await agreeTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
back()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -161,10 +161,10 @@
|
||||
<process-diagram-viewer v-if="processViewer" id-name="summaryProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oper-page-btn" v-if="data.state === '1' && data.taskId">
|
||||
<el-button @click="handleReject(summaryForm)">驳回</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
||||
</div>
|
||||
<!-- <div class="oper-page-btn" v-if="data.state === '1' && data.taskId">-->
|
||||
<!-- <el-button @click="handleReject(summaryForm)">驳回</el-button>-->
|
||||
<!-- <el-button color="#DED0B2" @click="handleAgree">同意</el-button>-->
|
||||
<!-- </div>-->
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
@@ -294,7 +294,6 @@ const handleDownload = (row) => {
|
||||
watch(
|
||||
() => props.formData,
|
||||
(val) => {
|
||||
console.log(val, 'ssss');
|
||||
}
|
||||
)
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
|
||||
Reference in New Issue
Block a user