提交 a5d97ef8 编写于 作者: zhujiamin's avatar zhujiamin

update:调整数据选择

上级 04f9b188
...@@ -19,10 +19,12 @@ ...@@ -19,10 +19,12 @@
:localParam="{{> @macro/front-end/common/navparam.hbs appNavParams=item.psEditor.psNavigateParams}}" :localParam="{{> @macro/front-end/common/navparam.hbs appNavParams=item.psEditor.psNavigateParams}}"
{{/if}} {{/if}}
{{#if item.psEditor.psAppDataEntity}} {{#if item.psEditor.psAppDataEntity}}
{{!-- deMajorField="getDeMajorField({{item.psEditor.psAppDataEntity.codeName}})" --}} deMajorField="{{lowerCase item.psEditor.psAppDataEntity.majorPSAppDEField.codeName}}"
{{!-- deKeyField="{{item.psEditor.psAppDataEntity.codeName}}" --}} deKeyField="{{lowerCase item.psEditor.psAppDataEntity.keyPSAppDEField.codeName}}"
{{/if}}
{{#if item.psEditor.editorParams.acParams}}
:acParams="{{item.psEditor.editorParams.acParams}}"
{{/if}} {{/if}}
{{!-- :acParams="getAcParams({{item.psEditor}})" --}}
{{#if item.psEditor.editorParams.sort}} {{#if item.psEditor.editorParams.sort}}
sort="{{item.psEditor.editorParams.sort}}" sort="{{item.psEditor.editorParams.sort}}"
{{/if}} {{/if}}
......
...@@ -15,24 +15,20 @@ ...@@ -15,24 +15,20 @@
{{/if}} {{/if}}
{{#if item.psEditor.psNavigateParams}} {{#if item.psEditor.psNavigateParams}}
:localParam="{{> @macro/front-end/common/navparam.hbs appNavParams=item.psEditor.psNavigateParams}}" :localParam="{{> @macro/front-end/common/navparam.hbs appNavParams=item.psEditor.psNavigateParams}}"
{{!-- :localParam="{{item.psEditor.psNavigateParams}}" --}}
{{/if}} {{/if}}
:context="state.context" :context="state.context"
:viewParams="state.viewParams" :viewParams="state.viewParams"
{{#if item.psEditor.psAppDataEntity}} {{#if item.psEditor.psAppDataEntity}}
{{!-- {{#each item.psEditor.psAppDataEntity as | filed |}} --}} deMajorField="{{lowerCase item.psEditor.psAppDataEntity.majorPSAppDEField.codeName}}"
{{!-- {{#if filed.majorField}} --}} deKeyField="{{lowerCase item.psEditor.psAppDataEntity.keyPSAppDEField.codeName}}"
{{!-- deMajorField="{{lowerCase filed.majorField.codeName}}" --}} {{/if}}
{{!-- {{/if}} --}} {{#if item.psEditor.pickupPSAppView }}
{{!-- {{/each}} --}} pickUpView="{{item.psEditor.pickupPSAppView.codeName}}"
{{!-- deKeyField="{{item.psEditor.psAppDataEntity.codeName}}" --}} {{/if}}
{{/if}}
{{!-- {{#if item.psEditor.pickuppsAppView }} --}}
{{!-- :pickupView="{{item.psEditor.pickuppsAppView}}" --}}
{{!-- {{/if}} --}}
pickUpView="ChartDataPickupView"
{{!-- :linkView="getLinkView({{item.psEditor}})" --}} {{!-- :linkView="getLinkView({{item.psEditor}})" --}}
{{!-- :acParams="getAcParams({{item.psEditor}})" --}} {{#if item.psEditor.editorParams.acParams}}
:acParams="{{item.psEditor.editorParams.acParams}}"
{{/if}}
{{#if item.psEditor.psAppDEACMode.minorSortDir}} {{#if item.psEditor.psAppDEACMode.minorSortDir}}
sort="{{item.psEditor.psAppDEACMode.minorSortDir}}" sort="{{item.psEditor.psAppDEACMode.minorSortDir}}"
{{/if}} {{/if}}
......
...@@ -137,7 +137,7 @@ onMounted(() => { ...@@ -137,7 +137,7 @@ onMounted(() => {
*/ */
const close = (result: any) => { const close = (result: any) => {
if (result && Array.isArray(result) && result.length > 0) { if (result && Array.isArray(result) && result.length > 0) {
Object.assign(tempResult, { ret: 'OK' }, { datas: JSON.parse(JSON.stringify(result)) }); Object.assign(tempResult, { ret: 'OK' }, { resultData: result });
} }
isVisible.value = false; isVisible.value = false;
}; };
...@@ -148,7 +148,7 @@ const close = (result: any) => { ...@@ -148,7 +148,7 @@ const close = (result: any) => {
const viewDataChange = (result: any) => { const viewDataChange = (result: any) => {
tempResult = { ret: '' }; tempResult = { ret: '' };
if (result && Array.isArray(result) && result.length > 0) { if (result && Array.isArray(result) && result.length > 0) {
Object.assign(tempResult, { ret: 'OK' }, { datas: JSON.parse(JSON.stringify(result)) }); Object.assign(tempResult, { ret: 'OK' }, { resultData: result });
} }
}; };
......
...@@ -8,7 +8,7 @@ interface Props{ ...@@ -8,7 +8,7 @@ interface Props{
const props = withDefaults(defineProps<Props>(), {}) const props = withDefaults(defineProps<Props>(), {})
let style = reactive({width:'600px',height:'600px'}); let style = reactive({width:'800px',height:'600px'});
/** /**
* Vue生命周期beforeMount * Vue生命周期beforeMount
...@@ -16,7 +16,10 @@ let style = reactive({width:'600px',height:'600px'}); ...@@ -16,7 +16,10 @@ let style = reactive({width:'600px',height:'600px'});
onBeforeMount(() => { onBeforeMount(() => {
if (props.width) { if (props.width) {
style.width = props.width + 'px'; style.width = props.width + 'px';
} else if(props.height){ } else {
style.width = '100%';
}
if(props.height){
style.height = props.height + 'px'; style.height = props.height + 'px';
} }
}); });
......
...@@ -131,7 +131,7 @@ onMounted(() => { ...@@ -131,7 +131,7 @@ onMounted(() => {
*/ */
const close = (result: any) => { const close = (result: any) => {
if (result && Array.isArray(result) && result.length > 0) { if (result && Array.isArray(result) && result.length > 0) {
Object.assign(tempResult, { ret: 'OK' }, { resultData: JSON.parse(JSON.stringify(result)) }); Object.assign(tempResult, { ret: 'OK' }, { resultData: result });
} }
props.subject?.next(tempResult); props.subject?.next(tempResult);
isVisible.value = false; isVisible.value = false;
...@@ -143,7 +143,7 @@ const close = (result: any) => { ...@@ -143,7 +143,7 @@ const close = (result: any) => {
const viewDataChange = (result: any) => { const viewDataChange = (result: any) => {
tempResult = { ret: '' }; tempResult = { ret: '' };
if (result && Array.isArray(result) && result.length > 0) { if (result && Array.isArray(result) && result.length > 0) {
Object.assign(tempResult, { ret: 'OK' }, { resultData: JSON.parse(JSON.stringify(result)) }); Object.assign(tempResult, { ret: 'OK' }, { resultData: result });
} }
}; };
......
...@@ -120,7 +120,7 @@ onBeforeMount(() => { ...@@ -120,7 +120,7 @@ onBeforeMount(() => {
*/ */
const close = (result: any) => { const close = (result: any) => {
if (result && Array.isArray(result) && result.length > 0) { if (result && Array.isArray(result) && result.length > 0) {
Object.assign(tempResult, { ret: 'OK' }, { datas: JSON.parse(JSON.stringify(result)) }); Object.assign(tempResult, { ret: 'OK' }, { resultData: result });
} }
props.subject?.next(tempResult); props.subject?.next(tempResult);
}; };
...@@ -131,7 +131,7 @@ const close = (result: any) => { ...@@ -131,7 +131,7 @@ const close = (result: any) => {
const viewDataChange = (result: any) => { const viewDataChange = (result: any) => {
tempResult = { ret: '' }; tempResult = { ret: '' };
if (result && Array.isArray(result) && result.length > 0) { if (result && Array.isArray(result) && result.length > 0) {
Object.assign(tempResult, { ret: 'OK' }, { datas: JSON.parse(JSON.stringify(result)) }); Object.assign(tempResult, { ret: 'OK' }, { resultData: result });
} }
}; };
......
...@@ -177,20 +177,20 @@ const onSearch = (value: string) => { ...@@ -177,20 +177,20 @@ const onSearch = (value: string) => {
// TODO数据服务请求数据 // TODO数据服务请求数据
items.value = [ items.value = [
{ {
srfkey: '4646', [props.deKeyField]: '4646',
srfmajortext: 'Jack', [props.deMajorField]: 'Jack',
}, },
{ {
srfkey: '49897', [props.deKeyField]: '49897',
srfmajortext: 'Lucy', [props.deMajorField]: 'Lucy',
}, },
{ {
srfkey: '164646', [props.deKeyField]: '164646',
srfmajortext: 'Disabled', [props.deMajorField]: 'Disabled',
}, },
{ {
srfkey: '4646', [props.deKeyField]: '4646',
srfmajortext: 'Yiminghe', [props.deMajorField]: 'Yiminghe',
}, },
]; ];
}; };
...@@ -215,8 +215,8 @@ const doEditorEmit = (data: any[]): any => { ...@@ -215,8 +215,8 @@ const doEditorEmit = (data: any[]): any => {
let majorValue: any = ''; let majorValue: any = '';
let keyValue: any = ''; let keyValue: any = '';
data.forEach((item: any) => { data.forEach((item: any) => {
majorValue = majorValue + (majorValue ? props.separator : '') + item[props.deMajorField!]; majorValue = item[props.deMajorField] ? majorValue + (majorValue ? props.separator : '') + item[props.deMajorField] : majorValue + (majorValue ? props.separator : '') + item['srfmajortext'];
keyValue = keyValue + (keyValue ? props.separator : '') + item[props.deKeyField]; keyValue = item[props.deKeyField] ? keyValue + (keyValue ? props.separator : '') + item[props.deKeyField] : keyValue + (keyValue ? props.separator : '') + item['srfkey'];
}); });
if (props.valueItem) { if (props.valueItem) {
emit('editorEvent', { tag: props.valueItem, action: 'valueChange', data: keyValue }); emit('editorEvent', { tag: props.valueItem, action: 'valueChange', data: keyValue });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册