fix : 修复流程图切换功能和屏蔽导出

This commit is contained in:
2024-06-11 20:14:49 +08:00
parent b425e709aa
commit 208584c34b
11 changed files with 103 additions and 70 deletions

View File

@@ -19,23 +19,38 @@
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
:preview="mode == 'resubmit'"/>
<div v-if="mode === 'resubmit'&&!changeDiagram">
<div class="approval-title">
<baseTitle title="审批记录"></baseTitle>
<div class="diagram">
<div class="base-title">流程图</div>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
/>
<div class="approval-record">
<div class="approval-title">
<baseTitle title="审批记录"></baseTitle>
<div class="diagram">
<div class="base-title">流程图</div>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
/>
</div>
</div>
</div>
<div class="process">
<operation-render :operation-list="data.operationList" :state="data.state"/>
</div>
</div>
<baseTitle title="流程"></baseTitle>
<div class="approval-record">
<process-diagram-viewer mode="view" :idName="title" v-if="processDiagramViewer&&changeDiagram"/>
<div v-if="changeDiagram">
<div class="approval-record">
<div class="approval-title">
<baseTitle title="审批记录"></baseTitle>
<div class="diagram">
<div class="base-title">流程图</div>
<el-switch
v-model="changeDiagram"
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
/>
</div>
</div>
</div>
<div class="process">
<process-diagram-viewer mode="view" :idName="title" v-if="processDiagramViewer"/>
</div>
</div>
<div class="oper-page-btn">
<el-button color="#DED0B2" v-if="mode === 'submit'" @click="handleSubmit">提交</el-button>
@@ -63,8 +78,10 @@
<el-table-column prop="createTime" label="创建时间"></el-table-column>
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button @click="chooseProProcess(scope.row)">选择</el-button>
<a :href="scope.row.baseUrl" target="_blank" style="color: #2a99ff">查看详情</a>
<div style="display: flex;align-items: center">
<el-button type="primary" @click="chooseProProcess(scope.row)" link>选择</el-button>
<a :href="scope.row.baseUrl" target="_blank" style="color: #2a99ff;margin-left: 10px">查看详情</a>
</div>
</template>
</el-table-column>
</el-table>
@@ -96,7 +113,7 @@ import Paging from "@/components/pagination/index.vue";
const router = useRouter()
const route = useRoute()
const changeDiagram = ref(false)
const changeDiagram = ref(true)
const emit = defineEmits(["getAttachment", "getOtherFile"])
const props = defineProps({
title: {
@@ -273,17 +290,17 @@ const handleSubmit = async () => {
// if (localFormData.value.singleFile) {
//
// } else {
if (attachment.value.singleFile == null) {
attachment.value.validate()
ElNotification({
title: '提示',
message: '请上传附件',
type: 'error'
})
return;
} else {
attachment.value.clearValidate()
}
if (attachment.value.singleFile == null) {
attachment.value.validate()
ElNotification({
title: '提示',
message: '请上传附件',
type: 'error'
})
return;
} else {
attachment.value.clearValidate()
}
// }
let params = {
@@ -375,6 +392,7 @@ watchEffect(() => {
})
onMounted(async () => {
changeDiagram.value = props.mode === 'submit';
await init()
})
</script>