田源
2025-03-05 f6b61a485501f326debe52d77ea65d87fb34b37f
Source/UBCS-WEB/src/components/template/FlowPath.vue
@@ -1,9 +1,12 @@
<template>
  <avue-crud v-if="Formlist.length>0" ref="crud" v-model="form" :data="data" :option="option" :page.sync="page"
             :search.sync="search" :table-loading="loading" @on-load="getDataList" @row-save="handleSave"
             @row-del="handleDelete" @row-update="handleEdit" @refresh-change="handleRefresh"
             @size-change="handleSizePage" @current-change="handleCurrentPage">
  </avue-crud>
  <div>
    <avue-crud v-if="Formlist.length>0" ref="crud" v-model="form" :data="data" :option="option" :page.sync="page"
               :search.sync="search" :table-loading="loading" @on-load="getDataList" @row-save="handleSave"
               @row-del="handleDelete" @row-update="handleEdit" @refresh-change="handleRefresh"
               @size-change="handleSizePage" @current-change="handleCurrentPage">
    </avue-crud>
  </div>
</template>
<script>
@@ -44,7 +47,8 @@
      startData: [],
      form: {},
      option: {
        height: 340,
        height: 'auto',
        calcHeight: 20,
        border: true,
        align: 'center',
        menu: !this.checkStatus || this.crudLCStatus == 'Editing',
@@ -80,7 +84,6 @@
              trigger: 'blur'
            }],
            nodeClick: (data) => {
              console.log(data)
              // 节点点击的时候会获取到数据
              this.form.modelName = data.name
            }
@@ -141,7 +144,6 @@
    async getStart() {
      const response = await getStartList()
      if (response.status === 200) {
        console.log(response.data.data.records)
        const data = response.data.data.records
        let newData = data.map(item => {
          const {key, name, version} = item
@@ -171,10 +173,8 @@
    },
    // 新增
    async handleSave(row, done, loading) {
      console.log(row)
      await flowpathSave({...row, ...{templateId: this.code}}).then(response => {
        if (response.status === 200) {
          console.log(response)
          this.$message({
            type: 'success',
            message: '新增数据成功!'
@@ -189,7 +189,6 @@
    },
    // 编辑
    async handleEdit(row, index, done, loading) {
      console.log(row)
      const {modelName, modelKey, buttonTypeKey, id, description} = row
      let param = {modelName, modelKey, buttonTypeKey, id, description}
      await flowpathSave({...param, ...{templateId: this.code}}).then(response => {
@@ -209,7 +208,6 @@
    },
    // 删除单条
    handleDelete(row) {
      console.log(row)
      const {id} = row
      this.deleteSysInfo({id: id})
    },
@@ -223,7 +221,6 @@
        // 接口
        const response = await flowpathDelete(param)
        if (response.status === 200) {
          console.log(response)
          this.$message({
            type: 'success',
            message: '删除成功!'