Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdict
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdict
提交
a60d5573
提交
a60d5573
编写于
4月 16, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
35b39874
变更
17
展开全部
显示空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
262 行增加
和
577 行删除
+262
-577
package.json
app_web/package.json
+1
-0
app-register.ts
app_web/src/app-register.ts
+2
-0
app-format-data.less
app_web/src/components/app-format-data/app-format-data.less
+3
-0
app-format-data.vue
app_web/src/components/app-format-data/app-format-data.vue
+41
-0
app-radio-group.vue
app_web/src/components/app-radio-group/app-radio-group.vue
+16
-67
app-span.less
app_web/src/components/app-span/app-span.less
+6
-1
app-span.vue
app_web/src/components/app-span/app-span.vue
+4
-4
codelist.vue
app_web/src/components/codelist/codelist.vue
+7
-2
default-searchform-base.vue
...zdict-item/default-searchform/default-searchform-base.vue
+57
-225
main-grid-base.vue
...web/src/widgets/ibzdict-item/main-grid/main-grid-base.vue
+1
-1
default-searchform-base.vue
...ts/ibzdict/default-searchform/default-searchform-base.vue
+57
-225
main-grid-base.vue
app_web/src/widgets/ibzdict/main-grid/main-grid-base.vue
+1
-1
yarn.lock
app_web/yarn.lock
+1
-1
IIBZDictItemService.java
...ava/cn/ibizlab/core/dict/service/IIBZDictItemService.java
+11
-7
IIBZDictService.java
...in/java/cn/ibizlab/core/dict/service/IIBZDictService.java
+11
-7
IBZDictItemServiceImpl.java
...bizlab/core/dict/service/impl/IBZDictItemServiceImpl.java
+17
-18
IBZDictServiceImpl.java
...cn/ibizlab/core/dict/service/impl/IBZDictServiceImpl.java
+26
-18
未找到文件。
app_web/package.json
浏览文件 @
a60d5573
...
...
@@ -25,6 +25,7 @@
"file-saver"
:
"^2.0.2"
,
"font-awesome"
:
"^4.7.0"
,
"interactjs"
:
"^1.9.4"
,
"moment"
:
"^2.24.0"
,
"path-to-regexp"
:
"^6.1.0"
,
"qs"
:
"^6.9.1"
,
"rxjs"
:
"^6.5.4"
,
...
...
app_web/src/app-register.ts
浏览文件 @
a60d5573
...
...
@@ -66,6 +66,7 @@ import AppColumnLink from './components/app-column-link/app-column-link.vue'
import
AppDataUploadView
from
'./components/app-data-upload/app-data-upload.vue'
import
DropDownListDynamic
from
'./components/dropdown-list-dynamic/dropdown-list-dynamic.vue'
import
AppImagePreview
from
'./components/app-image-preview/app-image-preview.vue'
import
AppFormatData
from
'./components/app-format-data/app-format-data.vue'
// 全局挂载UI实体服务注册中心
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
...
...
@@ -141,5 +142,6 @@ export const AppComponents = {
v
.
component
(
'app-data-upload'
,
AppDataUploadView
);
v
.
component
(
'dropdown-list-dynamic'
,
DropDownListDynamic
);
v
.
component
(
'app-image-preview'
,
AppImagePreview
);
v
.
component
(
'app-format-data'
,
AppFormatData
);
},
};
\ No newline at end of file
app_web/src/components/app-format-data/app-format-data.less
0 → 100644
浏览文件 @
a60d5573
.app-format-data{
display: inline-block;
}
\ No newline at end of file
app_web/src/components/app-format-data/app-format-data.vue
0 → 100644
浏览文件 @
a60d5573
<
template
>
<span
class=
"app-format-data"
>
{{
getcurValue
()
}}
</span>
</
template
>
<
script
lang =
'ts'
>
import
{
Component
,
Vue
,
Prop
}
from
'vue-property-decorator'
;
import
moment
from
"moment"
;
@
Component
({})
export
default
class
AppFormatData
extends
Vue
{
/**
* 格式化正则
*
* @type {string}
* @memberof AppFormatData
*/
@
Prop
({
default
:
'YYYY-MM-DD HH:mm:ss'
})
public
format
?:
string
;
/**
* 传入数据
*
* @type {*}
* @memberof AppFormatData
*/
@
Prop
()
public
data
!
:
any
;
/**
* 显示值
*
* @memberof AppFormatData
*/
getcurValue
(){
return
moment
(
this
.
data
).
format
(
this
.
format
);
}
}
</
script
>
<
style
lang=
"less"
>
@import './app-format-data.less';
</
style
>
\ No newline at end of file
app_web/src/components/app-radio-group/app-radio-group.vue
浏览文件 @
a60d5573
<
template
>
<radio-group
class=
"app-radio-group"
v-model=
"
selectArray
"
>
<radio-group
class=
"app-radio-group"
v-model=
"
value
"
>
<radio
v-for=
"(_item,index) in items"
:key =
"index"
:label=
"_item.value"
:disabled=
"isDisabled || _item.disabled"
>
<span>
{{
Object
.
is
(
codelistType
,
'STATIC'
)
?
$t
(
'codelist.'
+
tag
+
'.'
+
_item
.
value
)
:
_item
.
text
}}
</span>
</radio>
...
...
@@ -25,39 +25,41 @@ export default class AppRadioGroup extends Vue {
* @type {*}
* @memberof AppRadioGroup
*/
@
Model
(
'change'
)
value
?:
any
;
@
Model
(
'change'
)
item
?:
any
;
/**
*
代码表标识
*
获取值
*
* @type {string}
* @memberof AppRadioGroup
*/
@
Prop
()
public
tag
?:
string
;
get
value
()
{
return
this
.
item
;
}
/**
*
代码表类型
*
设置值
*
* @type {string}
* @memberof AppRadioGroup
*/
@
Prop
()
public
codelistType
?:
string
;
set
value
(
val
:
any
)
{
this
.
$emit
(
'change'
,
val
);
}
/**
* 代码表
值分隔符
* 代码表
标识
*
* @type {string}
* @memberof AppRadioGroup
*/
@
Prop
(
{
default
:
';'
})
public
valueSeparator
?:
string
;
@
Prop
(
)
public
tag
?:
string
;
/**
*
模式(数字或者字符串)
*
代码表类型
*
* @type {
*
}
* @memberof App
CheckBox
* @type {
string
}
* @memberof App
RadioGroup
*/
@
Prop
(
{
default
:
'str'
})
mode
:
any
;
@
Prop
(
)
public
codelistType
?:
string
;
/**
* 是否禁用
...
...
@@ -113,59 +115,6 @@ export default class AppRadioGroup extends Vue {
})
}
}
/**
* 选中数组
*
* @memberof AppRadioGroup
*/
get
selectArray
()
{
if
(
this
.
value
)
{
if
(
Object
.
is
(
this
.
mode
,
'num'
)
&&
this
.
items
)
{
let
selectsArray
:
Array
<
any
>
=
[];
let
num
:
number
=
parseInt
(
this
.
value
,
10
);
this
.
items
.
forEach
((
item
:
any
)
=>
{
if
((
num
&
item
.
value
)
==
item
.
value
)
{
selectsArray
.
push
(
item
.
value
);
}
});
return
selectsArray
;
}
else
if
(
Object
.
is
(
this
.
mode
,
'str'
))
{
if
(
this
.
value
!==
''
)
{
return
this
.
value
.
split
(
this
.
valueSeparator
);
}
}
}
else
{
return
[];
}
}
/**
* 设置选中
*
* @memberof AppRadioGroup
*/
set
selectArray
(
val
:
any
)
{
let
value
:
null
|
string
|
number
=
null
;
if
(
Object
.
is
(
this
.
mode
,
'num'
))
{
let
temp
:
number
=
0
;
val
.
forEach
((
item
:
any
)
=>
{
temp
=
temp
|
parseInt
(
item
,
10
);
});
value
=
temp
;
}
else
if
(
Object
.
is
(
this
.
mode
,
'str'
))
{
let
_datas
:
string
[]
=
[];
this
.
items
.
forEach
((
item
:
any
)
=>
{
const
index
=
val
.
findIndex
((
_key
:
any
)
=>
Object
.
is
(
item
.
value
,
_key
));
if
(
index
===
-
1
)
{
return
;
}
_datas
.
push
(
item
.
value
);
});
value
=
_datas
.
join
(
this
.
valueSeparator
);
}
this
.
$emit
(
'change'
,
value
);
}
}
</
script
>
<
style
lang=
"less"
>
...
...
app_web/src/components/app-span/app-span.less
浏览文件 @
a60d5573
.app-span{
white-space: nowrap;
text-overflow: ellipsis;
word-break: break-all;
overflow: hidden;
}
app_web/src/components/app-span/app-span.vue
浏览文件 @
a60d5573
<
template
>
<codelist
v-if=
"tag"
:tag=
"tag"
:value=
"value"
:codelistType=
"codelistType"
:renderMode=
"renderMode"
:valueSeparator=
"valueSeparator"
:textSeparator=
"textSeparator"
></codelist>
<span
v-else
>
{{
text
}}
</span>
<span
class=
"app-span"
v-else
>
{{
text
}}
</span>
</
template
>
<
script
lang=
"ts"
>
...
...
@@ -39,7 +39,7 @@ export default class DropDownList extends Vue {
* @type {boolean}
* @memberof SelectPicker
*/
@
Prop
()
public
renderMode
?:
string
;
@
Prop
(
{
default
:
"STR"
}
)
public
renderMode
?:
string
;
/**
* 文本分隔符
...
...
@@ -92,12 +92,12 @@ export default class DropDownList extends Vue {
}
/**
*
加载代码表
*
处理数据
*
* @memberof AppSpan
*/
public
load
(){
if
(
this
.
tag
){
if
(
!
this
.
value
||
this
.
tag
){
return
;
//代码表走codelist组件
}
else
if
(
Object
.
is
(
this
.
editorType
,
'PICTURE'
)
||
Object
.
is
(
this
.
editorType
,
'PICTURE_ONE'
)
||
Object
.
is
(
this
.
editorType
,
'FILEUPLOADER'
)){
let
files
:
any
[]
=
JSON
.
parse
(
this
.
value
);
...
...
app_web/src/components/codelist/codelist.vue
浏览文件 @
a60d5573
...
...
@@ -54,7 +54,7 @@ export default class CodeList extends Vue {
* @type {boolean}
* @memberof SelectPicker
*/
@
Prop
()
public
renderMode
?:
string
;
@
Prop
(
{
default
:
"STR"
}
)
public
renderMode
?:
string
;
/**
* 文本分隔符
...
...
@@ -213,5 +213,10 @@ export default class CodeList extends Vue {
</
script
>
<
style
lang=
'less'
>
.codelist {
white-space: nowrap;
text-overflow: ellipsis;
word-break: break-all;
overflow: hidden;
}
</
style
>
\ No newline at end of file
app_web/src/widgets/ibzdict-item/default-searchform/default-searchform-base.vue
浏览文件 @
a60d5573
此差异已折叠。
点击以展开。
app_web/src/widgets/ibzdict-item/main-grid/main-grid-base.vue
浏览文件 @
a60d5573
...
...
@@ -68,7 +68,7 @@
<
template
v-if=
"getColumnState('updatedate')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'updatedate'"
:label=
"$t('ibzdictitem.main_grid.columns.updatedate')"
:width=
"250"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot=
"
{row,column}">
<
span>
{{
row
.
updatedate
}}
</span
>
<
app-format-data
format=
"%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"
:data=
"row.updatedate"
></app-format-data
>
</
template
>
</el-table-column>
</template>
...
...
app_web/src/widgets/ibzdict/default-searchform/default-searchform-base.vue
浏览文件 @
a60d5573
此差异已折叠。
点击以展开。
app_web/src/widgets/ibzdict/main-grid/main-grid-base.vue
浏览文件 @
a60d5573
...
...
@@ -33,7 +33,7 @@
<
template
v-if=
"getColumnState('updatedate')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'updatedate'"
:label=
"$t('ibzdict.main_grid.columns.updatedate')"
:width=
"250"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot=
"
{row,column}">
<
span>
{{
row
.
updatedate
}}
</span
>
<
app-format-data
format=
"%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"
:data=
"row.updatedate"
></app-format-data
>
</
template
>
</el-table-column>
</template>
...
...
app_web/yarn.lock
浏览文件 @
a60d5573
...
...
@@ -6965,7 +6965,7 @@ mockjs@^1.1.0:
dependencies:
commander "*"
moment@2.24.0:
moment@2.24.0
, moment@^2.24.0
:
version "2.24.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==
...
...
ibzdict-core/src/main/java/cn/ibizlab/core/dict/service/IIBZDictItemService.java
浏览文件 @
a60d5573
...
...
@@ -23,13 +23,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
IIBZDictItemService
extends
IService
<
IBZDictItem
>{
IBZDictItem
get
(
String
itemId
)
;
IBZDictItem
get
(
IBZDictItem
iBZDictItem
)
;
IBZDictItem
getDraft
(
IBZDictItem
iBZDictItem
)
;
boolean
checkKey
(
IBZDictItem
iBZDictItem
)
;
boolean
remove
(
String
itemId
)
;
boolean
create
(
IBZDictItem
iBZDictItem
)
;
boolean
update
(
IBZDictItem
iBZDictItem
)
;
IBZDictItem
get
(
String
key
)
;
IBZDictItem
getDraft
(
IBZDictItem
et
)
;
boolean
save
(
IBZDictItem
et
)
;
void
saveBatch
(
List
<
IBZDictItem
>
list
,
int
batchSize
)
;
boolean
checkKey
(
IBZDictItem
et
)
;
boolean
Remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
,
int
batchSize
)
;
boolean
create
(
IBZDictItem
et
)
;
void
createBatch
(
List
<
IBZDictItem
>
list
,
int
batchSize
)
;
boolean
update
(
IBZDictItem
et
)
;
void
updateBatch
(
List
<
IBZDictItem
>
list
,
int
batchSize
)
;
Page
<
IBZDictItem
>
searchDefault
(
IBZDictItemSearchContext
context
)
;
}
...
...
ibzdict-core/src/main/java/cn/ibizlab/core/dict/service/IIBZDictService.java
浏览文件 @
a60d5573
...
...
@@ -23,13 +23,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
IIBZDictService
extends
IService
<
IBZDict
>{
IBZDict
get
(
String
dictId
)
;
IBZDict
get
(
IBZDict
iBZDict
)
;
boolean
create
(
IBZDict
iBZDict
)
;
boolean
checkKey
(
IBZDict
iBZDict
)
;
IBZDict
getDraft
(
IBZDict
iBZDict
)
;
boolean
update
(
IBZDict
iBZDict
)
;
boolean
remove
(
String
dictId
)
;
IBZDict
get
(
String
key
)
;
boolean
create
(
IBZDict
et
)
;
void
createBatch
(
List
<
IBZDict
>
list
,
int
batchSize
)
;
boolean
checkKey
(
IBZDict
et
)
;
IBZDict
getDraft
(
IBZDict
et
)
;
boolean
update
(
IBZDict
et
)
;
void
updateBatch
(
List
<
IBZDict
>
list
,
int
batchSize
)
;
boolean
Remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
,
int
batchSize
)
;
boolean
save
(
IBZDict
et
)
;
void
saveBatch
(
List
<
IBZDict
>
list
,
int
batchSize
)
;
Page
<
IBZDict
>
searchDefault
(
IBZDictSearchContext
context
)
;
}
...
...
ibzdict-core/src/main/java/cn/ibizlab/core/dict/service/impl/IBZDictItemServiceImpl.java
浏览文件 @
a60d5573
...
...
@@ -44,25 +44,24 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
@Override
@Transactional
public
IBZDictItem
get
(
String
itemid
)
{
IBZDictItem
ibzdictitem
=
getById
(
itemid
);
return
ibzdictitem
;
public
IBZDictItem
get
(
String
key
)
{
IBZDictItem
et
=
getById
(
key
);
if
(
et
==
null
)
{
et
=
new
IBZDictItem
();
et
.
setItemid
(
key
);
}
@Override
@Transactional
public
IBZDictItem
get
(
IBZDictItem
ibzdictitem
)
{
return
null
;
return
et
;
}
@Override
public
IBZDictItem
getDraft
(
IBZDictItem
ibzdictitem
)
{
return
ibzdictitem
;
public
IBZDictItem
getDraft
(
IBZDictItem
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
IBZDictItem
ibzdictitem
)
{
public
boolean
checkKey
(
IBZDictItem
et
)
{
return
true
;
}
@Override
...
...
@@ -75,17 +74,17 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
}
@Override
@Transactional
public
boolean
create
(
IBZDictItem
ibzdictitem
)
{
boolean
bOk
=
false
;
bOk
=
save
(
ibzdictitem
)
;
return
bOk
;
public
boolean
create
(
IBZDictItem
et
)
{
boolean
ret
=
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
))
;
if
(!
ret
)
return
ret
;
return
ret
;
}
@Override
@Transactional
public
boolean
update
(
IBZDictItem
ibzdictitem
)
{
public
boolean
update
(
IBZDictItem
et
)
{
boolean
bOk
=
false
;
bOk
=
update
(
ibzdictitem
,
(
Wrapper
)
ibzdictitem
.
getUpdateWrapper
(
true
).
eq
(
"ibzdictitemid"
,
ibzdictitem
.
getItemId
()));
bOk
=
update
(
et
,
(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"ibzdictitemid"
,
et
.
getItemId
()));
return
bOk
;
}
...
...
ibzdict-core/src/main/java/cn/ibizlab/core/dict/service/impl/IBZDictServiceImpl.java
浏览文件 @
a60d5573
...
...
@@ -44,39 +44,47 @@ public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> impl
@Override
@Transactional
public
IBZDict
get
(
String
dictid
)
{
IBZDict
ibzdict
=
getById
(
dictid
);
return
ibzdict
;
public
IBZDict
get
(
String
key
)
{
IBZDict
et
=
getById
(
key
);
if
(
et
==
null
)
{
et
=
new
IBZDict
();
et
.
setDictid
(
key
);
}
@Override
@Transactional
public
IBZDict
get
(
IBZDict
ibzdict
)
{
return
null
;
return
et
;
}
@Override
@Transactional
public
boolean
create
(
IBZDict
ibzdict
)
{
boolean
bOk
=
false
;
bOk
=
save
(
ibzdict
);
return
bOk
;
public
boolean
create
(
IBZDict
et
)
{
boolean
ret
=
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
));
if
(!
ret
)
return
ret
;
//嵌套[字典项目]
if
(
et
.
getItems
()!=
null
){
for
(
cn
.
ibizlab
.
core
.
dict
.
domain
.
IBZDictItem
sub:
et
.
getItems
())
{
sub
.
setDictid
(
et
.
getDictid
())
}
if
(
et
.
getItems
().
size
()>
0
)
ibzdictitemService
.
createBatch
(
sub
,
500
)
;
et
.
setItems
(
null
);
}
return
ret
;
}
@Override
public
boolean
checkKey
(
IBZDict
ibzdic
t
)
{
public
boolean
checkKey
(
IBZDict
e
t
)
{
return
true
;
}
@Override
public
IBZDict
getDraft
(
IBZDict
ibzdic
t
)
{
return
ibzdic
t
;
public
IBZDict
getDraft
(
IBZDict
e
t
)
{
return
e
t
;
}
@Override
@Transactional
public
boolean
update
(
IBZDict
ibzdic
t
)
{
public
boolean
update
(
IBZDict
e
t
)
{
boolean
bOk
=
false
;
bOk
=
update
(
ibzdict
,
(
Wrapper
)
ibzdict
.
getUpdateWrapper
(
true
).
eq
(
"ibzdictid"
,
ibzdic
t
.
getDictId
()));
bOk
=
update
(
et
,
(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"ibzdictid"
,
e
t
.
getDictId
()));
return
bOk
;
}
@Override
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录