🎉 1.0.3.RELEASE

saber
ssc 5 years ago
parent f9b74506a1
commit a2a271cac8
  1. 2
      public/cdn/avue-form-design/index.umd.min.js
  2. 71
      src/views/plugin/workflow/design/index.vue
  3. 6
      src/views/plugin/workflow/process/components/detail.vue
  4. 4
      src/views/plugin/workflow/process/components/form.vue

File diff suppressed because one or more lines are too long

@ -7,7 +7,16 @@
<el-step title="设计表单"
icon="el-icon-edit"></el-step>
<el-step title="设计流程"
icon="el-icon-upload"></el-step>
icon="el-icon-upload">
<template #title>
设计流程
<el-tooltip v-show="step == '1'"
content="全屏">
<i class="el-icon-full-screen"
@click="handleFullScreen"></i>
</el-tooltip>
</template>
</el-step>
<el-step title="完成"
icon="el-icon-circle-check"></el-step>
</el-steps>
@ -22,14 +31,16 @@
@click="$router.push('/plugin/workflow/design/form')">没有想要的表单点击去设计</el-link>
</template>
<template slot="form">
<avue-form v-model="step1.form"
<avue-form ref="form2"
v-model="step1.form"
:option="step1.option1"></avue-form>
</template>
</avue-form>
</div>
<div v-if="step == 1">
<wf-design ref="bpmn2"
style="height: calc(100vh - 290px)"
<wf-design id="bpmn2"
ref="bpmn2"
style="height: calc(100vh - 290px); background: white;"
:options="step2.option"></wf-design>
</div>
<div v-if="step == 2">
@ -38,7 +49,8 @@
:options="step3.option"></wf-design>
</div>
<div class="footer">
<div class="foot-item"
:style="{width: isCollapse? 'calc(100% - 80px)': 'calc(100% - 260px)' }">
<el-button type="primary"
size="medium"
v-if="step > 0"
@ -66,7 +78,7 @@ import { mapGetters } from 'vuex'
export default {
name: 'design',
computed: {
...mapGetters(['tag']),
...mapGetters(['tag', 'isCollapse']),
},
watch: {
'$route.params.id': {
@ -110,13 +122,19 @@ export default {
},
event: {
change: (val) => {
this.step1.option1 = {}
if (val) {
getFormByKey({ key: val }).then(res => {
_this.step1.option1 = { ...eval('(' + res.data.data.content + ')'), menuBtn: false, readonly: true }
_this.step1.option.group[1].display = true
setTimeout(() => {
_this.$refs.form2.clearValidate()
})
}).catch(() => {
_this.step1.option.group[1].display = false
})
} else {
_this.step1.option.group[1].display = false
}
}
},
@ -158,7 +176,8 @@ export default {
engine: 'flowable'
}
},
process: {}
process: {},
fullscreen: false
}
},
mounted() {
@ -272,25 +291,53 @@ export default {
deptName: r.deptName
}
})
console.log(userConfig)
this.$set(this.step2.option, 'user', userConfig)
})
},
handleFullScreen() {
let element = document.querySelector("#bpmn2");
if (this.fullscreen) {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
} else {
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.msRequestFullscreen) {
// IE11
element.msRequestFullscreen();
}
}
this.fullscreen = !this.fullscreen;
},
}
}
</script>
<style scoped lang="scss">
.footer {
.foot-item {
position: fixed;
bottom: 0;
right: 0;
margin-left: -20px;
// right: 0;
z-index: 101;
width: 100%;
padding: 15px 20px;
height: 66px;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
-webkit-transition: 0.3s;
transition: 0.3s;
-webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

@ -42,7 +42,11 @@
<el-card shadow="never">
<p>{{item.assigneeName}} [{{item.createTime}}] 开始处理 [{{item.historyActivityName}}] 环节</p>
<p v-if="item.historyActivityDurationTime">任务历时 [{{item.historyActivityDurationTime}}]</p>
<p v-if="item.comment">批复意见: [{{item.comment}}]</p>
<p v-if="item.commentObj && item.commentObj.type == 'transferComment'">转办意见: [{{item.comment}}]</p>
<p v-if="item.commentObj && item.commentObj.type == 'delegateComment'">委托意见: [{{item.comment}}]</p>
<p v-if="item.commentObj && item.commentObj.type == 'rollbackComment'">驳回意见: [{{item.comment}}]</p>
<p v-if="item.commentObj && item.commentObj.type == 'terminateComment'">终止意见: [{{item.comment}}]</p>
<p v-if="item.commentObj && item.commentObj.type == 'comment'">审批意见: [{{item.comment}}]</p>
<p v-if="item.endTime">结束时间: [{{item.endTime}}]</p>
</el-card>
</el-timeline-item>

@ -5,6 +5,7 @@
:value="process.name"></avue-title>
<avue-form v-if="option && ((option.column && option.column.length > 0) || (option.group && option.group.length > 0))"
v-model="form"
ref="form"
:option="option"
@submit="handleSubmit">
</avue-form>
@ -89,6 +90,9 @@ export default {
option.group = groupArr
this.option = option
setTimeout(() => {
this.$refs.form.clearValidate()
})
}
})
},

Loading…
Cancel
Save