瀏覽代碼

fix:修复拖拽列表排序问题

韩帛霖 1 年之前
父節點
當前提交
80e2746184
共有 2 個文件被更改,包括 69 次插入29 次删除
  1. 38 1
      ruoyi-ui/src/views/bpmprocess/index.vue
  2. 31 28
      ruoyi-ui/src/views/tablelist/commonTable/listInfo.vue

+ 38 - 1
ruoyi-ui/src/views/bpmprocess/index.vue

@@ -51,7 +51,7 @@
         </el-date-picker>
       </el-form-item>
       <!-- <el-form-item label="版本状态" prop="processVersion">
-       
+
         <el-select
           v-model="queryParams.processVersion"
           value-key="value"
@@ -484,6 +484,43 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+
+      let endFormData = {
+        // 节点脚本关联表
+        BpmNodeExceptionList: [{
+          id:null,
+          nodeKey: null,           // 节点别名
+          scriptKey: null,         // 脚本别名
+          scriptTriggerType: null  // 脚本触发机制(0:手动 1:自动)
+        }],
+        // 节点操作人 -》 数据传输分两种情况:1.当前节点勾选了指定用户,就需要前端生成一个虚拟的角色编码、以及指定的用户id、真实的角色编码null即可
+        // 2.当前节点根据角色勾选的执行人,就需要存贮真实的角色权限字符 生成一个虚拟的角色编码,其他为null即可
+        // 节点处理人表
+        BpmNodeHandleUser: [{
+          id:null,
+          virtuallyRole: null,  // 前端生成的虚拟角色编码
+          realRole: null,       // 真实的角色编码  [1,2,3]/[1]
+          executeUserNo: null   // 用户编码  [1,2,3]/[1]
+        }],
+        // 所有节点表
+        BpmProcessConfigurationList: [{
+          id:null,
+          nodeKey: null,          // 节点别名
+          nodeName: null,         // 节点名称
+          nodeFormKey: null,      // 节点表单别名
+          nodeProcessKey: null,   // 流程别名
+          nodeType: null,         // 节点类型(判断节点、正常节点。。。)根据字典维护
+          nodeBefor: null,        // 节点前
+          nodeAfter: null,        // 节点后
+          nodeRolePermission: null,// 节点对应的角色权限字符(只存虚拟角色编码)
+          spare1: null,             // 备用列
+          spare2: null,
+          spare3: null,
+          createBy: null,            // 创建者
+          updateBy: null,            // 修改者
+          remark: null              // 节点描述
+        }]
+      }
       this.resetForm("queryForm");
       this.handleQuery();
     },

+ 31 - 28
ruoyi-ui/src/views/tablelist/commonTable/listInfo.vue

@@ -41,7 +41,7 @@
             :underline="false"
             style="font-size: 12px; vertical-align: baseline"
             @click="importTemplate"
-            >下载模板
+          >下载模板
           </el-link>
         </div>
       </el-upload>
@@ -64,7 +64,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          >新增
+        >新增
         </el-button>
       </el-col>
       <el-col :span="1.5" v-if="false">
@@ -75,7 +75,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
-          >修改
+        >修改
         </el-button>
       </el-col>
       <el-col :span="1.5">
@@ -86,7 +86,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
-          >删除
+        >删除
         </el-button>
       </el-col>
       <el-col :span="1.5">
@@ -95,7 +95,7 @@
           icon="el-icon-upload2"
           size="mini"
           @click="upload.open = true"
-          >导入
+        >导入
         </el-button>
       </el-col>
       <el-col :span="1.5">
@@ -105,7 +105,7 @@
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          >导出
+        >导出
         </el-button>
       </el-col>
       <right-toolbar
@@ -153,7 +153,7 @@
                   type="text"
                   icon="el-icon-edit"
                   @click="handleUpdate(scope.row)"
-                  >修改
+                >修改
                 </el-button>
               </el-dropdown-item>
               <el-dropdown-item>
@@ -162,7 +162,7 @@
                   type="text"
                   icon="el-icon-delete"
                   @click="handleDelete(scope.row)"
-                  >删除
+                >删除
                 </el-button>
               </el-dropdown-item>
             </el-dropdown-menu>
@@ -211,14 +211,14 @@ import {
   addTableData,
   batchEdit,
 } from "@/api/tablelist/commonTable";
-import { getToken } from "@/utils/auth";
+import {getToken} from "@/utils/auth";
 import Queryfrom from "@/views/tablelist/commonTable/queryfrom.vue";
-import { camelCase } from "@/utils";
-import { inputDisableComplete } from "@/utils/other";
+import {camelCase} from "@/utils";
+import {inputDisableComplete} from "@/utils/other";
 
 export default {
   name: "listInfo",
-  components: { Queryfrom },
+  components: {Queryfrom},
   data() {
     return {
       // 遮罩层
@@ -257,18 +257,18 @@ export default {
         // 是否更新已经存在的数据
         updateSupport: 0,
         // 设置上传的请求头部
-        headers: { Authorization: "Bearer " + getToken() },
+        headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
         url: process.env.VUE_APP_BASE_API3 + "common/uploadData",
       },
       // 排序方式 默认降序
-      sortState: true,
+      sortOrder: true,
       // 共通查询参数接受子组件的参数
       queryParams: {
         pageNum: 1, // 第几页
         pageSize: 10, // 每页大小
         orderByColumn: "", // 根据某列排序
-        isAsc: this.sortState ? "DESC" : "ASC", // desc(降序)或 asc(升序)
+        isAsc: "", // desc(降序)或 asc(升序)
         // 基本查询参数
         basicMap: {
           tableName: "drag_form",
@@ -367,13 +367,15 @@ export default {
       // 序列化当前查询参数列表
       queryParams && (this.queryParams.queryMap = queryParams.queryMap);
       // 获取当前表单结构信息
-      dragTableInfo({ queryMap: { sqlkey: this.sqlkey } })
+      dragTableInfo({queryMap: {sqlkey: this.sqlkey}})
         .then((res) => {
           // 得到当前模版信息 --- sql columns queryWhere
           this.templateInfo = res.data.resultMap;
           this.queryParams.orderByColumn =
             res.data.resultMap.querySql.orderByColumn;
-          this.queryParams.isAsc = res.data.resultMap.querySql.sortOrder;
+          this.sortOrder = JSON.parse(res.data.resultMap.querySql.sortOrder);
+          // 根据拖拽时设置当前列表排列顺序
+          this.queryParams.isAsc = this.sortOrder ? "DESC" : "ASC"
           this.tableName = this.templateInfo.template.dtTableName;
           // 得到查询条件
           this.queryFromWhere = res.data.resultMap.where;
@@ -419,9 +421,9 @@ export default {
       this.$refs.mychild.pageList(
         row == undefined
           ? {
-              limit: this.queryParams.pageSize,
-              page: this.queryParams.pageNum,
-            }
+            limit: this.queryParams.pageSize,
+            page: this.queryParams.pageNum,
+          }
           : row
       );
     },
@@ -451,7 +453,7 @@ export default {
     handleAdd(row) {
       // this.reset();
       this.defaultValue = {};
-      getInfoBySqlKey(this.sqlkey).then(({ data }) => {
+      getInfoBySqlKey(this.sqlkey).then(({data}) => {
         if (!data || !data.dfVueTemplate) {
           this.$message.error("当前表格未绑定表单!");
           return;
@@ -468,7 +470,7 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      getInfoBySqlKey(this.sqlkey).then(({ data }) => {
+      getInfoBySqlKey(this.sqlkey).then(({data}) => {
         if (!data || !data.dfVueTemplate) {
           this.$message.error("当前表格未绑定表单!");
           return;
@@ -547,7 +549,8 @@ export default {
           this.$refs.mychild.pageList();
           this.$modal.msgSuccess("删除成功");
         })
-        .catch(() => {});
+        .catch(() => {
+        });
     },
     /** 导出按钮操作 */
     handleExport() {
@@ -580,7 +583,7 @@ export default {
     importTemplate() {
       this.download(
         process.env.VUE_APP_BASE_API3 +
-          `common/exportTemplate?tableName=${this.tableName}&sqlkey=${this.sqlkey}`,
+        `common/exportTemplate?tableName=${this.tableName}&sqlkey=${this.sqlkey}`,
         {},
         `下载模版名称${new Date().getTime()}.xlsx`
       );
@@ -596,10 +599,10 @@ export default {
       this.$refs.upload.clearFiles();
       this.$alert(
         "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
-          response.msg +
-          "</div>",
+        response.msg +
+        "</div>",
         "导入结果",
-        { dangerouslyUseHTMLString: true }
+        {dangerouslyUseHTMLString: true}
       );
       this.$refs.mychild.pageList({
         limit: this.queryParams.pageSize,
@@ -647,7 +650,7 @@ export default {
             updateData.conditionMap[this.templateInfo.template?.primaryKey] =
               this.defaultValue[
                 camelCase(this.templateInfo.template?.primaryKey)
-              ];
+                ];
             Object.keys(values).map((k) => {
               updateData.commMap[k] = values[k];
             });