Forráskód Böngészése

Merge branch 'master' of http://49.233.37.222:3000/wjm/mec-cloud_IntelligentManufacturing_CRM

lph 1 éve
szülő
commit
94e58b760f

+ 25 - 0
ruoyi-system/src/main/resources/sql/initialize_sys_tenant_menu.json

@@ -1023,5 +1023,30 @@
         "children": [],
         "tenantName": null,
         "tenantId": null
+    },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 09:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 3989,
+        "menuName": "操作按钮",
+        "parentName": null,
+        "parentId": 1103,
+        "orderNum": 1,
+        "path": "excuteBtnMange/index",
+        "component": "system/excuteBtnMange/index",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "1",
+        "status": "0",
+        "perms": "",
+        "icon": "button",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
     }
 ]

+ 17 - 10
ruoyi-ui/src/views/bpmprocess/scriptManage.vue

@@ -8,14 +8,14 @@
       v-show="showSearch"
       label-width="68px"
     >
-      <!-- <el-form-item label="脚本编码" prop="scriptKey">
+      <el-form-item label="脚本编码" prop="scriptKey">
         <el-input
           v-model="queryParams.scriptKey"
           placeholder="请输入脚本编码"
           clearable
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item> -->
+      </el-form-item>
       <el-form-item label="脚本方法名称" prop="scriptFunctionName">
         <el-input
           v-model="queryParams.scriptFunctionName"
@@ -106,7 +106,7 @@
     >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="编号" align="center" prop="id" />
-      <!-- <el-table-column label="脚本编码" align="center" prop="scriptKey" /> -->
+      <el-table-column label="脚本编码" align="center" prop="scriptKey" />
       <el-table-column
         label="脚本方法名称"
         align="center"
@@ -170,9 +170,10 @@
     <!-- 添加或修改流程节点脚本对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
-        <!-- <el-form-item label="脚本编码:" prop="scriptKey">
-          <el-input v-model="form.scriptKey" placeholder="请输入脚本编码" />
-        </el-form-item> -->
+ 
+        <el-form-item label="脚本编码:" prop="scriptKey">
+          <el-input v-model="form.scriptKey" placeholder="请输入脚本编码" :disabled="true"/>
+        </el-form-item>
         <el-form-item label="脚本名称:" prop="scriptName">
           <el-input v-model="form.scriptName" placeholder="请输入脚本名称" />
         </el-form-item>
@@ -257,6 +258,7 @@ import {
 } from "@/api/bpmprocess/process";
 import uuid from "@/utils/bpmn/uuid";
 import Editor from "vue2-ace-editor";
+import {v4 as uuidv4} from 'uuid';
 import * as monaco from "monaco-editor";
 
 export default {
@@ -295,8 +297,10 @@ export default {
         industryType: null,
         scriptDescription: null,
       },
+      uuid: uuidv4(),
       // 表单参数
-      form: {},
+      form: {
+      },
       // 表单校验
       rules: {
         scriptName: [
@@ -339,6 +343,7 @@ export default {
     // this.editorInit();
   },
   methods: {
+
     // 编辑器初始化
     editorInit() {
       require("brace/theme/chrome");
@@ -404,9 +409,12 @@ export default {
       this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
-    handleAdd() {
+    handleAdd() { 
+     
       this.monacoEditor?.dispose();
       this.reset();
+      this.form.scriptKey= uuidv4()
+      console.log(this.form.scriptKey);
       this.open = true;
       this.title = "添加流程节点脚本";
       // this.$nextTick(() => {
@@ -441,8 +449,7 @@ export default {
               this.open = false;
               this.getList();
             });
-          } else {
-            this.form.scriptKey = uuid();
+          } else { 
             addScript(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;