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

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

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