123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <template>
- <div>
- <x-form ref="xForm" v-model="formData" :config="formConfig">
- <template #executionListener>
- <el-badge :value="executionListenerLength">
- <el-button size="small" @click="dialogName = 'executionListenerDialog'">编辑</el-button>
- </el-badge>
- </template>
- </x-form>
- <executionListenerDialog
- v-if="dialogName === 'executionListenerDialog'"
- :element="element"
- :modeler="modeler"
- @close="finishExecutionListener"
- />
- </div>
- </template>
- <script>
- import mixinPanel from '../../common/mixinPanel'
- import mixinExecutionListener from '../../common/mixinExecutionListener'
- import { commonParse } from '../../common/parseElement'
- export default {
- mixins: [mixinPanel, mixinExecutionListener],
- data() {
- return {
- formData: {}
- }
- },
- computed: {
- formConfig() {
- const _this = this
- return {
- inline: false,
- item: [
- {
- xType: 'input',
- name: 'id',
- label: '节点 id',
- rules: [{ required: true, message: 'Id 不能为空' }],
- disabled : true
- },
- {
- xType: 'input',
- name: 'name',
- label: '节点名称'
- },
- {
- xType: 'input',
- name: 'documentation',
- label: '节点描述'
- },
- {
- xType: 'slot',
- name: 'executionListener',
- label: '执行监听器'
- },
- {
- xType: 'input',
- name: 'initiator',
- label: '发起人',
- show: !!_this.showConfig.initiator
- },
- {
- xType: 'input',
- name: 'formKey',
- label: '表单标识key',
- show: !!_this.showConfig.formKey
- }
- ]
- }
- }
- },
- watch: {
- 'formData.initiator': function(val) {
- if (val === '') val = null
- this.updateProperties({ 'flowable:initiator': val })
- },
- 'formData.formKey': function(val) {
- if (val === '') val = null
- this.updateProperties({ 'flowable:formKey': val })
- }
- },
- created() {
- this.formData = commonParse(this.element)
- if (!!this.element.businessObject.extensionElements) {
- this.executionListenerLength = this.element.businessObject.extensionElements.values.length;
- }
- }
- }
- </script>
- <style>
- </style>
|