🔨 修改主机逻辑.

This commit is contained in:
lijiahang
2024-07-22 18:05:00 +08:00
parent 0664eff151
commit b7608fccb3
63 changed files with 878 additions and 926 deletions

View File

@@ -61,6 +61,10 @@ public interface ErrorMessage {
String GROUP_ABSENT = "分组不存在";
String HOST_TYPE_ERROR = "主机类型错误";
String HOST_NOT_ENABLED = "主机未启用";
String UNABLE_OPERATE_ADMIN_ROLE = "无法操作管理员账号";
String UNSUPPORTED_CHARSET = "不支持的编码 [{}]";

View File

@@ -79,6 +79,6 @@ public interface FieldConst {
String FILTER = "filter";
String LICENSE = "license";
String ALL = "all";
}

View File

@@ -210,14 +210,23 @@ public class DataQuery<T> {
// -------------------- data grid --------------------
public DataGrid<T> dataGrid() {
return this.dataGrid(Function.identity());
return this.dataGrid(this.wrapper, Function.identity());
}
public DataGrid<T> dataGrid(Wrapper<T> countWrapper) {
return this.dataGrid(countWrapper, Function.identity());
}
public <R> DataGrid<R> dataGrid(Function<T, R> mapper) {
Valid.notNull(mapper, "convert function is null");
return this.dataGrid(this.wrapper, mapper);
}
public <R> DataGrid<R> dataGrid(Wrapper<T> countWrapper, Function<T, R> mapper) {
Valid.notNull(page, "page is null");
Valid.notNull(wrapper, "wrapper is null");
Long count = dao.selectCount(wrapper);
Valid.notNull(countWrapper, "count wrapper is null");
Valid.notNull(mapper, "convert function is null");
Long count = dao.selectCount(countWrapper);
Pager<R> pager = new Pager<>(page);
pager.setTotal(count.intValue());
boolean next = pager.hasMoreData();

View File

@@ -3,7 +3,7 @@
search-input-placeholder="输入搜索值"
create-card-position="head"
:loading="loading"
:fieldConfig="fieldConfig"
:field-config="fieldConfig"
:list="list"
:pagination="pagination"
:card-layout-cols="cardColLayout"
@@ -74,15 +74,16 @@
<!-- 修改 -->
<a-doption v-permission="['${package.ModuleName}:${typeHyphen}:update']"
@click="emits('openUpdate', record)">
<icon-edit />
修改
<span class="more-doption normal">
<icon-edit /> 修改
</span>
</a-doption>
<!-- 删除 -->
<a-doption v-permission="['${package.ModuleName}:${typeHyphen}:delete']"
class="span-red"
@click="deleteRow(record.id)">
<icon-delete />
删除
<span class="more-doption error">
<icon-delete /> 删除
</span>
</a-doption>
</template>
</a-dropdown>
@@ -93,15 +94,17 @@
<!-- 修改 -->
<a-doption v-permission="['${package.ModuleName}:${typeHyphen}:update']"
@click="emits('openUpdate', record)">
<icon-edit />
修改
<span class="more-doption normal">
<icon-edit /> 修改
</span>
</a-doption>
<!-- 删除 -->
<a-doption v-permission="['${package.ModuleName}:${typeHyphen}:delete']"
class="span-red"
@click="deleteRow(record.id)">
<icon-delete />
删除
<span class="more-doption error">
<icon-delete /> 删除
</span>
</a-doption>
</template>
</card-list>

View File

@@ -6,7 +6,7 @@ const columns = [
title: 'id',
dataIndex: 'id',
slotName: 'id',
width: 80,
width: 68,
align: 'left',
fixed: 'left',
}, #foreach($field in ${table.fields})#if("$!field.propertyName" != "id"){