提交 a6ffb0d3 编写于 作者: Mosher's avatar Mosher

update:调整面板,列表新增加载更多支持

上级 fe9043e6
<AppAutoComplete
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
:data="state.data"
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.valueItemName}}
valueItem="{{item.valueItemName}}"
......
<AppCheckboxList
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
:data="state.data"
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppCheckbox
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppCode
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppDataPickerView
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
:data="state.data"
{{#if item.valueItemName}}
valueItem="{{item.valueItemName}}"
......@@ -14,13 +18,15 @@
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.psNavigateContexts}}
:localContext="{{> @macro/front-end/common/navparam.hbs appNavParams=item.psEditor.psNavigateContexts}}"
......
<AppDataPicker
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
:data="state.data"
{{#if item.valueItemName}}
valueItem="{{item.valueItemName}}"
......@@ -14,13 +18,15 @@
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.psNavigateContexts}}
:localContext="{{> @macro/front-end/common/navparam.hbs appNavParams=item.psEditor.psNavigateContexts}}"
......
<AppDatePicker
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
{{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.placeHolder}}"
{{/if}}
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppDropdownList
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
{{#if item.psEditor.psAppCodeList}}
codeListTag="{{item.psEditor.psAppCodeList.codeListTag}}"
codeListType="{{item.psEditor.psAppCodeList.codeListType}}"
......@@ -17,13 +21,15 @@
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.editorParams.multiple}}
:multiple="{{item.psEditor.editorParams.multiple}}"
......
<AppInputIp
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppInput
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.placeHolder}}
placeholder="{{item.psEditor.placeHolder}}"
......
<AppListBox
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
:data="state.data"
:server="state.controlService"
:deMajorField="state.appDeMajorFieldName"
......@@ -24,13 +28,15 @@
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppRadioGroup
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
:data="state.data"
{{#if item.psEditor.psAppCodeList}}
codeListTag="{{item.psEditor.psAppCodeList.codeListTag}}"
......@@ -13,13 +17,15 @@
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppRating
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppRaw
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
:date="state.data"
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.editorParams.contentType}}
contentType="{{item.psEditor.editorParams.contentType}}"
......
<AppRichText
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppSlider
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
:date="state.data"
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppSpan
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{/if}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
......@@ -12,13 +11,15 @@
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.psAppCodeList}}
codeListTag="{{item.psEditor.psAppCodeList.codeListTag}}"
......
<AppStepper
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppSwitch
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppUpload
{{#if (and (eq ctrlType 'grid') dataItemName)}}
name="{{dataItemName}}"
{{else}}
{{#eq ctrlType 'grid'}}
name="{{#if dataItemName}}{{dataItemName}}{{else}}{{item.codeName}}{{/if}}"
{{/eq}}
{{#eq ctrlType 'panel'}}
name="{{item.name}}"
{{/eq}}
{{#eq ctrlType 'form'}}
name="{{item.codeName}}"
{{/if}}
{{/eq}}
{{#if item.psEditor.editorParams.method}}
method="{{item.psEditor.editorParams.method}}"
{{/if}}
......@@ -19,13 +23,15 @@
{{#if (eq ctrlType 'form')}}
:disabled="state.detailsModel.{{item.codeName}}.disabled"
{{else if (eq ctrlType 'grid')}}
{{#if (eq item.enableCond 0)}}
{{#if (eq item.enableCond 0)}}
:disabled="true"
{{else if (eq item.enableCond 1)}}
{{else if (eq item.enableCond 1)}}
:disabled="!Object.is(record.srfuf,0)"
{{else if (eq item.enableCond 2)}}
{{else if (eq item.enableCond 2)}}
:disabled="!Object.is(record.srfuf,1)"
{{/if}}
{{/if}}
{{else if (eq ctrlType 'panel')}}
:disabled="state.detailsModel.{{item.name}}.disabled"
{{/if}}
{{#if item.psEditor.readOnly}}
:readonly="{{item.psEditor.readOnly}}"
......
<AppPanelContainer
caption="{{item.caption}}"
{{#if item.psSysCss}}
class="{{item.psSysCss.cssName}}"
{{/if}}
class="app-panel-container app-panel-container__{{lowerCase item.name}}{{#and item.psLayout (eq item.psLayout.layout 'FLEX')}} flex-container{{/and}}{{#if item.psSysCss}} {{item.psSysCss.cssName}}{{/if}}"
name="{{item.name}}"
:layoutOpts="{{> @macro/front-end/common/layoutPos.hbs layout=item.psLayout layoutPos=item.psLayoutPos}}"
:visible="state.detailsModel.{{item.name}}.visible"
......
......@@ -2,9 +2,7 @@
{{#if item.caption}}
caption="{{item.caption}}"
{{/if}}
{{#if item.psSysCss}}
class="{{item.psSysCss.cssName}}"
{{/if}}
class="app-panel-field app-panel-field__{{lowerCase item.name}}{{#if item.psSysCss}} {{item.psSysCss.cssName}}{{/if}}"
name="{{item.name}}"
:layoutOpts="{{> @macro/front-end/common/layoutPos.hbs layout=item.psLayout layoutPos=item.psLayoutPos}}"
:visible="state.detailsModel.{{item.name}}.visible"
......@@ -27,7 +25,7 @@
>
{{#if item.psEditor}}
<div class="panel-editor-container" style="{{#if item.psEditor.editorWidth}}width: {{item.psEditor.editorWidth}}px;{{/if}}{{#if item.psEditor.editorHeight}}height: {{item.psEditor.editorHeight}}px{{/if}}">
{{> @macro/front-end/editors/include-editor.hbs type=item.psEditor.editorType item=item ctrlType="panel"}}
{{> @macro/front-end/editors/include-editor.hbs type=item.psEditor.editorType item=item ctrlType="panel"}}
</div>
{{/if}}
</AppPanelField>
......@@ -14,7 +14,11 @@ const props = withDefaults(defineProps<IProps>(), {
</script>
<template>
<AppCol :layoutOpts="layoutOpts">
<slot></slot>
<AppCol noRoot :visible="visible" :layoutOpts="layoutOpts">
<template #default="{ slotClass, slotStyle }">
<div :class="slotClass" :style="slotStyle">
<slot></slot>
</div>
</template>
</AppCol>
</template>
\ No newline at end of file
......@@ -15,9 +15,11 @@ const props = withDefaults(defineProps<IProps>(), {
</script>
<template>
<AppCol :layoutOpts="layoutOpts">
<div class="app-panel-field">
<slot></slot>
</div>
<AppCol :visible="visible" noRoot :layoutOpts="layoutOpts">
<template #default="{ slotClass, slotStyle }">
<div :class="slotClass" :style="slotStyle">
<slot></slot>
</div>
</template>
</AppCol>
</template>
\ No newline at end of file
......@@ -79,9 +79,21 @@ export class ListControl extends MDControl {
const { selectedData } = toRefs(this.state);
return selectedData.value.findIndex((selection: any) => selection.srfkey === item.srfkey) !== -1;
}
/**
* 加载更多
* @param event
*/
const loadMore = (event: MouseEvent) => {
const { mdCtrlPaging } = this.state;
let { current, pageSize } = mdCtrlPaging;
current += 1;
this.load();
}
return {
onListItemSelected: onListItemSelected.bind(this),
isSelected: isSelected.bind(this)
isSelected: isSelected.bind(this),
loadMore: loadMore.bind(this)
}
}
......
......@@ -54,7 +54,6 @@ export class PanelControl extends MainControl {
// 不获取,使用传入数据
if (navDatas && navDatas.value && navDatas.value.length) {
data.value = navDatas.value[0];
console.log(data.value);
}
} else if (dataMode === 1) {
// 存在传入数据时,不获取
......
......@@ -27,6 +27,10 @@ body{
border: 0;
}
.flex-container {
display: flex;
}
// 去除antd 卡片自带样式
.ant-card-body {
padding: 0;
......
......@@ -23,6 +23,16 @@ export class ControlVO extends ControlVOBase {
this.$DO.{{lowerCase dataItem.psAppDEField.codeName}} = value;
}
{{/if}}
{{#if dataItem.customCode}}
get {{lowerCase dataItem.name}}() {
let scriptCode: any = `{{dataItem.scriptCode}}`;
if (scriptCode.indexOf('return') !== -1) {
scriptCode = scriptCode.replace(new RegExp('return', "g"), '');
}
return scriptCode;
}
{{/if}}
{{/each}}
}
......@@ -35,6 +45,22 @@ export const ctrlState = {
appDeKeyFieldName: '{{#if ctrl.psAppDataEntity.keyPSAppDEField}}{{ctrl.psAppDataEntity.keyPSAppDEField.codeName}}{{/if}}',
appDeMajorFieldName: '{{#if ctrl.psAppDataEntity.majorPSAppDEField}}{{ctrl.psAppDataEntity.majorPSAppDEField.codeName}}{{/if}}',
controlService: new ListService<ControlVO>(ControlVO, new {{pascalCase ctrl.psAppDataEntity.codeName}}Service() ),
dataItems: [
{{#if ctrl.psDEListDataItems}}
{{#each ctrl.psDEListDataItems as | dataItem |}}
{
name: '{{dataItem.name}}',
caption: '{{dataItem.caption}}',
{{#if dataItem.customCode}}
customCode: true,
{{/if}}
{{#if dataItem.psAppDEField}}
property: '{{lowerCase dataItem.psAppDEField.codeName}}'
{{/if}}
}{{#unless @last}},{{/unless}}
{{/each}}
{{/if}}
],
// 多数据部件分组
mdCtrlGroup: {
enableGroup: {{ctrl.enableGroup}},
......
......@@ -41,17 +41,23 @@ const emit = defineEmits<CtrlEmit>();
// 安装功能模块,提供状态和能力
const { name, state, onUIAction, newRow, remove, save, load, refresh, getData, xDataCtrl, exportExcel, useCustom } = new ListControl(ctrlState, props, emit).moduleInstall();
const { onListItemSelected, isSelected } = useCustom;
const { onListItemSelected, isSelected, loadMore } = useCustom;
// 暴露内部状态及能力
defineExpose({ name, state, newRow, remove, save, load, refresh, getData, exportExcel });
</script>
// TODO 后续添加加载遮罩效果
<template>
<a-list
ref="xDataCtrl"
class="app-list{{#if ctrl.psSysCss}} {{ctrl.psSysCss.cssName}}{{/if}}"
item-layout="horizontal"
:data-source="state.items">
<template #loadMore>
<div :style="{ textAlign: 'center', marginTop: '12px', height: '32px', lineHeight: '32px' }">
<a-button v-else @click="loadMore">加载更多</a-button>
</div>
</template>
<template #renderItem="{ item }">
<a-list-item
:class="['app-list-item', isSelected(item) ? 'app-list-item__selection' : '']"
......
......@@ -37,9 +37,6 @@ defineExpose({ name, state, load, loadDraft, save, remove, refresh, getData });
<AppRow
:class="[
'app-panel',
{{#eq ctrl.layoutMode 'FLEX'}}
'has-flex',
{{/eq}}
panelType === 'LAYOUT' ? 'app-layout-panel' : '',
{{#if ctrl.psSysCss}}
'{{ctrl.psSysCss.cssName}}'
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册