From 31f4cb4c98684b3324399b5468d955919fc8de88 Mon Sep 17 00:00:00 2001
From: wangting <wangting@vci-tech.com>
Date: 星期四, 16 一月 2025 10:41:03 +0800
Subject: [PATCH] 调整样式,修改流程模板定义
---
Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue | 123 ++++++++++++++++++++++++++++++++++------
Source/plt-web/plt-web-ui/src/styles/ui.scss | 14 +++-
Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue | 2
3 files changed, 114 insertions(+), 25 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/styles/ui.scss b/Source/plt-web/plt-web-ui/src/styles/ui.scss
index de021e8..7336bb7 100644
--- a/Source/plt-web/plt-web-ui/src/styles/ui.scss
+++ b/Source/plt-web/plt-web-ui/src/styles/ui.scss
@@ -371,17 +371,18 @@
}
.avue-dialog .el-dialog{
top:50%;
- max-height: calc(100% - 80px);
+ max-height: calc(100% - 50px);
+ max-width: calc(100% - 50px);
-webkit-transform: translate(-50%, 0);
transform: translate(-50%, -50%);
margin-top: 0 !important;
}
.avue-dialog .el-dialog__body{
padding: 15px 15px 0px 15px; // 涓婂彸涓嬪乏 鍙栨秷琛ㄦ牸涓嬭竟璺濓紙浼氬嚭鐜版粴鍔ㄦ潯锛�
- margin-bottom: 10px !important;
+ margin-bottom: 5px !important;
}
.avue-dialog .el-dialog__body .avue-form{
- margin: 0px auto 40px; // 鍗曠嫭缁欏璇濇閲岀殑avue琛ㄥ崟鍔犱笂涓嬭竟璺�
+ margin: 0px auto 45px; // 鍗曠嫭缁欏璇濇閲岀殑avue琛ㄥ崟鍔犱笂涓嬭竟璺�
}
.dialog-footer{
background-color: #ffffff;
@@ -408,15 +409,18 @@
.avue-crud table td{
line-height: 22px;
}
+.avue-crud__header{
+ min-height: 35px;
+}
/**宸︿晶鎿嶄綔鏍�**/
.avue-crud__left{
display: flex;
- align-items: center;
+ align-items: start;
}
/**鍙充晶渚ф搷浣滄爮**/
.avue-crud__right{
display: flex;
- align-items: center;
+ align-items: start;
}
/**琛ㄥ唴鎿嶄綔鏍�**/
.avue-crud .avue-crud__menu{
diff --git a/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue
index 5e25bd7..35701d4 100644
--- a/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue
@@ -1,7 +1,7 @@
<template>
<!--娴佺▼妯℃澘瀹氫箟-->
<basic-container style="height: calc(100vh - 123px)">
- <div style="margin-bottom: 5px;">
+ <div style="margin-bottom: 10px;">
娴佺▼鍒嗙被锛�
<el-select v-model="tempType" :clearable="true" placeholder="璇烽�夋嫨" size="small"
style="width: 300px;margin-right: 20px;"
@@ -77,22 +77,45 @@
</span>
</el-button>
</template>
-
</avue-crud>
<!-- 鍒涘缓缂栬緫鑷畾涔夊璇濇 -->
<el-dialog
v-dialogDrag
v-loading="dialogLoading"
- :title="dialogType === 'add' ? ' 鍒涘缓' : '缂栬緫'"
+ title="娴佺▼鑷畾涔�"
:visible.sync="dialogVisible"
append-to-body="true"
class="avue-dialog"
- width="1000px"
- @close="dialogClose"
+ :close-on-press-escape="false"
+ :fullscreen="true"
+ :before-close="handleNutflowClose"
+ custom-class="wf-dialog"
>
+ <wf-design-base v-if="nutflowOption.step === 1"
+ class="animated fadeIn"
+ style="height: calc(100vh - 178px);"
+ ref="wf-design"
+ :options="nutflowOption.step1"></wf-design-base>
+ <wf-design-base v-if="nutflowOption.step === 2"
+ class="animated fadeIn"
+ style="height: calc(100vh - 178px);"
+ ref="wf-design-view"
+ :options="nutflowOption.step2"></wf-design-base>
<span slot="footer" class="dialog-footer">
- <el-button size="small" type="primary" @click="saveHandler">纭� 瀹�</el-button>
- <el-button size="small" @click="dialogClose">鍙� 娑�</el-button>
+ <el-button v-if="nutflowOption.step === 1"
+ size="small"
+ type="success"
+ @click="handleStep(1)">涓� 涓� 姝�</el-button>
+ <el-button v-if="nutflowOption.step === 2"
+ size="small"
+ type="success"
+ @click="handleStep(-1)">涓� 涓� 姝�</el-button>
+ <el-button v-if="nutflowOption.step === 2"
+ size="small"
+ type="primary"
+ @click="handleSubmitModel">纭� 瀹�</el-button>
+ <el-button size="small"
+ @click="handleNutflowClose(() => {}, true)">鍙� 娑�</el-button>
</span>
</el-dialog>
<!-- 瀵煎叆 -->
@@ -103,7 +126,7 @@
<el-main width="60%">
<div style="height: 100%;position: relative;">
- <flow-design style="padding-top: 5px" :is-display.sync="flowBox" :process-definition-id="processDefinitionId" height="calc(100vh - 190px)"></flow-design>
+ <flow-design style="padding-top: 5px" :is-display.sync="flowBox" :process-definition-id="processDefinitionId" height="calc(100vh - 195px)"></flow-design>
<div style="position: absolute;top:0;left: 0;height: 100%;width: 100%"></div>
</div>
</el-main>
@@ -138,6 +161,18 @@
dialogType:'add',
processDefinitionId: '',
flowBox: false,
+ nutflowOption: {
+ process: {},
+ step: 1,
+ step1: {
+ toolbar: ['open', 'create', 'fit', 'zoom-in', 'zoom-out', 'undo', 'redo', 'import', 'preview'],
+ },
+ step2: {
+ mode: 'view',
+ simulation: true,
+ minimap: true,
+ }
+ }
}
},
computed: {
@@ -225,29 +260,75 @@
this.dialogVisible = true;
this.dialogType = 'edit'
},
- // 缂栬緫淇濆瓨
- saveHandler() {
+ //淇濆瓨娴佺▼閰嶇疆
+ handleSubmitModel() {
+ const registry = this.$refs['wf-design-view'].getElementRegistry().getAll()
+ const {businessObject} = registry[0]
+ const {id, name, documentation} = businessObject
+ const description = (documentation && documentation.length > 0) ? documentation[0].text : null
+ const params = {
+ ...this.nutflowOption.process,
+ modelKey: id,
+ name,
+ description,
+ modelEditorXml: this.nutflowOption.process.xml
+ }
if(this.dialogType=='add'){
- saveProcessTemp(this.form).then(res => {
+ saveProcessTemp(params).then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.obj);
this.getTableList();
+ this.handleNutflowClose()
}
});
}else{
- updateProcessTemp(this.form).then(res => {
+ updateProcessTemp(params).then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.obj);
this.getTableList();
+ this.handleNutflowClose()
}
})
}
-
},
- dialogClose(){
- this.form={};
- this.dialogLoading=false;
- this.dialogVisible=false;
+ handleStep(step) {
+ if (step === 1) { // 涓嬩竴姝�
+ this.$refs['wf-design'].getData('xml').then(data => {
+ this.$set(this.nutflowOption.step1, 'xml', data)
+ this.$set(this.nutflowOption.step2, 'xml', data)
+ this.$set(this.nutflowOption.process, 'xml', data)
+ this.$set(this.nutflowOption, 'step', 2)
+ })
+ } else {
+ this.$set(this.nutflowOption, 'step', 1)
+ }
+ },
+ handleNutflowClose(done, flag) {
+ const initOption = {
+ process: {},
+ step: 1,
+ step1: {
+ toolbar: ['open', 'create', 'fit', 'zoom-in', 'zoom-out', 'undo', 'redo', 'import', 'preview'],
+ },
+ step2: {
+ mode: 'view',
+ simulation: true,
+ minimap: true,
+ }
+ }
+ if (done || flag) {
+ this.$confirm('纭畾瑕佸叧闂悧锛熷叧闂湭淇濆瓨鐨勪慨鏀归兘浼氫涪澶便��', '璀﹀憡', {
+ type: 'warning'
+ }).then(() => {
+ this.$set(this, 'nutflowOption', initOption)
+ if (typeof done == 'function') done()
+ this.dialogVisible = false
+ }).catch(() => {
+ })
+ } else {
+ this.$set(this, 'nutflowOption', initOption)
+ this.dialogVisible = false
+ }
},
// 鍒犻櫎
handleDel(row,index) {
@@ -340,6 +421,10 @@
}
</script>
-<style scoped>
-
+<style lang="scss" scoped>
+::v-deep {
+ .avue-dialog .el-dialog__body{
+ margin-bottom: 0 !important;
+ }
+}
</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue b/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue
index 8c4b080..f13558c 100644
--- a/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue
@@ -88,7 +88,7 @@
addBtn:false,
editBtn:false,
delBtn:false,
- calcHeight: -60,
+ calcHeight: -55,
align:'left',
headerAlign:'center',
menuWidth:160,
--
Gitblit v1.9.3