wangting
2025-01-14 9da5b50986991d21beb58a823cb039f8c486587c
增加流程模板管理页面
已修改3个文件
已添加2个文件
310 ■■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue
@@ -295,7 +295,6 @@
      this.$refs.form.validate((valid) => {
        if (valid) {
          const formData = this.initFormData();
          console.log(formData)
          btmSave(formData).then(res => {
            if (res.data.success) {
              this.$message.success("保存成功");
Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,99 @@
<template>
  <!--流程模板定义-->
  <basic-container>
    <div>
      æµç¨‹åˆ†ç±»ï¼š
      <el-select v-model="tempType" :clearable="true" placeholder="请选择" size="small"
                 style="width: 300px;margin-right: 20px;"
                 @change="tempTypeChange">
        <el-option
          v-for="item in tempTypeData"
          :key="item.oid"
          :label="item.text"
          :value="item.attributes.name">
        </el-option>
      </el-select>
      æµç¨‹æ¨¡æ¿åç§°ï¼š
      <el-input size="small" v-model="tempName" style="width: 300px;margin-right: 10px;"></el-input>
      <el-button icon="el-icon-search" plain size="small" style="margin-right: 40px;" type="primary"
                 @click="searchValue">
        æŸ¥è¯¢
      </el-button>
    </div>
  </basic-container>
</template>
<script>
import {mapGetters} from "vuex";
import basicOption from "@/util/basic-option";
export default {
  name: "index",
  data(){
    return {
      tempType:'',
      tempName:'',
      tempTypeData:[],
      form:{},
      tableLoading: false,
      tableData: [],
      currentRow:null,
      selectionList: [],
    }
  },
  computed: {
    ids() {
      let ids = [];
      this.selectionList.forEach(ele => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
    ...mapGetters(["permission"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
        delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false),
        editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
      };
    },
    option(){
      return  {
        ...basicOption,
        addBtn:false,
        editBtn:false,
        delBtn:false,
        calcHeight: -60,
        align:'left',
        headerAlign:'center',
        menuWidth:160,
        dialogMenuPosition: 'right',
        dialogWidth:600,
        column: [
          {
            label: '流程模板名称',
            prop: 'name'
          },{
            label: '版本',
            prop: 'desc'
          },{
            label: '状态',
            prop: 'status'
          }]
      }
    }
  },
  methods:{
    getTableList(){
    },
    tempTypeChange(val){
      this.getTableList();
    }
  }
}
</script>
<style scoped>
</style>
Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,201 @@
<template>
  <!--流程模板分类-->
  <basic-container>
    <avue-crud
      ref="crud"
      v-model="form"
      :data="tableData"
      :option="option"
      :table-loading="tableLoading"
      @on-load="getTableList"
      @row-save="rowSaveHandler"
      @row-update="rowUpdateHandler"
      @row-click="rowClickHandler"
      @selection-change="selectionChange"
    >
      <template slot="menuLeft" slot-scope="scope">
        <el-button v-if="permissionList.addBtn" class="button-custom-icon" size="small" type="primary"
                   @click="$refs.crud.rowAdd()">
          <icon-show :name="permissionList.addBtn.source"></icon-show>
          æ–° å¢ž
        </el-button>
        <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" @click="exportClickHandler">
          <icon-show :name="permissionList.exportBtn.source"></icon-show>
          å¯¼å‡º
        </el-button>
      </template>
      <template slot="menu" slot-scope="{ row, index }">
        <el-button
          v-if="permissionList.editBtn"
          size="small"
          type="text"
          @click="handleEdit(row, index)"
        >
          <icon-show :name="permissionList.editBtn.source"></icon-show>
          ç¼–辑
        </el-button>
        <el-button
          v-if="permissionList.delBtn"
          size="small"
          type="text"
          @click="handleDel(row, index)"
        >
          <icon-show :name="permissionList.delBtn.source"></icon-show>
          åˆ é™¤
        </el-button>
      </template>
    </avue-crud>
  </basic-container>
</template>
<script>
import {mapGetters} from "vuex";
import basicOption from "@/util/basic-option";
import {deletePvolume, getPvolumesPage, savePvolume, updatePvolume} from "@/api/system/fileCab/api";
import func from "@/util/func";
export default {
  name: "index",
  data: function () {
    return {
      form:{},
      tableLoading: false,
      tableData: [],
      currentRow:null,
      selectionList: [],
    }
  },
  computed: {
    ids() {
      let ids = [];
      this.selectionList.forEach(ele => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
    ...mapGetters(["permission"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
        delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false),
        editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
      };
    },
    option(){
      return  {
        ...basicOption,
        addBtn:false,
        editBtn:false,
        delBtn:false,
        calcHeight: -60,
        align:'left',
        headerAlign:'center',
        menuWidth:160,
        dialogMenuPosition: 'right',
        dialogWidth:600,
        column: [
          {
            label: '分类名称',
            prop: 'name',
            span: 24,
            rules: [{ required: true, message: '请输入分类名称', trigger: 'blur' }]
          },{
            label: '描述',
            prop: 'desc',
            span: 24,
            type:'textarea'
          }]
      }
    }
  },
  methods: {
    // è¡¨æ ¼è¯·æ±‚
    getTableList() {
      this.tableLoading = true;
      getPvolumesPage().then(res => {
        this.tableData = res.data.data;
        this.tableLoading = false;
      })
    },
    // æ–°å¢ž
    rowSaveHandler(row, done, loading) {
      savePvolume(row).then(res => {
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.getTableList();
          done();
        }
      }).catch(err => {
        loading()
      });
    },
    handleEdit(row,index){
      this.$refs.crud.rowEdit(row, index);
    },
    // ç¼–辑
    rowUpdateHandler(row, index, done, loading) {
      updatePvolume(row).then(res => {
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.getTableList();
          done()
        }
      }).catch(err => {
        loading()
      });
    },
    // åˆ é™¤
    handleDel(row,index) {
      let params = {
        ids: row.id
      }
      this.$confirm('您确定要删除当前的分类吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deletePvolume(params).then(res => {
          if (res.data.code === 200) {
            this.$message.success(res.data.obj);
            this.getTableList();
          }
        });
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    //选择的行
    selectionChange(list) {
      this.selectionList = list;
    },
    // è¡Œå•选
    rowClickHandler(row) {
      func.rowClickHandler(
        row,
        this.$refs.crud,
        this.lastIndex,
        (newIndex) => {
          this.lastIndex = newIndex;
        },
        () => {
          this.selectionList = [row];
        }
      );
    },
  }
}
</script>
<style scoped>
</style>
Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue
@@ -564,7 +564,9 @@
          let node = this.currentClickNode.parent;
          node.loaded = false;
          node.expand();
          this.$refs.tree.setCurrentNode(this.currentClickNode);
          this.$nextTick(()=>{
            this.$refs.tree.setCurrentKey(this.currentClickNode.data.id);
          });
        } else {
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
        }
Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue
@@ -294,7 +294,6 @@
  methods: {
    // æ ‘行点击
    nodeClick(row, node) {
      console.log(row.childType);
      this.form = {...row};
      this.nodeRow = {...row};
      this.currentClickNode = node;
@@ -553,7 +552,9 @@
          let node = this.currentClickNode.parent;
          node.loaded = false;
          node.expand();
          this.$refs.tree.setCurrentNode(this.currentClickNode);
          this.$nextTick(()=>{
            this.$refs.tree.setCurrentKey(this.currentClickNode.data.id);
          });
        } else {
          this.refresh = Math.random(); // åˆ·æ–°å·¦ä¾§æ ‘
        }