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

hebao1234 发布系统代码 [ibz-dst,应用]

上级 730a888c
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
:disabled="disabled" :disabled="disabled"
:file-list="files" :file-list="files"
:action="uploadUrl" :action="uploadUrl"
:limit="multiple ? limit: 1"
:accept="accept"
:multiple="multiple"
:headers="{}" :headers="{}"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:before-remove="onRemove" :before-remove="onRemove"
...@@ -17,6 +20,7 @@ ...@@ -17,6 +20,7 @@
:on-preview="onDownload" :on-preview="onDownload"
:drag="isdrag" :drag="isdrag"
:show-file-list="!rowPreview" :show-file-list="!rowPreview"
:on-exceed = "handleExceed"
> >
<el-button v-if="!isdrag" size='small' icon='el-icon-upload' :disabled="disabled">{{this.$t('app.fileUpload.caption')}}</el-button> <el-button v-if="!isdrag" size='small' icon='el-icon-upload' :disabled="disabled">{{this.$t('app.fileUpload.caption')}}</el-button>
<i v-if="isdrag" class="el-icon-upload"></i> <i v-if="isdrag" class="el-icon-upload"></i>
...@@ -173,6 +177,30 @@ export default class AppFileUpload extends Vue { ...@@ -173,6 +177,30 @@ export default class AppFileUpload extends Vue {
*/ */
@Prop() public exportparams?: any; @Prop() public exportparams?: any;
/**
* 是否支持多个文件上传
*
* @type {string}
* @memberof AppFileUpload
*/
@Prop({default: true}) public multiple!: boolean;
/**
* 最大允许上传个数
*
* @type {*}
* @memberof AppImageUpload
*/
@Prop({default: 9999}) public limit!: number;
/**
* 接受上传的文件类型
*
* @type {*}
* @memberof AppImageUpload
*/
@Prop({default: '*'}) public accept!: string;
/** /**
* 上传文件路径 * 上传文件路径
* *
...@@ -473,6 +501,14 @@ export default class AppFileUpload extends Vue { ...@@ -473,6 +501,14 @@ export default class AppFileUpload extends Vue {
*/ */
public showActions: boolean = false; public showActions: boolean = false;
/**
* 处理多选超出
*
* @memberof AppFileUpload
*/
public handleExceed(files: any, fileList: any) {
this.$message.warning(`${this.$t('components.appFileUpload.limitselect')} ${this.limit}`);
}
} }
</script> </script>
......
<template> <template>
<div class="app-icon-menus"> <div class="app-icon-menus">
<template v-for="(item,index) in menus"> <template v-for="(item,index) in menus">
<template v-if="!item.hidden">
<div :bordered="false" v-if="item.items && Array.isArray(item.items)" :key="index" :class="item.textcls"> <div :bordered="false" v-if="item.items && Array.isArray(item.items)" :key="index" :class="item.textcls">
<p @click="$emit('menuClick',item.name, [item.name])"> <p @click="$emit('menuClick',item.name, [item.name])">
<span>{{$t('app.menus.' + ctrlName + '.' + item.name)}}</span> <span>{{$t('app.menus.' + ctrlName + '.' + item.name)}}</span>
...@@ -32,6 +33,7 @@ ...@@ -32,6 +33,7 @@
</div> </div>
</el-card> </el-card>
</template> </template>
</template>
</div> </div>
</template> </template>
......
...@@ -32,11 +32,14 @@ ...@@ -32,11 +32,14 @@
<!-- 文件上传 --> <!-- 文件上传 -->
<el-upload <el-upload
v-if = "multiple || files.length === 0" v-if = "multiple || files.length === 0"
:limit="multiple ? limit: 1"
:class = "{'el-upload-disabled':disabled}" :class = "{'el-upload-disabled':disabled}"
:disabled = "disabled" :disabled = "disabled"
:action = "uploadUrl" :action = "uploadUrl"
:headers = "{ 'srfappdata': appData }" :headers = "{ 'srfappdata': appData }"
:show-file-list = "false" :show-file-list = "false"
:multiple="multiple"
:accept="accept"
list-type = "picture-card" list-type = "picture-card"
:file-list = "files" :file-list = "files"
:before-upload = "beforeUpload" :before-upload = "beforeUpload"
...@@ -44,6 +47,7 @@ ...@@ -44,6 +47,7 @@
:before-remove = "onRemove" :before-remove = "onRemove"
:on-error = "onError" :on-error = "onError"
:on-preview = "onDownload" :on-preview = "onDownload"
:on-exceed = "handleExceed"
> >
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
...@@ -180,6 +184,22 @@ export default class AppImageUpload extends Vue { ...@@ -180,6 +184,22 @@ export default class AppImageUpload extends Vue {
*/ */
@Prop() public customparams?: any; @Prop() public customparams?: any;
/**
* 最大允许上传个数
*
* @type {*}
* @memberof AppImageUpload
*/
@Prop({default: 9999}) public limit!: number;
/**
* 接受上传的文件类型
*
* @type {*}
* @memberof AppImageUpload
*/
@Prop({default: 'image/*'}) public accept!: string;
/** /**
* 上传文件路径 * 上传文件路径
* *
...@@ -472,6 +492,15 @@ export default class AppImageUpload extends Vue { ...@@ -472,6 +492,15 @@ export default class AppImageUpload extends Vue {
this.dialogImageUrl = file.url; this.dialogImageUrl = file.url;
this.dialogVisible = true; this.dialogVisible = true;
} }
/**
* 处理多选超出
*
* @memberof AppImageUpload
*/
public handleExceed(files: any, fileList: any) {
this.$message.warning(`${this.$t('components.appImageUpload.limitselect')} ${this.limit}`);
}
} }
</script> </script>
<style lang = "less"> <style lang = "less">
......
...@@ -68,6 +68,7 @@ function getLocaleResourceBase(){ ...@@ -68,6 +68,7 @@ function getLocaleResourceBase(){
uploadText: 'Drag files here,or <em>Click</em> to upload', uploadText: 'Drag files here,or <em>Click</em> to upload',
fileTypeErrorTitle: 'File type incorrect', fileTypeErrorTitle: 'File type incorrect',
fileTypeErrorInfo: 'Please select files with picture types,such as JPEG,GIF,PNG,BMP', fileTypeErrorInfo: 'Please select files with picture types,such as JPEG,GIF,PNG,BMP',
limitselect: 'The current number of restricted choices is ',
}, },
appFormDRUIPart: { appFormDRUIPart: {
blockUITipInfo: 'Please save the major data first', blockUITipInfo: 'Please save the major data first',
...@@ -208,7 +209,8 @@ function getLocaleResourceBase(){ ...@@ -208,7 +209,8 @@ function getLocaleResourceBase(){
groupSelect:'Group selection', groupSelect:'Group selection',
}, },
appImageUpload:{ appImageUpload:{
uploadFail:'Upload failed' uploadFail:'Upload failed',
limitselect: 'The current number of restricted choices is ',
}, },
appOrgSelect:{ appOrgSelect:{
loadFail:'Failed to load data' loadFail:'Failed to load data'
......
...@@ -69,6 +69,7 @@ function getLocaleResourceBase(){ ...@@ -69,6 +69,7 @@ function getLocaleResourceBase(){
uploadError: '上传失败', uploadError: '上传失败',
fileTypeErrorTitle: '文件类型错误', fileTypeErrorTitle: '文件类型错误',
fileTypeErrorInfo: '请选择图片类型的文件,如JPEG,GIF,PNG,BMP', fileTypeErrorInfo: '请选择图片类型的文件,如JPEG,GIF,PNG,BMP',
limitselect: '当前限制选择数量为 ',
}, },
appFormDRUIPart: { appFormDRUIPart: {
blockUITipInfo: '请先保存主数据', blockUITipInfo: '请先保存主数据',
...@@ -209,7 +210,8 @@ function getLocaleResourceBase(){ ...@@ -209,7 +210,8 @@ function getLocaleResourceBase(){
groupSelect:'分组选择', groupSelect:'分组选择',
}, },
appImageUpload:{ appImageUpload:{
uploadFail:'上传失败' uploadFail:'上传失败',
limitselect: '当前限制选择数量为 ',
}, },
appOrgSelect:{ appOrgSelect:{
loadFail:'加载数据失败' loadFail:'加载数据失败'
......
export * from './project-setting';
\ No newline at end of file
export const ProjectSetting = {
routeSetting: {},
};
...@@ -278,6 +278,10 @@ ...@@ -278,6 +278,10 @@
.start-workflow-select-wraper { .start-workflow-select-wraper {
z-index: 3000 !important; z-index: 3000 !important;
} }
// tooltip最大宽度1166px
.el-tooltip__popper.is-dark{
max-width: 1166px;
}
/*** END:多数据视图属性布局 ***/ /*** END:多数据视图属性布局 ***/
......
...@@ -698,7 +698,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -698,7 +698,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: 'DictCatalogPickupGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -734,7 +734,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -734,7 +734,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/ */
public loadDraft(opt: any = {},mode?:string): void { public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogPickupGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
......
...@@ -331,6 +331,20 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -331,6 +331,20 @@ export default class MainBase extends Vue implements ControlInterface {
return this.selections[0]; return this.selections[0];
} }
/**
* 打开新建数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public opendata: any;
/** /**
* 是否嵌入关系界面 * 是否嵌入关系界面
...@@ -853,7 +867,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -853,7 +867,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public load(opt: any = {}, pageReset: boolean = false): void { public load(opt: any = {}, pageReset: boolean = false): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogPickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(pageReset){ if(pageReset){
...@@ -948,7 +962,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -948,7 +962,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogPickupGridView'+(this.$t('app.gridpage.notConfig.removeAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogGridView'+(this.$t('app.gridpage.notConfig.removeAction') as string) });
return; return;
} }
let _datas:any[] = []; let _datas:any[] = [];
...@@ -1054,7 +1068,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1054,7 +1068,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public addBatch(arg: any = {}): void { public addBatch(arg: any = {}): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogPickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(!arg){ if(!arg){
...@@ -1847,7 +1861,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1847,7 +1861,7 @@ export default class MainBase extends Vue implements ControlInterface {
public setColState() { public setColState() {
this.resetColModel = Util.deepCopy(this.allColumns); this.resetColModel = Util.deepCopy(this.allColumns);
const viewParams: any = Util.deepCopy(this.viewparams); const viewParams: any = Util.deepCopy(this.viewparams);
Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_dictcatalogpickupgridview_grid_main'}); Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_dictcataloggridview_grid_main'});
const post = this.service.loadModel('grid_dynaconfig', this.context, viewParams); const post = this.service.loadModel('grid_dynaconfig', this.context, viewParams);
post.then((response: any) => { post.then((response: any) => {
if(response.status == 200 && response.data) { if(response.status == 200 && response.data) {
...@@ -1914,7 +1928,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1914,7 +1928,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public saveDynaConfig() { public saveDynaConfig() {
const viewParams: any = Util.deepCopy(this.viewparams); const viewParams: any = Util.deepCopy(this.viewparams);
Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_dictcatalogpickupgridview_grid_main', model: this.allColumns}); Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_dictcataloggridview_grid_main', model: this.allColumns});
const post = this.service.saveModel('grid_dynaconfig', this.context, viewParams); const post = this.service.saveModel('grid_dynaconfig', this.context, viewParams);
post.then((response: any) => { post.then((response: any) => {
if (response.status == 200) { if (response.status == 200) {
...@@ -1985,7 +1999,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1985,7 +1999,7 @@ export default class MainBase extends Vue implements ControlInterface {
try { try {
if(Object.is(item.rowDataState, 'create')){ if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){ if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogPickupGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator); let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
...@@ -1993,7 +2007,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1993,7 +2007,7 @@ export default class MainBase extends Vue implements ControlInterface {
} }
}else if(Object.is(item.rowDataState, 'update')){ }else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){ if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogPickupGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
if(item.dictcatalog){ if(item.dictcatalog){
...@@ -2060,7 +2074,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2060,7 +2074,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public newRow(args: any[], params?: any, $event?: any, xData?: any): void { public newRow(args: any[], params?: any, $event?: any, xData?: any): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogPickupGridView'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DictCatalogGridView'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) });
return; return;
} }
let _this = this; let _this = this;
......
...@@ -662,7 +662,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -662,7 +662,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: 'DstDataSourcePickupGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourceGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -698,7 +698,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -698,7 +698,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/ */
public loadDraft(opt: any = {},mode?:string): void { public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourcePickupGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourceGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
......
...@@ -307,6 +307,20 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -307,6 +307,20 @@ export default class MainBase extends Vue implements ControlInterface {
return this.selections[0]; return this.selections[0];
} }
/**
* 打开新建数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public opendata: any;
/** /**
* 是否嵌入关系界面 * 是否嵌入关系界面
...@@ -811,7 +825,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -811,7 +825,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public load(opt: any = {}, pageReset: boolean = false): void { public load(opt: any = {}, pageReset: boolean = false): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourcePickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourceGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(pageReset){ if(pageReset){
...@@ -906,7 +920,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -906,7 +920,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourcePickupGridView'+(this.$t('app.gridpage.notConfig.removeAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourceGridView'+(this.$t('app.gridpage.notConfig.removeAction') as string) });
return; return;
} }
let _datas:any[] = []; let _datas:any[] = [];
...@@ -1012,7 +1026,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1012,7 +1026,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public addBatch(arg: any = {}): void { public addBatch(arg: any = {}): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourcePickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourceGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(!arg){ if(!arg){
...@@ -1799,7 +1813,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1799,7 +1813,7 @@ export default class MainBase extends Vue implements ControlInterface {
public setColState() { public setColState() {
this.resetColModel = Util.deepCopy(this.allColumns); this.resetColModel = Util.deepCopy(this.allColumns);
const viewParams: any = Util.deepCopy(this.viewparams); const viewParams: any = Util.deepCopy(this.viewparams);
Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_dstdatasourcepickupgridview_grid_main'}); Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_dstdatasourcegridview_grid_main'});
const post = this.service.loadModel('grid_dynaconfig', this.context, viewParams); const post = this.service.loadModel('grid_dynaconfig', this.context, viewParams);
post.then((response: any) => { post.then((response: any) => {
if(response.status == 200 && response.data) { if(response.status == 200 && response.data) {
...@@ -1866,7 +1880,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1866,7 +1880,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public saveDynaConfig() { public saveDynaConfig() {
const viewParams: any = Util.deepCopy(this.viewparams); const viewParams: any = Util.deepCopy(this.viewparams);
Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_dstdatasourcepickupgridview_grid_main', model: this.allColumns}); Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_dstdatasourcegridview_grid_main', model: this.allColumns});
const post = this.service.saveModel('grid_dynaconfig', this.context, viewParams); const post = this.service.saveModel('grid_dynaconfig', this.context, viewParams);
post.then((response: any) => { post.then((response: any) => {
if (response.status == 200) { if (response.status == 200) {
...@@ -1937,7 +1951,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1937,7 +1951,7 @@ export default class MainBase extends Vue implements ControlInterface {
try { try {
if(Object.is(item.rowDataState, 'create')){ if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){ if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourcePickupGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourceGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator); let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
...@@ -1945,7 +1959,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1945,7 +1959,7 @@ export default class MainBase extends Vue implements ControlInterface {
} }
}else if(Object.is(item.rowDataState, 'update')){ }else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){ if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourcePickupGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourceGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
if(item.dstdatasource){ if(item.dstdatasource){
...@@ -2018,7 +2032,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2018,7 +2032,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public newRow(args: any[], params?: any, $event?: any, xData?: any): void { public newRow(args: any[], params?: any, $event?: any, xData?: any): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourcePickupGridView'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'DstDataSourceGridView'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) });
return; return;
} }
let _this = this; let _this = this;
......
...@@ -795,7 +795,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -795,7 +795,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: 'MetaEntityPickupGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -831,7 +831,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -831,7 +831,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/ */
public loadDraft(opt: any = {},mode?:string): void { public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityPickupGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
......
...@@ -343,6 +343,20 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -343,6 +343,20 @@ export default class MainBase extends Vue implements ControlInterface {
return this.selections[0]; return this.selections[0];
} }
/**
* 打开新建数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public opendata: any;
/** /**
* 是否嵌入关系界面 * 是否嵌入关系界面
...@@ -874,7 +888,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -874,7 +888,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public load(opt: any = {}, pageReset: boolean = false): void { public load(opt: any = {}, pageReset: boolean = false): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityPickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(pageReset){ if(pageReset){
...@@ -969,7 +983,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -969,7 +983,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityPickupGridView'+(this.$t('app.gridpage.notConfig.removeAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityGridView'+(this.$t('app.gridpage.notConfig.removeAction') as string) });
return; return;
} }
let _datas:any[] = []; let _datas:any[] = [];
...@@ -1075,7 +1089,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1075,7 +1089,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public addBatch(arg: any = {}): void { public addBatch(arg: any = {}): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityPickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(!arg){ if(!arg){
...@@ -1871,7 +1885,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1871,7 +1885,7 @@ export default class MainBase extends Vue implements ControlInterface {
public setColState() { public setColState() {
this.resetColModel = Util.deepCopy(this.allColumns); this.resetColModel = Util.deepCopy(this.allColumns);
const viewParams: any = Util.deepCopy(this.viewparams); const viewParams: any = Util.deepCopy(this.viewparams);
Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_metaentitypickupgridview_grid_main'}); Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_metaentitygridview_grid_main'});
const post = this.service.loadModel('grid_dynaconfig', this.context, viewParams); const post = this.service.loadModel('grid_dynaconfig', this.context, viewParams);
post.then((response: any) => { post.then((response: any) => {
if(response.status == 200 && response.data) { if(response.status == 200 && response.data) {
...@@ -1938,7 +1952,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1938,7 +1952,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public saveDynaConfig() { public saveDynaConfig() {
const viewParams: any = Util.deepCopy(this.viewparams); const viewParams: any = Util.deepCopy(this.viewparams);
Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_metaentitypickupgridview_grid_main', model: this.allColumns}); Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_metaentitygridview_grid_main', model: this.allColumns});
const post = this.service.saveModel('grid_dynaconfig', this.context, viewParams); const post = this.service.saveModel('grid_dynaconfig', this.context, viewParams);
post.then((response: any) => { post.then((response: any) => {
if (response.status == 200) { if (response.status == 200) {
...@@ -2009,7 +2023,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2009,7 +2023,7 @@ export default class MainBase extends Vue implements ControlInterface {
try { try {
if(Object.is(item.rowDataState, 'create')){ if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){ if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityPickupGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator); let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
...@@ -2017,7 +2031,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2017,7 +2031,7 @@ export default class MainBase extends Vue implements ControlInterface {
} }
}else if(Object.is(item.rowDataState, 'update')){ }else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){ if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityPickupGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
if(item.metaentity){ if(item.metaentity){
...@@ -2084,7 +2098,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2084,7 +2098,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public newRow(args: any[], params?: any, $event?: any, xData?: any): void { public newRow(args: any[], params?: any, $event?: any, xData?: any): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityPickupGridView'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'MetaEntityGridView'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) });
return; return;
} }
let _this = this; let _this = this;
......
...@@ -838,7 +838,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -838,7 +838,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: 'RuleItemPickupGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemGridView' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -874,7 +874,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -874,7 +874,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/ */
public loadDraft(opt: any = {},mode?:string): void { public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemPickupGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemGridView' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
......
...@@ -393,6 +393,20 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -393,6 +393,20 @@ export default class MainBase extends Vue implements ControlInterface {
return this.selections[0]; return this.selections[0];
} }
/**
* 打开新建数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public newdata: any;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof MainBase
*/
@Prop() public opendata: any;
/** /**
* 是否嵌入关系界面 * 是否嵌入关系界面
...@@ -960,7 +974,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -960,7 +974,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public load(opt: any = {}, pageReset: boolean = false): void { public load(opt: any = {}, pageReset: boolean = false): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemPickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(pageReset){ if(pageReset){
...@@ -1055,7 +1069,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1055,7 +1069,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemPickupGridView'+(this.$t('app.gridpage.notConfig.removeAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemGridView'+(this.$t('app.gridpage.notConfig.removeAction') as string) });
return; return;
} }
let _datas:any[] = []; let _datas:any[] = [];
...@@ -1161,7 +1175,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1161,7 +1175,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public addBatch(arg: any = {}): void { public addBatch(arg: any = {}): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemPickupGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemGridView'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(!arg){ if(!arg){
...@@ -1977,7 +1991,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1977,7 +1991,7 @@ export default class MainBase extends Vue implements ControlInterface {
public setColState() { public setColState() {
this.resetColModel = Util.deepCopy(this.allColumns); this.resetColModel = Util.deepCopy(this.allColumns);
const viewParams: any = Util.deepCopy(this.viewparams); const viewParams: any = Util.deepCopy(this.viewparams);
Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_ruleitempickupgridview_grid_main'}); Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_ruleitemgridview_grid_main'});
const post = this.service.loadModel('grid_dynaconfig', this.context, viewParams); const post = this.service.loadModel('grid_dynaconfig', this.context, viewParams);
post.then((response: any) => { post.then((response: any) => {
if(response.status == 200 && response.data) { if(response.status == 200 && response.data) {
...@@ -2044,7 +2058,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2044,7 +2058,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public saveDynaConfig() { public saveDynaConfig() {
const viewParams: any = Util.deepCopy(this.viewparams); const viewParams: any = Util.deepCopy(this.viewparams);
Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_ruleitempickupgridview_grid_main', model: this.allColumns}); Object.assign(viewParams,{utilServiceName: 'grid_dynaconfig', modelid: 'ibzdst_web_ruleitemgridview_grid_main', model: this.allColumns});
const post = this.service.saveModel('grid_dynaconfig', this.context, viewParams); const post = this.service.saveModel('grid_dynaconfig', this.context, viewParams);
post.then((response: any) => { post.then((response: any) => {
if (response.status == 200) { if (response.status == 200) {
...@@ -2115,7 +2129,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2115,7 +2129,7 @@ export default class MainBase extends Vue implements ControlInterface {
try { try {
if(Object.is(item.rowDataState, 'create')){ if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){ if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemPickupGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemGridView'+(this.$t('app.gridpage.notConfig.createAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator); let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
...@@ -2123,7 +2137,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2123,7 +2137,7 @@ export default class MainBase extends Vue implements ControlInterface {
} }
}else if(Object.is(item.rowDataState, 'update')){ }else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){ if(!this.updateAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemPickupGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemGridView'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
if(item.ruleitem){ if(item.ruleitem){
...@@ -2196,7 +2210,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -2196,7 +2210,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
public newRow(args: any[], params?: any, $event?: any, xData?: any): void { public newRow(args: any[], params?: any, $event?: any, xData?: any): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemPickupGridView'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: 'RuleItemGridView'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) });
return; return;
} }
let _this = this; let _this = this;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册