| | |
| | | <el-table-column label="属性值" prop="value" min-width="100px" show-overflow-tooltip /> |
| | | <el-table-column label="操作" width="90px"> |
| | | <template slot-scope="{ row, $index }"> |
| | | <el-button size="mini" type="text" @click="openAttributesForm(row, $index)">编辑</el-button> |
| | | <el-divider direction="vertical" /> |
| | | <el-button size="mini" type="text" style="color: #ff4d4f" @click="removeAttributes(row, $index)">移除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-button size="mini" type="primary" icon="el-icon-setting" @click="openAttributesForm(null, -1)">属性设置</el-button> |
| | | </div> |
| | | |
| | | <el-dialog :visible.sync="propertyFormModelVisible" title="属性配置" width="600px" append-to-body destroy-on-close> |
| | | <div v-for="item in canConfigPropertyList"> |
| | | <el-dialog :visible.sync="propertyFormModelVisible" title="属性配置" width="600px" @close="closeProperty" append-to-body :destroy-on-close="true" :close-on-click-modal="false"> |
| | | <div v-for="item in canConfigPropertyList" style="margin-bottom: 20px"> |
| | | <div v-if="item.vueType === 'switch'"> |
| | | <el-switch |
| | | v-model="item.value" |
| | |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-form>--> |
| | | <template slot="footer"> |
| | | <el-button size="mini" @click="propertyFormModelVisible = false">关 闭</el-button> |
| | | <el-button size="mini" @click="closeProperty">关 闭</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | return { |
| | | canConfigPropertyList: [ |
| | | { |
| | | name: '该节点是审批节点', |
| | | value: '是', |
| | | name: '是否审批节点', |
| | | value: false, |
| | | vueType: 'switch', |
| | | method: (name, value) => { |
| | | this.propertyForm.name = name |
| | | this.propertyForm.value = value |
| | | this.saveAttribute() |
| | | } |
| | | }, |
| | | { |
| | | name: '是否允许跳过', |
| | | value: false, |
| | | vueType: 'switch', |
| | | method: (name, value) => { |
| | | this.propertyForm.name = name |
| | | this.propertyForm.value = value |
| | | this.saveAttribute() |
| | | } |
| | | }, |
| | | { |
| | | name: '是否允许容缺', |
| | | value: false, |
| | | vueType: 'switch', |
| | | method: (name, value) => { |
| | | this.propertyForm.name = name |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | closeProperty() { |
| | | this.propertyFormModelVisible = false |
| | | this.resetList() |
| | | }, |
| | | resetList() { |
| | | this.canConfigPropertyList = [ |
| | | { |
| | | name: '是否审批节点', |
| | | value: false, |
| | | vueType: 'switch', |
| | | method: (name, value) => { |
| | | this.propertyForm.name = name |
| | | this.propertyForm.value = value |
| | | this.saveAttribute() |
| | | } |
| | | }, |
| | | { |
| | | name: '是否允许跳过', |
| | | value: false, |
| | | vueType: 'switch', |
| | | method: (name, value) => { |
| | | this.propertyForm.name = name |
| | | this.propertyForm.value = value |
| | | this.saveAttribute() |
| | | } |
| | | }, |
| | | { |
| | | name: '是否允许容缺', |
| | | value: false, |
| | | vueType: 'switch', |
| | | method: (name, value) => { |
| | | this.propertyForm.name = name |
| | | this.propertyForm.value = value |
| | | this.saveAttribute() |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | resetAttributesList() { |
| | | this.bpmnElement = this.modelerStore.element; |
| | | this.otherExtensionList = []; // 其他扩展配置 |
| | |
| | | } |
| | | return ex.$type === `flowable:Properties`; |
| | | }) ?? []; |
| | | |
| | | // 保存所有的 扩展属性字段 |
| | | this.bpmnElementPropertyList = this.bpmnElementProperties.reduce((pre, current) => pre.concat(current.values), []); |
| | | // 复制 显示 |
| | | |
| | | // 回显 |
| | | this.canConfigPropertyList.forEach(item => { |
| | | const find = this.bpmnElementPropertyList.find(el => el.name === item.name); |
| | | if (find) { |
| | | if (item.vueType === 'switch') { |
| | | item.value = find.value === '是' ? true : false |
| | | } |
| | | |
| | | } |
| | | }) |
| | | this.elementPropertyList = JSON.parse(JSON.stringify(this.bpmnElementPropertyList ?? [])); |
| | | }, |
| | | openAttributesForm(attr, index) { |