From 9da5b50986991d21beb58a823cb039f8c486587c Mon Sep 17 00:00:00 2001
From: wangting <wangting@vci-tech.com>
Date: 星期二, 14 一月 2025 18:31:53 +0800
Subject: [PATCH] 增加流程模板管理页面

---
 Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue                      |   99 ++++++++++++++++
 Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue                         |    4 
 Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue                        |  201 +++++++++++++++++++++++++++++++++
 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue |    1 
 Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue                            |    5 
 5 files changed, 306 insertions(+), 4 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue
index c67930c..2acc434 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue
+++ b/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("淇濆瓨鎴愬姛");
diff --git a/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/processTemplate/customDefine/index.vue
new file mode 100644
index 0000000..64bcfc6
--- /dev/null
+++ b/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>
diff --git a/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue b/Source/plt-web/plt-web-ui/src/views/processTemplate/customType/index.vue
new file mode 100644
index 0000000..7b0a155
--- /dev/null
+++ b/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>
diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue
index f7244e7..70157fc 100644
--- a/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue
+++ b/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(); // 鍒锋柊宸︿晶鏍�
         }
diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue
index d59ee86..8bb7e72 100644
--- a/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue
+++ b/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(); // 鍒锋柊宸︿晶鏍�
         }

--
Gitblit v1.9.3