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

update:调整数据选择

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