提交 63d59492 编写于 作者: ibizdev's avatar ibizdev

tony001 发布系统代码 [后台服务,演示应用]

上级 a15af8e3
...@@ -712,7 +712,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -712,7 +712,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/ */
public load(opt: any = {}): void { public load(opt: any = {}): void {
if(!this.loadAction){ if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCustomView_layout' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -748,7 +748,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -748,7 +748,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/ */
public async loadDraft(opt: any = {},mode?:string): Promise<any> { public async loadDraft(opt: any = {},mode?:string): Promise<any> {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKUsr9GridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCustomView_layout' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
......
...@@ -1378,7 +1378,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface ...@@ -1378,7 +1378,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
*/ */
public async load(opt: any = {}): Promise<any> { public async load(opt: any = {}): Promise<any> {
if(!this.loadAction){ if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loadaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -1429,7 +1429,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface ...@@ -1429,7 +1429,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
*/ */
public async loadDraft(opt: any = {}): Promise<any> { public async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) { if (!this.loaddraftAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
...@@ -1499,7 +1499,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface ...@@ -1499,7 +1499,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction; const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){ if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction"; let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return; return;
} }
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
...@@ -1607,7 +1607,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface ...@@ -1607,7 +1607,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction; const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){ if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction"; let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return; return;
} }
Object.assign(arg, { viewparams: this.viewparams }); Object.assign(arg, { viewparams: this.viewparams });
...@@ -1799,7 +1799,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface ...@@ -1799,7 +1799,7 @@ export default class GuideBorrowFormBase extends Vue implements ControlInterface
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> { public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.removeaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return; return;
} }
const arg: any = opt[0]; const arg: any = opt[0];
......
...@@ -1344,7 +1344,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface ...@@ -1344,7 +1344,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
*/ */
public async load(opt: any = {}): Promise<any> { public async load(opt: any = {}): Promise<any> {
if(!this.loadAction){ if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loadaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -1395,7 +1395,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface ...@@ -1395,7 +1395,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
*/ */
public async loadDraft(opt: any = {}): Promise<any> { public async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) { if (!this.loaddraftAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
...@@ -1465,7 +1465,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface ...@@ -1465,7 +1465,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction; const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){ if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction"; let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return; return;
} }
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
...@@ -1573,7 +1573,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface ...@@ -1573,7 +1573,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction; const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){ if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction"; let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return; return;
} }
Object.assign(arg, { viewparams: this.viewparams }); Object.assign(arg, { viewparams: this.viewparams });
...@@ -1765,7 +1765,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface ...@@ -1765,7 +1765,7 @@ export default class GuideReturnFormBase extends Vue implements ControlInterface
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> { public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.removeaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return; return;
} }
const arg: any = opt[0]; const arg: any = opt[0];
......
...@@ -1447,7 +1447,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface { ...@@ -1447,7 +1447,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
*/ */
public async load(opt: any = {}): Promise<any> { public async load(opt: any = {}): Promise<any> {
if(!this.loadAction){ if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loadaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -1499,7 +1499,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface { ...@@ -1499,7 +1499,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
*/ */
public async loadDraft(opt: any = {}): Promise<any> { public async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) { if (!this.loaddraftAction) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
...@@ -1569,7 +1569,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface { ...@@ -1569,7 +1569,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction; const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){ if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction"; let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return; return;
} }
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
...@@ -1677,7 +1677,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface { ...@@ -1677,7 +1677,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction; const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){ if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction"; let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.actionname') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.actionname') as string) });
return; return;
} }
Object.assign(arg, { viewparams: this.viewparams }); Object.assign(arg, { viewparams: this.viewparams });
...@@ -1869,7 +1869,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface { ...@@ -1869,7 +1869,7 @@ export default class GuideViewFormBase extends Vue implements ControlInterface {
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> { public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView' + (this.$t('app.formpage.notconfig.removeaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKWizardView_layout' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return; return;
} }
const arg: any = opt[0]; const arg: any = opt[0];
......
...@@ -369,7 +369,7 @@ export default class GuideBase extends Vue implements ControlInterface { ...@@ -369,7 +369,7 @@ export default class GuideBase extends Vue implements ControlInterface {
* @type {Boolean} * @type {Boolean}
* @memberof GuideBase * @memberof GuideBase
*/ */
public isShowStepBar: Boolean = false ; public isShowStepBar: Boolean = true ;
/** /**
* 获取多项数据 * 获取多项数据
......
...@@ -670,7 +670,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface ...@@ -670,7 +670,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface
*/ */
public load(opt: any = {}): void { public load(opt: any = {}): void {
if(!this.loadAction){ if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKListView' + (this.$t('app.searchForm.notConfig.loadAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCalendarView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -706,7 +706,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface ...@@ -706,7 +706,7 @@ export default class QUICKSEARCHFORMBase extends Vue implements ControlInterface
*/ */
public async loadDraft(opt: any = {},mode?:string): Promise<any> { public async loadDraft(opt: any = {},mode?:string): Promise<any> {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKListView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'IBIZBOOKCalendarView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
......
...@@ -426,6 +426,10 @@ ...@@ -426,6 +426,10 @@
"dataType" : 25, "dataType" : 25,
"name" : "srfmstag" "name" : "srfmstag"
} ], } ],
"getPSSysPFPlugin" : {
"pluginType" : "LIST_RENDER",
"pluginCode" : "listEvenYellowPlugin"
},
"pagingSize" : 1000, "pagingSize" : 1000,
"rTMOSFilePath" : "pssysapps/Web/psappdeviews/IBIZBOOKUsr7ListView_listPlugin/psappviewctrls/list", "rTMOSFilePath" : "pssysapps/Web/psappdeviews/IBIZBOOKUsr7ListView_listPlugin/psappviewctrls/list",
"getRemovePSControlAction" : { "getRemovePSControlAction" : {
......
...@@ -5628,6 +5628,19 @@ ...@@ -5628,6 +5628,19 @@
"refMode" : "CONTROL", "refMode" : "CONTROL",
"refTag" : "TREEVIEW", "refTag" : "TREEVIEW",
"templCode" : "<div>树插件</div>" "templCode" : "<div>树插件</div>"
}, {
"name" : "列表偶项背景变黄",
"getPSSysPFPlugin" : {
"pluginType" : "LIST_RENDER",
"pluginCode" : "listEvenYellowPlugin"
},
"pluginCode" : "listEvenYellowPlugin",
"pluginType" : "LIST_RENDER",
"refMode" : "CONTROL",
"refTag" : "LIST",
"templCode" : "<AppList\n :id=\"controlID\"\n :class=\"classNames\"\n :items=\"store.data\"\n :selections=\"store.selections\"\n :totalRecord=\"store.totalRecord\"\n @item-click=\"handleItemClick\"\n @item-db-click=\"handleItemDbClick\"\n @selection-change=\"handleSelectionChange\"\n @load-more=\"handleLoadMore\"\n @item-action-click=\"(logic: any, data: IParam, event: MouseEvent) => handleActionClick(controller, logic, data, event)\">\n <template #default=\"{ item }\">\n <List_itempanelPanel\n :actions=\"{\n loadDraftAction: 'GetDraft',\n createAction: 'Create',\n fetchAction: 'FetchDefault',\n removeAction: 'Remove',\n updateAction: 'Update'\n }\"\n :openView=\"store.openView\"\n :newView=\"store.newView\" \n :isLoadDefault='true'\n :data='item'\n name=\"\"\n :context=\"store.context\"\n :viewParams=\"store.viewParams\"\n :closeView=\"store.closeView\"\n :pLoadingHelper=\"store.loadingHelper\"\n :pViewCtx=\"store.viewCtx\"\n @ctrl-init=\"(name:string, ability:any) => { handleCtrlInit(controller, name, ability) }\"\n @ctrl-action=\"(name:string, action:any, data:any) => { handleCtrlAction(controller, name, action, data) }\"\n @ctrl-destroy=\"(name:string, data:any) => { handleCtrlDestroy(controller, name, data) }\"/>\n </template>\n </AppList>",
"templCode2" : "import { AppList } from '@components/widgets/list';\nimport { ICtrlDataAction, IContext, IParam, ListActionType, IListAbility, IListControllerParams, IListStore, ListController, createUUID, ILoadingHelper, IViewCtx, IListController, IViewLogicInput } from '@/core';\nimport List_itempanelPanel from '@widgets/ibizbook/list-itempanel-panel/list-itempanel-panel.vue';\nimport { useNavParamsBind, getCtrlClassNames, useEventBind, handleActionClick, handleCtrlInit, handleCtrlAction, handleCtrlDestroy, } from '@/hooks/use-ctrl';\nimport { ListControlVO } from './lnternal-func-list-list-vo';\nimport { model } from \"./lnternal-func-list-list-model\";\nimport ListService from \"@/core/modules/ctrl-service/list-service\";\ninterface Props {\n name?: string;\n context: IContext;\n viewParams: IParam;\n localContext?: IParam,\n localViewParams?: IParam,\n closeView?: Function;\n pLoadingHelper?: ILoadingHelper;\n pViewCtx?: IViewCtx;\n openView?: Function;\n newView?: Function;\n actions: ICtrlDataAction;\n singleSelect?: boolean;\n rowActiveMode?: 0 | 1 | 2;\n selectFirstDefault?: boolean;\n \n}\n\nconst props = withDefaults(defineProps<Props>(), {\n singleSelect: false,\n rowActiveMode: 2\n \n});\nconst emit = defineEmits<{\n (event: 'ctrl-action', name: string, action: ListActionType, data: IParam[]): void;\n (event: 'ctrl-init', name: string, data: IListAbility): void;\n (event: 'ctrl-destroy', name: string, data: IParam): void;\n}>();\n\nconst evt = useEventBind<ListActionType, IListAbility>(emit);\n// 部件样式名\nconst classNames = computed(() => {\n const names = getCtrlClassNames(model, props);\n Object.assign(names,{\n \"list-even-yellow-bg\":true\n })\n return names;\n});\n\nconst controlID = createUUID();\nconst params: IListControllerParams<ListActionType, IListAbility> = {\n name: props.name,\n model,\n evt,\n controlID,\n pLoadingHelper: props.pLoadingHelper,\n rowActiveMode: props.rowActiveMode,\n actions: props.actions,\n singleSelect: props.singleSelect,\n selectFirstDefault: props.selectFirstDefault,\n ctrlService: new ListService<ListControlVO>(ListControlVO, model.entityCodeName),\n openView: props.openView,\n newView: props.newView,\n closeView: props.closeView,\n pViewCtx: props.pViewCtx,\n handler: (data: IListStore) => { return reactive(data) }\n};\n\nconst controller: IListController<IListStore, IListAbility> = new ListController(params);\n\nuseNavParamsBind(controller, props);\n\nconst store: IListStore = controller.getStore();\n\nonMounted(() => {\n controller.ctrlMounted();\n})\n\nonUnmounted(() => {\n controller.ctrlDestroy();\n})\n\nconst handleItemClick = (row: IParam, event: MouseEvent) => {\n controller.handleItemClick(row, event);\n}\n\nconst handleItemDbClick = (row: IParam, event: MouseEvent) => {\n controller.handleItemDbClick(row, event);\n}\n\nconst handleSelectionChange = (selections: IParam[]) => {\n controller.handleSelectionChange(selections);\n}\n\nconst handleLoadMore = () => {\n controller.loadMore();\n}",
"templCode3" : ".list-even-yellow-bg .ant-list-item:nth-child(even) {\n background-color: yellow;\n}"
}, { }, {
"name" : "列表视图斑马纹", "name" : "列表视图斑马纹",
"getPSSysPFPlugin" : { "getPSSysPFPlugin" : {
...@@ -12,6 +12,19 @@ ...@@ -12,6 +12,19 @@
"refMode" : "CONTROL", "refMode" : "CONTROL",
"refTag" : "TREEVIEW", "refTag" : "TREEVIEW",
"templCode" : "<div>树插件</div>" "templCode" : "<div>树插件</div>"
}, {
"name" : "列表偶项背景变黄",
"getPSSysPFPlugin" : {
"pluginType" : "LIST_RENDER",
"pluginCode" : "listEvenYellowPlugin"
},
"pluginCode" : "listEvenYellowPlugin",
"pluginType" : "LIST_RENDER",
"refMode" : "CONTROL",
"refTag" : "LIST",
"templCode" : "<AppList\n :id=\"controlID\"\n :class=\"classNames\"\n :items=\"store.data\"\n :selections=\"store.selections\"\n :totalRecord=\"store.totalRecord\"\n @item-click=\"handleItemClick\"\n @item-db-click=\"handleItemDbClick\"\n @selection-change=\"handleSelectionChange\"\n @load-more=\"handleLoadMore\"\n @item-action-click=\"(logic: any, data: IParam, event: MouseEvent) => handleActionClick(controller, logic, data, event)\">\n <template #default=\"{ item }\">\n <List_itempanelPanel\n :actions=\"{\n loadDraftAction: 'GetDraft',\n createAction: 'Create',\n fetchAction: 'FetchDefault',\n removeAction: 'Remove',\n updateAction: 'Update'\n }\"\n :openView=\"store.openView\"\n :newView=\"store.newView\" \n :isLoadDefault='true'\n :data='item'\n name=\"\"\n :context=\"store.context\"\n :viewParams=\"store.viewParams\"\n :closeView=\"store.closeView\"\n :pLoadingHelper=\"store.loadingHelper\"\n :pViewCtx=\"store.viewCtx\"\n @ctrl-init=\"(name:string, ability:any) => { handleCtrlInit(controller, name, ability) }\"\n @ctrl-action=\"(name:string, action:any, data:any) => { handleCtrlAction(controller, name, action, data) }\"\n @ctrl-destroy=\"(name:string, data:any) => { handleCtrlDestroy(controller, name, data) }\"/>\n </template>\n </AppList>",
"templCode2" : "import { AppList } from '@components/widgets/list';\nimport { ICtrlDataAction, IContext, IParam, ListActionType, IListAbility, IListControllerParams, IListStore, ListController, createUUID, ILoadingHelper, IViewCtx, IListController, IViewLogicInput } from '@/core';\nimport List_itempanelPanel from '@widgets/ibizbook/list-itempanel-panel/list-itempanel-panel.vue';\nimport { useNavParamsBind, getCtrlClassNames, useEventBind, handleActionClick, handleCtrlInit, handleCtrlAction, handleCtrlDestroy, } from '@/hooks/use-ctrl';\nimport { ListControlVO } from './lnternal-func-list-list-vo';\nimport { model } from \"./lnternal-func-list-list-model\";\nimport ListService from \"@/core/modules/ctrl-service/list-service\";\ninterface Props {\n name?: string;\n context: IContext;\n viewParams: IParam;\n localContext?: IParam,\n localViewParams?: IParam,\n closeView?: Function;\n pLoadingHelper?: ILoadingHelper;\n pViewCtx?: IViewCtx;\n openView?: Function;\n newView?: Function;\n actions: ICtrlDataAction;\n singleSelect?: boolean;\n rowActiveMode?: 0 | 1 | 2;\n selectFirstDefault?: boolean;\n \n}\n\nconst props = withDefaults(defineProps<Props>(), {\n singleSelect: false,\n rowActiveMode: 2\n \n});\nconst emit = defineEmits<{\n (event: 'ctrl-action', name: string, action: ListActionType, data: IParam[]): void;\n (event: 'ctrl-init', name: string, data: IListAbility): void;\n (event: 'ctrl-destroy', name: string, data: IParam): void;\n}>();\n\nconst evt = useEventBind<ListActionType, IListAbility>(emit);\n// 部件样式名\nconst classNames = computed(() => {\n const names = getCtrlClassNames(model, props);\n Object.assign(names,{\n \"list-even-yellow-bg\":true\n })\n return names;\n});\n\nconst controlID = createUUID();\nconst params: IListControllerParams<ListActionType, IListAbility> = {\n name: props.name,\n model,\n evt,\n controlID,\n pLoadingHelper: props.pLoadingHelper,\n rowActiveMode: props.rowActiveMode,\n actions: props.actions,\n singleSelect: props.singleSelect,\n selectFirstDefault: props.selectFirstDefault,\n ctrlService: new ListService<ListControlVO>(ListControlVO, model.entityCodeName),\n openView: props.openView,\n newView: props.newView,\n closeView: props.closeView,\n pViewCtx: props.pViewCtx,\n handler: (data: IListStore) => { return reactive(data) }\n};\n\nconst controller: IListController<IListStore, IListAbility> = new ListController(params);\n\nuseNavParamsBind(controller, props);\n\nconst store: IListStore = controller.getStore();\n\nonMounted(() => {\n controller.ctrlMounted();\n})\n\nonUnmounted(() => {\n controller.ctrlDestroy();\n})\n\nconst handleItemClick = (row: IParam, event: MouseEvent) => {\n controller.handleItemClick(row, event);\n}\n\nconst handleItemDbClick = (row: IParam, event: MouseEvent) => {\n controller.handleItemDbClick(row, event);\n}\n\nconst handleSelectionChange = (selections: IParam[]) => {\n controller.handleSelectionChange(selections);\n}\n\nconst handleLoadMore = () => {\n controller.loadMore();\n}",
"templCode3" : ".list-even-yellow-bg .ant-list-item:nth-child(even) {\n background-color: yellow;\n}"
}, { }, {
"name" : "列表视图斑马纹", "name" : "列表视图斑马纹",
"getPSSysPFPlugin" : { "getPSSysPFPlugin" : {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册