Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzwf
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzwf
提交
ba31c7ed
提交
ba31c7ed
编写于
8月 06, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 部署微服务应用
上级
b11e3f68
变更
10
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
271 行增加
和
28 行删除
+271
-28
dropdown-list-mpicker.less
...mponents/dropdown-list-mpicker/dropdown-list-mpicker.less
+12
-1
dropdown-list-mpicker.vue
...omponents/dropdown-list-mpicker/dropdown-list-mpicker.vue
+121
-17
dropdown-list.less
app_web/src/components/dropdown-list/dropdown-list.less
+15
-4
dropdown-list.vue
app_web/src/components/dropdown-list/dropdown-list.vue
+86
-2
codelist-service.ts
app_web/src/service/app/codelist-service.ts
+1
-2
config.xml
config.xml
+5
-0
Dockerfile
ibzwf-app/ibzwf-app-web/src/main/docker/Dockerfile
+1
-1
ibzwf-app-web.yaml
ibzwf-app/ibzwf-app-web/src/main/docker/ibzwf-app-web.yaml
+14
-1
application-web-prod.yml
...ibzwf-app-web/src/main/resources/application-web-prod.yml
+8
-0
application-dev.yml
ibzwf-boot/src/main/resources/application-dev.yml
+8
-0
未找到文件。
app_web/src/components/dropdown-list-mpicker/dropdown-list-mpicker.less
浏览文件 @
ba31c7ed
.ivu-select-multiple .ivu-select-item-selected:after{
display: none;
}
.dropdown-list-mpicker-container{
.tree-dropdown-list-mpicker{
width: 100%;
.el-input__inner{
height: 32px !important;
line-height: 32px !important;
}
.el-input__icon{
line-height: 32px;
}
}
}
app_web/src/components/dropdown-list-mpicker/dropdown-list-mpicker.vue
浏览文件 @
ba31c7ed
<
template
>
<i-select
class=
'dropdown-list-mpicker'
multiple
:transfer=
"true"
transfer-class-name=
"dropdown-list-mpicker-transfer"
v-model=
"currentVal"
:disabled=
"disabled === true ? true : false"
:clearable=
"true"
:filterable=
"filterable === true ? true : false"
@
on-open-change=
"onClick"
:placeholder=
"$t('components.dropDownListMpicker.placeholder')"
>
<i-option
v-for=
"(item, index) in items"
:key=
"index"
:value=
"item.value.toString()"
:label=
"item.text"
>
<Checkbox
:value =
"(currentVal.indexOf(item.value.toString()))==-1?false:true"
>
{{
Object
.
is
(
codelistType
,
'STATIC'
)
?
$t
(
'codelist.'
+
tag
+
'.'
+
item
.
value
)
:
item
.
text
}}
</Checkbox>
</i-option>
</i-select>
<div
class=
"dropdown-list-mpicker-container"
>
<i-select
v-if=
"!hasChildren"
class=
'dropdown-list-mpicker'
multiple
:transfer=
"true"
transfer-class-name=
"dropdown-list-mpicker-transfer"
v-model=
"currentVal"
:disabled=
"disabled === true ? true : false"
:clearable=
"true"
:filterable=
"filterable === true ? true : false"
@
on-open-change=
"onClick"
:placeholder=
"$t('components.dropDownListMpicker.placeholder')"
>
<i-option
v-for=
"(item, index) in items"
:key=
"index"
:value=
"item.value.toString()"
:label=
"item.text"
>
<Checkbox
:value =
"(currentVal.indexOf(item.value.toString()))==-1?false:true"
>
{{
Object
.
is
(
codelistType
,
'STATIC'
)
?
$t
(
'codelist.'
+
tag
+
'.'
+
item
.
value
)
:
item
.
text
}}
</Checkbox>
</i-option>
</i-select>
<ibiz-select-tree
v-if=
"hasChildren"
class=
"tree-dropdown-list-mpicker"
:disabled=
"disabled"
:NodesData=
"items"
v-model=
"currentVal"
:multiple=
"true"
></ibiz-select-tree>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
}
from
'vue-property-decorator'
;
import
CodeListService
from
"@service/app/codelist-service"
;
import
{
Util
}
from
'@/utils'
;
@
Component
({
})
export
default
class
DropDownListMpicker
extends
Vue
{
...
...
@@ -32,6 +37,13 @@ export default class DropDownListMpicker extends Vue {
*/
public
codeListService
:
CodeListService
=
new
CodeListService
({
$store
:
this
.
$store
});
/**
* 是否有子集
* @type {boolean}
* @memberof DropDownListMpicker
*/
public
hasChildren
:
boolean
=
false
;
/**
* 当前选中值
* @type {any}
...
...
@@ -131,6 +143,14 @@ export default class DropDownListMpicker extends Vue {
* @memberof DropDownListMpicker
*/
set
currentVal
(
val
:
any
)
{
if
(
this
.
hasChildren
&&
val
){
let
tempVal
:
any
=
JSON
.
parse
(
val
);
if
(
tempVal
.
length
>
0
){
val
=
tempVal
.
map
((
item
:
any
)
=>
{
return
item
.
value
;
})
}
}
const
type
:
string
=
this
.
$util
.
typeOf
(
val
);
val
=
Object
.
is
(
type
,
'null'
)
||
Object
.
is
(
type
,
'undefined'
)
?
[]
:
val
;
let
value
=
val
.
length
>
0
?
val
.
join
(
this
.
valueSeparator
)
:
''
;
...
...
@@ -143,9 +163,45 @@ export default class DropDownListMpicker extends Vue {
* @memberof DropDownListMpicker
*/
get
currentVal
()
{
if
(
this
.
hasChildren
){
if
(
this
.
itemValue
){
let
list
:
Array
<
any
>
=
[];
let
selectedvalueArray
:
Array
<
any
>
=
[];
let
curSelectedValue
:
Array
<
any
>
=
this
.
itemValue
.
split
(
this
.
valueSeparator
);
this
.
getItemList
(
list
,
this
.
items
);
if
(
curSelectedValue
.
length
>
0
){
curSelectedValue
.
forEach
((
selectedVal
:
any
)
=>
{
let
tempResult
:
any
=
list
.
find
((
item
:
any
)
=>
{
return
item
.
value
==
selectedVal
;
})
selectedvalueArray
.
push
(
tempResult
);
})
}
return
selectedvalueArray
.
length
>
0
?
JSON
.
stringify
(
selectedvalueArray
):
null
;
}
else
{
return
null
;
}
}
return
this
.
itemValue
?
this
.
itemValue
.
split
(
this
.
valueSeparator
):[];
}
/**
* 获取代码表列表
*
* @memberof DropDownListMpicker
*/
public
getItemList
(
list
:
Array
<
any
>
,
items
:
Array
<
any
>
){
if
(
items
&&
items
.
length
>
0
){
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
children
){
this
.
getItemList
(
list
,
item
.
children
);
}
list
.
push
(
item
);
})
}
}
/**
* 代码表
*
...
...
@@ -186,6 +242,7 @@ export default class DropDownListMpicker extends Vue {
const
codelist
=
this
.
$store
.
getters
.
getCodeList
(
this
.
tag
);
if
(
codelist
)
{
this
.
items
=
[...
JSON
.
parse
(
JSON
.
stringify
(
codelist
.
items
))];
this
.
handleLevelCodeList
(
Util
.
deepCopy
(
this
.
items
));
}
else
{
console
.
log
(
`----
${
this
.
tag
}
----
${(
this
.
$t
(
'app.commonWords.codeNotExist'
)
as
string
)}
`
);
}
...
...
@@ -198,6 +255,7 @@ export default class DropDownListMpicker extends Vue {
let
_param
=
data
.
param
;
this
.
codeListService
.
getItems
(
this
.
tag
,
_context
,
_param
).
then
((
res
:
any
)
=>
{
this
.
items
=
res
;
this
.
handleLevelCodeList
(
Util
.
deepCopy
(
this
.
items
));
}).
catch
((
error
:
any
)
=>
{
console
.
log
(
`----
${
this
.
tag
}
----
${(
this
.
$t
(
'app.commonWords.codeNotExist'
)
as
string
)}
`
);
});
...
...
@@ -220,11 +278,57 @@ export default class DropDownListMpicker extends Vue {
let
_param
=
data
.
param
;
this
.
codeListService
.
getItems
(
this
.
tag
,
_context
,
_param
).
then
((
res
:
any
)
=>
{
this
.
items
=
res
;
this
.
handleLevelCodeList
(
Util
.
deepCopy
(
this
.
items
));
}).
catch
((
error
:
any
)
=>
{
console
.
log
(
`----
${
this
.
tag
}
----
${(
this
.
$t
(
'app.commonWords.codeNotExist'
)
as
string
)}
`
);
});
}
}
/**
* 处理层级代码表
*
* @param {*} items
* @memberof DropDownListMpicker
*/
public
handleLevelCodeList
(
items
:
Array
<
any
>
){
if
(
items
&&
items
.
length
>
0
){
this
.
hasChildren
=
items
.
some
((
item
:
any
)
=>
{
return
item
.
pvalue
;
})
if
(
this
.
hasChildren
){
let
list
:
Array
<
any
>
=
[];
items
.
forEach
((
codeItem
:
any
)
=>
{
if
(
!
codeItem
.
pvalue
){
let
valueField
:
string
=
codeItem
.
value
;
this
.
setChildCodeItems
(
valueField
,
items
,
codeItem
);
list
.
push
(
codeItem
);
}
})
this
.
items
=
list
;
}
}
}
/**
* 计算子类代码表
*
* @param {*} items
* @memberof DropDownListMpicker
*/
public
setChildCodeItems
(
pValue
:
string
,
result
:
Array
<
any
>
,
codeItem
:
any
){
result
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
pvalue
==
pValue
){
let
valueField
:
string
=
item
.
value
;
this
.
setChildCodeItems
(
valueField
,
result
,
item
);
if
(
!
codeItem
.
children
){
codeItem
.
children
=
[];
}
codeItem
.
children
.
push
(
item
);
}
})
}
}
</
script
>
...
...
app_web/src/components/dropdown-list/dropdown-list.less
浏览文件 @
ba31c7ed
.dropdown-list{
display: inline-block;
}
.dropdown-list-container{
.dropdown-list{
display: inline-block;
}
.tree-dropdown-list{
width: 100%;
.el-input__inner{
height: 32px !important;
line-height: 32px !important;
}
.el-input__icon{
line-height: 32px;
}
}
}
\ No newline at end of file
app_web/src/components/dropdown-list/dropdown-list.vue
浏览文件 @
ba31c7ed
<
template
>
<i-select
<div
class=
"dropdown-list-container"
>
<i-select
v-if=
"!hasChildren"
class=
'dropdown-list'
:transfer=
"true"
v-model=
"currentVal"
...
...
@@ -9,12 +10,15 @@
@
on-open-change=
"onClick"
:placeholder=
"$t('components.dropDownList.placeholder')"
>
<i-option
v-for=
"(item, index) in items"
:key=
"index"
:value=
"item.value"
>
{{
(
$t
(
'codelist.'
+
tag
+
'.'
+
item
.
value
)
!==
(
'codelist.'
+
tag
+
'.'
+
item
.
value
))?
$t
(
'codelist.'
+
tag
+
'.'
+
item
.
value
)
:
item
.
text
}}
</i-option>
</i-select>
</i-select>
<ibiz-select-tree
v-if=
"hasChildren"
class=
"tree-dropdown-list"
:disabled=
"disabled"
:NodesData=
"items"
v-model=
"currentVal"
:multiple=
"false"
></ibiz-select-tree>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Watch
,
Prop
,
Model
}
from
'vue-property-decorator'
;
import
CodeListService
from
"@service/app/codelist-service"
;
import
{
Util
}
from
'@/utils'
;
@
Component
({
})
...
...
@@ -42,6 +46,13 @@ export default class DropDownList extends Vue {
*/
public
queryParam
:
any
;
/**
* 是否有子集
* @type {boolean}
* @memberof DropDownList
*/
public
hasChildren
:
boolean
=
false
;
/**
* 当前选中值
* @type {any}
...
...
@@ -152,6 +163,10 @@ export default class DropDownList extends Vue {
* @memberof DropDownList
*/
set
currentVal
(
val
:
any
)
{
if
(
this
.
hasChildren
&&
val
){
let
tempVal
:
any
=
JSON
.
parse
(
val
);
val
=
tempVal
.
length
>
0
?
tempVal
[
0
].
value
:
null
;
}
const
type
:
string
=
this
.
$util
.
typeOf
(
val
);
val
=
Object
.
is
(
type
,
'null'
)
||
Object
.
is
(
type
,
'undefined'
)
?
undefined
:
val
;
this
.
$emit
(
'change'
,
val
);
...
...
@@ -163,9 +178,33 @@ export default class DropDownList extends Vue {
* @memberof DropDownList
*/
get
currentVal
()
{
if
(
this
.
hasChildren
&&
this
.
itemValue
){
let
list
:
Array
<
any
>
=
[];
this
.
getItemList
(
list
,
this
.
items
);
let
result
:
any
=
list
.
find
((
item
:
any
)
=>
{
return
item
.
value
==
this
.
itemValue
;
})
return
JSON
.
stringify
([
result
]);
}
return
this
.
itemValue
;
}
/**
* 获取代码表列表
*
* @memberof DropDownList
*/
public
getItemList
(
list
:
Array
<
any
>
,
items
:
Array
<
any
>
){
if
(
items
&&
items
.
length
>
0
){
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
children
){
this
.
getItemList
(
list
,
item
.
children
);
}
list
.
push
(
item
);
})
}
}
/**
* 代码表
*
...
...
@@ -287,6 +326,51 @@ export default class DropDownList extends Vue {
}
catch
(
error
){
console
.
warn
(
'代码表值类型和属性类型不匹配,自动强制转换异常,请修正代码表值类型和属性类型匹配'
);
}
this
.
handleLevelCodeList
(
Util
.
deepCopy
(
this
.
items
));
}
/**
* 处理层级代码表
*
* @param {*} items
* @memberof DropDownList
*/
public
handleLevelCodeList
(
items
:
Array
<
any
>
){
if
(
items
&&
items
.
length
>
0
){
this
.
hasChildren
=
items
.
some
((
item
:
any
)
=>
{
return
item
.
pvalue
;
})
if
(
this
.
hasChildren
){
let
list
:
Array
<
any
>
=
[];
items
.
forEach
((
codeItem
:
any
)
=>
{
if
(
!
codeItem
.
pvalue
){
let
valueField
:
string
=
codeItem
.
value
;
this
.
setChildCodeItems
(
valueField
,
items
,
codeItem
);
list
.
push
(
codeItem
);
}
})
this
.
items
=
list
;
}
}
}
/**
* 计算子类代码表
*
* @param {*} items
* @memberof DropDownList
*/
public
setChildCodeItems
(
pValue
:
string
,
result
:
Array
<
any
>
,
codeItem
:
any
){
result
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
pvalue
==
pValue
){
let
valueField
:
string
=
item
.
value
;
this
.
setChildCodeItems
(
valueField
,
result
,
item
);
if
(
!
codeItem
.
children
){
codeItem
.
children
=
[];
}
codeItem
.
children
.
push
(
item
);
}
})
}
}
</
script
>
...
...
app_web/src/service/app/codelist-service.ts
浏览文件 @
ba31c7ed
...
...
@@ -69,7 +69,7 @@ export default class CodeListService {
if
(
isEnableCache
){
// 加载完成,从本地缓存获取
if
(
CodeListService
.
codelistCached
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
)){
let
items
:
any
=
CodeListService
.
codelistCached
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
);
let
items
:
any
=
CodeListService
.
codelistCached
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
)
.
items
;
if
(
items
.
length
>
0
){
if
(
cacheTimeout
!==
-
1
){
if
(
new
Date
().
getTime
()
>
_this
[
tag
].
expirationTime
){
...
...
@@ -91,7 +91,6 @@ export default class CodeListService {
if
(
_this
[
tag
])
{
const
callback
:
Function
=
(
context
:
any
=
{},
data
:
any
=
{},
tag
:
string
,
promise
:
Promise
<
any
>
)
=>
{
promise
.
then
((
result
:
any
)
=>
{
console
.
log
()
if
(
result
.
length
>
0
){
CodeListService
.
codelistCached
.
set
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
,{
items
:
result
});
return
resolve
(
result
);
...
...
config.xml
浏览文件 @
ba31c7ed
...
...
@@ -37,6 +37,11 @@
git clone -b master $para2 ibzwf/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzwf/
mvn clean package -Pweb
cd ibzwf-app/ibzwf-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzwf-app-web.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
ibzwf-app/ibzwf-app-web/src/main/docker/Dockerfile
浏览文件 @
ba31c7ed
...
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-app-web.jar
EXPOSE
8080
EXPOSE
30003
ADD
ibzwf-app-web.jar /ibzwf-app-web.jar
ibzwf-app/ibzwf-app-web/src/main/docker/ibzwf-app-web.yaml
浏览文件 @
ba31c7ed
...
...
@@ -3,9 +3,22 @@ services:
ibzwf-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzwf-app-web:latest
ports
:
-
"
8080:8080
"
-
"
30003:30003
"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
-
SERVER_PORT=30003
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
-
SPRING_DATASOURCE_PASSWORD=@6dEfb3@
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
-
NACOS=172.16.102.211:8848
deploy
:
resources
:
limits
:
...
...
ibzwf-app/ibzwf-app-web/src/main/resources/application-web-prod.yml
浏览文件 @
ba31c7ed
...
...
@@ -51,5 +51,13 @@ zuul:
path
:
/ibzorganizations/**
serviceId
:
${ibiz.ref.service.ou:ibzou-api}
stripPrefix
:
false
oudict
:
path
:
/dictionarys/**/ibzou**
serviceId
:
${ibiz.ref.service.ou:ibzou-api}
stripPrefix
:
false
dict
:
path
:
/dictionarys/**
serviceId
:
${ibiz.ref.service.dict:ibzdict-api}
stripPrefix
:
false
sensitive-headers
:
-
Cookie,Set-Cookie,Authorization
ibzwf-boot/src/main/resources/application-dev.yml
浏览文件 @
ba31c7ed
...
...
@@ -24,5 +24,13 @@ zuul:
path
:
/ibzorganizations/**
serviceId
:
${ibiz.ref.service.ou:ibzou-api}
stripPrefix
:
false
oudict
:
path
:
/dictionarys/**/ibzou**
serviceId
:
${ibiz.ref.service.ou:ibzou-api}
stripPrefix
:
false
dict
:
path
:
/dictionarys/**
serviceId
:
${ibiz.ref.service.dict:ibzdict-api}
stripPrefix
:
false
sensitive-headers
:
-
Cookie,Set-Cookie,Authorization
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录