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

demoadmin 发布系统代码 [ibiz-task,任务调度]

上级 0199d8b6
...@@ -39,7 +39,7 @@ export default class CodeListService { ...@@ -39,7 +39,7 @@ export default class CodeListService {
* @type {Map<string,any>} * @type {Map<string,any>}
* @memberof CodeListService * @memberof CodeListService
*/ */
public static codelistCache:Map<string,any> = new Map(); public static codelistCache: Map<string, any> = new Map();
/** /**
* 动态代码表缓存(已完成) * 动态代码表缓存(已完成)
...@@ -47,7 +47,7 @@ export default class CodeListService { ...@@ -47,7 +47,7 @@ export default class CodeListService {
* @type {Map<string,any>} * @type {Map<string,any>}
* @memberof CodeListService * @memberof CodeListService
*/ */
public static codelistCached:Map<string,any> = new Map(); public static codelistCached: Map<string, any> = new Map();
/** /**
* 数据服务基类 * 数据服务基类
...@@ -55,7 +55,7 @@ export default class CodeListService { ...@@ -55,7 +55,7 @@ export default class CodeListService {
* @type {Minorentity} * @type {Minorentity}
* @memberof CodeListService * @memberof CodeListService
*/ */
public entityService:EntityService = new EntityService(); public entityService: EntityService = new EntityService();
/** /**
* 获取代码表服务 * 获取代码表服务
...@@ -79,15 +79,15 @@ export default class CodeListService { ...@@ -79,15 +79,15 @@ export default class CodeListService {
* @returns {Promise<any[]>} * @returns {Promise<any[]>}
* @memberof CodeListService * @memberof CodeListService
*/ */
public async getDataItems(codelist:any,context?:any, data?: any, isloading?: boolean){ public async getDataItems(codelist: any, context?: any, data?: any, isloading?: boolean) {
let dataItems:Array<any> = []; let dataItems: Array<any> = [];
try{ try {
if(codelist.tag && Object.is(codelist.type,"STATIC")){ if (codelist.tag && Object.is(codelist.type, "STATIC")) {
dataItems = await this.getStaticItems(codelist.tag); dataItems = await this.getStaticItems(codelist.tag);
}else{ } else {
dataItems = await this.getItems(codelist.tag,codelist.context,codelist.viewparam,codelist.isloading); dataItems = await this.getItems(codelist.tag, codelist.context, codelist.viewparam, codelist.isloading);
} }
}catch(error){ } catch (error) {
console.warn("代码表加载异常" + error); console.warn("代码表加载异常" + error);
} }
return dataItems; return dataItems;
...@@ -100,8 +100,8 @@ export default class CodeListService { ...@@ -100,8 +100,8 @@ export default class CodeListService {
* @returns {Promise<any[]>} * @returns {Promise<any[]>}
* @memberof CodeListService * @memberof CodeListService
*/ */
public getStaticItems(tag: string):Promise<any[]>{ public getStaticItems(tag: string): Promise<any[]> {
return new Promise((resolve:any,reject:any) =>{ return new Promise((resolve: any, reject: any) => {
const codelist = this.$store.getters.getCodeList(tag); const codelist = this.$store.getters.getCodeList(tag);
if (codelist) { if (codelist) {
let items: Array<any> = [...JSON.parse(JSON.stringify(codelist.items))]; let items: Array<any> = [...JSON.parse(JSON.stringify(codelist.items))];
...@@ -117,33 +117,17 @@ export default class CodeListService { ...@@ -117,33 +117,17 @@ export default class CodeListService {
* @returns {Promise<any[]>} * @returns {Promise<any[]>}
* @memberof CodeListService * @memberof CodeListService
*/ */
public getPredefinedItems(tag: string,data?: any, isloading?: boolean):Promise<any[]>{ public getPredefinedItems(tag: string, data?: any, isloading?: boolean): Promise<any[]> {
return new Promise((resolve:any,reject:any) =>{ return new Promise((resolve: any, reject: any) => {
if(CodeListService.codelistCached.get(`${tag}`)){ this.entityService.getPredefinedCodelist(tag).then((response: any) => {
let items:any = CodeListService.codelistCached.get(`${tag}`).items; if (response && response.status === 200 && response.data && response.data.items) {
if(items.length >0) resolve(items); resolve(response.data.items);
} } else {
const callback:Function = (tag:string,promise:Promise<any>) =>{ resolve([]);
promise.then((res:any) =>{ }
let result:any = res.data; }).catch((error: any) => {
if(result.items && result.items.length > 0){ resolve([]);
CodeListService.codelistCached.set(`${tag}`,{items:result.items}); });
return resolve(result.items);
}else{
return resolve([]);
}
}).catch((result:any) =>{
return reject(result);
})
}
// 加载中,UI又需要数据,解决连续加载同一代码表问题
if(CodeListService.codelistCache.get(`${tag}`)){
callback(tag,CodeListService.codelistCache.get(`${tag}`));
}else{
let result:Promise<any> = this.entityService.getPredefinedCodelist(tag);
CodeListService.codelistCache.set(`${tag}`,result);
callback(tag,result);
}
}) })
} }
...@@ -155,70 +139,77 @@ export default class CodeListService { ...@@ -155,70 +139,77 @@ export default class CodeListService {
* @returns {Promise<any[]>} * @returns {Promise<any[]>}
* @memberof CodeListService * @memberof CodeListService
*/ */
public getItems(tag: string,context:any = {}, data?: any, isloading?: boolean): Promise<any[]> { public getItems(tag: string, context: any = {}, data?: any, isloading?: boolean): Promise<any[]> {
let _this: any = this; let _this: any = this;
if(context && context.srfsessionid){ if (context && context.srfsessionid) {
delete context.srfsessionid; delete context.srfsessionid;
} }
return new Promise((resolve:any,reject:any) =>{ return new Promise((resolve: any, reject: any) => {
this.getService(tag).then((codelist:any) =>{ this.getService(tag).then((codelist: any) => {
if(Object.is(codelist.predefinedType,"RUNTIME")){ let isEnableCache: boolean = codelist.isEnableCache;
this.getPredefinedItems(tag).then((res:any) =>{ let cacheTimeout: any = codelist.cacheTimeout;
resolve(res);
})
return;
}
let isEnableCache:boolean = codelist.isEnableCache;
let cacheTimeout:any = codelist.cacheTimeout;
// 启用缓存 // 启用缓存
if(isEnableCache){ if (isEnableCache) {
const callback:Function = (context:any ={},data:any ={},tag:string,promise:Promise<any>) =>{ const callback: Function = (context: any = {}, data: any = {}, tag: string, promise: Promise<any>) => {
const callbackKey:string = `${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`; const callbackKey: string = `${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`;
promise.then((result:any) =>{ promise.then((result: any) => {
if(result.length > 0){ if (result.length > 0) {
CodeListService.codelistCached.set(callbackKey,{items:result}); CodeListService.codelistCached.set(callbackKey, { items: result });
CodeListService.codelistCache.delete(callbackKey); CodeListService.codelistCache.delete(callbackKey);
return resolve(result); return resolve(result);
}else{ } else {
return resolve([]); return resolve([]);
} }
}).catch((result:any) =>{ }).catch((result: any) => {
return reject(result); return reject(result);
}) })
} }
// 加载完成,从本地缓存获取 // 加载完成,从本地缓存获取
const key:string = `${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`; const key: string = `${JSON.stringify(context)}-${JSON.stringify(data)}-${tag}`;
if(CodeListService.codelistCached.get(key)){ if (CodeListService.codelistCached.get(key)) {
let items:any = CodeListService.codelistCached.get(key).items; let items: any = CodeListService.codelistCached.get(key).items;
if(items.length >0){ if (items.length > 0) {
if(new Date().getTime() <= codelist.getExpirationTime()){ if (new Date().getTime() <= codelist.getExpirationTime()) {
return resolve(items); return resolve(items);
} }
} }
} }
if (codelist) { if (codelist) {
// 加载中,UI又需要数据,解决连续加载同一代码表问题 // 加载中,UI又需要数据,解决连续加载同一代码表问题
if(CodeListService.codelistCache.get(key)){ if (CodeListService.codelistCache.get(key)) {
callback(context,data,tag,CodeListService.codelistCache.get(key)); callback(context, data, tag, CodeListService.codelistCache.get(key));
}else{ } else {
let result:Promise<any> = codelist.getItems(context,data,isloading); let result: Promise<any>;
CodeListService.codelistCache.set(key,result); if (Object.is(codelist.predefinedType, "RUNTIME")) {
result = this.getPredefinedItems(tag);
} else {
result = codelist.getItems(context, data, isloading);
}
CodeListService.codelistCache.set(key, result);
codelist.setExpirationTime(new Date().getTime() + cacheTimeout); codelist.setExpirationTime(new Date().getTime() + cacheTimeout);
callback(context,data,tag,result); callback(context, data, tag, result);
} }
} }
}else{ } else {
if (codelist) { if (codelist) {
codelist.getItems(context,data,isloading).then((result:any) =>{ if (Object.is(codelist.predefinedType, "RUNTIME")) {
this.getPredefinedItems(tag).then((res: any) => {
resolve(res);
}).catch((error: any) => {
Promise.reject([]);
})
} else {
codelist.getItems(context, data, isloading).then((result: any) => {
resolve(result); resolve(result);
}).catch((error:any) =>{ }).catch((error: any) => {
Promise.reject([]); Promise.reject([]);
}) })
}else{ }
} else {
return Promise.reject([]); return Promise.reject([]);
} }
} }
}).catch((error:any) =>{ }).catch((error: any) => {
console.warn("获取代码表异常"); console.warn("获取代码表异常");
return Promise.reject([]); return Promise.reject([]);
}) })
......
...@@ -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:'加载数据失败'
......
...@@ -18,6 +18,7 @@ function getLocaleResourceBase(){ ...@@ -18,6 +18,7 @@ function getLocaleResourceBase(){
status: commonLogic.appcommonhandle("状态",null), status: commonLogic.appcommonhandle("状态",null),
update_time: commonLogic.appcommonhandle("更新时间",null), update_time: commonLogic.appcommonhandle("更新时间",null),
create_time: commonLogic.appcommonhandle("创建时间",null), create_time: commonLogic.appcommonhandle("创建时间",null),
last_time_format: commonLogic.appcommonhandle("上次执行时间",null),
}, },
views: { views: {
editview: { editview: {
...@@ -62,15 +63,15 @@ function getLocaleResourceBase(){ ...@@ -62,15 +63,15 @@ function getLocaleResourceBase(){
main_grid: { main_grid: {
columns: { columns: {
id: commonLogic.appcommonhandle("主键ID",null), id: commonLogic.appcommonhandle("主键ID",null),
remark: commonLogic.appcommonhandle("备注",null),
app: commonLogic.appcommonhandle("服务名",null), app: commonLogic.appcommonhandle("服务名",null),
remark: commonLogic.appcommonhandle("备注",null),
handler: commonLogic.appcommonhandle("执行器任务HANDLER",null), handler: commonLogic.appcommonhandle("执行器任务HANDLER",null),
cron: commonLogic.appcommonhandle("任务执行CRON",null), cron: commonLogic.appcommonhandle("任务执行CRON",null),
last_time: commonLogic.appcommonhandle("上次调度时间",null), last_time: commonLogic.appcommonhandle("上次调度时间",null),
next_time: commonLogic.appcommonhandle("下次调度时间",null), next_time: commonLogic.appcommonhandle("下次调度时间",null),
status: commonLogic.appcommonhandle("状态",null), status: commonLogic.appcommonhandle("状态",null),
timeout: commonLogic.appcommonhandle("任务执行超时时间(秒)",null), timeout: commonLogic.appcommonhandle("任务执行超时时间(秒)",null),
update_time: commonLogic.appcommonhandle("更新时间",null), last_time_format: commonLogic.appcommonhandle("上次执行时间",null),
}, },
nodata:commonLogic.appcommonhandle("",null), nodata:commonLogic.appcommonhandle("",null),
uiactions: { uiactions: {
...@@ -82,6 +83,7 @@ function getLocaleResourceBase(){ ...@@ -82,6 +83,7 @@ function getLocaleResourceBase(){
n_app_like: commonLogic.appcommonhandle("服务名(文本包含(%))",null), n_app_like: commonLogic.appcommonhandle("服务名(文本包含(%))",null),
n_handler_like: commonLogic.appcommonhandle("执行器任务HANDLER(文本包含(%))",null), n_handler_like: commonLogic.appcommonhandle("执行器任务HANDLER(文本包含(%))",null),
n_status_eq: commonLogic.appcommonhandle("状态(等于(=))",null), n_status_eq: commonLogic.appcommonhandle("状态(等于(=))",null),
n_remark_like: commonLogic.appcommonhandle("备注(文本包含(%))",null),
}, },
uiactions: { uiactions: {
}, },
......
...@@ -18,6 +18,7 @@ function getLocaleResourceBase(){ ...@@ -18,6 +18,7 @@ function getLocaleResourceBase(){
status: commonLogic.appcommonhandle("状态",null), status: commonLogic.appcommonhandle("状态",null),
update_time: commonLogic.appcommonhandle("更新时间",null), update_time: commonLogic.appcommonhandle("更新时间",null),
create_time: commonLogic.appcommonhandle("创建时间",null), create_time: commonLogic.appcommonhandle("创建时间",null),
last_time_format: commonLogic.appcommonhandle("上次执行时间",null),
}, },
views: { views: {
editview: { editview: {
...@@ -62,15 +63,15 @@ function getLocaleResourceBase(){ ...@@ -62,15 +63,15 @@ function getLocaleResourceBase(){
main_grid: { main_grid: {
columns: { columns: {
id: commonLogic.appcommonhandle("主键ID",null), id: commonLogic.appcommonhandle("主键ID",null),
remark: commonLogic.appcommonhandle("备注",null),
app: commonLogic.appcommonhandle("服务名",null), app: commonLogic.appcommonhandle("服务名",null),
remark: commonLogic.appcommonhandle("备注",null),
handler: commonLogic.appcommonhandle("执行器任务HANDLER",null), handler: commonLogic.appcommonhandle("执行器任务HANDLER",null),
cron: commonLogic.appcommonhandle("任务执行CRON",null), cron: commonLogic.appcommonhandle("任务执行CRON",null),
last_time: commonLogic.appcommonhandle("上次调度时间",null), last_time: commonLogic.appcommonhandle("上次调度时间",null),
next_time: commonLogic.appcommonhandle("下次调度时间",null), next_time: commonLogic.appcommonhandle("下次调度时间",null),
status: commonLogic.appcommonhandle("状态",null), status: commonLogic.appcommonhandle("状态",null),
timeout: commonLogic.appcommonhandle("任务执行超时时间(秒)",null), timeout: commonLogic.appcommonhandle("任务执行超时时间(秒)",null),
update_time: commonLogic.appcommonhandle("更新时间",null), last_time_format: commonLogic.appcommonhandle("上次执行时间",null),
}, },
nodata:commonLogic.appcommonhandle("",null), nodata:commonLogic.appcommonhandle("",null),
uiactions: { uiactions: {
...@@ -82,6 +83,7 @@ function getLocaleResourceBase(){ ...@@ -82,6 +83,7 @@ function getLocaleResourceBase(){
n_app_like: commonLogic.appcommonhandle("服务名(文本包含(%))",null), n_app_like: commonLogic.appcommonhandle("服务名(文本包含(%))",null),
n_handler_like: commonLogic.appcommonhandle("执行器任务HANDLER(文本包含(%))",null), n_handler_like: commonLogic.appcommonhandle("执行器任务HANDLER(文本包含(%))",null),
n_status_eq: commonLogic.appcommonhandle("状态(等于(=))",null), n_status_eq: commonLogic.appcommonhandle("状态(等于(=))",null),
n_remark_like: commonLogic.appcommonhandle("备注(文本包含(%))",null),
}, },
uiactions: { uiactions: {
}, },
......
...@@ -18,6 +18,7 @@ function getLocaleResourceBase(){ ...@@ -18,6 +18,7 @@ function getLocaleResourceBase(){
status: commonLogic.appcommonhandle("状态",null), status: commonLogic.appcommonhandle("状态",null),
update_time: commonLogic.appcommonhandle("更新时间",null), update_time: commonLogic.appcommonhandle("更新时间",null),
create_time: commonLogic.appcommonhandle("创建时间",null), create_time: commonLogic.appcommonhandle("创建时间",null),
last_time_format: commonLogic.appcommonhandle("上次执行时间",null),
}, },
views: { views: {
editview: { editview: {
...@@ -62,15 +63,15 @@ function getLocaleResourceBase(){ ...@@ -62,15 +63,15 @@ function getLocaleResourceBase(){
main_grid: { main_grid: {
columns: { columns: {
id: commonLogic.appcommonhandle("主键ID",null), id: commonLogic.appcommonhandle("主键ID",null),
remark: commonLogic.appcommonhandle("备注",null),
app: commonLogic.appcommonhandle("服务名",null), app: commonLogic.appcommonhandle("服务名",null),
remark: commonLogic.appcommonhandle("备注",null),
handler: commonLogic.appcommonhandle("执行器任务HANDLER",null), handler: commonLogic.appcommonhandle("执行器任务HANDLER",null),
cron: commonLogic.appcommonhandle("任务执行CRON",null), cron: commonLogic.appcommonhandle("任务执行CRON",null),
last_time: commonLogic.appcommonhandle("上次调度时间",null), last_time: commonLogic.appcommonhandle("上次调度时间",null),
next_time: commonLogic.appcommonhandle("下次调度时间",null), next_time: commonLogic.appcommonhandle("下次调度时间",null),
status: commonLogic.appcommonhandle("状态",null), status: commonLogic.appcommonhandle("状态",null),
timeout: commonLogic.appcommonhandle("任务执行超时时间(秒)",null), timeout: commonLogic.appcommonhandle("任务执行超时时间(秒)",null),
update_time: commonLogic.appcommonhandle("更新时间",null), last_time_format: commonLogic.appcommonhandle("上次执行时间",null),
}, },
nodata:commonLogic.appcommonhandle("",null), nodata:commonLogic.appcommonhandle("",null),
uiactions: { uiactions: {
...@@ -82,6 +83,7 @@ function getLocaleResourceBase(){ ...@@ -82,6 +83,7 @@ function getLocaleResourceBase(){
n_app_like: commonLogic.appcommonhandle("服务名(文本包含(%))",null), n_app_like: commonLogic.appcommonhandle("服务名(文本包含(%))",null),
n_handler_like: commonLogic.appcommonhandle("执行器任务HANDLER(文本包含(%))",null), n_handler_like: commonLogic.appcommonhandle("执行器任务HANDLER(文本包含(%))",null),
n_status_eq: commonLogic.appcommonhandle("状态(等于(=))",null), n_status_eq: commonLogic.appcommonhandle("状态(等于(=))",null),
n_remark_like: commonLogic.appcommonhandle("备注(文本包含(%))",null),
}, },
uiactions: { uiactions: {
}, },
......
...@@ -74,6 +74,64 @@ function getLocaleResourceBase(){ ...@@ -74,6 +74,64 @@ function getLocaleResourceBase(){
uiactions: { uiactions: {
}, },
}, },
gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("新建",null),
tip: commonLogic.appcommonhandle("新建",null),
},
tbitem4: {
caption: commonLogic.appcommonhandle("编辑",null),
tip: commonLogic.appcommonhandle("编辑",null),
},
tbitem6: {
caption: commonLogic.appcommonhandle("拷贝",null),
tip: commonLogic.appcommonhandle("拷贝",null),
},
tbitem7: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem8: {
caption: commonLogic.appcommonhandle("删除",null),
tip: commonLogic.appcommonhandle("删除",null),
},
tbitem9: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem13: {
caption: commonLogic.appcommonhandle("导出",null),
tip: commonLogic.appcommonhandle("导出",null),
},
tbitem10: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem16: {
caption: commonLogic.appcommonhandle("其它",null),
tip: commonLogic.appcommonhandle("其它",null),
},
tbitem21: {
caption: commonLogic.appcommonhandle("导出数据模型",null),
tip: commonLogic.appcommonhandle("导出数据模型",null),
},
tbitem23: {
caption: commonLogic.appcommonhandle("数据导入",null),
tip: commonLogic.appcommonhandle("数据导入",null),
},
tbitem17: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem19: {
caption: commonLogic.appcommonhandle("过滤",null),
tip: commonLogic.appcommonhandle("过滤",null),
},
tbitem18: {
caption: commonLogic.appcommonhandle("帮助",null),
tip: commonLogic.appcommonhandle("帮助",null),
},
},
}; };
return data; return data;
} }
......
...@@ -74,6 +74,64 @@ function getLocaleResourceBase(){ ...@@ -74,6 +74,64 @@ function getLocaleResourceBase(){
uiactions: { uiactions: {
}, },
}, },
gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("New",null),
tip: commonLogic.appcommonhandle("New",null),
},
tbitem4: {
caption: commonLogic.appcommonhandle("Edit",null),
tip: commonLogic.appcommonhandle("Edit {0}",null),
},
tbitem6: {
caption: commonLogic.appcommonhandle("Copy",null),
tip: commonLogic.appcommonhandle("Copy {0}",null),
},
tbitem7: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem8: {
caption: commonLogic.appcommonhandle("Remove",null),
tip: commonLogic.appcommonhandle("Remove {0}",null),
},
tbitem9: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem13: {
caption: commonLogic.appcommonhandle("Export",null),
tip: commonLogic.appcommonhandle("Export {0} Data To Excel",null),
},
tbitem10: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem16: {
caption: commonLogic.appcommonhandle("其它",null),
tip: commonLogic.appcommonhandle("其它",null),
},
tbitem21: {
caption: commonLogic.appcommonhandle("Export Data Model",null),
tip: commonLogic.appcommonhandle("导出数据模型",null),
},
tbitem23: {
caption: commonLogic.appcommonhandle("数据导入",null),
tip: commonLogic.appcommonhandle("数据导入",null),
},
tbitem17: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem19: {
caption: commonLogic.appcommonhandle("Filter",null),
tip: commonLogic.appcommonhandle("Filter",null),
},
tbitem18: {
caption: commonLogic.appcommonhandle("Help",null),
tip: commonLogic.appcommonhandle("Help",null),
},
},
}; };
return data; return data;
} }
......
...@@ -74,6 +74,64 @@ function getLocaleResourceBase(){ ...@@ -74,6 +74,64 @@ function getLocaleResourceBase(){
uiactions: { uiactions: {
}, },
}, },
gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("新建",null),
tip: commonLogic.appcommonhandle("新建",null),
},
tbitem4: {
caption: commonLogic.appcommonhandle("编辑",null),
tip: commonLogic.appcommonhandle("编辑",null),
},
tbitem6: {
caption: commonLogic.appcommonhandle("拷贝",null),
tip: commonLogic.appcommonhandle("拷贝",null),
},
tbitem7: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem8: {
caption: commonLogic.appcommonhandle("删除",null),
tip: commonLogic.appcommonhandle("删除",null),
},
tbitem9: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem13: {
caption: commonLogic.appcommonhandle("导出",null),
tip: commonLogic.appcommonhandle("导出",null),
},
tbitem10: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem16: {
caption: commonLogic.appcommonhandle("其它",null),
tip: commonLogic.appcommonhandle("其它",null),
},
tbitem21: {
caption: commonLogic.appcommonhandle("导出数据模型",null),
tip: commonLogic.appcommonhandle("导出数据模型",null),
},
tbitem23: {
caption: commonLogic.appcommonhandle("数据导入",null),
tip: commonLogic.appcommonhandle("数据导入",null),
},
tbitem17: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem19: {
caption: commonLogic.appcommonhandle("过滤",null),
tip: commonLogic.appcommonhandle("过滤",null),
},
tbitem18: {
caption: commonLogic.appcommonhandle("帮助",null),
tip: commonLogic.appcommonhandle("帮助",null),
},
},
}; };
return data; return data;
} }
......
...@@ -11,6 +11,92 @@ ...@@ -11,6 +11,92 @@
<div style='margin-bottom: 6px;'> <div style='margin-bottom: 6px;'>
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;padding-left: 24px' placeholder="执行器任务HANDLER" /> <i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;padding-left: 24px' placeholder="执行器任务HANDLER" />
<div class='pull-right'> <div class='pull-right'>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem3' }, $event)">
<i class='fa fa-file-text-o'></i>
<span class='caption'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem3.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem3.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem4.visabled" :disabled="toolBarModels.tbitem4.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem4' }, $event)">
<i class='fa fa-edit'></i>
<span class='caption'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem4.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem4.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem6.visabled" :disabled="toolBarModels.tbitem6.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem6' }, $event)">
<i class='fa fa-copy'></i>
<span class='caption'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem6.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem6.tip')}}</div>
</tooltip>
<span class='seperator'>|</span>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem8.visabled" :disabled="toolBarModels.tbitem8.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem8' }, $event)">
<i class='fa fa-remove'></i>
<span class='caption'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem8.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem8.tip')}}</div>
</tooltip>
<span class='seperator'>|</span>
<tooltip :transfer="true" :max-width="600">
<app-export-excel :item="toolBarModels.tbitem13" :caption="$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem13.caption')" @exportexcel="toolbar_click({ tag: 'tbitem13' }, $event)"></app-export-excel>
<div slot='content'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem13.tip')}}</div>
</tooltip>
<span class='seperator'>|</span>
<dropdown v-show="toolBarModels.tbitem16.visabled" trigger='click'>
<tooltip :transfer="true" :max-width="600">
<i-button class=''>
<i class=''></i>
<span class='caption'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem16.caption')}}</span>
<icon type="ios-arrow-down"></icon>
</i-button>
<div slot='content'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem16.tip')}}</div>
</tooltip>
<dropdown-menu slot='list'>
<dropdown-item>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem21.visabled" :disabled="toolBarModels.tbitem21.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem21' }, $event)">
<i class='fa fa-download'></i>
<span class='caption'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem21.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem21.tip')}}</div>
</tooltip>
</dropdown-item>
<dropdown-item>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem23.visabled" :disabled="toolBarModels.tbitem23.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem23' }, $event)">
<i class='fa fa-upload'></i>
<span class='caption'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem23.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem23.tip')}}</div>
</tooltip>
</dropdown-item>
</dropdown-menu>
</dropdown>
<span class='seperator'>|</span>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem19.visabled" :disabled="toolBarModels.tbitem19.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem19' }, $event)">
<i class='fa fa-filter'></i>
<span class='caption'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem19.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem19.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem18.visabled" :disabled="toolBarModels.tbitem18.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem18' }, $event)">
<i class='fa fa-question'></i>
<span class='caption'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem18.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.jobslog.gridviewtoolbar_toolbar.tbitem18.tip')}}</div>
</tooltip>
</div>
</div> </div>
</div> </div>
<view_searchform <view_searchform
...@@ -237,6 +323,7 @@ export default class JobsLogGridViewBase extends Vue { ...@@ -237,6 +323,7 @@ export default class JobsLogGridViewBase extends Vue {
public containerModel: any = { public containerModel: any = {
view_grid: { name: 'grid', type: 'GRID' }, view_grid: { name: 'grid', type: 'GRID' },
view_searchform: { name: 'searchform', type: 'SEARCHFORM' }, view_searchform: { name: 'searchform', type: 'SEARCHFORM' },
view_toolbar: { name: 'toolbar', type: 'TOOLBAR' },
}; };
/** /**
...@@ -275,6 +362,39 @@ export default class JobsLogGridViewBase extends Vue { ...@@ -275,6 +362,39 @@ export default class JobsLogGridViewBase extends Vue {
* @memberof JobsLogGridViewBase * @memberof JobsLogGridViewBase
*/ */
public viewState: Subject<ViewState> = new Subject(); public viewState: Subject<ViewState> = new Subject();
/**
* 工具栏模型
*
* @type {*}
* @memberof JobsLogGridView
*/
public toolBarModels: any = {
tbitem3: { name: 'tbitem3', actiontarget: 'NONE', caption: '新建', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'New', target: '' } },
tbitem4: { name: 'tbitem4', actiontarget: 'NONE', caption: '编辑', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Edit', target: 'SINGLEKEY' } },
tbitem6: { name: 'tbitem6', actiontarget: 'NONE', caption: '拷贝', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Copy', target: 'SINGLEKEY' } },
tbitem7: { name: 'tbitem7', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem8: { name: 'tbitem8', actiontarget: 'NONE', caption: '删除', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Remove', target: 'MULTIKEY' } },
tbitem9: { name: 'tbitem9', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem13: { name: 'tbitem13', actiontarget: 'NONE', caption: '导出', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportExcel', target: '' }, MaxRowCount: 1000 },
tbitem10: { name: 'tbitem10', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem16: { name: 'tbitem16', caption: '其它', disabled: false, type: 'ITEMS', visabled: true, dataaccaction: '', uiaction: { } },
tbitem21: { name: 'tbitem21', actiontarget: 'NONE', caption: '导出数据模型', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ExportModel', target: '' } },
tbitem23: { name: 'tbitem23', actiontarget: 'NONE', caption: '数据导入', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Import', target: '' } },
tbitem17: { name: 'tbitem17', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem19: { name: 'tbitem19', actiontarget: 'NONE', caption: '过滤', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'ToggleFilter', target: '' } },
tbitem18: { name: 'tbitem18', actiontarget: 'NONE', caption: '帮助', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Help', target: '' } },
};
...@@ -712,6 +832,420 @@ export default class JobsLogGridViewBase extends Vue { ...@@ -712,6 +832,420 @@ export default class JobsLogGridViewBase extends Vue {
} }
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof JobsLogGridViewBase
*/
public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem4')) {
this.toolbar_tbitem4_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem5')) {
this.toolbar_tbitem5_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem6')) {
this.toolbar_tbitem6_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem24')) {
this.toolbar_tbitem24_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem25')) {
this.toolbar_tbitem25_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem8')) {
this.toolbar_tbitem8_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem13')) {
this.toolbar_tbitem13_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem11')) {
this.toolbar_tbitem11_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem21')) {
this.toolbar_tbitem21_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem23')) {
this.toolbar_tbitem23_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem19')) {
this.toolbar_tbitem19_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem18')) {
this.toolbar_tbitem18_click(null, '', $event2);
}
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem4_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem5_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.View(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem6_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem24_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem25_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem8_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Remove(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem13_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem11_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem21_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem23_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Import(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem19_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem18_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"JobsLog");
}
/** /**
* 打开新建数据视图 * 打开新建数据视图
...@@ -819,6 +1353,260 @@ export default class JobsLogGridViewBase extends Vue { ...@@ -819,6 +1353,260 @@ export default class JobsLogGridViewBase extends Vue {
} }
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public New(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.newdata && _this.newdata instanceof Function) {
const data: any = {};
_this.newdata([{ ...data }],[{ ...data }], params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public Edit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { jobslog: args[0].jobslog })
}
_this.opendata([{ ...data }], args, params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 查看
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public View(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { jobslog: args[0].jobslog })
}
_this.opendata([{ ...data }], args, params, $event, xData);
} else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public Copy(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
if (args.length === 0) {
return;
}
const _this: any = this;
if (_this.opendata && _this.opendata instanceof Function) {
const data: any = { };
if (args.length > 0) {
Object.assign(data, { jobslog: args[0].jobslog });
}
if(!params) params = {};
Object.assign(args,{copymode:true});
_this.opendata([{ ...data }], args, params, $event, xData);
} else {
Object.assign(this.viewparams,{copymode:true});
}
}
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public NewRow(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.hasOwnProperty('newRow') && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
}else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' });
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public Remove(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.remove instanceof Function)) {
return ;
}
xData.remove(args);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public ExportExcel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.exportExcel instanceof Function) || !$event) {
return ;
}
xData.exportExcel($event.exportparms);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public Print(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
if (!xData || !(xData.print instanceof Function) || !$event) {
return ;
}
xData.print();
}
/**
* 导出数据模型
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public ExportModel(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '导出数据模型未支持' });
}
/**
* 数据导入
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public Import(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (!xData || !(xData.importExcel instanceof Function) || !$event) {
return ;
}
xData.importExcel(params);
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public ToggleFilter(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
if (_this.hasOwnProperty('isExpandSearchForm')) {
_this.isExpandSearchForm = !_this.isExpandSearchForm;
}
}
/**
* 帮助
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof JobsLogGridViewBase
*/
public Help(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
this.$Notice.error({ title: '错误', desc: '帮助未支持' });
}
/** /**
* 关闭视图 * 关闭视图
......
.jobs-log-grid-view{ .jobs-log-grid-view{
position: relative; position: relative;
} }
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
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:多数据视图属性布局 ***/
......
...@@ -52,6 +52,20 @@ ...@@ -52,6 +52,20 @@
</app-form-item> </app-form-item>
</i-col>
<i-col v-show="detailsModel.n_remark_like.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item name='n_remark_like' :itemRules="this.rules.n_remark_like" class='' :caption="$t('entities.jobsinfo.default_searchform.details.n_remark_like')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_remark_like.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.n_remark_like"
@enter="onEnter($event)"
:disabled="detailsModel.n_remark_like.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col> </i-col>
</row> </row>
</i-col> </i-col>
...@@ -313,6 +327,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -313,6 +327,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
n_app_like: null, n_app_like: null,
n_handler_like: null, n_handler_like: null,
n_status_eq: null, n_status_eq: null,
n_remark_like: null,
}; };
/** /**
...@@ -329,6 +344,8 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -329,6 +344,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
n_handler_like: new FormItemModel({ caption: '执行器任务HANDLER(文本包含(%))', detailType: 'FORMITEM', name: 'n_handler_like', visible: true, isShowCaption: true, form: this,required:false, disabled: false, enableCond: 3 }) n_handler_like: new FormItemModel({ caption: '执行器任务HANDLER(文本包含(%))', detailType: 'FORMITEM', name: 'n_handler_like', visible: true, isShowCaption: true, form: this,required:false, disabled: false, enableCond: 3 })
, ,
n_status_eq: new FormItemModel({ caption: '状态(等于(=))', detailType: 'FORMITEM', name: 'n_status_eq', visible: true, isShowCaption: true, form: this,required:false, disabled: false, enableCond: 3 }) n_status_eq: new FormItemModel({ caption: '状态(等于(=))', detailType: 'FORMITEM', name: 'n_status_eq', visible: true, isShowCaption: true, form: this,required:false, disabled: false, enableCond: 3 })
,
n_remark_like: new FormItemModel({ caption: '备注(文本包含(%))', detailType: 'FORMITEM', name: 'n_remark_like', visible: true, isShowCaption: true, form: this,required:false, disabled: false, enableCond: 3 })
, ,
}; };
...@@ -357,6 +374,12 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -357,6 +374,12 @@ export default class DefaultBase extends Vue implements ControlInterface {
{ required: this.detailsModel.n_status_eq.required, type: 'number', message: '状态(等于(=)) 值不能为空', trigger: 'change' }, { required: this.detailsModel.n_status_eq.required, type: 'number', message: '状态(等于(=)) 值不能为空', trigger: 'change' },
{ required: this.detailsModel.n_status_eq.required, type: 'number', message: '状态(等于(=)) 值不能为空', trigger: 'blur' }, { required: this.detailsModel.n_status_eq.required, type: 'number', message: '状态(等于(=)) 值不能为空', trigger: 'blur' },
], ],
n_remark_like: [
{ type: 'string', message: '备注(文本包含(%)) 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: '备注(文本包含(%)) 值必须为字符串类型', trigger: 'blur' },
{ required: this.detailsModel.n_remark_like.required, type: 'string', message: '备注(文本包含(%)) 值不能为空', trigger: 'change' },
{ required: this.detailsModel.n_remark_like.required, type: 'string', message: '备注(文本包含(%)) 值不能为空', trigger: 'blur' },
],
} }
/** /**
...@@ -395,6 +418,18 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -395,6 +418,18 @@ export default class DefaultBase extends Vue implements ControlInterface {
this.formDataChange({ name: 'n_status_eq', newVal: newVal, oldVal: oldVal }); this.formDataChange({ name: 'n_status_eq', newVal: newVal, oldVal: oldVal });
} }
/**
* 监控表单属性 n_remark_like 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof DefaultBase
*/
@Watch('data.n_remark_like')
onN_remark_likeChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'n_remark_like', newVal: newVal, oldVal: oldVal });
}
/** /**
* 重置表单项值 * 重置表单项值
...@@ -419,6 +454,7 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -419,6 +454,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
} }
/** /**
......
...@@ -40,6 +40,11 @@ export default class DefaultModel { ...@@ -40,6 +40,11 @@ export default class DefaultModel {
prop: 'status', prop: 'status',
dataType: 'NSCODELIST', dataType: 'NSCODELIST',
}, },
{
name: 'n_remark_like',
prop: 'remark',
dataType: 'TEXT',
},
] ]
} }
......
...@@ -35,27 +35,27 @@ ...@@ -35,27 +35,27 @@
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-if="getColumnState('remark')"> <template v-if="getColumnState('app')">
<el-table-column show-overflow-tooltip :prop="'remark'" :label="$t('entities.jobsinfo.main_grid.columns.remark')" :width="250" :align="'left'" :sortable="'custom'"> <el-table-column show-overflow-tooltip :prop="'app'" :label="$t('entities.jobsinfo.main_grid.columns.app')" :width="100" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}"> <template v-slot:header="{column}">
<span class="column-header "> <span class="column-header ">
{{$t('entities.jobsinfo.main_grid.columns.remark')}} {{$t('entities.jobsinfo.main_grid.columns.app')}}
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<span>{{row.remark}}</span> <span>{{row.app}}</span>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-if="getColumnState('app')"> <template v-if="getColumnState('remark')">
<el-table-column show-overflow-tooltip :prop="'app'" :label="$t('entities.jobsinfo.main_grid.columns.app')" :width="200" :align="'left'" :sortable="'custom'"> <el-table-column show-overflow-tooltip :prop="'remark'" :label="$t('entities.jobsinfo.main_grid.columns.remark')" :width="250" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}"> <template v-slot:header="{column}">
<span class="column-header "> <span class="column-header ">
{{$t('entities.jobsinfo.main_grid.columns.app')}} {{$t('entities.jobsinfo.main_grid.columns.remark')}}
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<span>{{row.app}}</span> <span>{{row.remark}}</span>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
...@@ -133,15 +133,15 @@ ...@@ -133,15 +133,15 @@
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-if="getColumnState('update_time')"> <template v-if="getColumnState('last_time_format')">
<el-table-column show-overflow-tooltip :prop="'update_time'" :label="$t('entities.jobsinfo.main_grid.columns.update_time')" :width="200" :align="'left'" :sortable="'custom'"> <el-table-column show-overflow-tooltip :prop="'last_time_format'" :label="$t('entities.jobsinfo.main_grid.columns.last_time_format')" :width="100" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}"> <template v-slot:header="{column}">
<span class="column-header "> <span class="column-header ">
{{$t('entities.jobsinfo.main_grid.columns.update_time')}} {{$t('entities.jobsinfo.main_grid.columns.last_time_format')}}
</span> </span>
</template> </template>
<template v-slot="{row,column,$index}"> <template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD HH:mm:ss" :data="row.update_time"></app-format-data> <span>{{row.last_time_format}}</span>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
...@@ -714,18 +714,18 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -714,18 +714,18 @@ export default class MainBase extends Vue implements ControlInterface {
enableCond: 3 , enableCond: 3 ,
}, },
{ {
name: 'remark', name: 'app',
label: '备注', label: '服务名',
langtag: 'entities.jobsinfo.main_grid.columns.remark', langtag: 'entities.jobsinfo.main_grid.columns.app',
show: true, show: true,
unit: 'PX', unit: 'PX',
isEnableRowEdit: false, isEnableRowEdit: false,
enableCond: 3 , enableCond: 3 ,
}, },
{ {
name: 'app', name: 'remark',
label: '服务名', label: '备注',
langtag: 'entities.jobsinfo.main_grid.columns.app', langtag: 'entities.jobsinfo.main_grid.columns.remark',
show: true, show: true,
unit: 'PX', unit: 'PX',
isEnableRowEdit: false, isEnableRowEdit: false,
...@@ -786,9 +786,9 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -786,9 +786,9 @@ export default class MainBase extends Vue implements ControlInterface {
enableCond: 3 , enableCond: 3 ,
}, },
{ {
name: 'update_time', name: 'last_time_format',
label: '更新时间', label: '上次执行时间',
langtag: 'entities.jobsinfo.main_grid.columns.update_time', langtag: 'entities.jobsinfo.main_grid.columns.last_time_format',
show: true, show: true,
unit: 'PX', unit: 'PX',
isEnableRowEdit: false, isEnableRowEdit: false,
...@@ -1509,7 +1509,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1509,7 +1509,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase * @memberof MainBase
*/ */
public arraySpanMethod({row, column, rowIndex, columnIndex} : any) { public arraySpanMethod({row, column, rowIndex, columnIndex} : any) {
let allColumns:Array<any> = ['id','remark','app','handler','cron','last_time','next_time','status','timeout','update_time']; let allColumns:Array<any> = ['id','app','remark','handler','cron','last_time','next_time','status','timeout','last_time_format'];
if(row && row.children) { if(row && row.children) {
if(columnIndex == (this.isSingleSelect ? 0:1)) { if(columnIndex == (this.isSingleSelect ? 0:1)) {
return [1, allColumns.length+1]; return [1, allColumns.length+1];
...@@ -1590,15 +1590,15 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1590,15 +1590,15 @@ export default class MainBase extends Vue implements ControlInterface {
groupById: Number((i+1)*100), groupById: Number((i+1)*100),
group: group.label, group: group.label,
id:'', id:'',
remark:'',
app:'', app:'',
remark:'',
handler:'', handler:'',
cron:'', cron:'',
last_time:'', last_time:'',
next_time:'', next_time:'',
status:'', status:'',
timeout:'', timeout:'',
update_time:'', last_time_format:'',
children: children children: children
} }
groupTree.push(tree); groupTree.push(tree);
...@@ -1626,15 +1626,15 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1626,15 +1626,15 @@ export default class MainBase extends Vue implements ControlInterface {
groupById: Number((allGroup.length+1)*100), groupById: Number((allGroup.length+1)*100),
group: this.$t('app.gridpage.other'), group: this.$t('app.gridpage.other'),
id:'', id:'',
remark:'',
app:'', app:'',
remark:'',
handler:'', handler:'',
cron:'', cron:'',
last_time:'', last_time:'',
next_time:'', next_time:'',
status:'', status:'',
timeout:'', timeout:'',
update_time:'', last_time_format:'',
children: child children: child
} }
if(child && child.length > 0){ if(child && child.length > 0){
...@@ -1682,15 +1682,15 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1682,15 +1682,15 @@ export default class MainBase extends Vue implements ControlInterface {
groupById: Number((groupIndex+1)*100), groupById: Number((groupIndex+1)*100),
group: group, group: group,
id:'', id:'',
remark:'',
app:'', app:'',
remark:'',
handler:'', handler:'',
cron:'', cron:'',
last_time:'', last_time:'',
next_time:'', next_time:'',
status:'', status:'',
timeout:'', timeout:'',
update_time:'', last_time_format:'',
children: children, children: children,
} }
groupTree.push(tree); groupTree.push(tree);
......
...@@ -32,13 +32,13 @@ export default class MainModel { ...@@ -32,13 +32,13 @@ export default class MainModel {
dataType: 'TEXT', dataType: 'TEXT',
}, },
{ {
name: 'remark', name: 'app',
prop: 'remark', prop: 'app',
dataType: 'TEXT', dataType: 'TEXT',
}, },
{ {
name: 'app', name: 'remark',
prop: 'app', prop: 'remark',
dataType: 'TEXT', dataType: 'TEXT',
}, },
{ {
...@@ -72,9 +72,9 @@ export default class MainModel { ...@@ -72,9 +72,9 @@ export default class MainModel {
dataType: 'INT', dataType: 'INT',
}, },
{ {
name: 'update_time', name: 'last_time_format',
prop: 'update_time', prop: 'last_time_format',
dataType: 'DATETIME', dataType: 'TEXT',
}, },
{ {
name: 'srfkey', name: 'srfkey',
...@@ -111,6 +111,11 @@ export default class MainModel { ...@@ -111,6 +111,11 @@ export default class MainModel {
prop: 'n_status_eq', prop: 'n_status_eq',
dataType: 'QUERYPARAM' dataType: 'QUERYPARAM'
}, },
{
name: 'n_remark_like',
prop: 'n_remark_like',
dataType: 'QUERYPARAM'
},
{ {
name:'size', name:'size',
......
...@@ -37,12 +37,6 @@ ...@@ -37,12 +37,6 @@
git clone -b master $para2 ibztask/ git clone -b master $para2 ibztask/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibztask/ cd ibztask/
mvn clean package -Papi
mvn install -Papi
cd ibztask-provider/ibztask-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibztask-provider-api.yaml ibzlab-rt --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -40,6 +40,13 @@ public class JobsInfoSearchContext extends QueryWrapperContext<JobsInfo> { ...@@ -40,6 +40,13 @@ public class JobsInfoSearchContext extends QueryWrapperContext<JobsInfo> {
if(!ObjectUtils.isEmpty(this.n_handler_like)){ if(!ObjectUtils.isEmpty(this.n_handler_like)){
this.getSearchCond().like("handler", n_handler_like); this.getSearchCond().like("handler", n_handler_like);
} }
}
private String n_remark_like;//[备注]
public void setN_remark_like(String n_remark_like) {
this.n_remark_like = n_remark_like;
if(!ObjectUtils.isEmpty(this.n_remark_like)){
this.getSearchCond().like("remark", n_remark_like);
}
} }
private Integer n_status_eq;//[状态] private Integer n_status_eq;//[状态]
public void setN_status_eq(Integer n_status_eq) { public void setN_status_eq(Integer n_status_eq) {
......
...@@ -205,8 +205,8 @@ public class JobsInfoServiceImpl extends ServiceImpl<JobsInfoMapper, JobsInfo> i ...@@ -205,8 +205,8 @@ public class JobsInfoServiceImpl extends ServiceImpl<JobsInfoMapper, JobsInfo> i
@Transactional @Transactional
public JobsInfo stop(JobsInfo et) { public JobsInfo stop(JobsInfo et) {
et.set("Last_time","0"); et.set("Last_time","0");
et.set("Status","1");
et.set("Next_time","0"); et.set("Next_time","0");
et.set("Status","1");
update(et); update(et);
return et; return et;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!--输出实体[JOBS_INFO]数据结构 --> <!--输出实体[JOBS_INFO]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-jobs_info-6-1"> <changeSet author="root" id="tab-jobs_info-23-1">
<createTable tableName="JOBS_INFO"> <createTable tableName="JOBS_INFO">
<column name="ID" remarks="" type="VARCHAR(100)"> <column name="ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_JOBS_INFO_ID"/> <constraints primaryKey="true" primaryKeyName="PK_JOBS_INFO_ID"/>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<!--输出实体[JOBS_LOCK]数据结构 --> <!--输出实体[JOBS_LOCK]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-jobs_lock-1-2"> <changeSet author="root" id="tab-jobs_lock-1-2">
<createTable tableName="JOBS_LOCK"> <createTable tableName="JOBS_LOCK">
<column name="ID" remarks="" type="VARCHAR(100)"> <column name="ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_JOBS_LOCK_ID"/> <constraints primaryKey="true" primaryKeyName="PK_JOBS_LOCK_ID"/>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<!--输出实体[JOBS_LOG]数据结构 --> <!--输出实体[JOBS_LOG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-jobs_log-2-3"> <changeSet author="root" id="tab-jobs_log-6-3">
<createTable tableName="JOBS_LOG"> <createTable tableName="JOBS_LOG">
<column name="ID" remarks="" type="VARCHAR(100)"> <column name="ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_JOBS_LOG_ID"/> <constraints primaryKey="true" primaryKeyName="PK_JOBS_LOG_ID"/>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<!--输出实体[JOBS_REGISTRY]数据结构 --> <!--输出实体[JOBS_REGISTRY]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-jobs_registry-1-4"> <changeSet author="root" id="tab-jobs_registry-1-4">
<createTable tableName="JOBS_REGISTRY"> <createTable tableName="JOBS_REGISTRY">
<column name="ID" remarks="" type="VARCHAR(100)"> <column name="ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_JOBS_REGISTRY_ID"/> <constraints primaryKey="true" primaryKeyName="PK_JOBS_REGISTRY_ID"/>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<![CDATA[select t1.* from (SELECT t1.`APP`, t1.`AUTHOR`, t1.`CREATE_TIME`, t1.`CRON`, t1.`FAIL_RETRY_COUNT`, t1.`HANDLER`, t1.`ID`, t1.`LAST_TIME`, t1.`NEXT_TIME`, t1.`PARAM`, t1.`REMARK`, t1.`STATUS`, t1.`TENANT_ID`, t1.`TIMEOUT`, t1.`UPDATE_TIME` FROM `JOBS_INFO` t1 ) t1 where id=#{id}]]> <![CDATA[select t1.* from (SELECT t1.`APP`, t1.`AUTHOR`, t1.`CREATE_TIME`, t1.`CRON`, t1.`FAIL_RETRY_COUNT`, t1.`HANDLER`, t1.`ID`, t1.`LAST_TIME`, t1.`NEXT_TIME`, t1.`PARAM`, t1.`REMARK`, t1.`STATUS`, t1.`TENANT_ID`, t1.`TIMEOUT`, t1.`UPDATE_TIME` FROM `JOBS_INFO` t1 ) t1 where id=#{id}]]>
</select> </select>
<select id="selectById" resultMap="JobsInfoResultMap" databaseId="oracle"> <select id="selectById" resultMap="JobsInfoResultMap" databaseId="oracle">
<![CDATA[select t1.* from (SELECT t1.APP, t1.AUTHOR, t1.CREATE_TIME, t1.CRON, t1.FAIL_RETRY_COUNT, t1.HANDLER, t1.ID, t1.LAST_TIME, t1.NEXT_TIME, t1.PARAM, t1.REMARK, t1.STATUS, t1.TENANT_ID, t1.TIMEOUT, t1.UPDATE_TIME FROM JOBS_INFO t1 ) t1 where id=#{id}]]> <![CDATA[select t1.* from (SELECT t1.APP, t1.AUTHOR, t1.CREATE_TIME, t1.CRON, t1.FAIL_RETRY_COUNT, t1.HANDLER, t1.ID, t1.LAST_TIME, t1.LAST_TIME AS LAST_TIME_FORMAT, t1.NEXT_TIME, t1.PARAM, t1.REMARK, t1.STATUS, t1.TENANT_ID, t1.TIMEOUT, t1.UPDATE_TIME FROM JOBS_INFO t1 ) t1 where id=#{id}]]>
</select> </select>
<select id="selectById" resultMap="JobsInfoResultMap" databaseId="postgresql"> <select id="selectById" resultMap="JobsInfoResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.APP, t1.AUTHOR, t1.CREATE_TIME, t1.CRON, t1.FAIL_RETRY_COUNT, t1.HANDLER, t1.ID, t1.LAST_TIME, t1.NEXT_TIME, t1.PARAM, t1.REMARK, t1.STATUS, t1.TENANT_ID, t1.TIMEOUT, t1.UPDATE_TIME FROM JOBS_INFO t1 ) t1 where id=#{id}]]> <![CDATA[select t1.* from (SELECT t1.APP, t1.AUTHOR, t1.CREATE_TIME, t1.CRON, t1.FAIL_RETRY_COUNT, t1.HANDLER, t1.ID, t1.LAST_TIME, t1.NEXT_TIME, t1.PARAM, t1.REMARK, t1.STATUS, t1.TENANT_ID, t1.TIMEOUT, t1.UPDATE_TIME FROM JOBS_INFO t1 ) t1 where id=#{id}]]>
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<result property="nextTime" column="next_time" /> <result property="nextTime" column="next_time" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="lastTimeFormat" column="last_time_format" />
</resultMap> </resultMap>
...@@ -43,7 +44,7 @@ ...@@ -43,7 +44,7 @@
</sql> </sql>
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="oracle"> <sql id="Default" databaseId="oracle">
<![CDATA[ SELECT t1.APP, t1.AUTHOR, t1.CREATE_TIME, t1.CRON, t1.FAIL_RETRY_COUNT, t1.HANDLER, t1.ID, t1.LAST_TIME, t1.NEXT_TIME, t1.PARAM, t1.REMARK, t1.STATUS, t1.TENANT_ID, t1.TIMEOUT, t1.UPDATE_TIME FROM JOBS_INFO t1 <![CDATA[ SELECT t1.APP, t1.AUTHOR, t1.CREATE_TIME, t1.CRON, t1.FAIL_RETRY_COUNT, t1.HANDLER, t1.ID, t1.LAST_TIME, t1.LAST_TIME AS LAST_TIME_FORMAT, t1.NEXT_TIME, t1.PARAM, t1.REMARK, t1.STATUS, t1.TENANT_ID, t1.TIMEOUT, t1.UPDATE_TIME FROM JOBS_INFO t1
]]> ]]>
</sql> </sql>
<!--数据查询[Default]--> <!--数据查询[Default]-->
...@@ -58,7 +59,7 @@ ...@@ -58,7 +59,7 @@
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="oracle"> <sql id="View" databaseId="oracle">
<![CDATA[ SELECT t1.APP, t1.AUTHOR, t1.CREATE_TIME, t1.CRON, t1.FAIL_RETRY_COUNT, t1.HANDLER, t1.ID, t1.LAST_TIME, t1.NEXT_TIME, t1.PARAM, t1.REMARK, t1.STATUS, t1.TENANT_ID, t1.TIMEOUT, t1.UPDATE_TIME FROM JOBS_INFO t1 <![CDATA[ SELECT t1.APP, t1.AUTHOR, t1.CREATE_TIME, t1.CRON, t1.FAIL_RETRY_COUNT, t1.HANDLER, t1.ID, t1.LAST_TIME, t1.LAST_TIME AS LAST_TIME_FORMAT, t1.NEXT_TIME, t1.PARAM, t1.REMARK, t1.STATUS, t1.TENANT_ID, t1.TIMEOUT, t1.UPDATE_TIME FROM JOBS_INFO t1
]]> ]]>
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
......
...@@ -216,6 +216,21 @@ ...@@ -216,6 +216,21 @@
"key_field":0, "key_field":0,
"show_order":22, "show_order":22,
"major_field":0 "major_field":0
},
{
"fieldname":"LAST_TIME_FORMAT" ,
"codename":"Last_time_format",
"field_logic_name":"上次执行时间",
"entity_name":"JOBS_INFO",
"field_type":"TEXT",
"nullable":1,
"physical_field":0,
"data_type":"VARCHAR",
"data_length":200,
"expression":"%1$s",
"key_field":0,
"show_order":1000,
"major_field":0
} }
], ],
"subEntitys":[ "subEntitys":[
......
...@@ -10,6 +10,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -10,6 +10,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /ibztask-provider-api.jar java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /ibztask-provider-api.jar
EXPOSE 40005 EXPOSE 8081
ADD ibztask-provider-api.jar /ibztask-provider-api.jar ADD ibztask-provider-api.jar /ibztask-provider-api.jar
...@@ -22,34 +22,7 @@ spec: ...@@ -22,34 +22,7 @@ spec:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibztask-provider-api:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibztask-provider-api:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 40005 - containerPort: 8081
env:
- name: SPRING_CLOUD_NACOS_DISCOVERY_IP
value: "172.16.180.237"
- name: SERVER_PORT
value: "40005"
- name: SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR
value: "172.16.100.243:8848"
- name: SPRING_REDIS_HOST
value: "172.16.100.243"
- name: SPRING_REDIS_PORT
value: "6379"
- name: SPRING_REDIS_DATABASE
value: "0"
- name: SPRING_DATASOURCE_USERNAME
value: "a_A_5d9d78509"
- name: SPRING_DATASOURCE_PASSWORD
value: "@6dEfb3@"
- name: SPRING_DATASOURCE_URL
value: "jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true&serverTimezone=GMT%2B8"
- name: SPRING_DATASOURCE_DRIVER-CLASS-NAME
value: "com.mysql.jdbc.Driver"
- name: SPRING_DATASOURCE_DEFAULTSCHEMA
value: "a_A_5d9d78509"
- name: NACOS
value: "172.16.100.243:8848"
- name: SPRING_CLOUD_NACOS_DISCOVERY_GROUP
value: "ibizdev"
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /app/file mountPath: /app/file
...@@ -69,9 +42,9 @@ spec: ...@@ -69,9 +42,9 @@ spec:
type: NodePort type: NodePort
ports: ports:
- name: http - name: http
port: 40005 port: 8081
targetPort: 40005 targetPort: 8081
nodePort: 40005 nodePort: 8081
protocol: TCP protocol: TCP
selector: selector:
app: ibztask-provider-api app: ibztask-provider-api
......
...@@ -3,29 +3,9 @@ services: ...@@ -3,29 +3,9 @@ services:
ibztask-provider-api: ibztask-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibztask-provider-api:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibztask-provider-api:latest
ports: ports:
- "40005:40005" - "8081:8081"
networks: networks:
- agent_network - agent_network
#logging:
# driver: loki
# options:
# loki-url: "http://172.16.240.111:3100/loki/api/v1/push"
# max-size: "50m"
# max-file: "10"
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=40005
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.100.243:8848
- SPRING_REDIS_HOST=172.16.100.243
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
- SPRING_DATASOURCE_PASSWORD=@6dEfb3@
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true&serverTimezone=GMT%2B8
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
- NACOS=172.16.100.243:8848
- SPRING_CLOUD_NACOS_DISCOVERY_GROUP=ibizdev
deploy: deploy:
resources: resources:
limits: limits:
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册