Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rbc-demo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王衍超
rbc-demo
Commits
e5ef073a
Commit
e5ef073a
authored
Mar 17, 2022
by
袁成
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 基础数据组件
parent
ddebe5e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
22 deletions
+46
-22
baseDataMixin.js
...in-billexpand/src/control/baseDataSelect/baseDataMixin.js
+4
-0
index.vue
...ms-plugin-billexpand/src/control/baseDataSelect/index.vue
+39
-20
select-table.vue
...in-billexpand/src/control/baseDataSelect/select-table.vue
+3
-2
No files found.
develop/@gms/gms-plugin-billexpand/src/control/baseDataSelect/baseDataMixin.js
View file @
e5ef073a
...
@@ -140,6 +140,10 @@ export default {
...
@@ -140,6 +140,10 @@ export default {
isVxe
:
{
isVxe
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
showtype
:
{
type
:
String
,
default
:
''
}
}
},
},
data
()
{
data
()
{
...
...
develop/@gms/gms-plugin-billexpand/src/control/baseDataSelect/index.vue
View file @
e5ef073a
...
@@ -3,14 +3,14 @@
...
@@ -3,14 +3,14 @@
<el-popover
ref=
"popover"
popper-class=
"rbc-basedata-popover"
placement=
"top"
trigger=
"manual"
v-model=
"dataListShow"
:visible-arrow=
"false"
:width=
"searchPopperMinWidth"
>
<el-popover
ref=
"popover"
popper-class=
"rbc-basedata-popover"
placement=
"top"
trigger=
"manual"
v-model=
"dataListShow"
:visible-arrow=
"false"
:width=
"searchPopperMinWidth"
>
<ul
ref=
"searchList"
class=
"acct-search-list"
:class=
"
{'is-focus': hasFocus}" @mouseleave="onResultList = false" @mouseenter="onResultList = true">
<ul
ref=
"searchList"
class=
"acct-search-list"
:class=
"
{'is-focus': hasFocus}" @mouseleave="onResultList = false" @mouseenter="onResultList = true">
<li
:class=
"['acct-search-item',selectIndex === index ? 'selected' : '',
{active: activeName == item.name}]" v-for="(item,index) in baseDataList" :key="item.code" :value="item.code" @click="handleMainSearchSelectClick(item)">
<li
:class=
"['acct-search-item',selectIndex === index ? 'selected' : '',
{active: activeName == item.name}]" v-for="(item,index) in baseDataList" :key="item.code" :value="item.code" @click="handleMainSearchSelectClick(item)">
<span
class=
"acct-search-label"
>
{{
item
.
code
+
' '
+
item
.
name
}}
</span>
<span
class=
"acct-search-label"
>
{{
getLable
(
item
)
}}
</span>
</li>
</li>
<li
v-if=
"baseDataList.length === 0"
>
<li
v-if=
"baseDataList.length === 0"
>
<span
class=
"list-empty"
>
无匹配数据
</span>
<span
class=
"list-empty"
>
无匹配数据
</span>
</li>
</li>
</ul>
</ul>
<div
class=
"select-box"
slot=
"reference"
>
<div
class=
"select-box"
slot=
"reference"
>
<Input
ref=
"searchInput"
v-model=
"selectValue"
:disabled=
"disabled"
:readonly=
"readonly || multiple"
:class=
"
{'multiple-input': multiple
&&
!readonly}" placeholder="" @on-change="handleChange" @on-focus="handleFocus" @
on-blur="handleBlur" @
keydown.down.native="handleSelectNext" @keydown.up.native="handleSelectPrev" @keydown.enter.native="handleSelected">
<Input
ref=
"searchInput"
v-model=
"selectValue"
:disabled=
"disabled"
:readonly=
"readonly || multiple"
:class=
"
{'multiple-input': multiple
&&
!readonly}" placeholder="" @on-change="handleChange" @on-focus="handleFocus" @keydown.down.native="handleSelectNext" @keydown.up.native="handleSelectPrev" @keydown.enter.native="handleSelected">
<Icon
type=
"ios-close-circle"
:class=
"
{'clear-icon': true, 'hidden-icon': disabled || readonly || !selectValue }" slot="suffix" @click="clearList" />
<Icon
type=
"ios-close-circle"
:class=
"
{'clear-icon': true, 'hidden-icon': disabled || readonly || !selectValue }" slot="suffix" @click="clearList" />
<Icon
type=
"ios-more"
class=
"more-select"
slot=
"suffix"
@
click=
"handleInputSelect"
/>
<Icon
type=
"ios-more"
class=
"more-select"
slot=
"suffix"
@
click=
"handleInputSelect"
/>
</Input>
</Input>
...
@@ -100,6 +100,13 @@ export default {
...
@@ -100,6 +100,13 @@ export default {
this
.
getBaseDataList
()
this
.
getBaseDataList
()
}
}
}
}
},
showModal
(
val
)
{
if
(
val
)
{
this
.
$nextTick
(()
=>
{
this
.
dataListShow
=
false
})
}
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -110,6 +117,15 @@ export default {
...
@@ -110,6 +117,15 @@ export default {
this
.
removeDomListener
()
this
.
removeDomListener
()
},
},
methods
:
{
methods
:
{
getLable
(
val
)
{
if
(
this
.
showtype
===
'CODE'
)
{
return
val
.
code
}
else
if
(
this
.
showtype
===
'NAME'
)
{
return
val
.
name
}
else
{
return
val
.
code
+
''
+
val
.
name
}
},
addDomListener
()
{
addDomListener
()
{
if
(
this
.
isVxe
)
{
if
(
this
.
isVxe
)
{
let
doms
=
document
.
querySelectorAll
(
'.rootClass'
)
let
doms
=
document
.
querySelectorAll
(
'.rootClass'
)
...
@@ -170,33 +186,36 @@ export default {
...
@@ -170,33 +186,36 @@ export default {
this
.
selection
[
0
]
=
this
.
value
this
.
selection
[
0
]
=
this
.
value
this
.
showModal
=
true
this
.
showModal
=
true
}
}
this
.
dataListShow
=
false
this
.
$nextTick
(()
=>
{
this
.
dataListShow
=
false
})
}
}
},
},
// 下拉列表
// 下拉列表
handleFocus
()
{
handleFocus
()
{
if
(
this
.
showModal
)
return
this
.
selectIndex
=
-
1
this
.
selectIndex
=
-
1
this
.
hasFocus
=
true
this
.
hasFocus
=
true
this
.
getBaseDataList
()
this
.
getBaseDataList
()
},
},
handleBlur
()
{
//
handleBlur() {
//
if (!this.onResultList) {
//
if (!this.onResultList) {
//
this.hasFocus = false
//
this.hasFocus = false
//
this.dataListShow = false
//
this.dataListShow = false
//
}
//
}
//
this.selectValue = String(this.selectValue)
//
this.selectValue = String(this.selectValue)
//
if (this.value === null) {
//
if (this.value === null) {
//
this.selectValue = ''
//
this.selectValue = ''
//
this.selectIndex = -1
//
this.selectIndex = -1
//
this.selectedItem = {}
//
this.selectedItem = {}
//
} else {
//
} else {
//
this.selectValue = this.value.name
//
this.selectValue = this.value.name
//
this.selectedItem = this.value
//
this.selectedItem = this.value
//
this.findIndex()
//
this.findIndex()
//
}
//
}
//
this.$emit('data-change', this.value)
//
this.$emit('data-change', this.value)
},
//
},
// 输入查询时
// 输入查询时
handleChange
()
{
handleChange
()
{
if
(
this
.
selectValue
===
''
||
this
.
selectValue
===
null
)
{
if
(
this
.
selectValue
===
''
||
this
.
selectValue
===
null
)
{
...
...
develop/@gms/gms-plugin-billexpand/src/control/baseDataSelect/select-table.vue
View file @
e5ef073a
...
@@ -17,7 +17,8 @@
...
@@ -17,7 +17,8 @@
}
}
.table-view
{
.table-view
{
width
:
calc
(
~
'100% - 160px'
);
//
width
:
calc
(
~
'100% - 160px'
);
width
:
calc
(
~
'100% - 10px'
);
margin-left
:
10px
;
margin-left
:
10px
;
height
:
100%
;
height
:
100%
;
float
:
left
;
float
:
left
;
...
@@ -36,7 +37,7 @@
...
@@ -36,7 +37,7 @@
:disabled=
"selection.length == 0"
:disabled=
"selection.length == 0"
@
on-change=
"allCancel"
@
on-change=
"allCancel"
/>
/>
{{
"已选
(
"
+
selection
.
length
+
")条"
}}
{{
"已选
(
"
+
selection
.
length
+
")条"
}}
</div>
</div>
<div
class=
"selected-view-content"
>
<div
class=
"selected-view-content"
>
<SelectedView
<SelectedView
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment