fix : 优化需求征集详情页面

This commit is contained in:
2024-06-04 16:41:28 +08:00
parent 6597506435
commit 1d66c44edb
16 changed files with 162 additions and 429 deletions

View File

@@ -377,8 +377,8 @@ html, body, #app, .el-container, .el-aside, .el-main {
//放大缩小按钮上外边距
.scale {
margin-top: 10px;
z-index: 666;
position: static;
//z-index: 666;
//position: static;
//top: -20px;
}

View File

@@ -55,19 +55,9 @@ const props = defineProps({
default: false
}
})
watch(() => props.loading, (newVal) => {
props.loading = newVal
}, {deep: true})
const form = ref()
const localData = reactive({
fileList: props.formData.fileList,
singleFile: props.formData.singleFile
})
const schema = computed(()=>{
let arr
if(props.type == 'approval') {
arr = [
{
@@ -86,7 +76,7 @@ const schema = computed(()=>{
component: ()=>(
<div>
{
props.formData.singleFile?.originalFileName ?
props.formData.singleFile?.originalFileName?
<span
style={{color: '#409EFF', cursor: 'pointer'}}
onClick={()=>handleDownload(props.formData.singleFile)}
@@ -118,7 +108,7 @@ const schema = computed(()=>{
component: ()=>(
<div>
{
props.formData.singleFile?.originalFileName ?
props.formData.singleFile?.originalFileName?
<span
style={{color: '#409EFF', cursor: 'pointer'}}
onClick={()=>handleDownload(props.formData.singleFile)}
@@ -143,7 +133,7 @@ const schema = computed(()=>{
component: ()=>(
<div>
{
props.formData.singleFile?.originalFileName ?
props.formData.singleFile?.originalFileName?
<span
style={{color: '#409EFF', cursor: 'pointer'}}
onClick={()=>handleDownload(props.formData.singleFile)}
@@ -172,10 +162,13 @@ const handleDownload = (row) => {
loading.close()
})
}
watchEffect(()=>{
Object.keys(props.formData).length && (form.value.setValues(props.formData))
})
watch(() => props.loading, (newVal) => {
props.loading = newVal
}, {deep: true})
</script>
<style lang="scss" scoped>

View File

@@ -1,27 +1,32 @@
<template>
<div v-loading="loading">
<el-form :model="formData" ref="form" label-width="auto">
<el-form :model="formData" label-width="auto">
<el-row>
<el-col :span="12">
<el-form-item label="名称">
<el-form-item label="征集名称">
<span>{{ formData.requirementName }}</span>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="所属公司">-->
<!-- <span>{{ formData.companyIds }}</span>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item label="征集类型">
<span>{{ formData.collectType }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-col :span="12" v-if="type==='singleDetail'">
<el-form-item label="所属公司">
<span>{{ formData.companyIds }}</span>
</el-form-item>
</el-col>
<el-col :span="type==='singleDetail'?12:24">
<el-form-item label="截止时间">
<span>{{ formData.deadline }}</span>
</el-form-item>
</el-col>
<el-col :span="24" v-if="formData.isSpecialFund">
<el-form-item label="专项资金">
<span>{{ formData.specialFund }}</span>
</el-form-item>
</el-col>
<baseTitle title="征集说明"></baseTitle>
<el-col :span="24">
<el-form-item>
@@ -31,29 +36,11 @@
</el-card>
</el-form-item>
</el-col>
<baseTitle title="附件列表"></baseTitle>
<baseTitle v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" title="附件列表"></baseTitle>
<el-col :span="24">
<el-form-item>
<fvTable style="width: 100%;max-height: 200px" v-if="processViewer" :tableConfig="tableConfig"
:data="formData.fileList" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
</template>
</fvTable>
</el-form-item>
</el-col>
<el-col :span="24">
<div v-if="formData.taskId">
<baseTitle title="审核意见"></baseTitle>
<el-form-item prop="auditOpinion">
<el-input
v-model="formData.auditOpinion"
:rows="3"
type="textarea"
placeholder="请输入审核意见"
/>
</el-form-item>
</div>
<file-component title="" tag="需求征集"
v-model:value="formData.fileList" :processViewer="processViewer"
:file-list-show="fileListShow"/>
</el-col>
</el-row>
<div class="approval-record">
@@ -73,10 +60,6 @@ import OperationRender from '@/views/workflow/common/OperationRender.vue'
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
import {downloadFile} from "@/api/project-demand";
const emit = defineEmits(['getInfo',"update:formData"])
const form = ref()
const showTable = ref(false)
const props = defineProps({
formData: {
type: Array,
@@ -93,48 +76,20 @@ const props = defineProps({
companyOption: {
type: Array,
default: []
}, loading: {
},
loading: {
type: Boolean,
default: false
},
fileListShow: {
type: String,
default: ''
},
type: {
type: String,
default: ''
}
})
const tableConfig = reactive({
columns: [
{
prop: 'index',
type: 'index',
label: '序号',
align: 'center',
width: '80',
},
{
prop: 'originalFileName',
label: '文件名',
align: 'center',
},
{
prop: 'tag',
label: '标签',
align: 'center'
},
{
prop: 'size',
label: '文件大小',
align: 'center',
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
},
{
prop: 'oper',
label: '操作',
align: 'center',
currentRender: ({row, index}) => {
return (
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
)
}
}
]
})
const handleDownload = (row) => {
downloadFile(row.fileId).then(res => {
const blob = new Blob([res])
@@ -154,6 +109,16 @@ watch(() => props.processViewer, (newVal) => {
}, {deep: true})
</script>
<style scoped>
<style scoped lang="scss">
:deep(.el-empty__description) {
margin-top: 0;
}
.approval-record {
padding-bottom: 30px;
.process {
position: relative;
}
}
</style>

View File

@@ -1,7 +1,7 @@
<template>
<el-form-item label="需求上报附件" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'">
<el-form-item :label="title" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'">
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
<fvTable style="width: 100%;max-height: 400px;" v-if="processViewer" :tableConfig="tableConfig"
<fvTable style="width: 100%;max-height: 300px;" v-if="processViewer" :tableConfig="tableConfig"
:data="_value" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
@@ -11,10 +11,8 @@
</template>
<script setup lang="jsx">
import {downloadFile, deleteFile} from "@/api/project-demand";
import {ElMessage, ElMessageBox} from "element-plus";
import {ElMessageBox, ElNotification} from "element-plus";
const props = defineProps({
title: {
@@ -38,9 +36,7 @@ const props = defineProps({
default: false
},
})
const emit = defineEmits(['update:value'])
const tableConfig = reactive({
columns: [
{
@@ -123,11 +119,18 @@ const compositeParam = (item, type) => {
fileType: item.fileType,
url: item.url,
newFile: true,
tag: '需求上报'
tag: props.tag
}
}
const handleDownload = (row) => {
downloadFile(row.fileId).then(res => {
const blob = new Blob([res])
let a = document.createElement('a')
a.href = URL.createObjectURL(blob)
a.download = row.originalFileName
a.click()
})
}
const handleDelete = (row) => {
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
confirmButtonText: '确定',
@@ -135,13 +138,21 @@ const handleDelete = (row) => {
type: 'warning'
}).then(() => {
deleteFile(row.fileId).then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
ElMessage.success("删除成功");
_value.splice(_value.findIndex((item) => item.id === row.fileId), 1);
_value.value.splice(_value.value.findIndex((item) => item.id === row.fileId), 1);
}
});
}).catch(() => {
ElMessage.warning("用户取消删除! ");
ElNotification({
title: '提示',
message: '用户取消删除! ',
type: 'warning'
})
})
}
@@ -151,5 +162,7 @@ watch(() => props.processViewer, (newVal) => {
</script>
<style scoped>
:deep(.el-table--fit ) {
height: 300px !important;
}
</style>

View File

@@ -126,7 +126,7 @@
</el-col>
<el-col :span="24">
<el-form-item label="需求上报申请书">
<el-button type="primary" link @click="handleDownload(localFormData.singleFile)">
<el-button type="primary" link @click="handleDownload(localFormData.singleFile)" style="font-size: 16px">
{{ localFormData.singleFile?.originalFileName }}
</el-button>
</el-form-item>

View File

@@ -20,7 +20,7 @@
</el-form>
<el-card style="width: 100%">
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
:data="otherFileList" :isSettingCol="false" :pagination="false">
:data="fileList" :isSettingCol="false" :pagination="false">
<template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
</template>
@@ -38,7 +38,7 @@ const router = useRouter()
const attachment = reactive({})
const emit = defineEmits(['search'])
const props = defineProps({
otherFileList: {
fileList: {
type: Array,
default: []
},
@@ -123,12 +123,12 @@ const handleDownload = (row) => {
watch(() => props.type, (val) => {
props.type = val
})
watch(() => props.otherFileList, (val) => {
watch(() => props.fileList, (val) => {
showTable.value = false
nextTick(() => {
showTable.value = true
})
props.otherFileList = val
props.fileList = val
})
if (props.type === '40') {
getTagsOption()

View File

@@ -220,7 +220,6 @@ const formatActive = (val) => {
}
const stepClass = (val) => {
console.log('localStepSuccess.value',localStepSuccess.value,val)
if (localStepSuccess.value.includes(val)) {
return 'step-success'
}
@@ -228,7 +227,6 @@ const stepClass = (val) => {
}
const handleStep = (key, index) => {
console.log('key, index',key, index)
if (localStepSuccess.value.includes(index)) {
let active = ''
localActive.value = index

View File

@@ -1,229 +1,45 @@
<template>
<div class="detail-block" v-loading="loading">
<el-form :model="formData" ref="demandForm" label-width="auto" :rules="rules">
<baseTitle title="需求征集详情"></baseTitle>
<el-row>
<el-col :span="12">
<el-form-item label="名称">
<span>{{ formData.requirementName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属公司">
<span>{{ formData.companyIds }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="征集类型">
<span>{{ formData.collectType }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="截止时间">
<span>{{ formData.deadline }}</span>
</el-form-item>
</el-col>
<el-col :span="24" v-if="formData.isSpecialFund">
<el-form-item label="专项资金">
<span>{{ formData.specialFund }}</span>
</el-form-item>
</el-col>
<baseTitle title="征集说明"></baseTitle>
<el-col :span="24">
<el-form-item>
<el-card style="width: 100%">
<div v-html="formData.collectExplain">
</div>
</el-card>
</el-form-item>
</el-col>
<baseTitle v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" title="附件列表"></baseTitle>
<el-col :span="24" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'">
<el-form-item>
<file-upload v-if="fileListShow === 'EDIT'" @getFile="getFile"/>
<fvTable style="width: 100%;max-height: 600px;height: 600px" v-if="showTable" :tableConfig="tableConfig"
:data="formData.fileList" :isSettingCol="false"
:pagination="false">
<template #empty>
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
</template>
</fvTable>
</el-form-item>
</el-col>
<el-col :span="24">
<div class="approval-record">
<baseTitle title="审批记录"></baseTitle>
<div class="process">
<operation-render v-if="processDiagramViewer" :operation-list="processInstanceData.operationList"
:state="processInstanceData.state"/>
<process-diagram-viewer v-if="processDiagramViewer"/>
</div>
</div>
</el-col>
<el-col :span="24">
<div v-if="processInstanceData.taskId">
<baseTitle title="审核意见"></baseTitle>
<el-form-item prop="auditOpinion">
<el-input
v-model="formData.auditOpinion"
:rows="3"
type="textarea"
placeholder="请输入审核意见"
/>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
<div class="oper-page-btn" v-if="processInstanceData.state === '1' && processInstanceData.taskId">
<el-button type="danger" @click="handleReject(demandForm)">驳回</el-button>
<el-button color="#DED0B2" @click="handleSubmit">同意</el-button>
</div>
</div>
<baseTitle title="需求征集详情"></baseTitle>
<collection-detail :formData="collectData.formData" :data="collectData" type="singleDetail"
:fileListShow="fileListShow"
:processViewer="processViewer" :loading="loading"/>
<opinion v-if="collectData.taskId" :formData="formData" :taskId="collectData.taskId"></opinion>
</template>
<script setup lang="jsx">
import OperationRender from '@/views/workflow/common/OperationRender.vue'
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
import {useProcessStore} from '@/stores/processStore.js';
import {getInfo, agreeTask, rejectTask,
deleteFile,downloadFile} from "@/api/project-demand/index.js";
import {getSubCompOpt} from '@/api/user/user.js'
import {ElMessage, ElMessageBox, ElNotification} from "element-plus";
import {useProcessStore} from '@/stores/processStore.js'
import {getInfo} from "@/api/project-demand/index.js";
import {ElNotification} from "element-plus";
import {useTagsView} from '@/stores/tagsview.js'
import {matterTree} from '@/utils/matterTree.js';
import {getFundOption} from "@/api/special-fund";
import {getSubCompOpt} from "@/api/user/user";
import {matterTree} from "@/utils/matterTree";
const tagsViewStore = useTagsView()
const router = useRouter()
const route = useRoute()
const form = ref();
const loading = ref(false)
const demandForm = ref()
const processStore = useProcessStore()
const companyOption = ref([])
const specialFundOption = ref([])
const processInstanceData = ref({})
const fileListShow = ref("READ")
const showTable = ref(false)
const processDiagramViewer = ref(false)
const processViewer = ref(false)
const processTree = ref()
const companyNameArray = ref([])
const collectData = ref([])
const formData = ref({})
const rules = reactive({
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
})
const tableConfig = reactive({
columns: [
{
prop: 'index',
type: 'index',
label: '序号',
align: 'center',
width: '80',
},
{
prop: 'originalFileName',
label: '文件名',
align: 'center',
},
{
prop: 'tag',
label: '标签',
align: 'center'
},
{
prop: 'size',
label: '文件大小',
align: 'center',
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
},
{
prop: 'oper',
label: '操作',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = []
btn.push({label: '下载', func: () => handleDownload(row), type: 'primary'})
if (row.newFile){
btn.push({label: '删除', func: () => handleDelete(row), type: 'primary'})
}
return (
<div style={{width: '100%'}}>
{
btn.map(item => (
<el-button
type={item.type}
onClick={() => item.func()}
link
>
{item.label}
</el-button>
))
}
</div>
)
}
}
]
})
const handleSubmit = () => {
let approve = {
taskId: processInstanceData.value.taskId,
auditOpinion: formData.value.auditOpinion,
formData: formData.value
}
agreeTask(approve).then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
router.push({
name: 'Requirement'
})
}
})
}
const handleReject = (instance) => {
if (!instance) return
instance.validate(async (valid) => {
if (!valid) return
let approve = {
taskId: processInstanceData.value.taskId,
auditOpinion: formData.value.auditOpinion,
}
rejectTask(approve).then(res => {
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
router.push({
name: 'Requirement'
})
}
})
})
}
const getCompanyOption = async () => {
const res = await getSubCompOpt()
companyOption.value = res.data
}
const companyOption = ref([])
const companyNameArray = ref([])
const getFundOptions = async () => {
const res = await getFundOption()
specialFundOption.value = res.data
}
const getCompanyOption = async () => {
const res = await getSubCompOpt()
companyOption.value = res.data
}
const getCompanyOptionItem = (val) => {
if (val !== undefined) {
val.forEach(item => {
@@ -232,20 +48,10 @@ const getCompanyOptionItem = (val) => {
}
return companyNameArray.value.join('');
}
const handleDownload = (row) => {
downloadFile(row.fileId).then(res => {
const blob = new Blob([res])
let a = document.createElement('a')
a.href = URL.createObjectURL(blob)
a.download = row.originalFileName
a.click()
})
}
const init = async () => {
if (!route.query.id) return;
await getCompanyOption()
await getFundOptions()
await getCompanyOption()
getInfo(route.query.id).then(res => {
if (res.code !== 1000) {
ElNotification({
@@ -256,8 +62,9 @@ const init = async () => {
}
loading.value = false
let data = res.data
formData.value = data.formData;
data.formData.companyIds = getCompanyOptionItem(data.formData.companyIds)
collectData.value = data
formData.value = data.formData;
if (data.formData.specialFund) {
specialFundOption.value.forEach(item => {
if (data.formData.specialFund == item.value) {
@@ -273,7 +80,7 @@ const init = async () => {
processStore.refuseList.value = data.refuseList;
processStore.passList.value = data.passList;
nextTick(() => {
processDiagramViewer.value = true
processViewer.value = true
showTable.value = true
if (data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm
@@ -285,55 +92,6 @@ onMounted(async () => {
loading.value = true
await init()
})
const getFile = (val) => {
showTable.value = false
let fileObj = compositeParam(val)
formData.value.fileList.push(fileObj)
nextTick(() => {
showTable.value = true
})
}
const compositeParam = (item) => {
let tag = ''
if (!formData.value.collectType && routerName.value === 'Requirement/add') {
tag = '需求征集'
}else if(!formData.value.collectType &&routerName.value === 'Requirement/edit'){
tag = '需求征集'
}if (formData.value.collectType) {
tag = formData.value.collectType
}
return {
fileId: item.id,
size: item.size,
originalFileName: item.originalFilename,
fileType: item.fileType,
url: item.url,
processNodeTag: null,
newFile: true,
tag: tag,
}
}
const handleDelete = (row) => {
ElMessageBox.confirm(`确认删除名称为${row.originalFileName}的表格吗?`, '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteFile(row.fileId).then(res => {
if (res.code === 1000) {
ElMessage.success("删除成功");
formData.value.fileList.splice(formData.value.fileList.findIndex((item) => item.id === row.fileId), 1);
}
});
}).catch(() => {
ElMessage.warning("用户取消删除! ");
})
}
</script>
<style lang="scss" scoped>
@@ -344,34 +102,35 @@ const handleDelete = (row) => {
:deep(.el-table--fit ) {
height: 300px !important;
}
.detail-block {
overflow: hidden;
padding-right: 10px;
.info {
display: flex;
flex-wrap: wrap;
//.info {
// display: flex;
// flex-wrap: wrap;
//
// > div {
// width: 350px;
// margin-bottom: 15px;
// margin-right: 10px;
//
// > span:first-child {
// color: black;
// font-size: 16px;
// font-weight: bold;
// }
// }
//}
> div {
width: 350px;
margin-bottom: 15px;
margin-right: 10px;
> span:first-child {
color: black;
font-size: 16px;
font-weight: bold;
}
}
}
.approval-record {
padding-bottom: 30px;
.process {
position: relative;
}
}
//.approval-record {
// padding-bottom: 30px;
//
// .process {
// position: relative;
// }
//}
}
</style>

View File

@@ -18,11 +18,11 @@ const authStore = useAuthStore()
const router = useRouter()
const searchConfig = reactive([
{
label: '需求名称',
label: '征集名称',
prop: 'requirementName',
component: 'el-input',
props: {
placeholder: '请输入需求名称查询',
placeholder: '请输入征集名称查询',
clearable: true,
filterable: true,
checkStrictly: true
@@ -60,7 +60,7 @@ const tableConfig = reactive({
},
{
prop: 'requirementName',
label: '需求名称',
label: '征集名称',
align: 'center'
},
{

View File

@@ -417,7 +417,7 @@ const handleSubmit = debounce(async (instance) => {
// }
let params = {
...formData.value,
isSpecialFund: formData.value.isSpecialFund ? formData.value.isSpecialFund : false,
isSpecialFund: formData.value.isSpecialFund? formData.value.isSpecialFund : false,
deploymentId: deploymentId.value,
fileList: otherFiles,
singleFile: singleFile,
@@ -472,6 +472,7 @@ const handleResubmit = debounce(() => {
//todo requirementId
let params = {
...formData.value,
isSpecialFund: formData.value.isSpecialFund? formData.value.isSpecialFund : false,
deploymentId: deploymentId.value,
fileList: otherFiles,
singleFile: singleFile,

View File

@@ -2,7 +2,7 @@
<steps :active="route.query.id==='-1'?0:1" @setDetail="setDetail" @stepChange="stepChange" :reportType="route.query.id==='-1'?'direct':''">
<template #content>
<collection-detail v-show="showActive == '00'" :formData="summaryData.formData" :data="summaryData"
:processViewer="summaryProcessViewer" :loading="loading"/>
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow"/>
<summary-detail v-show="showActive == '10'" :formData="summaryData.formData" :data="summaryData"
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow"/>
<ApprovalDetail v-show="showActive == '20'" :formData="summaryData.formData" :data="summaryData"
@@ -32,11 +32,11 @@ const processStore = useProcessStore()
const active = ref(route.query.state)
const showActive = ref()
const getInfo = async (state) => {
fileListShow.value='READ'
const projectId = route.query.projectId
summaryProcessViewer.value = false
loading.value = true
const {code, data,msg} = await getMapProjectStateInfo(projectId, state)
if(data===undefined)return;
if(code===1000){
summaryData.value = data;
loading.value = false
@@ -58,6 +58,10 @@ const getInfo = async (state) => {
message: msg,
type: 'error'
})
if(msg==='查询结果为空'){
summaryData.value=[]
}
loading.value = false
}
}
@@ -71,7 +75,3 @@ const stepChange = (data) => {
getInfo(data.active)
}
</script>
<style scoped>
</style>

View File

@@ -137,7 +137,7 @@ const tableConfig = reactive({
columns: [
{
prop: 'projectName',
label: '名称',
label: '项目名称',
align: 'center'
},
{

View File

@@ -62,6 +62,9 @@ const getAllInfo = async (state) => {
message: msg,
type: 'error'
})
if(msg==='查询结果为空'){
commonForm.value=[]
}
loading.close()
}
if (data === undefined) return;

View File

@@ -136,7 +136,7 @@ const tableConfig = reactive({
columns: [
{
prop: 'projectName',
label: '名称',
label: '项目名称',
align: 'center'
},
{

View File

@@ -1,13 +1,13 @@
<template>
<div>
<div class="scale">
<el-button icon="Plus" size="mini" @click="scale += 10" :disabled="scale >= 150" circle></el-button>
<span>{{ scale }}%</span>
<el-button icon="Minus" size="mini" @click="scale -= 10" :disabled="scale <= 40" circle></el-button>
<span>{{ scale }}%</span>
<el-button icon="Plus" size="mini" @click="scale += 10" :disabled="scale >= 150" circle></el-button>
</div>
</div>
<div style="margin-top: 40px">
<div :style="'transform: scale('+ scale / 100 +');'">
<div>
<div :style="'transform: scale('+ scale / 100 +');margin-top: 100px'">
<div :id="idName">
<process-tree :mode="mode" ref="processTreePreview" :id-name="idName"/>
</div>
@@ -24,13 +24,14 @@ const props = defineProps({
mode: {
type: String,
default: 'preview'
},idName:{
type:String,
default:'previewProcess'
},
idName: {
type: String,
default: 'previewProcess'
}
})
nextTick(()=>{
nextTick(() => {
processTreePreview.value.init()
})
</script>

View File

@@ -68,26 +68,26 @@ export default defineConfig({
strictPort: false,
open: true,
proxy: {
// '/api/workflow': {
'/api/workflow': {
target: 'http://frp.feashow.cn:31800/',
// target: 'http://clay.frp.feashow.cn/',
// target: 'http://192.168.31.175:8000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
},
// '/summary/admin': {
// // target: 'http://frp.feashow.cn:31800/',
// target: 'http://clay.frp.feashow.cn/',
// // target: 'http://192.168.31.175:8000',
// changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, '')
// },
// '/api/admin': {
// // target: 'http://frp.feashow.cn:31800/',
// target: 'http://clay.frp.feashow.cn/',
// // target: 'http://192.168.31.175:8000',
// changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, '')
// rewrite: (path) => path.replace(/^\/summary/, '')
// },
'/api': {
target: 'http://mosr.feashow.cn',
changeOrigin: true,
},
// '/api/notice-ws': {
// target: 'ws://mosr.feashow.cn/api/notice-ws',
// '/summary/notice-ws': {
// target: 'ws://mosr.feashow.cn/summary/notice-ws',
// ws: true,
// changeOrigin: true,
// }