提交 c10aeccc 编写于 作者: ibizdev's avatar ibizdev

zhujiamin 发布系统代码 [TrainSys,网页端]

上级 01626366
......@@ -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.129",
"@ibiz-template/core": "^0.0.1-beta.129",
"@ibiz-template/model": "^0.0.1-beta.129",
"@ibiz-template/runtime": "^0.0.1-beta.129",
"@ibiz-template/service": "^0.0.1-beta.129",
"@ibiz-template/theme": "^0.0.1-beta.129",
"@ibiz-template/vue-util": "^0.0.1-beta.129",
"@ibiz-template/controller": "^0.0.1-beta.130",
"@ibiz-template/core": "^0.0.1-beta.130",
"@ibiz-template/model": "^0.0.1-beta.130",
"@ibiz-template/runtime": "^0.0.1-beta.130",
"@ibiz-template/service": "^0.0.1-beta.130",
"@ibiz-template/theme": "^0.0.1-beta.130",
"@ibiz-template/vue-util": "^0.0.1-beta.130",
"@ibiz/dynamic-model-api": "^2.1.28",
"@riophae/vue-treeselect": "^0.4.0",
"dayjs": "^1.11.7",
......
......@@ -12,26 +12,26 @@ dependencies:
specifier: ^0.0.1-beta.50
version: 0.0.1-beta.50
'@ibiz-template/controller':
specifier: ^0.0.1-beta.129
version: 0.0.1-beta.129(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(@ibiz-template/runtime@0.0.1-beta.129)(@ibiz-template/service@0.0.1-beta.129)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
specifier: ^0.0.1-beta.130
version: 0.0.1-beta.130(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(@ibiz-template/runtime@0.0.1-beta.130)(@ibiz-template/service@0.0.1-beta.130)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
'@ibiz-template/core':
specifier: ^0.0.1-beta.129
version: 0.0.1-beta.129(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
specifier: ^0.0.1-beta.130
version: 0.0.1-beta.130(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model':
specifier: ^0.0.1-beta.129
version: 0.0.1-beta.129(@ibiz/dynamic-model-api@2.1.28)(lodash-es@4.17.21)(qx-util@0.4.8)
specifier: ^0.0.1-beta.130
version: 0.0.1-beta.130(@ibiz/dynamic-model-api@2.1.28)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/runtime':
specifier: ^0.0.1-beta.129
version: 0.0.1-beta.129(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(@ibiz-template/service@0.0.1-beta.129)(qx-util@0.4.8)
specifier: ^0.0.1-beta.130
version: 0.0.1-beta.130(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(@ibiz-template/service@0.0.1-beta.130)(qx-util@0.4.8)
'@ibiz-template/service':
specifier: ^0.0.1-beta.129
version: 0.0.1-beta.129(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(qx-util@0.4.8)(ramda@0.28.0)
specifier: ^0.0.1-beta.130
version: 0.0.1-beta.130(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/theme':
specifier: ^0.0.1-beta.129
version: 0.0.1-beta.129
specifier: ^0.0.1-beta.130
version: 0.0.1-beta.130
'@ibiz-template/vue-util':
specifier: ^0.0.1-beta.129
version: 0.0.1-beta.129(@ibiz-template/controller@0.0.1-beta.129)(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(@ibiz-template/service@0.0.1-beta.129)(qs@6.11.1)(qx-util@0.4.8)(ramda@0.28.0)(vue-router@3.6.5)(vue@2.7.14)
specifier: ^0.0.1-beta.130
version: 0.0.1-beta.130(@ibiz-template/controller@0.0.1-beta.130)(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(@ibiz-template/service@0.0.1-beta.130)(qs@6.11.1)(qx-util@0.4.8)(ramda@0.28.0)(vue-router@3.6.5)(vue@2.7.14)
'@ibiz/dynamic-model-api':
specifier: ^2.1.28
version: 2.1.28(qx-util@0.4.8)
......@@ -939,8 +939,8 @@ packages:
qx-util: 0.4.8
dev: false
/@ibiz-template/controller@0.0.1-beta.129(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(@ibiz-template/runtime@0.0.1-beta.129)(@ibiz-template/service@0.0.1-beta.129)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8):
resolution: {integrity: sha512-D+Tdcrrn/ZFbOAOKwyPoe6IKC3n6YgcagFWmRsYAtcmHhDWbY5jaTb53BMDwqCq+AjkKsMY9fYS0kOgeORVEhA==}
/@ibiz-template/controller@0.0.1-beta.130(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(@ibiz-template/runtime@0.0.1-beta.130)(@ibiz-template/service@0.0.1-beta.130)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8):
resolution: {integrity: sha512-o8UA0hIUto78En54D2oKjyxbxjSCvXJSFzx89mEJ4v1P4opXwyQ/4eDKfk0HevSO330DA951xbWAtiXAA4Qosg==}
peerDependencies:
'@ibiz-template/core': ^0.0.1-beta.30
'@ibiz-template/model': ^0.0.1-beta.30
......@@ -950,10 +950,10 @@ packages:
qs: ^6.11.0
qx-util: ^0.4.8
dependencies:
'@ibiz-template/core': 0.0.1-beta.129(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.129(@ibiz/dynamic-model-api@2.1.28)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/runtime': 0.0.1-beta.129(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(@ibiz-template/service@0.0.1-beta.129)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.129(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/core': 0.0.1-beta.130(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.130(@ibiz/dynamic-model-api@2.1.28)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/runtime': 0.0.1-beta.130(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(@ibiz-template/service@0.0.1-beta.130)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.130(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(qx-util@0.4.8)(ramda@0.28.0)
async-validator: 4.2.5
dayjs: 1.11.7
lodash-es: 4.17.21
......@@ -961,8 +961,8 @@ packages:
qx-util: 0.4.8
dev: false
/@ibiz-template/core@0.0.1-beta.129(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0):
resolution: {integrity: sha512-Y+bFzqpUfwWTujnbdkE8a98qOUwr4vpwufcbEt0i57VpFDej9jc5cwmIp49/aa9RE0pxgh6yeHgvhSAK36PtcA==}
/@ibiz-template/core@0.0.1-beta.130(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0):
resolution: {integrity: sha512-J/zMqRSPskzggYok4rrYAAYcIvSMnyYgZv+jfHUCeDE9iZjva6j6+g5b0r+i29b1ISKZ9PUfWtTK70SRB+Fn9A==}
peerDependencies:
lodash-es: ^4.17.21
qx-util: ^0.4.8
......@@ -979,8 +979,8 @@ packages:
- debug
dev: false
/@ibiz-template/model@0.0.1-beta.129(@ibiz/dynamic-model-api@2.1.28)(lodash-es@4.17.21)(qx-util@0.4.8):
resolution: {integrity: sha512-Uh82aBrIRSOqD9+qFpucakqZdjioR9XKpD6li1x2k2ZKlGPXztLU1Q7+wIVbEZgUmzWPRKS0KEFLZairbsYv5w==}
/@ibiz-template/model@0.0.1-beta.130(@ibiz/dynamic-model-api@2.1.28)(lodash-es@4.17.21)(qx-util@0.4.8):
resolution: {integrity: sha512-6v93zzb2+Aw9Pj+Qra3CdvEqMrWIhRWmT/hQ3Qy/NwGSXEI1OFsHihdsRhlpd3gTFxQjtRL2tJYnyvJ8QE3nyg==}
peerDependencies:
'@ibiz/dynamic-model-api': ^2.1.28
lodash-es: ^4.17.21
......@@ -992,8 +992,8 @@ packages:
qx-util: 0.4.8
dev: false
/@ibiz-template/runtime@0.0.1-beta.129(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(@ibiz-template/service@0.0.1-beta.129)(qx-util@0.4.8):
resolution: {integrity: sha512-2C+faaBVtaIlu7YBrS+IYNWpEseIPos/R2GTl7r6oPBR5sMgZjOFiQub1YL//09cEEhYhReDt9yWUpwyru65Yw==}
/@ibiz-template/runtime@0.0.1-beta.130(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(@ibiz-template/service@0.0.1-beta.130)(qx-util@0.4.8):
resolution: {integrity: sha512-h5ImnLEeVI5Hq0ZGnxsfMNXLRHADPwbSxlnd2HwN5aI/O7VFP7NJ+exwNPgB8iQGsVKV95iQcSNZnPIXUP+iFA==}
peerDependencies:
'@ibiz-template/core': ^0.0.1-beta.30
'@ibiz-template/model': ^0.0.1-beta.30
......@@ -1001,33 +1001,33 @@ packages:
qx-util: ^0.4.8
dependencies:
'@ibiz-template/command': 0.0.1-beta.50
'@ibiz-template/core': 0.0.1-beta.129(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.129(@ibiz/dynamic-model-api@2.1.28)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.129(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/core': 0.0.1-beta.130(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.130(@ibiz/dynamic-model-api@2.1.28)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.130(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(qx-util@0.4.8)(ramda@0.28.0)
qs: 6.11.1
qx-util: 0.4.8
dev: false
/@ibiz-template/service@0.0.1-beta.129(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(qx-util@0.4.8)(ramda@0.28.0):
resolution: {integrity: sha512-fpT9V36kGF6UMddPvxEiGeeJ0jNmkEot0+lQXoGsQe85IdFkiB/MsGpSAjK2rwnMgPAqPrEPsTMoZ0gVTUEf1g==}
/@ibiz-template/service@0.0.1-beta.130(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(qx-util@0.4.8)(ramda@0.28.0):
resolution: {integrity: sha512-7E1VUXq6EU3BHus8lM+Au+gv+jYPl1oyYPddvz3TwH9mfgDzD5hrdGngZ2Ev/++pNvQi5TuLU5z9ZuMjQZ9G7A==}
peerDependencies:
'@ibiz-template/core': ^0.0.1-beta.30
'@ibiz-template/model': ^0.0.1-beta.30
qx-util: ^0.4.8
ramda: ^0.28.0
dependencies:
'@ibiz-template/core': 0.0.1-beta.129(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.129(@ibiz/dynamic-model-api@2.1.28)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/core': 0.0.1-beta.130(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.130(@ibiz/dynamic-model-api@2.1.28)(lodash-es@4.17.21)(qx-util@0.4.8)
qx-util: 0.4.8
ramda: 0.28.0
dev: false
/@ibiz-template/theme@0.0.1-beta.129:
resolution: {integrity: sha512-Y9irFfIdHeWdxAmsffOqV4JXMPFHPGq5/mtTSD/g/wCKWal/voEoTUwgeJeHv89CVWGsPrjdbuabJSVGFbPRtQ==}
/@ibiz-template/theme@0.0.1-beta.130:
resolution: {integrity: sha512-+vsKIP5PcAtgVeGmqXIiRBia1xIZNPDbE2A0Xy52GTlXoNjdp8Lsvry5lINtEqJAXiNYzcsgHK0skeILK487VQ==}
dev: false
/@ibiz-template/vue-util@0.0.1-beta.129(@ibiz-template/controller@0.0.1-beta.129)(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(@ibiz-template/service@0.0.1-beta.129)(qs@6.11.1)(qx-util@0.4.8)(ramda@0.28.0)(vue-router@3.6.5)(vue@2.7.14):
resolution: {integrity: sha512-rkzvwag6OyV+bzGD4Od3k6ziKrIrF5SvBGi7OZPq7mc+XgZMg8TPADn+Ruv0HE4r3EULsCv/OBRYt3bCCLERpw==}
/@ibiz-template/vue-util@0.0.1-beta.130(@ibiz-template/controller@0.0.1-beta.130)(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(@ibiz-template/service@0.0.1-beta.130)(qs@6.11.1)(qx-util@0.4.8)(ramda@0.28.0)(vue-router@3.6.5)(vue@2.7.14):
resolution: {integrity: sha512-1NUecVzlAjVC03HI2ANtAt4/GO7pY4egG7b91O/prwHxUxAEMeQQu1i8wL0BorLGbzUFCuHOoeyV8WNkTqlEkg==}
peerDependencies:
'@ibiz-template/controller': ^0.0.1-beta.30
'@ibiz-template/core': ^0.0.1-beta.30
......@@ -1039,10 +1039,10 @@ packages:
vue: ^2.7.14
vue-router: ^3.6.5
dependencies:
'@ibiz-template/controller': 0.0.1-beta.129(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(@ibiz-template/runtime@0.0.1-beta.129)(@ibiz-template/service@0.0.1-beta.129)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
'@ibiz-template/core': 0.0.1-beta.129(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.129(@ibiz/dynamic-model-api@2.1.28)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.129(@ibiz-template/core@0.0.1-beta.129)(@ibiz-template/model@0.0.1-beta.129)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/controller': 0.0.1-beta.130(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(@ibiz-template/runtime@0.0.1-beta.130)(@ibiz-template/service@0.0.1-beta.130)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
'@ibiz-template/core': 0.0.1-beta.130(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.130(@ibiz/dynamic-model-api@2.1.28)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.130(@ibiz-template/core@0.0.1-beta.130)(@ibiz-template/model@0.0.1-beta.130)(qx-util@0.4.8)(ramda@0.28.0)
qs: 6.11.1
qx-util: 0.4.8
ramda: 0.28.0
......
......@@ -119,7 +119,12 @@ export const ViewToolbar = defineComponent({
return (
<div
key={item.id}
class={[this.ns.e('item'), this.ns.e('item-deuiaction')]}
class={[
this.ns.e('item'),
this.ns.e('item-deuiaction'),
this.ns.is('loading', this.toolbarState[item.id].loading),
this.ns.is('caption', !!(item.showCaption && item.caption)),
]}
>
<i-button
title={item.tooltip}
......
......@@ -137,9 +137,10 @@ export const IBizCheckbox = defineComponent({
selectArray,
valueText,
onSelectArrayChange,
c,
};
},
render() {
render(h) {
return (
<div
class={[
......@@ -148,24 +149,33 @@ export const IBizCheckbox = defineComponent({
this.readonly ? this.ns.m('readonly') : '',
]}
>
{this.readonly ? (
this.valueText
) : (
<i-checkbox-group
value={this.selectArray}
on-on-change={this.onSelectArrayChange}
>
{this.items.map((item, index: number) => (
<i-checkbox
key={index}
label={item.value}
disabled={this.disabled}
>
<span class={this.ns.e('text')}>{item.text}</span>
</i-checkbox>
))}
</i-checkbox-group>
)}
{[
this.readonly && this.valueText,
!this.readonly &&
h(
'ICheckboxGroup',
{
props: {
...this.c.customProps,
value: this.selectArray,
},
on: {
'on-change': this.onSelectArrayChange,
},
},
[
this.items.map((item, index: number) => (
<i-checkbox
key={index}
label={item.value}
disabled={this.disabled}
>
<span class={this.ns.e('text')}>{item.text}</span>
</i-checkbox>
)),
],
),
]}
</div>
);
},
......
......@@ -199,7 +199,7 @@ export const IBizMPicker = defineComponent({
setDefaultOptions,
};
},
render() {
render(h) {
return (
<div
class={[
......@@ -209,34 +209,42 @@ export const IBizMPicker = defineComponent({
]}
>
{this.readonly && this.valueText}
{!this.readonly && (
<i-select
ref='selectRef'
value={this.curValue}
filterable
transfer
multiple
default-label={this.defaultLabel}
loading={this.loading}
placeholder={this.c.placeHolder}
remote-method={this.onSearch}
on-on-open-change={this.onOpenChange}
on-on-change={this.onSelect}
disabled={this.disabled}
>
{this.items.map(item => {
return (
<i-option
key={item.srfkey}
value={item.srfkey}
label={item.srfmajortext}
>
{item.srfmajortext}
</i-option>
);
})}
</i-select>
)}
{!this.readonly &&
h(
'iSelect',
{
ref: 'selectRef',
props: {
...this.c.customProps,
value: this.curValue,
filterable: true,
transfer: true,
multiple: true,
defaultLabel: this.defaultLabel,
loading: this.loading,
placeholder: this.c.placeHolder,
disabled: this.disabled,
remoteMethod: this.onSearch,
},
on: {
'on-change': this.onSelect,
'on-open-change': this.onOpenChange,
},
},
[
this.items.map(item => {
return (
<i-option
key={item.srfkey}
value={item.srfkey}
label={item.srfmajortext}
>
{item.srfmajortext}
</i-option>
);
}),
],
)}
{!this.readonly && (
<div class={this.ns.e('buns-position')}>
<div class={this.ns.e('btns')}>
......
......@@ -182,7 +182,7 @@ export const IBizPickerDropDown = defineComponent({
onSearch,
};
},
render() {
render(h) {
if (this.readonly) {
return (
<div class={(this.ns.b(), this.ns.m('readonly'))}>{this.value}</div>
......@@ -190,34 +190,43 @@ export const IBizPickerDropDown = defineComponent({
}
return (
<div class={[this.ns.b(), this.disabled ? this.ns.m('disabled') : '']}>
{this.readonly ? (
this.value
) : (
<i-select
value={this.refValue}
filterable
remote
allow-clear
clearable
transfer
loading={this.loading}
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}
>
{this.items.map((item, index) => {
return (
<i-option value={item[this.c.keyName]} key={index}>
{item[this.c.textName]}
</i-option>
);
})}
</i-select>
)}
{[
this.readonly && this.value,
!this.readonly &&
h(
'iSelect',
{
props: {
...this.c.customProps,
value: this.refValue,
filterable: true,
remote: true,
allowClear: true,
clearable: true,
transfer: true,
loading: this.loading,
placeholder: this.c.placeHolder,
remoteMethod: this.onSearch,
disabled: this.disabled,
},
on: {
'on-change': this.onSelect,
'on-open-change': this.onOpenChange,
'on-query-change': this.onQueryChange,
'on-on-clear': this.onClear,
},
},
[
this.items.map((item, index) => {
return (
<i-option value={item[this.c.keyName]} key={index}>
{item[this.c.textName]}
</i-option>
);
}),
],
),
]}
</div>
);
},
......
......@@ -141,7 +141,7 @@ export const IBizPicker = defineComponent({
onBlur,
};
},
render() {
render(h) {
if (this.readonly) {
return (
<div class={(this.ns.b(), this.ns.m('readonly'))}>{this.value}</div>
......@@ -149,84 +149,106 @@ export const IBizPicker = defineComponent({
}
return (
<div class={[this.ns.b(), this.disabled ? this.ns.m('disabled') : '']}>
{this.c.noAC ? (
<i-input
value={this.curValue}
clearable
placeholder={this.c.placeHolder}
on-on-clear={this.onClear}
disabled={this.disabled}
>
{this.$slots.append}
{!this.$slots.append && this.c.pickupView ? (
<i-button
key='ios-search'
icon='ios-search'
on-click={this.openPickUpView}
></i-button>
) : null}
{!this.$slots.append && this.c.linkView ? (
<i-button
key='ios-search-outline'
icon='ios-search-outline'
on-click='openLinkView'
></i-button>
) : null}
</i-input>
) : (
<div
class={[
this.ns.e('autocomplete'),
this.ns.m(this.closeCircle.toString()),
]}
>
<i-auto-complete
value={this.curValue}
placeholder={this.c.placeHolder}
placement='bottom'
clearable
transfer-class-name={this.ns.e('transfer')}
on-on-focus={this.onFocus}
on-on-search={this.onSearch}
on-on-clear={this.onClear}
on-on-blur={this.onBlur}
disabled={this.disabled}
>
{this.items.map(item => {
return (
<div
class={this.ns.e('transfer-item')}
on-click={() => {
this.onACSelect(item);
}}
>
{item[this.c.textName]}
</div>
);
})}
</i-auto-complete>
<div class={this.ns.e('buns-position')}>
<div class={this.ns.e('btns')}>
{this.c.pickupView ? (
{[
this.c.noAC &&
h(
'IInput',
{
props: {
...this.c.customProps,
value: this.curValue,
clearable: true,
placeholder: this.c.placeHolder,
disabled: this.disabled,
},
on: {
'on-clear': this.onClear,
},
},
[
this.$slots.append,
!this.$slots.append && this.c.pickupView && (
<i-button
key='ios-search'
icon='ios-search'
on-click={this.openPickUpView}
type={'text'}
></i-button>
) : null}
{this.c.linkView ? (
),
!this.$slots.append && this.c.linkView && (
<i-button
on-click={this.openLinkView}
type={'text'}
class={this.ns.e('link')}
>
<ion-icon src={'./assets/img/link.svg'}></ion-icon>
</i-button>
) : null}
</div>
key='ios-search-outline'
icon='ios-search-outline'
on-click='openLinkView'
></i-button>
),
],
),
!this.c.noAC && (
<div
class={[
this.ns.e('autocomplete'),
this.ns.m(this.closeCircle.toString()),
]}
>
{[
h(
'IAutoComplete',
{
props: {
...this.c.customProps,
value: this.curValue,
placeholder: this.c.placeHolder,
placement: 'bottom',
clearable: true,
transferClassName: this.ns.e('transfer'),
disabled: this.disabled,
},
on: {
'on-focus': this.onFocus,
'on-search': this.onSearch,
'on-clear': this.onClear,
'on-blur': this.onBlur,
},
},
[
this.items.map(item => {
return (
<div
class={this.ns.e('transfer-item')}
on-click={() => {
this.onACSelect(item);
}}
>
{item[this.c.textName]}
</div>
);
}),
],
),
<div class={this.ns.e('buns-position')}>
<div class={this.ns.e('btns')}>
{this.c.pickupView ? (
<i-button
icon='ios-search'
on-click={this.openPickUpView}
type={'text'}
></i-button>
) : null}
{this.c.linkView ? (
<i-button
on-click={this.openLinkView}
type={'text'}
class={this.ns.e('link')}
>
<ion-icon src={'./assets/img/link.svg'}></ion-icon>
</i-button>
) : null}
</div>
</div>,
]}
</div>
</div>
)}
),
]}
</div>
);
},
......
......@@ -99,7 +99,7 @@ export const IBizDatePicker = defineComponent({
isTimePicker,
};
},
render() {
render(h) {
return (
<div
class={[
......@@ -108,33 +108,45 @@ export const IBizDatePicker = defineComponent({
this.readonly ? this.ns.m('readonly') : '',
]}
>
{this.readonly ? (
this.formatValue
) : this.isTimePicker ? (
<i-time-picker
ref='inputRef'
transfer
type={this.type}
format={this.format}
placeholder={this.c!.placeHolder}
value={this.value}
on-on-open-change={this.onOpenChange}
on-on-change={this.handleChange}
disabled={this.disabled}
></i-time-picker>
) : (
<i-CalendarPicker
ref='inputRef'
transfer
type={this.type}
format={this.format}
placeholder={this.c!.placeHolder}
value={this.value}
on-on-open-change={this.onOpenChange}
on-on-change={this.handleChange}
disabled={this.disabled}
></i-CalendarPicker>
)}
{[
this.readonly && this.formatValue,
!this.readonly &&
this.isTimePicker &&
h('ITimePicker', {
ref: 'inputRef',
props: {
...this.c.customProps,
value: this.value,
type: this.type,
format: this.format,
placeholder: this.c!.placeHolder,
disabled: this.disabled,
transfer: true,
},
on: {
'on-change': this.handleChange,
'on-open-change': this.onOpenChange,
},
}),
!this.readonly &&
!this.isTimePicker &&
h('ICalendarPicker', {
ref: 'inputRef',
props: {
...this.c.customProps,
value: this.value,
type: this.type,
format: this.format,
placeholder: this.c!.placeHolder,
disabled: this.disabled,
transfer: true,
},
on: {
'on-change': this.handleChange,
'on-open-change': this.onOpenChange,
},
}),
]}
</div>
);
},
......
......@@ -141,7 +141,7 @@ export const IBizDateRange = defineComponent({
unlinkPanels,
};
},
render() {
render(h) {
return (
<div
class={[
......@@ -150,20 +150,25 @@ export const IBizDateRange = defineComponent({
this.readonly ? this.ns.m('readonly') : '',
]}
>
<i-date-picker
ref='inputRef'
value={this.curValue}
transfer
type={this.type}
format={this.format}
placeholder={this.c!.placeHolder}
disabled={this.disabled}
readonly={this.readonly}
separator={this.rangeSeparator}
split-panels={this.unlinkPanels}
on-on-open-change={this.onOpenChange} // 弹出日历和关闭日历时触发
on-on-change={this.handleChange} // 日期发生变化时触发
></i-date-picker>
{h('IDatePicker', {
ref: 'inputRef',
props: {
...this.c.customProps,
value: this.curValue,
transfer: true,
type: this.type,
format: this.format,
placeholder: this.c!.placeHolder,
disabled: this.disabled,
readonly: this.readonly,
separator: this.rangeSeparator,
splitPanels: this.unlinkPanels,
},
on: {
'on-change': this.handleChange,
'on-open-change': this.onOpenChange,
},
})}
</div>
);
},
......
......@@ -69,6 +69,10 @@ export const IBizDropdown = defineComponent({
});
}
const onSelect = (value: string | Array<string> | undefined) => {
curValue.value = value;
};
const onOpenChange = (isOpen: boolean) => {
emit('operate', isOpen);
};
......@@ -82,37 +86,11 @@ export const IBizDropdown = defineComponent({
hasChildren,
onOpenChange,
inputRef,
onSelect,
};
},
render() {
// 编辑态内容
const editContent = this.hasChildren ? (
<app-select-tree
class={[this.ns.e('tree-select')]}
value={this.curValue}
nodes-data={this.items}
disabled={this.disabled}
multiple={this.c!.multiple}
></app-select-tree>
) : (
<i-select
ref='inputRef'
v-model={this.curValue}
allow-clear
transfer
clearable
class={[this.ns.e('select')]}
multiple={this.c!.multiple}
placeholder={this.c!.placeHolder}
disabled={this.disabled}
on-on-open-change={this.onOpenChange}
>
{this.items.map(item => {
return <i-option value={item.value}>{item.text}</i-option>;
})}
</i-select>
);
render(h) {
return (
<div
class={[
......@@ -121,7 +99,46 @@ export const IBizDropdown = defineComponent({
this.readonly ? this.ns.m('readonly') : '',
]}
>
{this.readonly ? this.valueText : editContent}
{[
this.readonly && this.valueText,
!this.readonly && this.hasChildren && (
<app-select-tree
class={[this.ns.e('tree-select')]}
value={this.curValue}
nodes-data={this.items}
disabled={this.disabled}
multiple={this.c!.multiple}
></app-select-tree>
),
!this.readonly &&
!this.hasChildren &&
h(
'iSelect',
{
ref: 'inputRef',
class: this.ns.e('select'),
props: {
...this.c.customProps,
value: this.curValue,
allowClear: true,
transfer: true,
clearable: true,
multiple: this.c!.multiple,
placeholder: this.c.placeHolder,
disabled: this.disabled,
},
on: {
'on-change': this.onSelect,
'on-open-change': this.onOpenChange,
},
},
[
this.items.map(item => {
return <i-option value={item.value}>{item.text}</i-option>;
}),
],
),
]}
</div>
);
},
......
......@@ -38,9 +38,10 @@ export const IBizRadio = defineComponent({
items,
valueText,
onSelectValueChange,
c,
};
},
render() {
render(h) {
return (
<div
class={[
......@@ -49,21 +50,34 @@ export const IBizRadio = defineComponent({
this.readonly ? this.ns.m('readonly') : '',
]}
>
{this.readonly ? (
this.valueText
) : (
<i-radio-group
class={this.ns.e('group')}
value={this.value}
on-on-change={this.onSelectValueChange}
>
{this.items.map((_item, index: number) => (
<i-radio key={index} label={_item.value} disabled={this.disabled}>
<span class={this.ns.e('text')}>{_item.text}</span>
</i-radio>
))}
</i-radio-group>
)}
{[
this.readonly && this.valueText,
!this.readonly &&
h(
'IRadioGroup',
{
class: this.ns.e('group'),
props: {
...this.c.customProps,
value: this.value,
},
on: {
'on-change': this.onSelectValueChange,
},
},
[
this.items.map((_item, index: number) => (
<i-radio
key={index}
label={_item.value}
disabled={this.disabled}
>
<span class={this.ns.e('text')}>{_item.text}</span>
</i-radio>
)),
],
),
]}
</div>
);
},
......
......@@ -28,6 +28,18 @@ export const IBizInputNumber = defineComponent({
{ immediate: true },
);
let hiddenupdownbutton = false;
if (c.editorParams) {
if (c.editorParams.hiddenupdownbutton) {
try {
hiddenupdownbutton = JSON.parse(c.editorParams.hiddenupdownbutton);
} catch {
hiddenupdownbutton = false;
}
}
}
const handleChange = (e: number | null) => {
emit('change', e);
};
......@@ -49,35 +61,48 @@ export const IBizInputNumber = defineComponent({
currentVal,
handleChange,
inputRef,
hiddenupdownbutton,
};
},
render() {
render(h) {
return (
<div
class={[
this.ns.b(),
this.disabled ? this.ns.m('disabled') : '',
this.readonly ? this.ns.m('readonly') : '',
this.hiddenupdownbutton ? this.ns.m('hiddenupdownbutton') : '',
]}
>
{this.readonly ? (
this.currentVal
) : (
<i-input-number
ref='inputRef'
value={this.currentVal}
placeholder={this.c.placeHolder}
precision={this.c.model.precision}
disabled={this.disabled}
on-on-change={this.handleChange}
>
{this.c.model.unitName && (
<i class={this.ns.e('unit')} slot='suffix'>
{this.c.model.unitName}
</i>
)}
</i-input-number>
)}
{[
this.readonly && this.currentVal,
!this.readonly &&
h(
'IInputNumber',
{
ref: 'inputRef',
props: {
...this.c.customProps,
value: this.currentVal,
placeholder: this.controller.placeHolder,
precision:
this.c.model.precision === -1
? undefined
: this.c.model.precision,
disabled: this.disabled,
},
on: {
'on-change': this.handleChange,
},
},
[
this.controller.model.unitName &&
h('i', { class: this.ns.e('unit'), slot: 'suffix' }, [
this.controller.model.unitName,
]),
],
),
]}
</div>
);
},
......
......@@ -173,9 +173,10 @@ export const IBizInput = defineComponent({
handleBlur,
inputRef,
autoSize,
c,
};
},
render() {
render(h) {
return (
<div
class={[
......@@ -185,29 +186,39 @@ export const IBizInput = defineComponent({
this.readonly ? this.ns.m('readonly') : '',
]}
>
{this.readonly ? (
this.currentVal
) : (
<i-input
ref='inputRef'
value={this.currentVal}
placeholder={this.controller.placeHolder}
type={this.type}
rows={this.rows}
on-on-change={this.handleChange}
on-on-blur={this.handleBlur}
nativeOnkeyup={this.handleKeyUp}
class={this.ns.b('input')}
disabled={this.disabled}
autosize={this.autoSize}
>
{this.controller.model.unitName && (
<i class={this.ns.e('unit')} slot='suffix'>
{this.controller.model.unitName}
</i>
)}
</i-input>
)}
{[
this.readonly && this.currentVal,
!this.readonly &&
h(
'IInput',
{
ref: 'inputRef',
class: this.ns.b('input'),
props: {
...this.c.customProps,
value: this.currentVal,
placeholder: this.controller.placeHolder,
type: this.type,
rows: this.rows,
disabled: this.disabled,
autosize: this.autoSize,
},
on: {
'on-change': this.handleChange,
'on-blur': this.handleBlur,
},
nativeOn: {
keyup: this.handleKeyUp,
},
},
[
this.controller.model.unitName &&
h('i', { class: this.ns.e('unit'), slot: 'suffix' }, [
this.controller.model.unitName,
]),
],
),
]}
</div>
);
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册