提交 96a5050e 编写于 作者: sq3536's avatar sq3536

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	modules/ibizlab-generator-core/src/main/resources/templ/r7/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/service/impl/{{entities@SQL}}ServiceImpl.java.hbs
<IbizAutoComplete
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
:data="state.data"
{{#if item.valueItemName}}
valueItem="{{item.valueItemName}}"
{{/if}}
{{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.placeHolder}}"
{{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
{{#if item.psEditor.psNavigateContexts}}
localContext="{{item.psEditor.psNavigateContexts}}"
{{/if}}
{{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}"
{{/if}}
{{#if item.psEditor.psAppDataEntity}}
{{!-- deMajorField="getDeMajorField({{item.psEditor.psAppDataEntity.codeName}})" --}}
{{!-- deKeyField="{{item.psEditor.psAppDataEntity.codeName}}" --}}
{{/if}}
{{!-- :acParams="getAcParams({{item.psEditor}})" --}}
{{#if item.psEditor.editorParams.sort}}
sort="{{item.psEditor.editorParams.sort}}"
{{/if}}
{{#if item.psEditor.editorParams.open}}
:open="{{item.psEditor.editorParams.open}}"
{{/if}}
{{#if item.psEditor.disabled}}
disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.editorParams.multiple}}
:multiple="{{item.psEditor.editorParams.multiple}}"
{{/if}}
@editorEvent="handleEditorEvent"/>
<IbizCheckboxList
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
:data="state.data"
{{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.isReadOnly}}
:readonly="{{item.psEditor.isReadOnly}}"
{{/if}}
{{#if item.psEditor.codeList}}
codeListTag="{{item.psEditor.codeList.codeListTag}}"
codeListType="{{item.psEditor.codeList.codeListType}}"
valueSeparator="{{item.psEditor.codeList.valueSeparator}}"
{{/if}}
{{#if item.psEditor.psNavigateContexts}}
localContext="{{item.psEditor.psNavigateContexts}}"
{{/if}}
{{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}"
{{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
@editorEvent="handleEditorEvent"/>
<IbizCheckbox
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
{{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.isReadOnly}}
:readonly="{{item.psEditor.isReadOnly}}"
{{/if}}
@editorEvent="handleEditorEvent"/>
<IbizDataPicker
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
:data="state.data"
{{#if item.valueItemName}}
valueItem="{{item.valueItemName}}"
{{/if}}
{{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.placeHolder}}"
{{/if}}
{{#if item.psEditor.disabled}}
disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.psNavigateContexts}}
localContext="{{item.psEditor.psNavigateContexts}}"
{{/if}}
{{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}"
{{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
{{#if item.psEditor.psAppDataEntity}}
deMajorField="{{item.psEditor.psAppDataEntity.majorPSAppDEField.codename}}"
deKeyField="{{item.psEditor.psAppDataEntity.codeName}}"
{{/if}}
{{!-- :pickupView="getPickupView({{item.psEditor}})" --}}
{{!-- :linkView="getLinkView({{item.psEditor}})" --}}
{{!-- :acParams="getAcParams({{item.psEditor}})" --}}
{{#if item.psEditor.psAppDEACMode.minorSortDir}}
sort="{{item.psEditor.psAppDEACMode.minorSortDir}}"
{{/if}}
{{#if item.psEditor.pickUpData}}
pickUpData="{{item.psEditor.pickUpData}}"
{{/if}}
@editorEvent="handleEditorEvent"/>
<IbizDatePicker
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
{{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.placeHolder}}"
{{/if}}
{{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{/if}}
{{#eq item.psEditor.editorType "DATEPICKEREX"}}
valueFormat="yyyy-MM-dd HH:mm:ss"
picker="date"
mode="date"
{{/eq}}
{{#eq item.psEditor.editorType "DATEPICKEREX_NOTIME"}}
valueFormat="yyyy-MM-dd"
picker="date"
mode="date"
{{/eq}}
{{#eq item.psEditor.editorType "DATEPICKER"}}
valueFormat="yyyy-MM-dd HH:mm:ss"
picker="date"
mode="time"
{{/eq}}
{{#eq item.psEditor.editorType "DATEPICKEREX_HOUR"}}
valueFormat="yyyy-MM-dd HH"
picker="date"
mode="time"
{{/eq}}
{{#eq item.psEditor.editorType "DATEPICKEREX_MINUTE"}}
valueFormat="yyyy-MM-dd HH:mm"
picker="time"
mode="date"
{{/eq}}
{{#eq item.psEditor.editorType "DATEPICKEREX_SECOND"}}
valueFormat="yyyy-MM-dd HH:mm:ss"
picker="time"
mode="date"
{{/eq}}
{{#eq item.psEditor.editorType "DATEPICKEREX_NODAY"}}
valueFormat="HH:mm:ss"
picker="date"
mode="date"
{{/eq}}
{{#eq item.psEditor.editorType "DATEPICKEREX_NODAY_NOSECOND"}}
valueFormat="HH:mm"
picker="date"
mode="date"
{{/eq}}
{{#eq item.psEditor.editorType "DATEPICKEREX_NOSECOND"}}
valueFormat="yyyy-MM-dd HH:mm"
picker="date"
mode="date"
{{/eq}}
@editorEvent="handleEditorEvent"/>
......@@ -7,21 +7,24 @@
codeListType="{{item.psEditor.codeList.codeListType}}"
valueSeparator="{{item.psEditor.codeList.valueSeparator}}"
{{/if}}
{{#if item.psEditor.getPlaceHolder}}
placeholder="{{item.psEditor.getPlaceHolder}}"
{{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.placeHolder}}"
{{/if}}
{{#if item.psEditor.disabled}}
disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.getEditorParams.multiple}}
:multiple="{{item.psEditor.getEditorParams.multiple}}"
{{#if item.psEditor.editorParams.multiple}}
:multiple="{{item.psEditor.editorParams.multiple}}"
{{/if}}
{{#if item.psEditor.getPSNavigateContexts}}
localContext="{{item.psEditor.getPSNavigateContexts}}"
{{#if item.psEditor.psNavigateContexts}}
localContext="{{item.psEditor.psNavigateContexts}}"
{{/if}}
{{#if item.psEditor.getPSNavigateParams}}
localParam="{{item.psEditor.getPSNavigateParams}}"
{{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}"
{{/if}}
{{#eq item.psEditor.editorType "MDROPDOWNLIST"}}
:multiple="true"
{{/eq}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
@editorEvent="handleEditorEvent"/>
{{#*inline "AC"}}{{>@macro/editor/auto-complete.hbs}}{{/inline}}
{{#*inline "AC_FS"}}{{>@macro/editor/auto-complete.hbs}}{{/inline}}
{{#*inline "AC_NOBUTTON"}}{{>@macro/editor/auto-complete.hbs}}{{/inline}}
{{#*inline "AC_FS_NOBUTTON"}}{{>@macro/editor/auto-complete.hbs}}{{/inline}}
{{#*inline "CHECKBOXLIST"}}{{>@macro/editor/checkbox-list.hbs}}{{/inline}}
{{#*inline "CHECKBOX"}}{{>@macro/editor/checkbox.hbs}}{{/inline}}
{{#*inline "LISTBOXPICKUP"}}{{>@macro/editor/checkbox-list.hbs}}{{/inline}}
{{#*inline "LISTBOX"}}{{>@macro/editor/checkbox-list.hbs}}{{/inline}}
{{#*inline "PICKEREX_LINKONLY"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
{{#*inline "PICKER"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
{{#*inline "PICKEREX_NOBUTTON"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
{{#*inline "PICKEREX_NOAC_LINK"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
{{#*inline "PICKEREX_TRIGGER_LINK"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
{{#*inline "PICKEREX_TRIGGER"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
{{#*inline "PICKEREX_NOAC"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
{{#*inline "PICKEREX_LINK"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
{{#*inline "PICKEREX_DROPDOWNVIEW"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
{{#*inline "PICKEREX_DROPDOWNVIEW_LINK"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
{{#*inline "DATEPICKEREX"}}{{>@macro/editor/date-picker.hbs}}{{/inline}}
{{#*inline "DATEPICKEREX_NOTIME"}}{{>@macro/editor/date-picker.hbs}}{{/inline}}
{{#*inline "DATEPICKER"}}{{>@macro/editor/date-picker.hbs}}{{/inline}}
{{#*inline "DATEPICKEREX_HOUR"}}{{>@macro/editor/date-picker.hbs}}{{/inline}}
{{#*inline "DATEPICKEREX_MINUTE"}}{{>@macro/editor/date-picker.hbs}}{{/inline}}
{{#*inline "DATEPICKEREX_SECOND"}}{{>@macro/editor/date-picker.hbs}}{{/inline}}
{{#*inline "DATEPICKEREX_NODAY"}}{{>@macro/editor/date-picker.hbs}}{{/inline}}
{{#*inline "DATEPICKEREX_NODAY_NOSECOND"}}{{>@macro/editor/date-picker.hbs}}{{/inline}}
{{#*inline "DROPDOWNLIST"}}{{>@macro/editor/dropdown-list.hbs}}{{/inline}}
{{#*inline "DROPDOWNLIST_100"}}{{>@macro/editor/dropdown-list.hbs}}{{/inline}}
{{#*inline "MDROPDOWNLIST"}}{{>@macro/editor/dropdown-list.hbs}}{{/inline}}
{{#*inline "IPADDRESSTEXTBOX"}}{{>@macro/editor/input-ip.hbs}}{{/inline}}
{{#*inline "TEXTBOX"}}{{>@macro/editor/input.hbs}}{{/inline}}
{{#*inline "NUMBER"}}{{>@macro/editor/input.hbs}}{{/inline}}
{{#*inline "PASSWORD"}}{{>@macro/editor/input.hbs}}{{/inline}}
{{#*inline "TEXTAREA"}}{{>@macro/editor/input.hbs}}{{/inline}}
{{#*inline "TEXTAREA_10"}}{{>@macro/editor/input.hbs}}{{/inline}}
{{#*inline "RADIOBUTTONLIST"}}{{>@macro/editor/radio-group.hbs}}{{/inline}}
{{#*inline "RATING"}}{{>@macro/editor/rating.hbs}}{{/inline}}
{{#*inline "RAW"}}{{>@macro/editor/raw.hbs}}{{/inline}}
{{#*inline "SLIDER"}}{{>@macro/editor/slider.hbs}}{{/inline}}
{{#*inline "SPAN"}}{{>@macro/editor/span.hbs}}{{/inline}}
{{#*inline "DROPDOWNLIST"}}{{>@macro/editor/dropdown-list.hbs}}{{/inline}}
\ No newline at end of file
{{#*inline "STEPPER"}}{{>@macro/editor/stepper.hbs}}{{/inline}}
{{#*inline "SWITCH"}}{{>@macro/editor/switch.hbs}}{{/inline}}
{{#*inline "FILEUPLOADER"}}{{>@macro/editor/upload.hbs}}{{/inline}}
{{#*inline "FILEUPLOADER_ONE"}}{{>@macro/editor/upload.hbs}}{{/inline}}
{{#*inline "PICTURE"}}{{>@macro/editor/upload.hbs}}{{/inline}}
{{#*inline "PICTURE_ONE"}}{{>@macro/editor/upload.hbs}}{{/inline}}
\ No newline at end of file
<IbizInputIp
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
{{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{/if}}
@editorEvent="handleEditorEvent"/>
<IbizInput
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
{{#if item.psEditor.getPlaceHolder}}
placeholder="{{item.psEditor.getPlaceHolder}}"
{{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.placeHolder}}"
{{/if}}
{{#if item.psEditor.disabled}}
disabled="{{item.psEditor.disabled}}"
:disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.isReadOnly}}
:readonly="{{item.psEditor.isReadOnly}}"
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.getEditorParams.max}}
:max="{{item.psEditor.getEditorParams.max}}"
{{#if item.psEditor.editorParams.max}}
:max="{{item.psEditor.editorParams.max}}"
{{/if}}
{{#if item.psEditor.getEditorParams.min}}
:max="{{item.psEditor.getEditorParams.min}}"
{{#if item.psEditor.editorParams.min}}
:max="{{item.psEditor.editorParams.min}}"
{{/if}}
{{#if item.psEditor.getEditorParams.precision}}
:precision="{{item.psEditor.getEditorParams.precision}}"
{{#if item.psEditor.editorParams.precision}}
:precision="{{item.psEditor.editorParams.precision}}"
{{/if}}
{{#if item.psEditor.getEditorParams.maxLength}}
{{#if item.psEditor.maxLength}}
:maxLength="{{item.psEditor.maxLength}}"
{{/if}}
{{#if item.psEditor.showMaxLength}}
:showMaxLength="{{item.psEditor.showMaxLength}}"
{{/if}}
{{#eq item.psEditor.editorType "TEXTBOX"}}
type="text"
{{/eq}}
......
<IbizRadioGroup
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
:data="state.data"
{{#if item.psEditor.codeList}}
codeListTag="{{item.psEditor.codeList.codeListTag}}"
codeListType="{{item.psEditor.codeList.codeListType}}"
valueSeparator="{{item.psEditor.codeList.valueSeparator}}"
{{/if}}
{{#if item.psEditor.disabled}}
disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.isReadOnly}}
:readonly="{{item.psEditor.isReadOnly}}"
{{/if}}
{{#if item.psEditor.psNavigateContexts}}
localContext="{{item.psEditor.psNavigateContexts}}"
{{/if}}
{{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}"
{{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
@editorEvent="handleEditorEvent"/>
\ No newline at end of file
<IbizRating
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
{{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.editorParams.max}}
:max="{{item.psEditor.editorParams.max}}"
{{/if}}
{{#if item.psEditor.editorParams.allowHalf}}
:allowHalf="{{item.psEditor.editorParams.allowHalf}}"
{{/if}}
@editorEvent="handleEditorEvent"/>
<IbizRaw
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
:date="state.data"
{{#if item.psEditor.editorParams.contentType}}
:contentType="{{item.psEditor.editorParams.contentType}}"
{{/if}}
{{#if item.psEditor.editorParams.icon}}
icon="{{item.psEditor.editorParams.icon}}"
{{/if}}
{{#if item.psEditor.editorParams.caption}}
caption="{{item.psEditor.editorParams.caption}}"
{{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
@editorEvent="handleEditorEvent"/>
<IbizSlider
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
:date="state.data"
{{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.stepValue}}
:step="{{item.psEditor.stepValue}}"
{{/if}}
{{#if item.psEditor.editorParams.min}}
:min="{{item.psEditor.editorParams.min}}"
{{/if}}
{{#if item.psEditor.editorParams.max}}
:max="{{item.psEditor.editorParams.max}}"
{{/if}}
@editorEvent="handleEditorEvent"/>
......@@ -8,20 +8,20 @@
{{#if item.getDataType}}
dataType="{{item.getDataType}}"
{{/if}}
{{#if item.psEditor.getEditorParams.unitName}}
unitName="{{item.psEditor.getEditorParams.unitName}}"
{{#if item.psEditor.editorParams.unitName}}
unitName="{{item.psEditor.editorParams.unitName}}"
{{/if}}
{{#if item.psEditor.getEditorParams.valueFormat}}
valueFormat="{{item.psEditor.getEditorParams.valueFormat}}"
{{#if item.psEditor.editorParams.valueFormat}}
valueFormat="{{item.psEditor.editorParams.valueFormat}}"
{{/if}}
{{#if item.psEditor.getPrecision}}
:precision="{{item.psEditor.getPrecision}}"
{{#if item.psEditor.precision}}
:precision="{{item.psEditor.precision}}"
{{/if}}
{{#if item.psEditor.getPSNavigateContexts}}
localContext="{{item.psEditor.getPSNavigateContexts}}"
{{#if item.psEditor.psNavigateContexts}}
localContext="{{item.psEditor.psNavigateContexts}}"
{{/if}}
{{#if item.psEditor.getPSNavigateParams}}
localParam="{{item.psEditor.getPSNavigateParams}}"
{{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}"
{{/if}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"/>
<IbizStepper
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
{{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.editorParams.precision}}
:precision="{{item.psEditor.editorParams.precision}}"
{{/if}}
{{#if item.psEditor.stepValue}}
:step="{{item.psEditor.stepValue}}"
{{/if}}
{{#if item.psEditor.editorParams.min}}
:min="{{item.psEditor.editorParams.min}}"
{{/if}}
{{#if item.psEditor.editorParams.max}}
:max="{{item.psEditor.editorParams.max}}"
{{/if}}
@editorEvent="handleEditorEvent"/>
<IbizSwitch
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
{{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.isReadOnly}}
:readonly="{{item.psEditor.isReadOnly}}"
{{/if}}
{{#if item.psEditor.editorParams.size}}
size="{{item.psEditor.editorParams.size}}"
{{/if}}
@editorEvent="handleEditorEvent"/>
<IbizUpload
name="{{item.codeName}}"
:value="state.data.{{item.psEditor.name}}"
{{#if item.psEditor.editorParams.method}}
method="{{item.psEditor.editorParams.method}}"
{{/if}}
{{#if item.psEditor.editorParams.multiple}}
multiple="{{item.psEditor.editorParams.multiple}}"
{{/if}}
{{#if item.psEditor.editorParams.showUploadList}}
:showUploadList="{{item.psEditor.editorParams.showUploadList}}"
{{/if}}
{{#if item.psEditor.editorParams.tooltip}}
tooltip="{{item.psEditor.editorParams.tooltip}}"
{{/if}}
{{#if item.psEditor.disabled}}
:disabled="{{item.psEditor.disabled}}"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
{{/if}}
{{#if item.psEditor.maxFileCount}}
:limit="{{item.psEditor.maxFileCount}}"
{{/if}}
{{#eq item.psEditor.editorType "PICTURE"}}
accept='image/*'
listType="picture-card"
{{/eq}}
{{#eq item.psEditor.editorType "PICTURE_ONE"}}
accept='image/*'
listType="picture-card"
{{/eq}}
@editorEvent="handleEditorEvent"/>
{
title: "{{item.caption}}",
{{#neq lastColumn true}}
{{#if item.widthUnit 'PX'}}
width: "{{item.width}}px",
width: {{item.width}},
{{else}}
minWidth: "{{item.width}}px",
minWidth: {{item.width}},
{{/if}}
resizable: true,
{{/neq}}
{{#eq item.columnType 'GROUPGRIDCOLUMN'}}
children: [
{{#each item.pSDEGridColumns as | column |}}
......@@ -13,5 +16,6 @@
],
{{else}}
dataIndex: "{{item.codeName}}",
ellipsis: true,
{{/eq}}
},
{{#neq item.columnType 'GROUPGRIDCOLUMN'}}
<div v-if="column.dataIndex === '{{item.codeName}}'" class="table-cell">
{{!-- 数据列 --}}
{{#eq item.columnType 'DEFGRIDCOLUMN'}}
{{!-- 是否可编辑 --}}
{{#if ctrl.enableRowEdit . item.enableRowEdit}}
{{#if item.enableRowEdit}}
<div v-if="state.rowEditState" class="editor-cell">
{{#each ctrl.pSDEGridEditItems as | editColumn | }}
{{#eq editColumn.codeName . item.codeName}}
......@@ -14,11 +13,11 @@
{{/each}}
</div>
<div v-else class="text-cell">
\{{text}}
<span class="text">\{{text}}</span>
</div>
{{else}}
<div class="text-cell">
\{{text}}
<span class="text">\{{text}}</span>
</div>
{{/if}}
{{/eq}}
......@@ -30,3 +29,4 @@
:viewParams="state.viewParams"/> --}}
{{/eq}}
</div>
{{/neq}}
{{#eq item.columnType 'GROUPGRIDCOLUMN'}}
{{#each item.pSDEGridColumns as | column |}}
{{>(lookup 'SUMMARYCOLUMN') item=column ctrl=ctrl}}
{{/each}}
{{else}}
<a-table-summary-cell>\{{state.dataAgg}}</a-table-summary-cell>
{{/eq}}
{{#*inline "COLUMN"}}{{>@macro/grid-detail/grid-column.hbs}}{{/inline}}
{{#*inline "COLUMNMODEL"}}{{>@macro/grid-detail/grid-column-model.hbs}}{{/inline}}
{{#*inline "SUMMARYCOLUMN"}}{{>@macro/grid-detail/grid-summary-column.hbs}}{{/inline}}
\ No newline at end of file
......@@ -16,11 +16,6 @@ interface AutoCompleteProps {
*/
name: string;
/**
* @description 值项
*/
valueItem: string;
/**
* @description 占位提示信息
*/
......@@ -56,16 +51,6 @@ interface AutoCompleteProps {
*/
deKeyField?: string;
/**
* @description 选择视图
*/
pickUpView?: IParam;
/**
* @description 链接视图
*/
linkView?: IParam;
/**
* @description ac参数
*/
......@@ -77,14 +62,14 @@ interface AutoCompleteProps {
sort?: string;
/**
* @description 是否展开下拉框
* @description 外键值附加数据
*/
open: boolean;
pickUpData?: string;
/**
* @description 外键值附加数据
* @description 是否默认展开
*/
pickUpData?: string;
defaultOpen: boolean;
/**
* @description 禁用
......@@ -105,7 +90,7 @@ const props = withDefaults(defineProps<AutoCompleteProps>(), {
disabled: false,
readonly: false,
showButton: true,
open: true,
defaultOpen: true,
});
const emit = defineEmits<EditorEmit>();
const { navContext, navViewParam } = handleEditorNavParams(props);
......@@ -144,7 +129,7 @@ const onSearch = (value: string) => {
};
const filterOption= (inputValue: string,option: IParam) => {
return option[props.deMajorField].includes(inputValue);
return option[props.deMajorField].toUpperCase().indexOf(inputValue.toUpperCase()) >= 0;
}
const onSelect = (value: any) => {
......@@ -156,11 +141,6 @@ const onSelect = (value: any) => {
action: "valueChange",
data: selectItem[props.deMajorField],
});
emit("editorEvent", {
tag: props.valueItem,
action: "valueChange",
data: selectItem[props.deKeyField],
});
}
</script>
......@@ -169,15 +149,16 @@ const onSelect = (value: any) => {
<a-auto-complete
:class="['app-editor-container', `app-auto-complete-${name}`]"
:allowClear="true"
:value="value"
v-model:value="value"
:placeholder="placeholder"
:options="items"
:filterOption="filterOption"
:disabled="disabled || readonly"
@search="onSearch"
:defaultOpen="true"
>
<template #option="{ srfmajortext: caption,srfkey: value }">
<div @click="onSelect(value)">{{caption}}</div>
<div @click="onSelect(value)">\{{caption}}</div>
</template>
</a-auto-complete>
</template>
......
......@@ -73,10 +73,11 @@ const onChange = ($event: any) => {
<div :class="['app-editor-container',`app-input-${name}`]">
<a-input
allowClear
v-if="Object.is('text', type)"
v-if="Object.is('text', type) || Object.is('number', type)"
v-model:value="value"
:disabled="disabled"
:maxlength="maxLength"
:type="type"
@blur="onChange"
:placeholder="showMaxLength ? `最大内容长度为${maxLength}` : placeholder" />
<a-input-password
......@@ -87,22 +88,12 @@ const onChange = ($event: any) => {
:placeholder="placeholder"/>
<a-textarea
showCount
allowClear
v-if="Object.is('textarea', type)"
v-model:value="value"
:disabled="disabled"
:maxlength="maxLength"
@blur="onChange"
:placeholder="placeholder"/>
<a-input-number
v-if="Object.is('number', type)"
v-model:value="value"
:max="max"
:min="min"
:disabled="disabled"
:precision="precision"
@blur="onChange"
:placeholder="placeholder"/>
</div>
</template>
......
......@@ -33,15 +33,7 @@ interface RawProps {
* @type {string}
* @memberof AppRawItem
*/
imageClass?: string;
/**
* 图片
*
* @type {string}
* @memberof AppRawItem
*/
imgUrl?: string;
icon?: string;
/**
* 标题
......@@ -96,8 +88,8 @@ onBeforeMount(() => {
</div>
<div v-else-if="Object.is(contentType, 'HTML')" v-html="content" />
<div v-else-if="Object.is(contentType, 'IMAGE')">
<img v-if="imgUrl" :src="imgUrl" />
<a-icon v-else :type="imageClass || ''" />
<img v-if="value" :src="value" />
<a-icon v-else :type="icon || ''" />
</div>
</div>
</template>
......
......@@ -133,7 +133,7 @@ onBeforeMount(() => {
<template>
<div :class="['app-editor-container', `app-span-${name}`]">
<span></span>
<span>{{text}}</span>
</div>
</template>
......
<script setup lang="ts">
import { getDownloadUrl, getRequestingHeader, getUploadUrl, IActionParam, IParam } from "@ibiz-core";
import { UploadOutlined, PlusOutlined } from '@ant-design/icons-vue';
import { ref, Ref } from "vue";
interface UploadProps {
/**
......@@ -45,12 +46,26 @@ interface UploadProps {
*/
showUploadList: boolean;
/**
* 最大文件数
*
* @type {boolean}
*/
limit: number;
/**
* 文件列表样式
*
* @type {boolean}
*/
listType: string;
/**
* 按钮提示信息
*
* @type {boolean}
*/
Tooltip: string;
tooltip: string;
/**
* 只读模式
......@@ -75,9 +90,12 @@ const props = withDefaults(defineProps<UploadProps>(), {
disabled: false,
readonly: false,
method: 'post',
multiple: true,
multiple: false,
showUploadList: true,
Tooltip: '点击上传'
tooltip: '点击上传',
accept:"*",
limit: 999,
listType: 'text',
});
const emit = defineEmits<EditorEmit>();
const uploadUrl = getUploadUrl();
......@@ -86,12 +104,14 @@ const headers = getRequestingHeader();
const fileList: Ref<IParam[]> = ref([])
const previewFile = (file: IParam) => {
//todo
}
const onChange = (value: number) => {
const onChange = ($event: any) => {
fileList.value = $event.fileList;
emit("editorEvent", {
tag: props.name,
action: "valueChange",
data: value,
data: $event,
});
};
</script>
......@@ -99,19 +119,26 @@ const onChange = (value: number) => {
<template>
<div :class="['app-editor-container', `app-upload-${name}`]">
<a-upload
v-model:fileList="fileList"
:class="{'ant-upload--limit': fileList.length == limit}"
:action="uploadUrl"
:method="method"
v-model:fileList="fileList"
:accept="accept"
:headers="headers"
:multiple="multiple"
:previewFile="previewFile"
:showUploadList="showUploadList"
:list-type="listType"
:disabled="disabled || readonly"
@change="onChange">
<a-button>
<a-button v-if="Object.is(listType,'text')">
<upload-outlined></upload-outlined>
{{Tooltip}}
\{{tooltip}}
</a-button>
<div v-else>
<plus-outlined />
<div class="ant-upload-text">\{{tooltip}}</div>
</div>
</a-upload>
</div>
</template>
......@@ -120,5 +147,13 @@ const onChange = (value: number) => {
.app-editor-container {
width: 100%;
height: 100%;
text-align: left;
}
.app-editor-container .ant-upload--limit .ant-upload-select-picture-card {
display: none;
}
.ant-upload-select-picture-card .ant-upload-text {
margin-top: 8px;
color: #666;
}
</style>
......@@ -13,7 +13,7 @@ interface toolbarEmit {
}
const props = withDefaults(defineProps<ToolbarProps>(), {});
const emit = defineEmits<toolbarEmit>();
const items: Ref<IParam[]> = ref(props.toolbarModel.items || []);
const items: Ref<IParam[]> = ref(props.toolbarModel?.items || []);
const { context, viewParams } = useContextParams(props);
const getItemClass = (item: IParam) => {
//todo 样式表
......
......@@ -70,4 +70,74 @@ export interface GridControlState extends MainControlState {
* @memberof GridControlState
*/
selectFirstDefault: boolean;
/**
* @description 数据总条数
* @type {number}
* @memberof GridControlState
*/
total: number;
/**
* @description 是否启用分页
* @type {boolean}
* @memberof GridControlState
*/
enablePagingBar: boolean;
/**
* @description 数据聚合
* @type {IParam}
* @memberof GridControlState
*/
dataAgg: IParam;
/**
* @description 聚合模式
* @type {string}
* @memberof GridControlState
*/
aggMode: string;
/**
* @description 分组模式
* @type {string}
* @memberof GridControlState
*/
groupMode: string;
/**
* @description 分组属性
* @type {string}
* @memberof GridControlState
*/
groupField: string;
/**
* @description 分组代码表
* @type {*}
* @memberof GridControlState
*/
groupCodeList: any;
/**
* @description 禁用排序
* @type {boolean}
* @memberof GridControlState
*/
noSort: boolean;
/**
* @description 排序方向
* @type {string}
* @memberof GridControlState
*/
minorSortDir: string;
/**
* @description 排序属性
* @type {string}
* @memberof GridControlState
*/
minorSortPSDEF: string;
}
{{>@macro/grid-detail/include-grid.hbs}}
import { IParam } from '@ibiz-core';
export const CtrlConfig = {
controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}',
controlCodeName: "{{ctrl.codeName}}",
controlName: "{{ctrl.name}}",
items: [],
total: 0,
aggMode: "{{ctrl.aggMode}}",
groupMode: "{{ctrl.groupMode}}",
groupField: "{{ctrl.groupPSAppDEField.codeName}}",
{{#if ctrl.groupPSCodeList}}
groupCodeList: {
codeListTag: "{{ctrl.groupPSCodeList.codeName}}",
codeListType: "{{ctrl.groupPSCodeList.codeListType}}",
},
{{/if}}
{{#if ctrl.noSort}}
noSort: true,
{{else}}
noSort: false,
minorSortDir: "{{#if ctrl.minorSortDir}}{{ctrl.minorSortDir}}{{else}}ASC{{/if}}",
minorSortPSDEF: "{{ctrl.minorSortPSAppDEField.codeName}}",
{{/if}}
{{#if ctrl.enablePagingBar}}
enablePagingBar: true,
pagination: {
position: ['bottomRight'],
defaultPageSize: {{ctrl.pagingSize}},
showQuickJumper: true,
showTotal: (total: number, range: IParam[]) => `${range[0]}-${range[1]} of ${total} items`,
pageSizeOptions: ['10','20','50','100'],
},
{{else}}
enablePagingBar: false,
pagination: false,
{{/if}}
columnsModel: [
{{#each ctrl.pSDEGridColumns as | column |}}
{{>(lookup 'COLUMNMODEL') item=column}}
{{#if @last}}
{{>(lookup 'COLUMNMODEL') item=column lastColumn=true}}
{{else}}
{{>(lookup 'COLUMNMODEL') item=column lastColumn=false}}
{{/if}}
{{/each}}
]
};
\ No newline at end of file
......@@ -36,26 +36,63 @@ const emit = defineEmits<CtrlEmit>();
// 安装功能模块,提供状态和能力方法
const { state, handleEditorEvent } = new GridControl(CtrlConfig).moduleInstall(props);
// 表格滚动条配置
const gridScrollOption = computed(() => {
return {
scrollToFirstRowOnChange: true,
x: '100%',
y: '690px',
}
});
// 表格行样式(斑马纹)
const rowClassName = (record: IParam, index: number) => {
return index % 2 === 1 ? 'table-striped' : null;
}
// 表格选择功能配置
const rowSelection = computed(() => {
const rowSelectionOption = computed(() => {
return {
columnWidth: {{#neq ctrl.aggMode 'NONE'}}90{{else}}50{{/neq}},
onChange: (selectedRowKeys: string[], selectedRows: IParam[]) => {
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
},
getCheckboxProps: (record: IParam) => ({
}),
};
});
// 处理拖动列
const handleResizeColumn = (width: number, column: IParam) => {
column.width = width;
}
// 处理表格变化(分页,过滤,排序)
const handleChange = (pagination: IParam, filters: IParam, sorter: IParam, data: IParam) => {
const { current, pageSize } = pagination;
const { currentDataSource } = data;
console.log(pagination, filters, sorter, currentDataSource);
}
const data = [];
for (let i = 0; i < 100; i++) {
data.push({
key: i,
name: `Edrward ${i}`,
age: 32,
address: `London Park no. ${i}`,
});
}
</script>
<template>
<a-table
bordered
class="ibiz-grid"
:showHeader="{{#if ctrl.hideHeader}}false{{else}}true{{/if}}"
:data-source="state.items"
:row-selection="rowSelection"
:columns="state.columnsModel">
:scroll="gridScrollOption"
:sortDirections="['ascend', 'descend']"
:data-source="data"
:row-selection="rowSelectionOption"
:columns="state.columnsModel"
:pagination="state.pagination"
:rowClassName="rowClassName"
@change="handleChange"
@resizeColumn="handleResizeColumn">
<template #emptyText>
<div class="not-data">
<span class="empty-text">
......@@ -73,10 +110,23 @@ const rowSelection = computed(() => {
{{>(lookup 'COLUMN') item=column ctrl=ctrl}}
{{/each}}
</template>
{{#neq ctrl.aggMode 'NONE'}}
<template #summary>
<a-table-summary-row>
<a-table-summary-cell>数据聚合</a-table-summary-cell>
{{#each ctrl.pSDEGridColumns as | column |}}
{{>(lookup 'SUMMARYCOLUMN') item=column ctrl=ctrl}}
{{/each}}
</a-table-summary-row>
</template>
{{/neq}}
</a-table>
</template>
<style lang="scss">
.ibiz-grid {
margin: 20px;
.table-striped {
background-color: #fafafa;
}
}
</style>
\ No newline at end of file
package {{packageName}}.core.{{module}}.service.impl;
package {{packageName}}.core.{{entity.module}}.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
......@@ -27,10 +27,10 @@ import io.seata.spring.annotation.GlobalTransactional;
</system.enableGlobalTransaction>
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import {{packageName}}.core.{{module}}.domain.{{entity.codeName}};
import {{packageName}}.core.{{module}}.filter.{{entity.codeName}}SearchContext;
import {{packageName}}.core.{{module}}.service.I{{entity.codeName}}Service;
import {{packageName}}.core.{{module}}.mapper.${item.getCodeName()}Mapper;
import {{packageName}}.core.{{entity.module}}.domain.{{entity.codeName}};
import {{packageName}}.core.{{entity.module}}.filter.{{entity.codeName}}SearchContext;
import {{packageName}}.core.{{entity.module}}.service.I{{entity.codeName}}Service;
import {{packageName}}.core.{{entity.module}}.mapper.${item.getCodeName()}Mapper;
import {{packageName}}.util.helper.CachedBeanCopier;
import {{packageName}}.util.helper.DEFieldCacheMap;
import com.alibaba.fastjson.JSONObject;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册