Prechádzať zdrojové kódy

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

lph 1 rok pred
rodič
commit
fa3b1dee75

+ 16 - 5
ruoyi-ui/src/views/bpmprocess/scriptManage.vue

@@ -172,8 +172,12 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
  
  
         <el-form-item label="脚本编码:" prop="scriptKey">
         <el-form-item label="脚本编码:" prop="scriptKey">
-          <el-input v-model="form.scriptKey" placeholder="请输入脚本编码" :disabled="true"/>
-          <el-button icon="el-icon-document-copy"></el-button>
+          <el-col :span="20">
+            <el-input v-model="form.scriptKey" placeholder="请输入脚本编码" :disabled="true"/>
+          </el-col>
+          <el-col :span="4">
+            <el-button icon="el-icon-document-copy" v-clipboard:copy="form.scriptKey" v-clipboard:success="onCopy" v-clipboard:error="onError"></el-button>
+          </el-col>
         </el-form-item>
         </el-form-item>
         <el-form-item label="脚本名称:" prop="scriptName">
         <el-form-item label="脚本名称:" prop="scriptName">
           <el-input v-model="form.scriptName" placeholder="请输入脚本名称" />
           <el-input v-model="form.scriptName" placeholder="请输入脚本名称" />
@@ -260,6 +264,7 @@ import uuid from "@/utils/bpmn/uuid";
 import Editor from "vue2-ace-editor";
 import Editor from "vue2-ace-editor";
 import {v4 as uuidv4} from 'uuid';
 import {v4 as uuidv4} from 'uuid';
 import * as monaco from "monaco-editor";
 import * as monaco from "monaco-editor";
+import Clipboard from "clipboard";
 
 
 export default {
 export default {
   name: "Script",
   name: "Script",
@@ -358,7 +363,14 @@ export default {
       require("brace/mode/javascript");
       require("brace/mode/javascript");
       require("brace/snippets/javascript");
       require("brace/snippets/javascript");
     },
     },
-
+    // 复制成功
+    onCopy() {
+      this.$modal.msgSuccess("脚本编码已成功复制到剪贴板");
+    },
+    //复制失败
+    onError() {
+      this.$modal.msgError("脚本编码复制失败");
+    },
     /** 查询流程节点脚本列表 */
     /** 查询流程节点脚本列表 */
     getList() {
     getList() {
       this.loading = true;
       this.loading = true;
@@ -410,10 +422,9 @@ export default {
     },
     },
     /** 新增按钮操作 */
     /** 新增按钮操作 */
     handleAdd() { 
     handleAdd() { 
-     
       this.monacoEditor?.dispose();
       this.monacoEditor?.dispose();
       this.reset();
       this.reset();
-      this.form.scriptKey= uuidv4()
+      this.form.scriptKey= uuidv4();
       console.log(this.form.scriptKey);
       console.log(this.form.scriptKey);
       this.open = true;
       this.open = true;
       this.title = "添加流程节点脚本";
       this.title = "添加流程节点脚本";

+ 14 - 10
ruoyi-ui/src/views/dialogMange/index.vue

@@ -985,6 +985,8 @@ export default {
       countFieldList: [],
       countFieldList: [],
       // 统计状态信息回显
       // 统计状态信息回显
       statusCount: [],
       statusCount: [],
+      // 回显数据单表列表
+      lists: []
     };
     };
   },
   },
   computed: {
   computed: {
@@ -2007,20 +2009,21 @@ export default {
           if(this.tId){
           if(this.tId){
             // console.log('修改');
             // console.log('修改');
             // console.log(this.editData);
             // console.log(this.editData);
+            // 基础信息
             tableList1.sqlKey = this.editData.sqlKey
             tableList1.sqlKey = this.editData.sqlKey
             tableList1.tableKey = this.editData.tableKey
             tableList1.tableKey = this.editData.tableKey
-
-
+            tableList1.tId = this.lists[0].tId
+            tableList1.dragTableBtnRelevanceList = this.getBtnMapList(this.editData.tableKey);
+            // 关联子表
             tableList2.tableKey = this.subEchoData.tableKey
             tableList2.tableKey = this.subEchoData.tableKey
             tableList2.sqlKey = this.subEchoData.sqlKey
             tableList2.sqlKey = this.subEchoData.sqlKey
-
+            tableList2.tId = this.lists[1].tId
             tableList2.dragTableBtnRelevanceList = this.getBtnMapList(this.subEchoData.tableKey);
             tableList2.dragTableBtnRelevanceList = this.getBtnMapList(this.subEchoData.tableKey);
-
-            tableList1.dragTableBtnRelevanceList = this.getBtnMapList(this.echoData.sqlKey);
-
+            // 数据统计
             countTableList.tableKey = this.countEchoData.tableKey
             countTableList.tableKey = this.countEchoData.tableKey
             countTableList.sqlKey = this.countEchoData.sqlKey
             countTableList.sqlKey = this.countEchoData.sqlKey
-            countTableList.dragTableBtnRelevanceList = this.getBtnMapList(this.countEchoData.sqlKey);
+            countTableList.dragTableBtnRelevanceList = this.getBtnMapList(this.countEchoData.tableKey);
+            countTableList.tId = this.lists[2].tId
 
 
           let data = {
           let data = {
             id : this.tId,
             id : this.tId,
@@ -2099,7 +2102,8 @@ export default {
             groupName: this.formData.groupName,
             groupName: this.formData.groupName,
             groupDescription: this.formData.groupDescription,
             groupDescription: this.formData.groupDescription,
             groupTableInfo: [],
             groupTableInfo: [],
-            dragTables:[]
+            dragTables:[],
+            templateType:'myTemplateType'
           }
           }
           data.groupTableInfo.push({
           data.groupTableInfo.push({
             tableKey: tableList1.tableKey,
             tableKey: tableList1.tableKey,
@@ -2211,14 +2215,14 @@ export default {
       // console.log(res);
       // console.log(res);
       if (res.code == 200) {
       if (res.code == 200) {
         this.groupKey = res.data.groupKey
         this.groupKey = res.data.groupKey
-        let lists = res.data.dragTables
+        this.lists = res.data.dragTables
 
 
         this.formData.groupName =  res.data.groupName
         this.formData.groupName =  res.data.groupName
         this.formData.groupDescription = res.data.groupDescription
         this.formData.groupDescription = res.data.groupDescription
 
 
         let groupInfo =JSON.parse(res.data.groupTableInfo)
         let groupInfo =JSON.parse(res.data.groupTableInfo)
 
 
-        lists.forEach(async item => {
+        this.lists.forEach(async item => {
           if(item.tableKey == groupInfo[0].tableKey){
           if(item.tableKey == groupInfo[0].tableKey){
             this.editData = item;
             this.editData = item;
             // console.log('123',this.editData);
             // console.log('123',this.editData);

+ 3 - 2
ruoyi-ui/src/views/dialogTemplate/components/index.vue

@@ -223,9 +223,9 @@ export default {
 
 
           const res = await dragTableInfo({queryMap: {tableKey : item.tableKey }})
           const res = await dragTableInfo({queryMap: {tableKey : item.tableKey }})
           
           
+          console.log('butt',res.data.resultMap.button)
           this.controlBtnArr = res.data.resultMap.button[0]
           this.controlBtnArr = res.data.resultMap.button[0]
           this.controlBtnArr = this.controlBtnArr.children
           this.controlBtnArr = this.controlBtnArr.children
-          console.log('butt',this.controlBtnArr)
         }
         }
       })
       })
     },
     },
@@ -244,6 +244,7 @@ export default {
         this.tableName = this.templateInfo.template.dtTableName;
         this.tableName = this.templateInfo.template.dtTableName;
         // 得到查询条件
         // 得到查询条件
         this.queryFromWhere = res.data.resultMap.where;
         this.queryFromWhere = res.data.resultMap.where;
+        
         //  得到当前列表信息
         //  得到当前列表信息
         this.columns = this.columnsHandler(
         this.columns = this.columnsHandler(
           JSON.parse(this.templateInfo.template.dtColumnName)
           JSON.parse(this.templateInfo.template.dtColumnName)
@@ -277,7 +278,7 @@ export default {
             })
             })
   
   
             this.getDataHandler(this.tableCondition[1]).then(res => {
             this.getDataHandler(this.tableCondition[1]).then(res => {
-              console.log(res);
+              // console.log(res);
               if(sort == 0){
               if(sort == 0){
                 this.infoData.push(res)
                 this.infoData.push(res)
                 // this.$set(this.infoData)
                 // this.$set(this.infoData)