新增:置标标签自定义排序功能

master
Guo XIn 1 year ago
parent 09b9a70e9f
commit 6bf9d66cb4
  1. 3
      dbsql/update/update202308.sql
  2. 10
      shandan-system/src/main/java/com/keyware/shandan/bianmu/entity/DataLabelsVo.java
  3. 6
      shandan-system/src/main/resources/static/js/business/datalabels/managerIndex.js

@ -1,2 +1,5 @@
alter table BIANMU.B_DIRECTORY add SORT integer; alter table BIANMU.B_DIRECTORY add SORT integer;
comment on column BIANMU.B_DIRECTORY.SORT is '加载顺序'; comment on column BIANMU.B_DIRECTORY.SORT is '加载顺序';
alter table BIANMU.B_DATA_LABELS add SORT integer;
comment on column BIANMU.B_DATA_LABELS.SORT is '加载顺序';

@ -3,7 +3,6 @@ package com.keyware.shandan.bianmu.entity;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.keyware.shandan.common.entity.BaseEntity; import com.keyware.shandan.common.entity.BaseEntity;
import com.keyware.shandan.common.util.StringUtils; import com.keyware.shandan.common.util.StringUtils;
import com.keyware.shandan.system.utils.StringUtil;
import lombok.*; import lombok.*;
import java.util.Date; import java.util.Date;
@ -74,6 +73,13 @@ public class DataLabelsVo extends BaseEntity {
@OrderBy(isDesc = false, sort = 1) @OrderBy(isDesc = false, sort = 1)
private Boolean isLabel; private Boolean isLabel;
/**
* 渲染顺序
*/
@TableField(value = "SORT")
@OrderBy(isDesc = false)
private Integer sort;
/** /**
* 创建时间 * 创建时间
*/ */
@ -91,7 +97,7 @@ public class DataLabelsVo extends BaseEntity {
return ""; return "";
} }
public String getTitlePathWithSelf(){ public String getTitlePathWithSelf() {
if (StringUtils.hasText(titlePath)) { if (StringUtils.hasText(titlePath)) {
return titlePath + title + "/"; return titlePath + title + "/";
} }

@ -289,6 +289,12 @@ layui.use(['layer', 'form', 'gtable', 'globalTree'], function () {
<input class="layui-input" type="text" name="title" value="${data.title || ''}" maxlength="50" placeholder="请输入${titleName}名称" lay-verify="required"> <input class="layui-input" type="text" name="title" value="${data.title || ''}" maxlength="50" placeholder="请输入${titleName}名称" lay-verify="required">
</div> </div>
</div> </div>
<div class="layui-form-item">
<div class="layui-inline" style="width: calc(100% - 30px); margin:15px 15px 0 15px">
<label style="color: #555;">顺序</label>
<input class="layui-input" name="sort" value="${data.sort || '0'}" lay-verify="number" autocomplete="false" maxlength="230" placeholder="请输入加载顺序" />
</div>
</div>
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-inline" style="width: calc(100% - 30px); margin:15px 15px 0 15px"> <div class="layui-inline" style="width: calc(100% - 30px); margin:15px 15px 0 15px">
<label style="color: #555;">备注</label> <label style="color: #555;">备注</label>