diff --git a/data/magic-api/api/系统管理/配置中心/列表.ms b/data/magic-api/api/系统管理/配置中心/列表.ms index 175c271..7c7073a 100644 --- a/data/magic-api/api/系统管理/配置中心/列表.ms +++ b/data/magic-api/api/系统管理/配置中心/列表.ms @@ -5,7 +5,7 @@ "groupId" : "0295f2b4af9145f5a0ea29fa4b797214", "name" : "列表", "createTime" : null, - "updateTime" : 1653129241574, + "updateTime" : 1653634268957, "lock" : null, "createBy" : null, "updateBy" : null, @@ -110,6 +110,7 @@ return db.page(""" select id,configure_condition,configure_key,configure_value,configure_name,configure_type,configure_desc_ribe,remarks,create_date from sys_configure where is_del = 0 ?{configureCondition, and configure_condition like concat('%',#{configureCondition},'%')} - ?{configureKey, and configure_key = #{configureKey}} + ?{configureKey, and configure_key like concat('%',#{configureKey},'%')} + ?{configureValue, and configure_value like concat('%',#{configureValue},'%')} order by create_date desc """) \ No newline at end of file diff --git a/magic-boot-ui/src/components/magic/data/mb-search.vue b/magic-boot-ui/src/components/magic/data/mb-search.vue index 9c77c4b..32f68b6 100644 --- a/magic-boot-ui/src/components/magic/data/mb-search.vue +++ b/magic-boot-ui/src/components/magic/data/mb-search.vue @@ -3,22 +3,12 @@ - - - - - - + diff --git a/magic-boot-ui/src/components/magic/form/mb-select.vue b/magic-boot-ui/src/components/magic/form/mb-select.vue index 4b0cac6..0d3973c 100644 --- a/magic-boot-ui/src/components/magic/form/mb-select.vue +++ b/magic-boot-ui/src/components/magic/form/mb-select.vue @@ -105,12 +105,10 @@ onMounted(() => { }) function setValue(value){ - if(value){ - if(props.multiple && props.join){ - selectValue.value = value.split(',') - }else{ - selectValue.value = value.toString() - } + if(props.multiple && props.join){ + selectValue.value = value ? value.split(',') : [] + }else{ + selectValue.value = value ? value.toString() : '' } } diff --git a/magic-boot-ui/src/scripts/gen/gen-mb-list.js b/magic-boot-ui/src/scripts/gen/gen-mb-list.js index 85e63f2..a827c8a 100644 --- a/magic-boot-ui/src/scripts/gen/gen-mb-list.js +++ b/magic-boot-ui/src/scripts/gen/gen-mb-list.js @@ -30,9 +30,17 @@ function gen(groupPath, data){ for(var i in data){ var d = data[i] if(d.query){ + var props = '' + if(d.dictType){ + props = `, + props: { + type: '${d.dictType}' + }` + } html += ` ${d.columnName}: { - label: '${d.columnComment}' + label: '${d.columnComment}', + ${d.component}${props} },` } } diff --git a/magic-boot-ui/src/views/examples/test-mb-list.vue b/magic-boot-ui/src/views/examples/test-mb-list.vue index a9a2f9c..b7a6a81 100644 --- a/magic-boot-ui/src/views/examples/test-mb-list.vue +++ b/magic-boot-ui/src/views/examples/test-mb-list.vue @@ -40,7 +40,7 @@ const listOptions = reactive({ label: '姓名/昵称', }, roleId: { - type: 'select', + component: 'select', label: '角色', props: { url: '/system/role/all', diff --git a/magic-boot-ui/src/views/lowcode/code-gen-list.vue b/magic-boot-ui/src/views/lowcode/code-gen-list.vue index 6d39d07..06d1db1 100644 --- a/magic-boot-ui/src/views/lowcode/code-gen-list.vue +++ b/magic-boot-ui/src/views/lowcode/code-gen-list.vue @@ -33,8 +33,11 @@ label: '描述' }, createDate: { + component: 'date', label: '创建时间', - type: 'daterange' + props: { + type: 'daterange' + } } }, cols: [ diff --git a/magic-boot-ui/src/views/system/configure/configure-list.vue b/magic-boot-ui/src/views/system/configure/configure-list.vue index 28f3b25..d56355d 100644 --- a/magic-boot-ui/src/views/system/configure/configure-list.vue +++ b/magic-boot-ui/src/views/system/configure/configure-list.vue @@ -92,14 +92,13 @@ const tableOptions = reactive({ page: true, where: { configureCondition: { - type: 'input', - label: '条件', - value: '' + label: '查询条件' }, configureKey: { - type: 'input', - label: '键值', - value: '' + label: '配置键值' + }, + configureValue: { + label: '配置数据' } }, cols: [ diff --git a/magic-boot-ui/src/views/system/dict/dict-items.vue b/magic-boot-ui/src/views/system/dict/dict-items.vue index e6cade1..57f1e88 100644 --- a/magic-boot-ui/src/views/system/dict/dict-items.vue +++ b/magic-boot-ui/src/views/system/dict/dict-items.vue @@ -63,21 +63,17 @@ const tableOptions = reactive({ page: true, where: { label: { - type: 'input', - label: '标签', - value: '' + label: '标签' }, value: { - type: 'input', - label: '值', - value: '' + label: '值' }, dictId: props.dictId }, cols: [ { field: 'label', - label: '类型' + label: '标签' }, { field: 'value', diff --git a/magic-boot-ui/src/views/system/dict/dict-list.vue b/magic-boot-ui/src/views/system/dict/dict-list.vue index 0c78c26..a62d9bb 100644 --- a/magic-boot-ui/src/views/system/dict/dict-list.vue +++ b/magic-boot-ui/src/views/system/dict/dict-list.vue @@ -63,14 +63,11 @@ const tableOptions = reactive({ page: true, where: { type: { - type: 'input', - label: '类型', - value: '' + label: '类型' }, dictType: { - type: 'select', + component: 'select', label: '字典类型', - value: '', props: { 'all-option': true, type: 'dict_type' diff --git a/magic-boot-ui/src/views/system/monitor/login-log.vue b/magic-boot-ui/src/views/system/monitor/login-log.vue index a325edb..7af08f3 100644 --- a/magic-boot-ui/src/views/system/monitor/login-log.vue +++ b/magic-boot-ui/src/views/system/monitor/login-log.vue @@ -12,9 +12,11 @@ url: '/system/log/login/list', where: { createDate: { - type: 'datetimerange', + component: 'date', label: '创建时间', - value: '' + props: { + type: 'datetimerange' + } } }, cols: [ diff --git a/magic-boot-ui/src/views/system/monitor/oper-log.vue b/magic-boot-ui/src/views/system/monitor/oper-log.vue index 9cf4164..418deb0 100644 --- a/magic-boot-ui/src/views/system/monitor/oper-log.vue +++ b/magic-boot-ui/src/views/system/monitor/oper-log.vue @@ -30,12 +30,15 @@ label: '路径' }, costTime: { - label: '耗时区间', - type: 'inputrange' + component: 'inputrange', + label: '耗时区间' }, createDate: { - type: 'datetimerange', - label: '创建时间' + component: 'date', + label: '创建时间', + props: { + type: 'datetimerange' + } } }, cols: [ diff --git a/magic-boot-ui/src/views/system/role/role-list.vue b/magic-boot-ui/src/views/system/role/role-list.vue index bb009e1..6a988cf 100644 --- a/magic-boot-ui/src/views/system/role/role-list.vue +++ b/magic-boot-ui/src/views/system/role/role-list.vue @@ -92,9 +92,7 @@ const tableOptions = reactive({ url: '/system/role/list', where: { name: { - type: 'input', - label: '角色名称', - value: '' + label: '角色名称' } }, cols: [ diff --git a/magic-boot-ui/src/views/system/user/user-list.vue b/magic-boot-ui/src/views/system/user/user-list.vue index e7c902c..c0318fb 100644 --- a/magic-boot-ui/src/views/system/user/user-list.vue +++ b/magic-boot-ui/src/views/system/user/user-list.vue @@ -115,19 +115,14 @@ const tableOptions = reactive({ selection: true, where: { username: { - type: 'input', - label: '登录名称', - value: '' + label: '登录名称' }, name: { - type: 'input', - label: '姓名/昵称', - value: '' + label: '姓名/昵称' }, roleId: { - type: 'select', + component: 'select', label: '角色', - value: '', props: { url: '/system/role/all', multiple: true