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

@ -42,7 +42,11 @@
<el-card shadow="never"> <el-card shadow="never">
<p>{{item.assigneeName}} [{{item.createTime}}] 开始处理 [{{item.historyActivityName}}] 环节</p> <p>{{item.assigneeName}} [{{item.createTime}}] 开始处理 [{{item.historyActivityName}}] 环节</p>
<p v-if="item.historyActivityDurationTime">任务历时 [{{item.historyActivityDurationTime}}]</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> <p v-if="item.endTime">结束时间: [{{item.endTime}}]</p>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>

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

Loading…
Cancel
Save