Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzou
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzou
提交
3f8ea7f0
提交
3f8ea7f0
编写于
5月 22, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lab_qyk 发布系统代码
上级
7cf5902a
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
238 行增加
和
36 行删除
+238
-36
app-register.ts
app_web/src/app-register.ts
+3
-0
app-department-select.less
...mponents/app-department-select/app-department-select.less
+29
-0
app-department-select.vue
...omponents/app-department-select/app-department-select.vue
+168
-0
ibiz-group-picker.vue
...eb/src/components/ibiz-group-picker/ibiz-group-picker.vue
+33
-33
ibiz-group-select.vue
...eb/src/components/ibiz-group-select/ibiz-group-select.vue
+5
-3
未找到文件。
app_web/src/app-register.ts
浏览文件 @
3f8ea7f0
...
@@ -72,10 +72,12 @@ import ContextMenu from './components/context-menu/context-menu'
...
@@ -72,10 +72,12 @@ import ContextMenu from './components/context-menu/context-menu'
import
AppColumnFormat
from
'./components/app-column-format/app-column-format.vue'
import
AppColumnFormat
from
'./components/app-column-format/app-column-format.vue'
import
AppQuickGroup
from
'./components/app-quick-group/app-quick-group.vue'
import
AppQuickGroup
from
'./components/app-quick-group/app-quick-group.vue'
import
AppOrgSelect
from
'./components/app-org-select/app-org-select.vue'
import
AppOrgSelect
from
'./components/app-org-select/app-org-select.vue'
import
AppDepartmentSelect
from
'./components/app-department-select/app-department-select.vue'
import
IBizGroupSelect
from
'./components/ibiz-group-select/ibiz-group-select.vue'
import
IBizGroupSelect
from
'./components/ibiz-group-select/ibiz-group-select.vue'
import
IBizGroupPicker
from
'./components/ibiz-group-picker/ibiz-group-picker.vue'
import
IBizGroupPicker
from
'./components/ibiz-group-picker/ibiz-group-picker.vue'
// 全局挂载UI实体服务注册中心
// 全局挂载UI实体服务注册中心
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
// 全局挂载功能服务注册中心
// 全局挂载功能服务注册中心
...
@@ -156,6 +158,7 @@ export const AppComponents = {
...
@@ -156,6 +158,7 @@ export const AppComponents = {
v
.
component
(
'app-column-format'
,
AppColumnFormat
);
v
.
component
(
'app-column-format'
,
AppColumnFormat
);
v
.
component
(
'app-quick-group'
,
AppQuickGroup
);
v
.
component
(
'app-quick-group'
,
AppQuickGroup
);
v
.
component
(
'app-org-select'
,
AppOrgSelect
);
v
.
component
(
'app-org-select'
,
AppOrgSelect
);
v
.
component
(
'app-department-select'
,
AppDepartmentSelect
);
v
.
component
(
'ibiz-group-select'
,
IBizGroupSelect
);
v
.
component
(
'ibiz-group-select'
,
IBizGroupSelect
);
v
.
component
(
'ibiz-group-picker'
,
IBizGroupPicker
);
v
.
component
(
'ibiz-group-picker'
,
IBizGroupPicker
);
},
},
...
...
app_web/src/components/app-department-select/app-department-select.less
0 → 100644
浏览文件 @
3f8ea7f0
.ivu-dropdown{
.ivu-dropdown-rel{
.tree-input{
.ivu-input-suffix{
width: auto;
text-align: right;
.icon-arrow{
margin-right: 4px;
}
}
.el-icon-circle-close{
display: none;
}
}
.tree-input:hover{
.el-icon-circle-close{
display: inline-block;
}
}
}
.ivu-select-dropdown{
max-height: 200px;
overflow: scroll;
.tree-contant{
overflow:inherit;
}
}
}
app_web/src/components/app-department-select/app-department-select.vue
0 → 100644
浏览文件 @
3f8ea7f0
<
template
>
<div
class=
"app-department-select"
>
<ibiz-select-tree
:NodesData=
"Nodesdata"
:value=
"value"
:multiple=
"multiple"
@
select=
"onSelect"
></ibiz-select-tree>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Watch
,
Prop
,
Model
}
from
'vue-property-decorator'
;
@
Component
({
})
export
default
class
AppDepartmentSelect
extends
Vue
{
/**
* 接口url
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@
Prop
({
default
:
'/ibzorganizations/{orgid}/ibzdepartments/picker'
})
public
url
?:
any
;
/**
* 过滤项
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@
Prop
()
public
filter
?:
any
;
/**
* 过滤项
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@
Prop
()
public
fillMap
?:
any
;
/**
* 是否多选
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@
Prop
({
default
:
false
})
public
multiple
?:
any
;
/**
* 表单项名称
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@
Prop
()
public
name
!
:
any
;
/**
* 表单数据
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@
Prop
()
public
data
!
:
any
;
/**
* 表单项值
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@
Prop
()
public
value
!
:
any
;
/**
* 上下文变量
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@
Prop
()
public
context
!
:
any
;
/**
* 树节点数据
*
* @type {*}
* @memberof AppDepartmentSelect
*/
public
Nodesdata
:
any
[]
=
[];
/**
* 当前树节点数据的url
*
* @type {*}
* @memberof AppDepartmentSelect
*/
public
oldurl
:
any
[]
=
[];
/**
* 获取节点数据
*
* @memberof AppDepartmentSelect
*/
public
searchNodesData
(){
// 处理请求参数
let
param
=
''
if
(
this
.
filter
){
if
(
this
.
data
&&
this
.
data
[
this
.
filter
]){
param
=
this
.
data
[
this
.
filter
];
}
else
if
(
this
.
context
&&
this
.
context
[
this
.
filter
]){
param
=
this
.
context
[
this
.
filter
];
}
}
else
{
param
=
this
.
context
.
srforgid
;
}
let
_url
=
this
.
url
.
replace
(
/{orgid}/
,
param
)
if
(
this
.
oldurl
===
_url
){
return
;
}
this
.
$http
.
get
(
_url
).
then
((
response
:
any
)
=>
{
console
.
log
(
response
)
this
.
Nodesdata
=
response
.
data
;
this
.
oldurl
=
_url
;
}).
catch
((
response
:
any
)
=>
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常!'
});
return
;
}
});
}
/**
* 值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppDepartmentSelect
*/
@
Watch
(
'data'
,{
deep
:
true
})
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
searchNodesData
();
}
/**
* select事件处理
*
* @param {*} $event
* @memberof AppDepartmentSelect
*/
public
onSelect
(
$event
:
any
){
// 组件自身抛值事件
let
selectArr
=
JSON
.
parse
(
$event
);
if
(
selectArr
.
length
===
0
){
return
;
}
let
valueArr
=
selectArr
.
map
((
item
:
any
)
=>
{
return
{
id
:
item
.
id
,
label
:
item
.
label
}});
this
.
$emit
(
'select-change'
,
{
name
:
this
.
name
,
value
:
JSON
.
stringify
(
valueArr
)
});
// fillMap抛值事件
if
(
this
.
fillMap
&&
Object
.
keys
(
this
.
fillMap
).
length
>
0
){
Object
.
keys
(
this
.
fillMap
).
forEach
((
attribute
:
string
)
=>
{
let
_name
=
this
.
fillMap
[
attribute
];
let
_value
=
selectArr
.
map
((
item
:
any
)
=>
item
[
attribute
]);
this
.
$emit
(
'select-change'
,{
name
:
_name
,
value
:
_value
.
join
(
","
)})
});
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './app-department-select.less';
</
style
>
\ No newline at end of file
app_web/src/components/ibiz-group-picker/ibiz-group-picker.vue
浏览文件 @
3f8ea7f0
...
@@ -203,44 +203,44 @@ export default class IBizGroupPicker extends Vue {
...
@@ -203,44 +203,44 @@ export default class IBizGroupPicker extends Vue {
* @memberof IBizGroupPicker
* @memberof IBizGroupPicker
*/
*/
public
groupSelect
(
event
:
any
)
{
public
groupSelect
(
event
:
any
)
{
// if (!event || !event.selects) {
if
(
!
event
||
!
event
.
selects
)
{
// return;
return
;
// }
}
// if(!this.multiple) {
// this.selects = [];
// }
// if(event.rselect) {
// let index: number = this.selects.findIndex((item: any) => Object.is(event.rselect, item.id));
// if(index >= 0) {
// this.selects.splice(index, 1);
// }
// } else {
// event.selects.forEach((key: string) => {
// let index: number = this.selects.findIndex((item: any) => Object.is(key, item.id));
// if(index >= 0) {
// return;
// }
// let item: any = this.cardItems.find((item: any) => Object.is(key, item.id));
// if (item) {
// this.selects.push(item);
// }
// });
// }
// 测试 start
if
(
!
this
.
multiple
)
{
if
(
!
this
.
multiple
)
{
this
.
selects
=
[];
this
.
selects
=
[];
}
}
event
.
forEach
((
key
:
string
)
=>
{
if
(
event
.
rselect
)
{
let
index
:
number
=
this
.
selects
.
findIndex
((
item
:
any
)
=>
Object
.
is
(
key
,
item
.
id
));
let
index
:
number
=
this
.
selects
.
findIndex
((
item
:
any
)
=>
Object
.
is
(
event
.
rselect
,
item
.
id
));
if
(
index
>=
0
)
{
if
(
index
>=
0
)
{
return
;
this
.
selects
.
splice
(
index
,
1
)
;
}
}
let
item
:
any
=
this
.
cardItems
.
find
((
item
:
any
)
=>
Object
.
is
(
key
,
item
.
id
));
}
else
{
if
(
item
)
{
event
.
selects
.
forEach
((
key
:
string
)
=>
{
this
.
selects
.
push
(
item
);
let
index
:
number
=
this
.
selects
.
findIndex
((
item
:
any
)
=>
Object
.
is
(
key
,
item
.
id
));
}
if
(
index
>=
0
)
{
});
return
;
}
let
item
:
any
=
this
.
cardItems
.
find
((
item
:
any
)
=>
Object
.
is
(
key
,
item
.
id
));
if
(
item
)
{
this
.
selects
.
push
(
item
);
}
});
}
// 测试 start
// if(!this.multiple) {
// this.selects = [];
// }
// event.forEach((key: string) => {
// let index: number = this.selects.findIndex((item: any) => Object.is(key, item.id));
// if(index >= 0) {
// return;
// }
// let item: any = this.cardItems.find((item: any) => Object.is(key, item.id));
// if (item) {
// this.selects.push(item);
// }
// });
// 测试 end
// 测试 end
}
}
...
...
app_web/src/components/ibiz-group-select/ibiz-group-select.vue
浏览文件 @
3f8ea7f0
...
@@ -7,11 +7,12 @@
...
@@ -7,11 +7,12 @@
<template
v-else
v-for=
"(select, index) of selects"
>
<template
v-else
v-for=
"(select, index) of selects"
>
<div
:key=
"index"
class=
"ibiz-group-item"
>
<div
:key=
"index"
class=
"ibiz-group-item"
>
{{
select
.
label
}}
{{
select
.
label
}}
<i
class=
"el-icon-close"
@
click=
"remove(select)"
></i>
<i
v-if=
"!disabled"
class=
"el-icon-close"
@
click=
"remove(select)"
></i>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
<div
class=
"ibiz-group-open"
>
<div
v-if=
"!disabled"
class=
"ibiz-group-open"
>
<i
v-if=
"!disabled && !multiple && selects.length > 0"
class=
"el-icon-close"
@
click=
"remove(selects[0])"
></i>
<i
class=
"el-icon-search"
@
click=
"openView"
></i>
<i
class=
"el-icon-search"
@
click=
"openView"
></i>
</div>
</div>
</div>
</div>
...
@@ -118,6 +119,7 @@ export default class IBizGroupSelect extends Vue {
...
@@ -118,6 +119,7 @@ export default class IBizGroupSelect extends Vue {
if
(
this
.
valueitem
)
{
if
(
this
.
valueitem
)
{
vals2
=
this
.
data
[
this
.
valueitem
].
split
(
','
);
vals2
=
this
.
data
[
this
.
valueitem
].
split
(
','
);
}
}
console
.
log
(
this
.
data
[
this
.
valueitem
])
vals
.
forEach
((
val
:
string
,
index
:
number
)
=>
{
vals
.
forEach
((
val
:
string
,
index
:
number
)
=>
{
this
.
selects
.
push
({
this
.
selects
.
push
({
label
:
val
,
label
:
val
,
...
@@ -254,10 +256,10 @@ export default class IBizGroupSelect extends Vue {
...
@@ -254,10 +256,10 @@ export default class IBizGroupSelect extends Vue {
}
}
}
}
.ibiz-group-open {
.ibiz-group-open {
width: 20px;
display: flex;
display: flex;
text-align: center;
text-align: center;
align-items: center;
align-items: center;
padding: 0 5px;
}
}
}
}
.ibiz-group-select:hover {
.ibiz-group-select:hover {
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录