fuliqi
2025-02-07 7a267fc8e5bc6bbe1d770c1aebb50bbed5461e22
src/components/Process/panel/PropertiesPanel.vue
@@ -14,8 +14,8 @@
      <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"
@@ -35,7 +35,7 @@
<!--        </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>
@@ -56,13 +56,36 @@
    return {
      canConfigPropertyList: [
        {
          name: '该节点是审批节点',
          name: '是否审批节点',
          value: false,
          vueType: 'switch',
          method: (name, value) => {
            this.propertyForm.name = name
            this.propertyForm.value = value
            this.saveAttribute()
            this.resetList()
          }
        },
        {
          name: '是否允许跳过',
          value: false,
          vueType: 'switch',
          method: (name, value) => {
            this.propertyForm.name = name
            this.propertyForm.value = value
            this.saveAttribute()
            this.resetList()
          }
        },
        {
          name: '是否允许容缺',
          value: false,
          vueType: 'switch',
          method: (name, value) => {
            this.propertyForm.name = name
            this.propertyForm.value = value
            this.saveAttribute()
            this.resetList()
          }
        }
      ], // 可以配置的属性列表
@@ -84,6 +107,44 @@
    }
  },
  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 = []; // 其他扩展配置