Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-Mob-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-Mob-R7-Res
提交
9c0be901
提交
9c0be901
编写于
9月 29, 2020
作者:
KK
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
解决事件冒泡问题 && 格式化组件
上级
955cebc1
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
26 行增加
和
25 行删除
+26
-25
app-mob-select-drop-down.less
...ts/app-mob-select-drop-down/app-mob-select-drop-down.less
+1
-0
app-mob-select-drop-down.vue
...nts/app-mob-select-drop-down/app-mob-select-drop-down.vue
+25
-25
未找到文件。
src/components/app-mob-select-drop-down/app-mob-select-drop-down.less
浏览文件 @
9c0be901
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
}
}
.select_text {
.select_text {
height: 43px;
height: 43px;
padding-right: 25px;
line-height: 40px;
line-height: 40px;
text-align: right;
text-align: right;
color: #969696;
color: #969696;
...
...
src/components/app-mob-select-drop-down/app-mob-select-drop-down.vue
浏览文件 @
9c0be901
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"app-mobile-select-drop-down"
>
<div
class=
"app-mobile-select-drop-down"
>
<div
class=
"cancel-icon"
v-if=
"curvalue"
><ion-icon
name=
"close-circle-outline"
@
click=
"onClear"
></ion-icon></div>
<div
class=
"cancel-icon"
v-if=
"curvalue"
><ion-icon
name=
"close-circle-outline"
@
click=
"onClear"
></ion-icon></div>
<div
v-if=
"curvalue== null || curvalue==''"
class=
"ion-select-icon"
></div>
<div
v-if=
"curvalue== null || curvalue==''"
class=
"ion-select-icon"
></div>
<
ion-input
class=
"select_text"
readonly=
"true"
:value=
"curvalue"
:ref=
"name+'input'"
style=
"height: 43px;"
@
ionFocus=
"openSelect"
/
>
<
div
class=
"select_text"
@
click=
"openSelect"
>
{{
curvalue
}}
</div
>
<ion-select
:selected-text=
"selectValue"
:ref=
"name+'select'"
v-show=
"false"
:disabled=
"disabled "
@
ionChange=
"change"
interface=
"action-sheet"
:cancel-text=
"$t('app.button.cancel')"
@
ionCancel=
"cancel"
>
<ion-select
:selected-text=
"selectValue"
:ref=
"name+'select'"
v-show=
"false"
:disabled=
"disabled "
@
ionChange=
"change"
interface=
"action-sheet"
:cancel-text=
"$t('app.button.cancel')"
@
ionCancel=
"cancel"
>
<ion-select-option
v-for=
"option of items"
:key=
"option.value"
:value=
"option.value"
>
{{
option
.
text
}}
</ion-select-option>
<ion-select-option
v-for=
"option of items"
:key=
"option.value"
:value=
"option.value"
>
{{
option
.
text
}}
</ion-select-option>
</ion-select>
</ion-select>
...
@@ -27,7 +27,7 @@ import { ViewOpenService } from '../../utils/view-open-service/view-open-service
...
@@ -27,7 +27,7 @@ import { ViewOpenService } from '../../utils/view-open-service/view-open-service
associated_entity
:
'Please configure the associated entity and data set in the corresponding entity properties!'
,
associated_entity
:
'Please configure the associated entity and data set in the corresponding entity properties!'
,
error_request
:
'Error, request exception!'
,
error_request
:
'Error, request exception!'
,
error_system
:
'Error, the system is abnormal!'
,
error_system
:
'Error, the system is abnormal!'
,
error_value
:
'Error, abnormal value item!'
,
error_value
:
'Error, abnormal value item!'
,
}
}
}
}
}
}
...
@@ -199,7 +199,7 @@ export default class AppSelectDropDown extends Vue {
...
@@ -199,7 +199,7 @@ export default class AppSelectDropDown extends Vue {
* @type {string}
* @type {string}
* @memberof AppSelectDropDown
* @memberof AppSelectDropDown
*/
*/
public
selectValue
:
any
=
""
;
public
selectValue
:
any
=
""
;
/**
/**
...
@@ -219,7 +219,7 @@ export default class AppSelectDropDown extends Vue {
...
@@ -219,7 +219,7 @@ export default class AppSelectDropDown extends Vue {
*/
*/
get
curvalue
()
{
get
curvalue
()
{
if
(
this
.
value
&&
this
.
items
.
length
>
0
)
{
// 判断是否拿到表单传来的值、列表项是否加载完成
if
(
this
.
value
&&
this
.
items
.
length
>
0
)
{
// 判断是否拿到表单传来的值、列表项是否加载完成
if
(
this
.
valueitem
&&
this
.
items
.
every
((
item
:
any
)
=>
{
return
item
[
this
.
deKeyField
]
!=
this
.
value
}))
{
if
(
this
.
valueitem
&&
this
.
items
.
every
((
item
:
any
)
=>
{
return
item
[
this
.
deKeyField
]
!=
this
.
value
}))
{
return
this
.
value
;
return
this
.
value
;
}
}
}
}
...
@@ -246,8 +246,8 @@ export default class AppSelectDropDown extends Vue {
...
@@ -246,8 +246,8 @@ export default class AppSelectDropDown extends Vue {
@
Watch
(
'value'
)
@
Watch
(
'value'
)
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
oldVal
&&
!
newVal
)
{
if
(
oldVal
&&
!
newVal
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
let
select
:
any
=
this
.
$refs
[
this
.
name
+
'select'
];
let
select
:
any
=
this
.
$refs
[
this
.
name
+
'select'
];
if
(
select
)
{
if
(
select
)
{
select
.
value
=
null
;
select
.
value
=
null
;
}
}
...
@@ -265,7 +265,7 @@ export default class AppSelectDropDown extends Vue {
...
@@ -265,7 +265,7 @@ export default class AppSelectDropDown extends Vue {
this
.
items
.
push
({
text
:
newVal
,
value
:
value
});
this
.
items
.
push
({
text
:
newVal
,
value
:
value
});
}
}
this
.
onSearch
(
newVal
,
false
);
this
.
onSearch
(
newVal
,
false
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
}
}
}
}
...
@@ -276,7 +276,7 @@ export default class AppSelectDropDown extends Vue {
...
@@ -276,7 +276,7 @@ export default class AppSelectDropDown extends Vue {
*/
*/
public
mounted
()
{
public
mounted
()
{
this
.
onSearch
(
null
,
true
);
this
.
onSearch
(
null
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
}
}
/**
/**
...
@@ -287,7 +287,7 @@ export default class AppSelectDropDown extends Vue {
...
@@ -287,7 +287,7 @@ export default class AppSelectDropDown extends Vue {
this
.
open
=
flag
;
this
.
open
=
flag
;
if
(
this
.
open
)
{
if
(
this
.
open
)
{
this
.
onSearch
(
this
.
curvalue
,
true
);
this
.
onSearch
(
this
.
curvalue
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
}
}
}
}
/**
/**
...
@@ -312,7 +312,7 @@ export default class AppSelectDropDown extends Vue {
...
@@ -312,7 +312,7 @@ export default class AppSelectDropDown extends Vue {
this
.
inputState
=
false
;
this
.
inputState
=
false
;
Object
.
assign
(
_param
,
{
query
:
query
});
Object
.
assign
(
_param
,
{
query
:
query
});
if
(
!
this
.
acParams
.
serviceName
||
!
this
.
acParams
.
interfaceName
)
{
if
(
!
this
.
acParams
.
serviceName
||
!
this
.
acParams
.
interfaceName
)
{
this
.
$notice
.
error
(
`
${
this
.
$t
(
'associated_entity'
)}
`
);
this
.
$notice
.
error
(
`
${
this
.
$t
(
'associated_entity'
)}
`
);
return
;
return
;
}
}
const
appEntityServiceConstructor
=
window
.
appEntityServiceConstructor
;
const
appEntityServiceConstructor
=
window
.
appEntityServiceConstructor
;
...
@@ -323,7 +323,7 @@ export default class AppSelectDropDown extends Vue {
...
@@ -323,7 +323,7 @@ export default class AppSelectDropDown extends Vue {
this
.
items
=
response
.
data
;
this
.
items
=
response
.
data
;
this
.
result
(
this
.
items
);
this
.
result
(
this
.
items
);
}
else
{
}
else
{
this
.
$notice
.
error
(
`
${
this
.
$t
(
'error_request'
)}
`
);
this
.
$notice
.
error
(
`
${
this
.
$t
(
'error_request'
)}
`
);
}
}
}
}
}
}
...
@@ -354,7 +354,7 @@ export default class AppSelectDropDown extends Vue {
...
@@ -354,7 +354,7 @@ export default class AppSelectDropDown extends Vue {
if
(
this
.
valueitem
)
{
if
(
this
.
valueitem
)
{
let
tempvalue
=
item
[
this
.
deKeyField
]
?
item
[
this
.
deKeyField
]
:
item
.
srfkey
;
let
tempvalue
=
item
[
this
.
deKeyField
]
?
item
[
this
.
deKeyField
]
:
item
.
srfkey
;
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
valueitem
,
value
:
tempvalue
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
valueitem
,
value
:
tempvalue
});
}
}
if
(
this
.
name
)
{
if
(
this
.
name
)
{
let
temptext
=
item
[
this
.
deMajorField
]
?
item
[
this
.
deMajorField
]
:
item
.
srfmajortext
;
let
temptext
=
item
[
this
.
deMajorField
]
?
item
[
this
.
deMajorField
]
:
item
.
srfmajortext
;
...
@@ -369,7 +369,7 @@ export default class AppSelectDropDown extends Vue {
...
@@ -369,7 +369,7 @@ export default class AppSelectDropDown extends Vue {
* @memberof AppSelectDropDown
* @memberof AppSelectDropDown
*/
*/
public
onSelect
(
val
:
string
)
{
public
onSelect
(
val
:
string
)
{
let
index
=
this
.
items
.
findIndex
((
item
)
=>
{
return
item
[
this
.
deKeyField
]
==
val
}
);
let
index
=
this
.
items
.
findIndex
((
item
)
=>
{
return
item
[
this
.
deKeyField
]
==
val
}
);
if
(
index
>=
0
)
{
if
(
index
>=
0
)
{
this
.
onACSelect
(
this
.
items
[
index
]);
this
.
onACSelect
(
this
.
items
[
index
]);
}
}
...
@@ -394,7 +394,7 @@ export default class AppSelectDropDown extends Vue {
...
@@ -394,7 +394,7 @@ export default class AppSelectDropDown extends Vue {
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
''
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
''
});
}
}
this
.
selectValue
=
null
;
this
.
selectValue
=
null
;
let
select
:
any
=
this
.
$refs
[
this
.
name
+
'select'
];
let
select
:
any
=
this
.
$refs
[
this
.
name
+
'select'
];
select
.
value
=
null
;
select
.
value
=
null
;
this
.
$forceUpdate
();
this
.
$forceUpdate
();
}
}
...
@@ -652,8 +652,8 @@ export default class AppSelectDropDown extends Vue {
...
@@ -652,8 +652,8 @@ export default class AppSelectDropDown extends Vue {
return
false
;
return
false
;
}
}
// 导航参数处理
// 导航参数处理
const
{
context
,
param
}
=
this
.
$viewTool
.
formatNavigateParam
(
this
.
navigateContext
,
this
.
navigateParam
,
this
.
context
,
this
.
viewparams
,
this
.
data
);
const
{
context
,
param
}
=
this
.
$viewTool
.
formatNavigateParam
(
this
.
navigateContext
,
this
.
navigateParam
,
this
.
context
,
this
.
viewparams
,
this
.
data
);
arg
.
context
=
context
;
arg
.
context
=
context
;
arg
.
param
=
param
;
arg
.
param
=
param
;
return
true
;
return
true
;
}
}
...
@@ -764,8 +764,8 @@ export default class AppSelectDropDown extends Vue {
...
@@ -764,8 +764,8 @@ export default class AppSelectDropDown extends Vue {
* @memberof AppSelect
* @memberof AppSelect
*/
*/
public
change
(
value
:
any
)
{
public
change
(
value
:
any
)
{
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
this
.
curvalue
=
value
.
detail
.
value
;
this
.
curvalue
=
value
.
detail
.
value
;
}
}
/**
/**
...
@@ -774,8 +774,8 @@ export default class AppSelectDropDown extends Vue {
...
@@ -774,8 +774,8 @@ export default class AppSelectDropDown extends Vue {
* @type {*}
* @type {*}
* @memberof AppSelect
* @memberof AppSelect
*/
*/
public
cancel
(){
public
cancel
()
{
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
}
}
/**
/**
...
@@ -793,14 +793,14 @@ export default class AppSelectDropDown extends Vue {
...
@@ -793,14 +793,14 @@ export default class AppSelectDropDown extends Vue {
* @type {*}
* @type {*}
* @memberof AppSelectDropDown
* @memberof AppSelectDropDown
*/
*/
public
openSelect
(){
public
openSelect
()
{
this
.
onSearch
(
null
);
this
.
onSearch
(
null
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
this
.
$store
.
commit
(
'setSelectStatus'
,
true
);
let
select
:
any
=
this
.
$refs
[
this
.
name
+
'select'
];
let
select
:
any
=
this
.
$refs
[
this
.
name
+
'select'
];
if
(
select
)
{
if
(
select
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
select
.
open
();
select
.
open
();
this
.
$store
.
commit
(
'setSelectStatus'
,
false
);
this
.
$store
.
commit
(
'setSelectStatus'
,
false
);
},
1
);
},
1
);
}
}
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录