xiangpei
2024-11-26 ab3072bb85b73f8a1a30a21350e733850570da00
src/views/flowable/definition/index.vue
@@ -92,6 +92,7 @@
      <el-table-column label="操作" width="250" fixed="right"class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button @click="handleLoadXml(scope.row)" icon="el-icon-edit-outline" type="text" size="small">设计</el-button>
          <el-button @click="handleConfig(scope.row)" icon="el-icon-edit-outline" type="text" size="small">流程配置</el-button>
          <el-button @click="handleAddForm(scope.row)" icon="el-icon-edit-el-icon-s-promotion" type="text" size="small" v-if="scope.row.formId == null">配置主表单</el-button>
          <el-button @click="handleUpdateSuspensionState(scope.row)" icon="el-icon-video-pause" type="text" size="small" v-if="scope.row.suspensionState === 1">挂起</el-button>
          <el-button @click="handleUpdateSuspensionState(scope.row)" icon="el-icon-video-play" type="text" size="small" v-if="scope.row.suspensionState === 2">激活</el-button>
@@ -224,6 +225,11 @@
    <!--      append-to-body>-->
    <!--      <Model :deployId="deployId"/>-->
    <!--    </el-dialog>-->
    <edit-process-config :process-config-show="processConfigShow"
                         :deploy-name="configDeployName"
                         :form="configForm"
                         @close="closeConfig"/>
  </div>
</template>
@@ -242,16 +248,29 @@
import { getForm, addDeployForm ,listForm } from "@/api/flowable/form";
import BpmnViewer from '@/components/Process/viewer';
import Model from './model';
import EditProcessConfig from '@/views/flowable/definition/component/EditProcessConfig';
import {getProcessConfigInfoByDeploy} from "@/api/projectProcess/processConfigInfo";
export default {
  name: "Definition",
  dicts: ['sys_process_category'],
  components: {
    BpmnViewer,
    Model
    Model,
    EditProcessConfig
  },
  data() {
    return {
      configForm: {
        deployId: '',
        deployVersion: null,
        projectType: '', // 项目类型
        fundType: '',  // 资金类型
        investType: '',  // 投资类别
        importanceType: '',  // 重点分类
      },
      processConfigShow: false,  // 修改流程信息show
      configDeployName: '',   // 修改配置的部署名称
      // 遮罩层
      loading: true,
      dialogVisible: false,
@@ -341,6 +360,26 @@
    }
  },
  methods: {
    closeConfig() {
      this.processConfigShow = false
    },
    handleConfig(row) {
      const infoArr = row.id.split(":");
      const params = {
        deployId: infoArr[2],
        deployVersion: infoArr[1]
      }
      getProcessConfigInfoByDeploy(params).then(res => {
        if (res.data) {
          this.configForm = res.data
        }
      })
      this.configForm.deployId = infoArr[2]
      this.configForm.deployVersion = infoArr[1]
      this.configDeployName = row.name
      this.processConfigShow = true
    },
    /** 查询流程定义列表 */
    getList() {
      this.loading = true;