Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
T
TrainSys
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
苏州培训方案
TrainSys
提交
3fa0dd74
提交
3fa0dd74
编写于
6月 28, 2023
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zhujiamin 发布系统代码 [TrainSys,网页端]
上级
987bee88
变更
4
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
112 行增加
和
80 行删除
+112
-80
package.json
app_Web/package.json
+7
-7
pnpm-lock.yaml
app_Web/pnpm-lock.yaml
+41
-41
ibiz-picker-dropdown.tsx
...data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.tsx
+36
-4
yarn.lock
app_Web/yarn.lock
+28
-28
未找到文件。
app_Web/package.json
浏览文件 @
3fa0dd74
...
...
@@ -13,13 +13,13 @@
"dependencies"
:
{
"@floating-ui/dom"
:
"^1.0.11"
,
"@ibiz-template/command"
:
"^0.0.1-beta.50"
,
"@ibiz-template/controller"
:
"^0.0.1-beta.8
7
"
,
"@ibiz-template/core"
:
"^0.0.1-beta.8
7
"
,
"@ibiz-template/model"
:
"^0.0.1-beta.8
7
"
,
"@ibiz-template/runtime"
:
"^0.0.1-beta.8
7
"
,
"@ibiz-template/service"
:
"^0.0.1-beta.8
7
"
,
"@ibiz-template/theme"
:
"^0.0.1-beta.8
7
"
,
"@ibiz-template/vue-util"
:
"^0.0.1-beta.8
7
"
,
"@ibiz-template/controller"
:
"^0.0.1-beta.8
8
"
,
"@ibiz-template/core"
:
"^0.0.1-beta.8
8
"
,
"@ibiz-template/model"
:
"^0.0.1-beta.8
8
"
,
"@ibiz-template/runtime"
:
"^0.0.1-beta.8
8
"
,
"@ibiz-template/service"
:
"^0.0.1-beta.8
8
"
,
"@ibiz-template/theme"
:
"^0.0.1-beta.8
8
"
,
"@ibiz-template/vue-util"
:
"^0.0.1-beta.8
8
"
,
"@ibiz/dynamic-model-api"
:
"^2.1.22"
,
"@riophae/vue-treeselect"
:
"^0.4.0"
,
"dayjs"
:
"^1.11.7"
,
...
...
app_Web/pnpm-lock.yaml
浏览文件 @
3fa0dd74
此差异已折叠。
点击以展开。
app_Web/src/components/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.tsx
浏览文件 @
3fa0dd74
...
...
@@ -4,8 +4,8 @@ import {
getEditorEmits
,
useNamespace
,
}
from
'@ibiz-template/vue-util'
;
import
{
isNil
}
from
'ramda'
;
import
'@ibiz-template/theme/style/components/editor/ibiz-picker-dropdown/ibiz-picker-dropdown.scss'
;
import
{
isNil
}
from
'ramda'
;
export
const
IBizPickerDropDown
=
defineComponent
({
name
:
'IBizPickerDropDown'
,
...
...
@@ -16,16 +16,28 @@ export const IBizPickerDropDown = defineComponent({
const
c
=
props
.
controller
;
// 当前值
// 当前
文本
值
const
curValue
:
Ref
<
Array
<
string
>
|
string
|
null
>
=
ref
(
''
);
// 实体数据集
const
items
:
Ref
<
IData
[]
>
=
ref
([]);
// 是否是第一次搜索
const
isFirstSearch
=
ref
(
false
);
// 第一次搜索的时候需要保存值,否则回显有问题
const
firstRefValue
:
Ref
<
string
>
=
ref
(
''
);
// 是否选择过选项
const
hasSelected
=
ref
(
false
);
watch
(
()
=>
props
.
value
,
newVal
=>
{
(
newVal
,
oldVal
)
=>
{
if
(
newVal
||
newVal
===
null
)
{
if
(
oldVal
===
undefined
||
oldVal
===
null
)
{
isFirstSearch
.
value
=
true
;
}
curValue
.
value
=
newVal
;
const
value
=
props
.
data
[
c
.
valueItem
];
const
index
=
items
.
value
.
findIndex
((
item
:
IData
)
=>
...
...
@@ -89,6 +101,7 @@ export const IBizPickerDropDown = defineComponent({
if
(
index
>=
0
)
{
onACSelect
(
items
.
value
[
index
]);
}
hasSelected
.
value
=
true
;
};
// 在搜索中时,再次触发搜索记录搜索值,等待上次搜索触发完成后再次搜索
...
...
@@ -98,8 +111,14 @@ export const IBizPickerDropDown = defineComponent({
const
onSearch
=
async
(
query
:
string
)
=>
{
if
(
c
.
model
.
appDataEntity
&&
loading
.
value
===
false
)
{
loading
.
value
=
true
;
// 初次搜索时refValue需要置空,否则选项出不来
if
(
isFirstSearch
.
value
)
{
firstRefValue
.
value
=
refValue
.
value
;
refValue
.
value
=
''
;
}
try
{
const
res
=
await
c
.
getServiceData
(
query
,
props
.
data
!
);
const
searchQuery
=
isFirstSearch
.
value
?
''
:
query
;
const
res
=
await
c
.
getServiceData
(
searchQuery
,
props
.
data
!
);
if
(
res
)
{
items
.
value
=
res
.
data
as
IData
[];
}
...
...
@@ -114,6 +133,7 @@ export const IBizPickerDropDown = defineComponent({
}
else
{
waitQuery
=
query
;
}
isFirstSearch
.
value
=
false
;
};
// 下拉打开
...
...
@@ -122,6 +142,16 @@ export const IBizPickerDropDown = defineComponent({
if
(
isOpen
)
{
items
.
value
=
[];
onSearch
(
''
);
}
else
if
(
!
hasSelected
.
value
)
{
// 下拉关闭的时候,如果没有选择过,要把回显值重新赋回select
refValue
.
value
=
firstRefValue
.
value
;
}
};
// 搜索词改变时触发
const
onQueryChange
=
(
query
:
string
)
=>
{
if
(
query
===
''
)
{
onSearch
(
''
);
}
};
...
...
@@ -146,6 +176,7 @@ export const IBizPickerDropDown = defineComponent({
loading
,
items
,
onOpenChange
,
onQueryChange
,
onClear
,
onSelect
,
onSearch
,
...
...
@@ -173,6 +204,7 @@ export const IBizPickerDropDown = defineComponent({
placeholder=
{
this
.
c
.
placeHolder
}
remote
-
method=
{
this
.
onSearch
}
on
-
on
-
open
-
change=
{
this
.
onOpenChange
}
on
-
on
-
query
-
change=
{
this
.
onQueryChange
}
on
-
on
-
change=
{
this
.
onSelect
}
on
-
on
-
clear=
{
this
.
onClear
}
disabled=
{
this
.
disabled
}
...
...
app_Web/yarn.lock
浏览文件 @
3fa0dd74
...
...
@@ -651,54 +651,54 @@
dependencies:
qx-util "^0.4.8"
"@ibiz-template/controller@^0.0.1-beta.8
7
":
version "0.0.1-beta.8
7
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/controller/-/controller-0.0.1-beta.8
7.tgz#ba7bdb0ae94df8b052767e17ee598b78b3be2bc0
"
integrity sha512-
xf+F6Uud3LdFV756nE7tFHs4kUeX/+5ETlUpbcsa1EYJCjuPWDx0/Gp6UpaVp6eabjARG3KXSFwjA77XQNG+xw
==
"@ibiz-template/controller@^0.0.1-beta.8
8
":
version "0.0.1-beta.8
8
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/controller/-/controller-0.0.1-beta.8
8.tgz#182d9b9d96fb365a0bb7d8f2a3d32b5da38609be
"
integrity sha512-
kqSzzpkk0LopkF2JSuhF+Dj5Y6ajkhk1rv9wgfC5fD8G1G/N7Fis6OaBsBe8tlI1ytL38Oon4B2aMYUq36EjGQ
==
dependencies:
async-validator "^4.2.5"
dayjs "^1.11.5"
"@ibiz-template/core@^0.0.1-beta.8
7
":
version "0.0.1-beta.8
7
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/core/-/core-0.0.1-beta.8
7.tgz#0e451605ddbde3a170f92f18f937da41708d3611
"
integrity sha512-
H99YbcCrVFeuxKjbtApQp2R7puVoDMa5TgVJWXmcKeJ2gguxNEjEH2seFG2ESMqH3lwVb3oUnepEBhI3cMeJCA
==
"@ibiz-template/core@^0.0.1-beta.8
8
":
version "0.0.1-beta.8
8
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/core/-/core-0.0.1-beta.8
8.tgz#5f9fb8f0b192b6cb25ae63a82af4e1a7a5defe69
"
integrity sha512-
d3t95s0n2QGlCWpx2OzJxqS/uUxIb8aF7D4AALj0ahasL3RHKF6YLrG/F55ng5/ub06OjbvkIPZzQic39Gu2Xg
==
dependencies:
axios "^1.2.1"
loglevel "^1.8.0"
pluralize "^8.0.0"
qs "^6.11.0"
"@ibiz-template/model@^0.0.1-beta.8
7
":
version "0.0.1-beta.8
7
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/model/-/model-0.0.1-beta.8
7.tgz#d5b6deedde287afe254063d785cd0ab15d5a0f9e
"
integrity sha512-
h/Ec6ppE4MfjjdJ7T1I/QQR2HTVmg+ZeotURTNHbbyq30AmzLydcQBPofQHKFRo4vbYb0es55ZaWKXbo9cj9eg
==
"@ibiz-template/model@^0.0.1-beta.8
8
":
version "0.0.1-beta.8
8
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/model/-/model-0.0.1-beta.8
8.tgz#f2f2889c6d8411673a97d909d014a7ececd0ed08
"
integrity sha512-
8tqA1Py304BjUSAeFNq463q41cd0lAPtrAk6OQOuy2b531zZFq6H4amYVCV/XZn5rJJ32veub2L3bm9CxWijSQ
==
dependencies:
"@ibiz/dynamic-model-api" "^2.1.22"
pluralize "^8.0.0"
"@ibiz-template/runtime@^0.0.1-beta.8
7
":
version "0.0.1-beta.8
7
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/runtime/-/runtime-0.0.1-beta.8
7.tgz#96c04d680d58d1c05456ef225d2bbf2316ad3f6f
"
integrity sha512-
lK7E9JfUBGqCQEGpMGcd54LiCL9I8ZnXAAw9cQg3KzBKGoCLOLebaayW+4TAeOis/DV3r6xFUe182Li458GecA
==
"@ibiz-template/runtime@^0.0.1-beta.8
8
":
version "0.0.1-beta.8
8
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/runtime/-/runtime-0.0.1-beta.8
8.tgz#7043438b752bc68b4b69c56ca1975c3f6de0c6e6
"
integrity sha512-
um7iSypiImO1fcTXP04vKa5Qn8VEl93QAUSylqBcjyRa6eTs8obmu+Skz8ETAyKOmdEgOw+utV7FuqTYHCIMOg
==
dependencies:
"@ibiz-template/command" "^0.0.1-beta.50"
qs "^6.11.0"
"@ibiz-template/service@^0.0.1-beta.8
7
":
version "0.0.1-beta.8
7
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/service/-/service-0.0.1-beta.8
7.tgz#0ec46a97ab5011d040d33ec4c67ca41c89e605bd
"
integrity sha512-
wZcgbhOEp0FElkRF/XNygzmuHjHd6wBGOyV46YuccDqv7R6XAfhkMabe7xvlYtAJar/dPLg9UBqqWJxQ3uQ1QA
==
"@ibiz-template/service@^0.0.1-beta.8
8
":
version "0.0.1-beta.8
8
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/service/-/service-0.0.1-beta.8
8.tgz#8f0b74ddc176ef6b18a0108f5ef2e4f321c4d50a
"
integrity sha512-
Kzr3zl81Vuo073gsSPhOMTFoLknBBjyUsW2kPp2sCFAklzcM72tqV/QI5wLahRQ5D3rCjwR/QISslyeeXPa+oQ
==
"@ibiz-template/theme@^0.0.1-beta.8
7
":
version "0.0.1-beta.8
7
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/theme/-/theme-0.0.1-beta.8
7.tgz#94096a4eb97f7c55d4582e848478feb8f8cc10b8
"
integrity sha512-
pelpQeJxu2nB4xzy2xTIVE+YshDd+znO5eVrjx/YnLDDBhEg4RzWat1+/nauFocZuA6/B1avwdgZBlfVqCH9xA
==
"@ibiz-template/theme@^0.0.1-beta.8
8
":
version "0.0.1-beta.8
8
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/theme/-/theme-0.0.1-beta.8
8.tgz#29ae44fd020d9a32fc1962968ef22bfeb92592d2
"
integrity sha512-
Fo3R90FLrWmemWJAGetpem0CwevB1e4Z+QSssZPI2z3C1w47YByxDIBQMZJl2tGloUlKBxxh/fVz1v1r5UKHAQ
==
"@ibiz-template/vue-util@^0.0.1-beta.8
7
":
version "0.0.1-beta.8
7
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/vue-util/-/vue-util-0.0.1-beta.8
7.tgz#32d3dbca7ee8f0ae6fe5fd023c9c84e99d3ec424
"
integrity sha512-
4A+ru5VWIdEa5NK5FA+98lR8obq3KXcueMj9D8a0bWYo0Z9mIKRaBmXi/Omm82povCqcRVzOkNM3yckBxz1r5
Q==
"@ibiz-template/vue-util@^0.0.1-beta.8
8
":
version "0.0.1-beta.8
8
"
resolved "http://npm.zhr.icu:4873/@ibiz-template/vue-util/-/vue-util-0.0.1-beta.8
8.tgz#89d6951623eaa878c0fdd0af909f1cdd80f3198f
"
integrity sha512-
fpKHFyzNwvsqKIh7TfoNkjcZE+gf37CI/OO5++uSBpRAEopPpR0wVjss2AtQUN0IfNKq4vNYnpLCwfBOMMQDW
Q==
"@ibiz/dynamic-model-api@^2.1.22":
version "2.1.22"
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录