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

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

上级 3ec071e0
......@@ -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.95",
"@ibiz-template/core": "^0.0.1-beta.95",
"@ibiz-template/model": "^0.0.1-beta.95",
"@ibiz-template/runtime": "^0.0.1-beta.95",
"@ibiz-template/service": "^0.0.1-beta.95",
"@ibiz-template/theme": "^0.0.1-beta.95",
"@ibiz-template/vue-util": "^0.0.1-beta.95",
"@ibiz-template/controller": "^0.0.1-beta.96",
"@ibiz-template/core": "^0.0.1-beta.96",
"@ibiz-template/model": "^0.0.1-beta.96",
"@ibiz-template/runtime": "^0.0.1-beta.96",
"@ibiz-template/service": "^0.0.1-beta.96",
"@ibiz-template/theme": "^0.0.1-beta.96",
"@ibiz-template/vue-util": "^0.0.1-beta.96",
"@ibiz/dynamic-model-api": "^2.1.24",
"@riophae/vue-treeselect": "^0.4.0",
"dayjs": "^1.11.7",
......
lockfileVersion: '6.1'
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
......@@ -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.95
version: 0.0.1-beta.95(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(@ibiz-template/runtime@0.0.1-beta.95)(@ibiz-template/service@0.0.1-beta.95)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
specifier: ^0.0.1-beta.96
version: 0.0.1-beta.96(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(@ibiz-template/runtime@0.0.1-beta.96)(@ibiz-template/service@0.0.1-beta.96)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
'@ibiz-template/core':
specifier: ^0.0.1-beta.95
version: 0.0.1-beta.95(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
specifier: ^0.0.1-beta.96
version: 0.0.1-beta.96(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model':
specifier: ^0.0.1-beta.95
version: 0.0.1-beta.95(@ibiz/dynamic-model-api@2.1.24)(lodash-es@4.17.21)(qx-util@0.4.8)
specifier: ^0.0.1-beta.96
version: 0.0.1-beta.96(@ibiz/dynamic-model-api@2.1.24)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/runtime':
specifier: ^0.0.1-beta.95
version: 0.0.1-beta.95(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(@ibiz-template/service@0.0.1-beta.95)(qx-util@0.4.8)
specifier: ^0.0.1-beta.96
version: 0.0.1-beta.96(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(@ibiz-template/service@0.0.1-beta.96)(qx-util@0.4.8)
'@ibiz-template/service':
specifier: ^0.0.1-beta.95
version: 0.0.1-beta.95(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(qx-util@0.4.8)(ramda@0.28.0)
specifier: ^0.0.1-beta.96
version: 0.0.1-beta.96(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/theme':
specifier: ^0.0.1-beta.95
version: 0.0.1-beta.95
specifier: ^0.0.1-beta.96
version: 0.0.1-beta.96
'@ibiz-template/vue-util':
specifier: ^0.0.1-beta.95
version: 0.0.1-beta.95(@ibiz-template/controller@0.0.1-beta.95)(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(@ibiz-template/service@0.0.1-beta.95)(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.96
version: 0.0.1-beta.96(@ibiz-template/controller@0.0.1-beta.96)(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(@ibiz-template/service@0.0.1-beta.96)(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.24
version: 2.1.24(qx-util@0.4.8)
......@@ -939,8 +939,8 @@ packages:
qx-util: 0.4.8
dev: false
/@ibiz-template/controller@0.0.1-beta.95(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(@ibiz-template/runtime@0.0.1-beta.95)(@ibiz-template/service@0.0.1-beta.95)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8):
resolution: {integrity: sha512-ayKN4S9IIQTrciIoSo/yWmWMV8wEh4s0Va3dnC4+C5kenqE7b3Gmy2YVZzyA6ZvO8hR9IhNZUGsEl/5deVYqyg==}
/@ibiz-template/controller@0.0.1-beta.96(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(@ibiz-template/runtime@0.0.1-beta.96)(@ibiz-template/service@0.0.1-beta.96)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8):
resolution: {integrity: sha512-1wxayWzZnT8jYxB5VIGCsITolicNDF28BckKyLCwzACAzLVSDXC4gx5fWtjL6dM9iUhrl8htMnRutFiy6n4YXw==}
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.95(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.95(@ibiz/dynamic-model-api@2.1.24)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/runtime': 0.0.1-beta.95(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(@ibiz-template/service@0.0.1-beta.95)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.95(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/core': 0.0.1-beta.96(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.96(@ibiz/dynamic-model-api@2.1.24)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/runtime': 0.0.1-beta.96(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(@ibiz-template/service@0.0.1-beta.96)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.96(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(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.95(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0):
resolution: {integrity: sha512-/lmB8fRUEyOv7AHTUdqiUMPzl8heHMHEiyLJYNyCyqIiGDMjovQXd30O1IdEq2ebHLifzYoWfOdd/2iI0baZSw==}
/@ibiz-template/core@0.0.1-beta.96(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0):
resolution: {integrity: sha512-WVlAbN3ex+Vpzdz7o6zx+KMsT6gLlSwr2NMmamrmgefTEWDHyjLpmWfw24F/CLJmyvCRuEoNPmD+S1xDF1hxDg==}
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.95(@ibiz/dynamic-model-api@2.1.24)(lodash-es@4.17.21)(qx-util@0.4.8):
resolution: {integrity: sha512-/uiyYekWjXljwsj4C+CEl4iwEd7WLDX3VyVo9GLLW0qgcuYb/soSZxU85hZhcmvIQBVE2eGNYk8sih8v7nWlYA==}
/@ibiz-template/model@0.0.1-beta.96(@ibiz/dynamic-model-api@2.1.24)(lodash-es@4.17.21)(qx-util@0.4.8):
resolution: {integrity: sha512-jD/Xi0XHEHoRKv3aNuhfP63PkiVFkus7DsQvgO4iYk8/YsE9JFo1YJPWExQtCCT8aRFs3TXaXHlNlG61l+VyiQ==}
peerDependencies:
'@ibiz/dynamic-model-api': ^2.1.24
lodash-es: ^4.17.21
......@@ -992,8 +992,8 @@ packages:
qx-util: 0.4.8
dev: false
/@ibiz-template/runtime@0.0.1-beta.95(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(@ibiz-template/service@0.0.1-beta.95)(qx-util@0.4.8):
resolution: {integrity: sha512-lr3JjBFi3nH153UMiMYgHjQP+DidhXlHlMxqKb6mz7vjuniGYQV1Rlg6MJDZC3TTUX504qZQ9r9y4HrFy6xKHQ==}
/@ibiz-template/runtime@0.0.1-beta.96(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(@ibiz-template/service@0.0.1-beta.96)(qx-util@0.4.8):
resolution: {integrity: sha512-n4WdFx5RKJoHSjA7u5ajbmLSSVhGpyvYB5gdsA7SDWN0iwl+ThbH/3EtOscHTthMsYKwNIEzBsQrJeluOkW4pg==}
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.95(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.95(@ibiz/dynamic-model-api@2.1.24)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.95(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/core': 0.0.1-beta.96(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.96(@ibiz/dynamic-model-api@2.1.24)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.96(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(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.95(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(qx-util@0.4.8)(ramda@0.28.0):
resolution: {integrity: sha512-I5ULWcTZIq9IMRON/kFS8Poj4lgWDCZRZGfsJ00FDvg7bsIQN/LLN4gtxQCxUtJJyiTx6UahaLHFl3cMPGvKsQ==}
/@ibiz-template/service@0.0.1-beta.96(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(qx-util@0.4.8)(ramda@0.28.0):
resolution: {integrity: sha512-lCOufqdtplw/DLhe5VofDsZnTLroli8xjkv1N+opFFcQqSDq2n/nw9mTK7HYEMl/6P3YFF+Iefyeo+JQhIQJ3w==}
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.95(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.95(@ibiz/dynamic-model-api@2.1.24)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/core': 0.0.1-beta.96(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.96(@ibiz/dynamic-model-api@2.1.24)(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.95:
resolution: {integrity: sha512-4x/NDwqaLYOMlheeAeCS8y40wka9uK+9TNCG3PlrCs6ODFabhMgfxPOayoMLG0Ye9JUEAjSDQtOxKeDOe1Eq4A==}
/@ibiz-template/theme@0.0.1-beta.96:
resolution: {integrity: sha512-L9cWxQFXvgOQs4phoR83/RY3WXFXxZJ1+z2Ynaq+nwddesL1nkSeBwFZdIbpmmLfEyhWLcHM+y4BGzP2Ny89Ew==}
dev: false
/@ibiz-template/vue-util@0.0.1-beta.95(@ibiz-template/controller@0.0.1-beta.95)(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(@ibiz-template/service@0.0.1-beta.95)(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-YAAgu50mtnCAPvqEsasNGNf60HX92CbxoxrTOgXS0qqdnX4ROQZAvD3nPK0VNkU+HtJTnoD0VqirteaPrhDc6A==}
/@ibiz-template/vue-util@0.0.1-beta.96(@ibiz-template/controller@0.0.1-beta.96)(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(@ibiz-template/service@0.0.1-beta.96)(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-CdaN7E/6/kF8Kd3rohg6821ObH0pz21Wgt7lwurOjgjHH/9i5IVxupslRv3YCbd31KqxHDcn4Y9dPVdsZE5d0A==}
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.95(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(@ibiz-template/runtime@0.0.1-beta.95)(@ibiz-template/service@0.0.1-beta.95)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
'@ibiz-template/core': 0.0.1-beta.95(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.95(@ibiz/dynamic-model-api@2.1.24)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.95(@ibiz-template/core@0.0.1-beta.95)(@ibiz-template/model@0.0.1-beta.95)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/controller': 0.0.1-beta.96(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(@ibiz-template/runtime@0.0.1-beta.96)(@ibiz-template/service@0.0.1-beta.96)(lodash-es@4.17.21)(qs@6.11.1)(qx-util@0.4.8)
'@ibiz-template/core': 0.0.1-beta.96(lodash-es@4.17.21)(qx-util@0.4.8)(ramda@0.28.0)
'@ibiz-template/model': 0.0.1-beta.96(@ibiz/dynamic-model-api@2.1.24)(lodash-es@4.17.21)(qx-util@0.4.8)
'@ibiz-template/service': 0.0.1-beta.96(@ibiz-template/core@0.0.1-beta.96)(@ibiz-template/model@0.0.1-beta.96)(qx-util@0.4.8)(ramda@0.28.0)
qs: 6.11.1
qx-util: 0.4.8
ramda: 0.28.0
......
......@@ -104,6 +104,7 @@ import {
IBizPickerDropDown,
IBizRadio,
IBizSpan,
IBizSpanLink,
NotSupportedEditor,
IBizGridInput,
IBizGridCheckbox,
......@@ -204,6 +205,7 @@ export const AppRegister = {
// 注册编辑器组件
v.component('GridEditor', GridEditor);
v.component('IBizSpan', IBizSpan);
v.component('IBizSpanLink', IBizSpanLink);
v.component('IBizInput', IBizInput);
v.component('IBizInputNumber', IBizInputNumber);
v.component('IBizCheckbox', IBizCheckbox);
......
import { ref, defineComponent, Ref, watch, computed } from 'vue';
import { getSpanProps, useNamespace } from '@ibiz-template/vue-util';
import dayjs from 'dayjs';
import '@ibiz-template/theme/style/components/editor/ibiz-span-link/ibiz-span-link.scss';
import { CodeListItem } from '@ibiz-template/service';
export const IBizSpanLink = defineComponent({
name: 'IBizSpanLink',
props: getSpanProps(),
setup(props) {
const ns = useNamespace('span-link');
const c = props.controller;
const text: Ref<string> = ref('');
const codeList = c.model.codeList;
// 值分隔符
let valueSeparator = ',';
if (codeList && codeList.valueSeparator) {
valueSeparator = codeList.valueSeparator;
}
watch(
() => props.value,
(newVal, oldVal) => {
if (newVal !== oldVal) {
if (newVal == null) {
text.value = '';
return;
}
if (c.valueFormat) {
text.value = dayjs(newVal).format(c.valueFormat);
} else {
text.value = `${newVal}`;
}
if (c.unitName) {
text.value += c.unitName;
}
}
},
{
immediate: true,
},
);
// 代码表数据
const items = ref<readonly CodeListItem[]>([]);
if (codeList) {
watch(
() => props.data,
newVal => {
c.loadCodeList(newVal).then(_codeList => {
items.value = _codeList;
});
},
{
immediate: true,
deep: true,
},
);
}
/** 代码表转换后文本 */
const codeListText = computed(() => {
if (!codeList || !props.value || items.value.length === 0) {
return undefined;
}
if (codeList.codeItemValueNumber) {
return items.value.find(item => item.value === props.value);
}
const values = (props.value as string).split(valueSeparator);
const selects = items.value.filter(item =>
values.includes(item.value as string & Number),
);
return selects.map(item => item.text).join(valueSeparator);
});
const openLinkView = async () => {
await c.openLinkView(props.data);
};
return {
ns,
text,
codeListText,
openLinkView,
};
},
render() {
let text = '';
if (this.codeListText != null) {
text = this.codeListText as string;
} else if (this.text != null) {
text = this.text;
}
return (
<span
class={[
this.ns.b(),
this.disabled ? this.ns.m('disabled') : '',
this.readonly ? this.ns.m('readonly') : '',
]}
>
<a onClick={this.openLinkView}>{text}</a>
</span>
);
},
});
export { IBizSpan } from './ibiz-span/ibiz-span';
export { IBizGridSpan } from './ibiz-grid-span/ibiz-grid-span';
export { IBizSpanLink } from './ibiz-span-link/ibiz-span-link';
......@@ -21,6 +21,7 @@ export function presetEditorProvider(): void {
}
// 标签
editorRegister.register('SPAN', new SpanEditorProvider());
editorRegister.register('SPAN_LINK', new SpanEditorProvider('SPAN_LINK'));
// 输入框
const textBoxEditorProvider = new TextBoxEditorProvider();
......
......@@ -19,6 +19,13 @@ export class SpanEditorProvider implements IEditorProvider {
gridEditor: string = 'IBizGridSpan';
constructor(editorType?: string) {
if (editorType === 'SPAN_LINK') {
this.formEditor = 'IBizSpanLink';
this.gridEditor = 'IBizSpanLink';
}
}
async createController(
editorModel: SpanEditorModel,
parentController: FormItemController | GridEditItemController,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册