Browse Source

👣 提供原生模板

master
wangxiang 3 years ago
parent
commit
00c2f34396
  1. 2
      kicc-platform/kicc-platform-biz/kicc-system-biz/src/main/java/com/cloud/kicc/system/controller/ConfigController.java
  2. 17
      kicc-ui/src/views/system/config/index.vue

2
kicc-platform/kicc-platform-biz/kicc-system-biz/src/main/java/com/cloud/kicc/system/controller/ConfigController.java

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cloud.kicc.system.api.entity.Config;
import com.cloud.kicc.system.api.entity.User;
import com.cloud.kicc.system.service.ConfigService;
import com.cloud.kicc.common.core.api.R;
import com.cloud.kicc.common.core.constant.AppConstants;
@ -39,6 +40,7 @@ public class ConfigController { @@ -39,6 +40,7 @@ public class ConfigController {
.like(StrUtil.isNotBlank(config.getName()), Config::getName, config.getName())
.eq(StrUtil.isNotBlank(config.getKey()), Config::getKey, config.getKey())
.eq(StrUtil.isNotBlank(config.getIsSys()), Config::getIsSys, config.getIsSys())
.between(StrUtil.isNotBlank(config.getBeginTime()) && StrUtil.isNotBlank(config.getEndTime()), Config::getCreateTime, config.getBeginTime(), config.getEndTime())
.orderByDesc(Config::getId);
}

17
kicc-ui/src/views/system/config/index.vue

@ -8,10 +8,15 @@ @@ -8,10 +8,15 @@
:wrapperCol="{ style: { width: '300px', 'margin-bottom': '5px' } }"
>
<AFormItem label="参数名称" name="name">
<a-input v-model:value="state.queryParams.name" placeholder="请输入参数名称"/>
<a-input v-model:value="state.queryParams.name"
allowClear
placeholder="请输入参数名称"
/>
</AFormItem>
<AFormItem label="参数键" name="key">
<a-input v-model:value="state.queryParams.key" placeholder="请输入参数键"/>
<a-input v-model:value="state.queryParams.key"
allowClear
placeholder="请输入参数键"/>
</AFormItem>
<AFormItem label="系统内置" name="isSys">
<ASelect v-model:value="state.queryParams.isSys"
@ -41,6 +46,7 @@ @@ -41,6 +46,7 @@
</AFormItem>
</AForm>
<ATable ref="tableElRef"
:loading="state.loading"
:size="state.selectedKeys[0]"
:dataSource="state.dataSource"
:columns="columns"
@ -148,6 +154,7 @@ @@ -148,6 +154,7 @@
/** 类型规范统一声明定义区域 */
interface TableState {
loading: boolean;
ids: string[];
single: boolean;
multiple: boolean;
@ -194,6 +201,8 @@ @@ -194,6 +201,8 @@
const { toggle, isFullscreen } = useFullscreen(wrapRef);
const [registerModal, { openModal }] = useModal();
const state = reactive<TableState>({
//
loading: true,
//
ids: [],
//
@ -203,7 +212,7 @@ @@ -203,7 +212,7 @@
//
total: 0,
//
tableHeight: 630,
tableHeight: 588,
// a-table
tableInstance: null,
// a-form
@ -250,9 +259,11 @@ @@ -250,9 +259,11 @@
/** 查询列表数据 */
function getList() {
state.loading = true;
listConfig(convertDateRange(state.queryParams, state.dateRange)).then(response => {
state.dataSource = response.data;
state.total = response.total;
state.loading = false;
});
}

Loading…
Cancel
Save