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

ibiz4j 发布系统代码

上级 a4cf8f36
## v7.0.0-alpha.18 [2020-8-23]
### Bug修复
修复后续界面行为异常问题
修复表格合计行去掉N/A字样
修复树表跳转页面逻辑
修复嵌入表格保存提示信息重复问题
修复表格表格值清空保存问题
### 功能新增及优化
#### 模板
新增向导面板支持状态属性
新增应用全屏功能和应用锁屏功能
新增搜索表单新建默认值逻辑
新增实体表格值规则
新增动态工作流导航视图计数器
新增工作流审批意见控件时光轴样式组件和cron表达式组件
新增支持日历部件项布局面板
优化视图标题问题
优化表单属性值规则,无值的时候不校验
优化表单按钮、表单分组界面行为、表格操作列、工具栏、操作列权限控制
优化实体数据多项选择视图选中效果
优化动态代码表本地缓存逻辑
优化合入应用级上下文时机
优化实体数据重定向视图逻辑
优化表单开始流程和提交流程逻辑
#### 基础文件
修复表格滑动条表头与内容不齐
修复数据选择(嵌入视图)抛值异常问题
优化权限服务基类菜单权限和统一资源权限
优化动态工作流导航视图引擎
优化表单按钮、表单分组界面行为、表格操作列、工具栏、操作列权限控制
优化表单项增加padding
新增应用全屏组件和应用锁屏组件
新增工作流审批意见控件时光轴样式组件和cron表达式组件
## v7.0.0-alpha.17 [2020-8-9]
### Bug修复
......
......@@ -83,6 +83,10 @@ import UpdatePwd from './components/app-update-password/app-update-password.vue'
import AppMenuItem from './components/app-menu-item/app-menu-item.vue'
import AppFullScren from './components/app-full-scren/app-full-scren.vue'
import AppLockScren from './components/app-lock-scren/app-lock-scren.vue'
import ActionTimeline from './components/action-timeline/action-timeline.vue'
import CronEditor from './components/cron-editor/cron-editor.vue'
import AppMessagePopover from './components/app-message-popover/app-message-popover.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
// 全局挂载实体权限服务注册中心
......@@ -179,5 +183,8 @@ export const AppComponents = {
v.component('context-menu-drag',ContextMenuDrag);
v.component('app-update-password',UpdatePwd);
v.component('app-menu-item', AppMenuItem);
v.component('action-timeline', ActionTimeline);
v.component('cron-editor', CronEditor);
v.component('app-message-popover', AppMessagePopover);
},
};
\ No newline at end of file
.action-timeline-table {
width: calc(100% - 60px);
margin: 0 30px;
border-collapse:separate;
border-spacing:0px 40px;
.action-timeline-thead {
th:nth-child(1) {
min-width: 200px;
}
th:nth-child(2) {
width: 100%
}
}
.action-timeline-tbody {
tr {
td {
position: relative;
> .date {
display: flex;
width: max-content;
padding: 16px;
font-size: 16px;
border: 2px solid #515a6e;
.arrow {
margin-left: 10px;
}
}
>.date::before {
content: ' ';
display: block;
position: absolute;
right: -20px;
top: 30px;
height: 2px;
width: 20px;
background-color: #515a6e;
}
>.timeline {
padding: 16px;
border: 2px solid #515a6e;
min-height: 68px;
margin-left: 18px;
.action-timeline-wrapper {
padding-left: 115px;
color: var(--view-font-color-bright);
>.action-timeline-item {
position: relative;
height: 30px;
display: list-item;
list-style: none;
top: -6px;
>.timeline-time {
position: absolute;
left: -115px;
top: 5px;
font-size: 12px;
}
>.timeline-content {
padding: 5px;
padding-left: 65px;
}
}
>.action-timeline-item::before {
position: absolute;
top: 17px;
left: 45px;
z-index: 3;
width: 7px;
height: 7px;
background-color: var(--view-button-background-color);
border: 1px solid #515a6e;
content: ' ';
border-radius: 50%;
}
>.action-timeline-item:nth-child(n+2)::after {
position: absolute;
top: -7px;
bottom: 12px;
left: 48px;
z-index: 1;
display: block;
content: ' ';
border-left: 1px solid #515a6e;
}
}
}
}
}
}
}
\ No newline at end of file
<template>
<div class="action-timeline">
<table class="action-timeline-table">
<thead class="action-timeline-thead">
<tr>
<th></th>
<th></th>
</tr>
</thead>
<tbody class="action-timeline-tbody">
<template v-for="(usertask, usertaskIndex) in data.usertasks">
<tr :key='usertaskIndex'>
<td align="right" valign="top">
<div class='date'>
<div class='usertaskname'>{{ usertask.userTaskName }}</div>
<div class='arrow' @click="changeExpand(usertask)">
<i :class="usertask.isShow ? 'el-icon-arrow-down' : 'el-icon-arrow-up' " />
</div>
</div>
</td>
<td>
<div class='timeline'>
<template v-if="usertask.identitylinks && usertask.identitylinks.length > 0">
{{$t('components.appWFApproval.wait')}}
<strong>
<template v-for="(identitylink, len) in usertask.identitylinks">
<template v-if="identitylink.displayname">
{{ identitylink.displayname }}
<template v-if="len != usertask.identitylinks.length - 1">
</template>
</template>
</template>
</strong>
{{$t('components.appWFApproval.handle')}}
</template>
<template v-else>
<ul class="action-timeline-wrapper">
<template v-if="!usertask.isShow">
<li v-if="usertask.comments && usertask.comments.length > 0" class="action-timeline-item">
<div class='timeline-time'>
{{ formatDate(usertask.comments[0].time, 'MM月DD日 HH:mm') }}&nbsp;{{ usertask.comments[0].authorName }}
</div>
<div class='timeline-content'>
{{ usertask.comments[0].type }}&nbsp;{{ usertask.comments[0].fullMessage }}
</div>
</li>
</template>
<template v-else>
<template v-for="(comment, commentIndex) in usertask.comments">
<li :key="commentIndex" class="action-timeline-item">
<div class='timeline-time'>
{{ formatDate(comment.time, 'MM月DD日 HH:mm')}} &nbsp;{{ comment.authorName }}
</div>
<div class='timeline-content'>
{{ comment.type }}&nbsp;{{ comment.fullMessage }}
</div>
</li>
</template>
</template>
</ul>
</template>
</div>
</td>
</tr>
</template>
</tbody>
</table>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
import moment from 'moment';
@Component({
})
export default class ActionTimeline extends Vue {
/**
* 数据
*
* @memberof ActionTimeline
*/
public data:any = {};
/**
* 初始化memo
*
* @memberof ActionTimeline
*/
public initmemo:string = "";
/**
* 传入数据服务
*
* @memberof ActionTimeline
*/
@Prop() public service:any;
/**
* 上下文
*
* @memberof ActionTimeline
*/
@Prop() public context:any;
/**
* 视图参数
*
* @memberof ActionTimeline
*/
@Prop() public viewparams:any;
/**
* 初始化数据
*
* @memberof ActionTimeline
*/
public created(){
if(this.service){
this.service.GetWFHistory(this.context).then((res:any) =>{
if(res && (res.status === 200)){
this.data = res.data;
this.initUIStateData();
}
})
}
}
/**
* 初始化数据添加标记
*
* @memberof ActionTimeline
*/
public initUIStateData() {
if(this.data && this.data.usertasks) {
this.data.usertasks.forEach((item: any) => {
item.isShow = true;
})
}
}
/**
* 时间转换
*
* @memberof ActionTimeline
*/
public formatDate(date: string, format: string) {
return moment(date).format(format);
}
/**
* 点击事件
*
* @memberof ActionTimeline
*/
public changeExpand(usertask:any) {
usertask.isShow = !usertask.isShow;
this.$forceUpdate();
}
}
</script>
<style lang='less'>
@import './action-timeline.less';
</style>
\ No newline at end of file
......@@ -104,8 +104,15 @@ export default class AppActionBar extends Vue {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService && data && Object.keys(data).length >0){
let dataActionResult:any = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
......
......@@ -162,8 +162,15 @@ export default class AppFormGroup extends Vue {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService && data && Object.keys(data).length >0){
let dataActionResult:any = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
......
.app-form-item {
height: 100%;
padding: 0 6px;
.editor {
height: 100%;
.ivu-form-item-content {
......
.item {
height: 24px;
line-height: 24px;
}
.show-more {
text-align: center;
margin-top: 10px;
height: 20px;
color: #409eff;
label {
cursor: pointer;
}
}
#bellBtn {
height: 24px;
font-size: 19px;
padding-top: 2px;
padding-right: 2px;
color: #aaa;
}
.Row {
height: 70px;
border-bottom: 1px solid lightgray;
display: flex;
align-items: center;
.column1 {
text-align: center;
border: 0px solid red;
}
.column2 {
border: 0px red solid;
.process-definition-name {
font-size: 14px;
}
.el-row {
display: flex;
.el-col {
flex-grow: 1;
div {
margin-bottom: 5px;
}
div:first-child {
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
div:nth-child(n+2) {
font-size: 12px;
}
}
}
}
}
<template>
<Select
v-model="value[0]"
class="transfer-select"
@on-change='handleCronChange'
:disabled="disabled"
:placeholder="placeholder">
<Option class="hidden" v-for="(item,i) in value" :value="item" :label="item" :key="i">
</Option>
<vue-cron class='vue-cron' @cronValue='handleCronChange'></vue-cron>
</Select>
</template>
<script lang="ts">
import { Vue, Component, Prop, Watch, Model } from 'vue-property-decorator';
import VueCron from './vue-cron/vue-cron.vue';
@Component({
components: {
'vue-cron': VueCron,
}
})
export default class CronEditor extends Vue {
/**
* 启用状态
*
* @type {any}
* @memberof CronEditor
*/
@Prop() disabled: any;
/**
* 下拉框显示值
*
* @type {any}
* @memberof CronEditor
*/
@Prop() placeholder:any;
/**
* 绑定Cron表达式
*
* @type {any[]}
* @memberof CronEditor
*/
public value: any[] = [];
/**
* 处理返回Cron表达式
*
* @type {any}
* @memberof CronEditor
*/
public handleCronChange(val: any) {
this.value[0] = val;
this.value.push(val);
}
/**
* Vue生命周期
*
*/
public created() {
this.value[0] = '';
}
}
</script>
<style lang="less">
.transfer-select{
.ivu-select-dropdown {
padding: 0px;
overflow: inherit;
.hidden {
display: none;
}
.vue-cron{
min-width: 100% !important;
}
}
}
</style>
\ No newline at end of file
<template>
<div :val="value_">
<div>
<el-radio v-model="type" label="1" size="mini" border>{{ $t('components.cronEditor.day.daily') }}</el-radio>
</div>
<div>
<el-radio v-model="type" label="5" size="mini" border>{{ $t('components.cronEditor.public.notSpecify') }}</el-radio>
</div>
<div>
<el-radio v-model="type" label="2" size="mini" border>{{ $t('components.cronEditor.public.cycle') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.public.from') }}</span>
<el-input-number @change="type = '2'" v-model="cycle.start" :min="1" :max="31" size="mini" style="width: 100px;"></el-input-number>
<span style="margin-left: 5px; margin-right: 5px;">{{ $t('components.cronEditor.public.to') }}</span>
<el-input-number @change="type = '2'" v-model="cycle.end" :min="2" :max="31" size="mini" style="width: 100px;"></el-input-number>
{{ $t('components.cronEditor.day.title') }}
</div>
<div>
<el-radio v-model="type" label="3" size="mini" border>{{ $t('components.cronEditor.public.loop') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.public.from') }}</span>
<el-input-number @change="type = '3'" v-model="loop.start" :min="1" :max="31" size="mini" style="width: 100px;"></el-input-number>
<span style="margin-left: 5px; margin-right: 5px;">{{ $t('components.cronEditor.day.dayStart') }}</span>
<el-input-number @change="type = '3'" v-model="loop.end" :min="1" :max="31" size="mini" style="width: 100px;"></el-input-number>
{{ $t('components.cronEditor.day.onceADay') }}
</div>
<div>
<el-radio v-model="type" label="8" size="mini" border>{{ $t('components.cronEditor.day.workDay') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.day.thisMonth') }}</span>
<el-input-number @change="type = '8'" v-model="work" :min="1" :max="7" size="mini" style="width: 100px;"></el-input-number>
{{ $t('components.cronEditor.day.lastWorkDay') }}
</div>
<div>
<el-radio v-model="type" label="6" size="mini" border>{{ $t('components.cronEditor.day.lastDayOfMonth') }}</el-radio>
</div>
<div>
<el-radio v-model="type" label="4" size="mini" border>{{ $t('components.cronEditor.public.specify') }}</el-radio>
<el-checkbox-group v-model="appoint">
<div v-for="i in 4" :key="i" style="margin-left: 10px; line-height: 25px;">
<template v-for="j in 10">
<el-checkbox @change="type = '4'" v-if="parseInt((i - 1) + '' + (j - 1)) < 32 && !(i === 1 && j === 1)" :key="j" :label="(i - 1) + '' + (j - 1)"></el-checkbox>
</template>
</div>
</el-checkbox-group>
</div>
</div>
</template>
<script lang='ts'>
import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
@Component({})
export default class Day extends Vue {
/**
* Cron表达式
*
* @type {any}
* @memberof Day
*/
public value: any;
/**
* 标签类型标识
*
* @type {any}
* @memberof Day
*/
public type: string = '5';
/**
* 周期
*
* @type {any}
* @memberof Day
*/
public cycle: any = {
start: 0,
end: 0
};
/**
* 循环
*
* @type {any}
* @memberof Day
*/
public loop: any = {
start: 0,
end: 0
};
/**
* 指定周
*
* @type {any}
* @memberof Day
*/
public week: any = {
start: 0,
end: 0
};
/**
* 工作日
*
* @type {any}
* @memberof Day
*/
public work: number = 0;
/**
* 最后
*
* @type {any}
* @memberof Day
*/
public last: number = 0;
/**
* 指定
*
* @type {any}
* @memberof Day
*/
public appoint: any = [];
/**
* 获取Cron表达式
*
* @returns
* @memberof Day
*/
get value_() {
let result: any = [];
switch (this.type) {
case '1': // 每秒
result.push('*')
break
case '2': // 周期
result.push(`${this.cycle.start}-${this.cycle.end}`)
break
case '3': // 循环
result.push(`${this.loop.start}/${this.loop.end}`)
break
case '4': // 指定
result.push(this.appoint.join(','))
break
case '6': // 最后
result.push(`${this.last === 0 ? '' : this.last}L`)
break
case '7': // 指定周
result.push(`${this.week.start}#${this.week.end}`)
break
case '8': // 工作日
result.push(`${this.work}W`)
break
default: // 不指定
result.push('?')
break
}
this.$emit('input', result.join(''))
return result.join('')
}
/**
* 数据值变化
*
* @returns
* @memberof Day
*/
@Watch('value')
public updateVal() {
if (!this.value) {
return
}
if (this.value === '?') {
this.type = '5'
} else if (this.value.indexOf('-') !== -1) { // 2周期
if (this.value.split('-').length === 2) {
this.type = '2'
this.cycle.start = this.value.split('-')[0]
this.cycle.end = this.value.split('-')[1]
}
} else if (this.value.indexOf('/') !== -1) { // 3循环
if (this.value.split('/').length === 2) {
this.type = '3'
this.loop.start = this.value.split('/')[0]
this.loop.end = this.value.split('/')[1]
}
} else if (this.value.indexOf('*') !== -1) { // 1每
this.type = '1'
} else if (this.value.indexOf('L') !== -1) { // 6最后
this.type = '6'
this.last = this.value.replace('L', '')
} else if (this.value.indexOf('#') !== -1) { // 7指定周
if (this.value.split('#').length === 2) {
this.type = '7'
this.week.start = this.value.split('#')[0]
this.week.end = this.value.split('#')[1]
}
} else if (this.value.indexOf('W') !== -1) { // 8工作日
this.type = '8'
this.work = this.value.replace('W', '')
} else { // *
this.type = '4'
this.appoint = this.value.split(',')
}
}
/**
* Vue生命周期
*
* @returns
* @memberof Day
*/
public created() {
this.updateVal();
}
}
</script>
<style lang="css">
.el-checkbox+.el-checkbox {
margin-left: 10px;
}
</style>
<template lang="html">
<div :val="value_">
<div>
<el-radio v-model="type" label="1" size="mini" border>{{ $t('components.cronEditor.hour.everyHour') }}</el-radio>
</div>
<div>
<el-radio v-model="type" label="2" size="mini" border>{{ $t('components.cronEditor.public.cycle') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.public.from') }}</span>
<el-input-number @change="type = '2'" v-model="cycle.start" :min="0" :max="23" size="mini" style="width: 100px;"></el-input-number>
<span style="margin-left: 5px; margin-right: 5px;">{{ $t('components.cronEditor.public.to') }}</span>
<el-input-number @change="type = '2'" v-model="cycle.end" :min="2" :max="23" size="mini" style="width: 100px;"></el-input-number>
{{ $t('components.cronEditor.hour.title') }}
</div>
<div>
<el-radio v-model="type" label="3" size="mini" border>{{ $t('components.cronEditor.public.loop') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.public.from') }}</span>
<el-input-number @change="type = '3'" v-model="loop.start" :min="0" :max="23" size="mini" style="width: 100px;"></el-input-number>
<span style="margin-left: 5px; margin-right: 5px;">{{ $t('components.cronEditor.hour.hourStart') }}</span>
<el-input-number @change="type = '3'" v-model="loop.end" :min="1" :max="23" size="mini" style="width: 100px;"></el-input-number>
{{ $t('components.cronEditor.hour.onceAHour') }}
</div>
<div>
<el-radio v-model="type" label="4" size="mini" border>{{ $t('components.cronEditor.public.specify') }}</el-radio>
<el-checkbox-group v-model="appoint">
<div v-for="i in 3" :key="i" style="margin-left: 10px; line-height: 25px;">
<template v-for="j in 10">
<el-checkbox @change="type = '4'" v-if="parseInt((i - 1) + '' + (j - 1)) < 24" :key="j" :label="(i - 1) + '' + (j - 1)"></el-checkbox>
</template>
</div>
</el-checkbox-group>
</div>
</div>
</template>
<script lang='ts'>
import { Vue, Watch, Component } from 'vue-property-decorator';
@Component({})
export default class Hour extends Vue {
/**
* Cron表达式
*
* @type {any}
* @memberof Day
*/
public value: any;
/**
* 标签类型标识
*
* @type {any}
* @memberof Day
*/
public type: string = '1';
/**
* 周期
*
* @type {any}
* @memberof Day
*/
public cycle: any = {
start: 0,
end: 0
};
/**
* 循环
*
* @type {any}
* @memberof Day
*/
public loop: any = {
start: 0,
end: 0
}
/**
* 周
*
* @type {any}
* @memberof Day
*/
public week: any = {
start: 0,
end: 0
}
/**
* 工作日
*
* @type {any}
* @memberof Day
*/
public work: number = 0;
/**
* 最后
*
* @type {any}
* @memberof Day
*/
public last: number = 0;
/**
* 指定
*
* @type {any}
* @memberof Day
*/
public appoint: any = [];
/**
* 获取Cron表达式
*
* @returns
* @memberof Day
*/
get value_() {
let result: any = [];
switch (this.type) {
case '1': // 每秒
result.push('*')
break;
case '2': // 年期
result.push(`${this.cycle.start}-${this.cycle.end}`)
break;
case '3': // 循环
result.push(`${this.loop.start}/${this.loop.end}`)
break;
case '4': // 指定
result.push(this.appoint.join(','))
break;
case '6': // 最后
result.push(`${this.last === 0 ? '' : this.last}L`)
break;
default: // 不指定
result.push('?')
break;
}
this.$emit('input', result.join(''));
return result.join('');
}
/**
* 数据值变化
*
* @returns
* @memberof Hour
*/
@Watch('value')
public updateVal() {
if (!this.value) {
return
}
if (this.value === '?') {
this.type = '5'
} else if (this.value.indexOf('-') !== -1) { // 2周期
if (this.value.split('-').length === 2) {
this.type = '2'
this.cycle.start = this.value.split('-')[0]
this.cycle.end = this.value.split('-')[1]
}
} else if (this.value.indexOf('/') !== -1) { // 3循环
if (this.value.split('/').length === 2) {
this.type = '3'
this.loop.start = this.value.split('/')[0]
this.loop.end = this.value.split('/')[1]
}
} else if (this.value.indexOf('*') !== -1) { // 1每
this.type = '1'
} else if (this.value.indexOf('L') !== -1) { // 6最后
this.type = '6'
this.last = this.value.replace('L', '')
} else if (this.value.indexOf('#') !== -1) { // 7指定周
if (this.value.split('#').length === 2) {
this.type = '7'
this.week.start = this.value.split('#')[0]
this.week.end = this.value.split('#')[1]
}
} else if (this.value.indexOf('W') !== -1) { // 8工作日
this.type = '8'
this.work = this.value.replace('W', '')
} else { // *
this.type = '4'
this.appoint = this.value.split(',')
}
}
/**
* Vue生命周期
*
* @returns
* @memberof Day
*/
public created () {
this.updateVal()
}
}
</script>
<style lang="css">
.el-checkbox+.el-checkbox {
margin-left: 10px;
}
</style>
<template lang="html">
<div :val="value_">
<div>
<el-radio v-model="type" label="1" size="mini" border>{{ $t('components.cronEditor.month.everyMonth') }}</el-radio>
</div>
<div>
<el-radio v-model="type" label="5" size="mini" border>{{ $t('components.cronEditor.public.notSpecify') }}</el-radio>
</div>
<div>
<el-radio v-model="type" label="2" size="mini" border>{{ $t('components.cronEditor.public.cycle') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.public.from') }}</span>
<el-input-number @change="type = '2'" v-model="cycle.start" :min="1" :max="12" size="mini" style="width: 100px;"></el-input-number>
<span style="margin-left: 5px; margin-right: 5px;">{{ $t('components.cronEditor.public.to') }}</span>
<el-input-number @change="type = '2'" v-model="cycle.end" :min="2" :max="12" size="mini" style="width: 100px;"></el-input-number>
{{ $t('components.cronEditor.month.title') }}
</div>
<div>
<el-radio v-model="type" label="3" size="mini" border>{{ $t('components.cronEditor.public.loop') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.public.from') }}</span>
<el-input-number @change="type = '3'" v-model="loop.start" :min="1" :max="12" size="mini" style="width: 100px;"></el-input-number>
<span style="margin-left: 5px; margin-right: 5px;">{{ $t('components.cronEditor.month.monthStart') }}</span>
<el-input-number @change="type = '3'" v-model="loop.end" :min="1" :max="12" size="mini" style="width: 100px;"></el-input-number>
{{ $t('components.cronEditor.month.onceAMonth') }}
</div>
<div>
<el-radio v-model="type" label="4" size="mini" border>{{ $t('components.cronEditor.public.specify') }}</el-radio>
<el-checkbox-group v-model="appoint" style="margin-left: 0px; line-height: 25px;">
<el-checkbox @change="type = '4'" v-for="i in 12" :key="i" :label="i.toString()" ></el-checkbox>
</el-checkbox-group>
</div>
</div>
</template>
<script lang='ts'>
import { Vue, Watch, Component } from 'vue-property-decorator';
@Component({})
export default class Month extends Vue {
/**
* Cron表达式
*
* @type {any}
* @memberof Day
*/
public value: any;
/**
* 标签类型标识
*
* @type {any}
* @memberof Day
*/
public type: string = '1';
/**
* 周期
*
* @type {any}
* @memberof Day
*/
public cycle: any = {
start: 0,
end: 0
};
/**
* 循环
*
* @type {any}
* @memberof Day
*/
public loop: any = {
start: 0,
end: 0
}
/**
* 周
*
* @type {any}
* @memberof Day
*/
public week: any = {
start: 0,
end: 0
}
/**
* 工作日
*
* @type {any}
* @memberof Day
*/
public work: number = 0;
/**
* 最后
*
* @type {any}
* @memberof Day
*/
public last: number = 0;
/**
* 指定
*
* @type {any}
* @memberof Day
*/
public appoint: any = [];
/**
* 获取Cron表达式
*
* @returns
* @memberof Day
*/
get value_() {
let result = []
switch (this.type) {
case '1': // 每秒
result.push('*')
break
case '2': // 年期
result.push(`${this.cycle.start}-${this.cycle.end}`)
break
case '3': // 循环
result.push(`${this.loop.start}/${this.loop.end}`)
break
case '4': // 指定
result.push(this.appoint.join(','))
break
case '6': // 最后
result.push(`${this.last === 0 ? '' : this.last}L`)
break
default: // 不指定
result.push('?')
break
}
this.$emit('input', result.join(''))
return result.join('')
}
/**
* 数据值变化
*
* @returns
* @memberof Month
*/
@Watch('value')
public updateVal() {
if (!this.value) {
return
}
if (this.value === '?') {
this.type = '5'
} else if (this.value.indexOf('-') !== -1) { // 2周期
if (this.value.split('-').length === 2) {
this.type = '2'
this.cycle.start = this.value.split('-')[0]
this.cycle.end = this.value.split('-')[1]
}
} else if (this.value.indexOf('/') !== -1) { // 3循环
if (this.value.split('/').length === 2) {
this.type = '3'
this.loop.start = this.value.split('/')[0]
this.loop.end = this.value.split('/')[1]
}
} else if (this.value.indexOf('*') !== -1) { // 1每
this.type = '1'
} else if (this.value.indexOf('L') !== -1) { // 6最后
this.type = '6'
this.last = this.value.replace('L', '')
} else if (this.value.indexOf('#') !== -1) { // 7指定周
if (this.value.split('#').length === 2) {
this.type = '7'
this.week.start = this.value.split('#')[0]
this.week.end = this.value.split('#')[1]
}
} else if (this.value.indexOf('W') !== -1) { // 8工作日
this.type = '8'
this.work = this.value.replace('W', '')
} else { // *
this.type = '4'
this.appoint = this.value.split(',')
}
}
public created() {
this.updateVal();
}
}
</script>
<style lang="css">
.el-checkbox+.el-checkbox {
margin-left: 10px;
}
</style>
<!-- 秒,分钟 -->
<template lang="html">
<div :val="value_">
<div>
<el-radio v-model="type" label="1" size="mini" border>{{ $t('components.cronEditor.public.every') }} {{ showLabel }}</el-radio>
</div>
<div>
<el-radio v-model="type" label="2" size="mini" border>{{ $t('components.cronEditor.public.cycle') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.public.from') }}</span>
<el-input-number @change="type = '2'" v-model="cycle.start" :min="1" :max="59" size="mini" style="width: 100px;"></el-input-number>
<span style="margin-left: 5px; margin-right: 5px;">{{ $t('components.cronEditor.public.to') }}</span>
<el-input-number @change="type = '2'" v-model="cycle.end" :min="2" :max="59" size="mini" style="width: 100px;"></el-input-number>
{{showLabel}}
</div>
<div>
<el-radio v-model="type" label="3" size="mini" border>{{ $t('components.cronEditor.public.loop') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.public.from') }}</span>
<el-input-number @change="type = '3'" v-model="loop.start" :min="0" :max="59" size="mini" style="width: 100px;"></el-input-number>
<span style="margin-left: 5px; margin-right: 5px;">{{showLabel}} {{ $t('components.cronEditor.week.start') }}</span>
<el-input-number @change="type = '3'" v-model="loop.end" :min="1" :max="59" size="mini" style="width: 100px;"></el-input-number>
{{showLabel}} {{ $t('components.cronEditor.public.once') }}
</div>
<div>
<el-radio v-model="type" label="4" size="mini" border>{{ $t('components.cronEditor.public.specify') }}</el-radio>
<el-checkbox-group v-model="appoint">
<div v-for="i in 6" :key="i" style="margin-left: 10px; line-height: 25px;">
<el-checkbox @change="type = '4'" v-for="j in 10" :key="j" :label="(i - 1) + '' + (j - 1)"></el-checkbox>
</div>
</el-checkbox-group>
</div>
</div>
</template>
<script lang='ts'>
import { Vue, Watch, Component, Prop } from 'vue-property-decorator';
@Component({})
export default class SecondAndMinute extends Vue {
/**
* 标题
*
* @type {any}
* @memberof Day
*/
@Prop() public label: any;
/**
* 显示标题
*
* @type {any}
* @memberof Day
*/
public showLabel: any;
/**
* Cron表达式
*
* @type {any}
* @memberof Day
*/
public value: any;
/**
* 标签类型标识
*
* @type {any}
* @memberof Day
*/
public type: string = '1';
/**
* 周期
*
* @type {any}
* @memberof Day
*/
public cycle: any = {
start: 0,
end: 0
};
/**
* 循环
*
* @type {any}
* @memberof Day
*/
public loop: any = {
start: 0,
end: 0
}
/**
* 周
*
* @type {any}
* @memberof Day
*/
public week: any = {
start: 0,
end: 0
}
/**
* 工作日
*
* @type {any}
* @memberof Day
*/
public work: number = 0;
/**
* 最后
*
* @type {any}
* @memberof Day
*/
public last: number = 0;
/**
* 指定
*
* @type {any}
* @memberof Day
*/
public appoint: any = [];
/**
* 获取Cron表达式
*
* @returns
* @memberof Day
*/
get value_() {
let result = []
switch (this.type) {
case '1': // 每秒
result.push('*')
break
case '2': // 年期
result.push(`${this.cycle.start}-${this.cycle.end}`)
break
case '3': // 循环
result.push(`${this.loop.start}/${this.loop.end}`)
break
case '4': // 指定
result.push(this.appoint.join(','))
break
case '6': // 最后
result.push(`${this.last === 0 ? '' : this.last}L`)
break
default: // 不指定
result.push('?')
break
}
this.$emit('input', result.join(''))
return result.join('')
}
/**
* 数据值变化
*
* @returns
* @memberof SecondAndMinute
*/
@Watch('value')
public updateVal() {
if (!this.value) {
return
}
if (this.value === '?') {
this.type = '5'
} else if (this.value.indexOf('-') !== -1) { // 2周期
if (this.value.split('-').length === 2) {
this.type = '2'
this.cycle.start = this.value.split('-')[0]
this.cycle.end = this.value.split('-')[1]
}
} else if (this.value.indexOf('/') !== -1) { // 3循环
if (this.value.split('/').length === 2) {
this.type = '3'
this.loop.start = this.value.split('/')[0]
this.loop.end = this.value.split('/')[1]
}
} else if (this.value.indexOf('*') !== -1) { // 1每
this.type = '1'
} else if (this.value.indexOf('L') !== -1) { // 6最后
this.type = '6'
this.last = this.value.replace('L', '')
} else if (this.value.indexOf('#') !== -1) { // 7指定周
if (this.value.split('#').length === 2) {
this.type = '7'
this.week.start = this.value.split('#')[0]
this.week.end = this.value.split('#')[1]
}
} else if (this.value.indexOf('W') !== -1) { // 8工作日
this.type = '8'
this.work = this.value.replace('W', '')
} else { // *
this.type = '4'
this.appoint = this.value.split(',')
}
}
/**
* 数据值变化
*
* @returns
* @memberof Day
*/
@Watch('label')
public updateLabel(newVal: any, oldVal: any) {
this.showLabel = this.label ? this.label : oldVal;
}
public created() {
this.showLabel = this.label ? this.label : '';
this.updateVal();
}
}
</script>
<style lang="css">
.el-checkbox+.el-checkbox {
margin-left: 10px;
}
</style>
<template>
<div class="cron" :val="_value">
<el-tabs v-model="activeName">
<el-tab-pane :label="$t('components.cronEditor.label.second')" name="s">
<second-and-minute v-model="sVal" :label="$t('components.cronEditor.second')"></second-and-minute >
</el-tab-pane>
<el-tab-pane :label="$t('components.cronEditor.label.minute')" name="m">
<second-and-minute v-model="mVal" :label="$t('components.cronEditor.minute')"></second-and-minute >
</el-tab-pane>
<el-tab-pane :label="$t('components.cronEditor.label.hour')" name="h">
<hour v-model="hVal" :lable="$t('components.cronEditor.hour.title')"></hour>
</el-tab-pane>
<el-tab-pane :label="$t('components.cronEditor.label.day')" name="d">
<day v-model="dVal" :lable="$t('components.cronEditor.day.title')"></day>
</el-tab-pane>
<el-tab-pane :label="$t('components.cronEditor.label.month')" name="month">
<month v-model="monthVal" :lable="$t('components.cronEditor.month.title')"></month>
</el-tab-pane>
<el-tab-pane :label="$t('components.cronEditor.label.week')" name="week">
<week v-model="weekVal" :lable="$t('components.cronEditor.week.title')"></week>
</el-tab-pane>
<el-tab-pane :label="$t('components.cronEditor.label.year')" name="year">
<year v-model="yearVal" :lable="$t('components.cronEditor.year.title')"></year>
</el-tab-pane>
</el-tabs>
<!-- table -->
<el-table
:data="tableData"
size="mini"
border
style="width: 100%;">
<el-table-column
prop="sVal"
:label="$t('components.cronEditor.second')"
width="70">
</el-table-column>
<el-table-column
prop="mVal"
:label="$t('components.cronEditor.minute')"
width="70">
</el-table-column>
<el-table-column
prop="hVal"
:label="$t('components.cronEditor.hour.title')"
width="70">
</el-table-column>
<el-table-column
prop="dVal"
:label="$t('components.cronEditor.day.title')"
width="70">
</el-table-column>
<el-table-column
prop="monthVal"
:label="$t('components.cronEditor.month.title')"
width="70">
</el-table-column>
<el-table-column
prop="weekVal"
:label="$t('components.cronEditor.week.title')"
width="70">
</el-table-column>
<el-table-column
prop="yearVal"
:label="this.$t('components.cronEditor.year.title')">
</el-table-column>
</el-table>
</div>
</template>
<script lang='ts'>
import SecondAndMinute from './secondAndMinute.vue';
import hour from './hour.vue';
import day from './day.vue';
import month from './month.vue';
import week from './week.vue';
import year from './year.vue';
import { Vue, Component, Prop, Watch, Model } from 'vue-property-decorator';
@Component({
components: {
'second-and-minute': SecondAndMinute,
hour,
day,
month,
week,
year
}
})
export default class VueCron extends Vue {
/**
* 传递数据
*
* @type {any}
* @memberof VueCron
*/
@Prop() data: any;
/**
* Cron表达式
*
* @type {any}
* @memberof VueCron
*/
public value: any = '';
/**
* 标签名
*
* @type {any}
* @memberof VueCron
*/
public activeName: string = 's';
/**
* 标签-秒 数据
*
* @type {any}
* @memberof VueCron
*/
public sVal: any = '';
/**
* 标签-分 数据
*
* @type {any}
* @memberof VueCron
*/
public mVal: any = '';
/**
* 标签-天 数据
*
* @type {any}
* @memberof VueCron
*/
public dVal: any = '';
/**
* 标签-时 数据
*
* @type {any}
* @memberof VueCron
*/
public hVal: any = '';
/**
* 标签月 数据
*
* @type {any}
* @memberof VueCron
*/
public monthVal:any = '';
/**
* 标签-周 数据
*
* @type {any}
* @memberof VueCron
*/
public weekVal: any = '';
/**
* 标签年 数据
*
* @type {any}
* @memberof VueCron
*/
public yearVal: any = '';
/**
* 数据值变化
* @returns
* @memberof VueCron
*/
@Watch('value')
public updateVal() {
if (!this.value) {
return
}
let arrays: Array<any> = this.value.split(' ');
this.sVal = arrays[0];
this.mVal = arrays[1];
this.hVal = arrays[2];
this.dVal = arrays[3];
this.monthVal = arrays[4];
this.weekVal = arrays[5];
this.yearVal = arrays[6];
}
/**
* 获取表格内容
* @returns
* @memberof VueCron
*/
get tableData() {
return [{
sVal: this.sVal,
mVal: this.mVal,
hVal: this.hVal,
dVal: this.dVal,
monthVal: this.monthVal,
weekVal: this.weekVal,
yearVal: this.yearVal
}]
}
/**
* 获取Cron表达式
* @returns
* @memberof VueCron
*/
get _value() {
if (!this.dVal && !this.weekVal) {
return '';
}
if (this.dVal === '?' && this.weekVal === '?') {
this.$message.error(this.$t('components.cronEditor.message.error1') as string);
}
if (this.dVal !== '?' && this.weekVal !== '?') {
this.$message.error(this.$t('components.cronEditor.message.error1') as string);
}
let v: any = `${this.sVal} ${this.mVal} ${this.hVal} ${this.dVal} ${this.monthVal} ${this.weekVal} ${this.yearVal}`;
if (v !== this.value) {
this.$emit('cronValue', v);
}
this.value = v;
return v;
}
/**
* Vue生命周期
* @returns
* @memberof VueCron
*/
public created() {
if(!this.value) {
this.value = '';
}
this.updateVal();
}
}
</script>
<style lang="less">
.cron {
text-align: left;
padding: 10px;
background: #fff;
border: 1px solid #dcdfe6;
box-shadow: 0 2px 4px 0 rgba(0,0,0,.12), 0 0 6px 0 rgba(0,0,0,.04);
}
</style>
<template lang="html">
<div :val="value_">
<div>
<el-radio v-model="type" label="1" size="mini" border>{{ $t('components.cronEditor.week.everyWeek') }}</el-radio>
</div>
<div>
<el-radio v-model="type" label="5" size="mini" border>{{ $t('components.cronEditor.public.notSpecify') }}</el-radio>
</div>
<div>
<el-radio v-model="type" label="2" size="mini" border>{{ $t('components.cronEditor.public.cycle') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.week.from') }}</span>
<el-input-number @change="type = '2'" v-model="cycle.start" :min="1" :max="7" size="mini" style="width: 100px;"></el-input-number>
<span style="margin-left: 5px; margin-right: 5px;">{{ $t('components.cronEditor.week.to') }}</span>
<el-input-number @change="type = '2'" v-model="cycle.end" :min="2" :max="7" size="mini" style="width: 100px;"></el-input-number>
</div>
<div>
<el-radio v-model="type" label="3" size="mini" border>{{ $t('components.cronEditor.public.loop') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.week.from') }}</span>
<el-input-number @change="type = '3'" v-model="loop.start" :min="1" :max="7" size="mini" style="width: 100px;"></el-input-number>
<span style="margin-left: 5px; margin-right: 5px;">{{ $t('components.cronEditor.week.start') }}</span>
<el-input-number @change="type = '3'" v-model="loop.end" :min="1" :max="7" size="mini" style="width: 100px;"></el-input-number>
{{ $t('components.cronEditor.week.onceADay') }}
</div>
<div>
<el-radio v-model="type" label="7" size="mini" border>{{ $t('components.cronEditor.week.specifyWeek') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.week.weekOfMonth') }}</span>
<el-input-number @change="type = '7'" v-model="week.start" :min="1" :max="4" size="mini" style="width: 100px;"></el-input-number>
<span style="margin-left: 5px; margin-right: 5px;">{{ $t('components.cronEditor.week.weekWeek') }}</span>
<el-input-number @change="type = '7'" v-model="week.end" :min="1" :max="7" size="mini" style="width: 100px;"></el-input-number>
</div>
<div>
<el-radio v-model="type" label="6" size="mini" border>{{ $t('components.cronEditor.week.lastOfMonth') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.week.week') }}</span>
<el-input-number @change="type = '6'" v-model="last" :min="1" :max="7" size="mini" style="width: 100px;"></el-input-number>
</div>
<div>
<el-radio v-model="type" label="4" size="mini" border>{{ $t('components.cronEditor.public.specify') }}</el-radio>
<el-checkbox-group v-model="appoint" style="margin-left: 50px; line-height: 25px;">
<template v-for="i in 7" >
<el-checkbox @change="type = '4'" :key="i" :label="i.toString()"></el-checkbox>
</template>
</el-checkbox-group>
</div>
</div>
</template>
<script lang='ts'>
import { Vue, Watch, Component } from 'vue-property-decorator';
@Component({})
export default class Week extends Vue {
/**
* Cron表达式
*
* @type {any}
* @memberof Day
*/
public value: any;
/**
* 标签类型标识
*
* @type {any}
* @memberof Day
*/
public type: string = '1';
/**
* 周期
*
* @type {any}
* @memberof Day
*/
public cycle: any = {
start: 0,
end: 0
};
/**
* 循环
*
* @type {any}
* @memberof Day
*/
public loop: any = {
start: 0,
end: 0
}
/**
* 周
*
* @type {any}
* @memberof Day
*/
public week: any = {
start: 0,
end: 0
}
/**
* 工作日
*
* @type {any}
* @memberof Day
*/
public work: number = 0;
/**
* 最后
*
* @type {any}
* @memberof Day
*/
public last: number = 0;
/**
* 指定
*
* @type {any}
* @memberof Day
*/
public appoint: any = [];
/**
* 获取Cron表达式
*
* @returns
* @memberof Day
*/
get value_() {
let result = []
switch (this.type) {
case '1': // 每秒
result.push('*')
break
case '2': // 年期
result.push(`${this.cycle.start}-${this.cycle.end}`)
break
case '3': // 循环
result.push(`${this.loop.start}/${this.loop.end}`)
break
case '4': // 指定
result.push(this.appoint.join(','))
console.log(this.appoint);
break
case '6': // 最后
result.push(`${this.last === 0 ? '' : this.last}L`)
break
case '7': // 指定周
result.push(`${this.week.start}#${this.week.end}`)
break
default: // 不指定
result.push('?')
break
}
this.$emit('input', result.join(''))
return result.join('')
}
/**
* 数据值变化
*
* @returns
* @memberof Day
*/
@Watch('value')
public updateVal() {
if (!this.value) {
return
}
if (this.value === '?') {
this.type = '5'
} else if (this.value.indexOf('-') !== -1) { // 2周期
if (this.value.split('-').length === 2) {
this.type = '2'
this.cycle.start = this.value.split('-')[0]
this.cycle.end = this.value.split('-')[1]
}
} else if (this.value.indexOf('/') !== -1) { // 3循环
if (this.value.split('/').length === 2) {
this.type = '3'
this.loop.start = this.value.split('/')[0]
this.loop.end = this.value.split('/')[1]
}
} else if (this.value.indexOf('*') !== -1) { // 1每
this.type = '1'
} else if (this.value.indexOf('L') !== -1) { // 6最后
this.type = '6'
this.last = this.value.replace('L', '')
} else if (this.value.indexOf('#') !== -1) { // 7指定周
if (this.value.split('#').length === 2) {
this.type = '7'
this.week.start = this.value.split('#')[0]
this.week.end = this.value.split('#')[1]
}
} else if (this.value.indexOf('W') !== -1) { // 8工作日
this.type = '8'
this.work = this.value.replace('W', '')
} else { // *
this.type = '4'
this.appoint = this.value.split(',')
}
}
public created() {
this.updateVal();
}
}
</script>
<style lang="css">
.el-checkbox+.el-checkbox {
margin-left: 10px;
}
</style>
<template lang="html">
<div :val="value_">
<div>
<el-radio v-model="type" label="1" size="mini" border>{{ $t('components.cronEditor.year.everyYear') }}</el-radio>
</div>
<div>
<el-radio v-model="type" label="5" size="mini" border>{{ $t('components.cronEditor.public.notSpecify') }}</el-radio>
</div>
<div>
<el-radio v-model="type" label="2" size="mini" border>{{ $t('components.cronEditor.public.cycle') }}</el-radio>
<span style="margin-left: 10px; margin-right: 5px;">{{ $t('components.cronEditor.public.from') }}</span>
<el-input-number @change="type = '2'" v-model="cycle.start" :min="2000" size="mini" style="width: 100px;"></el-input-number>
<span style="margin-left: 5px; margin-right: 5px;">{{ $t('components.cronEditor.public.to') }}</span>
<el-input-number @change="type = '2'" v-model="cycle.end" :min="2000" size="mini" style="width: 100px;"></el-input-number>
{{ $t('components.cronEditor.year.title') }}
</div>
</div>
</template>
<script lang='ts'>
import { Vue, Watch, Component } from 'vue-property-decorator';
@Component({})
export default class Year extends Vue {
/**
* Cron表达式
*
* @type {any}
* @memberof Day
*/
public value: any;
/**
* 标签类型标识
*
* @type {any}
* @memberof Day
*/
public type: string = '1';
/**
* 周期
*
* @type {any}
* @memberof Day
*/
public cycle: any = {
start: 0,
end: 0
};
/**
* 循环
*
* @type {any}
* @memberof Day
*/
public loop: any = {
start: 0,
end: 0
}
/**
* 周
*
* @type {any}
* @memberof Day
*/
public week: any = {
start: 0,
end: 0
}
/**
* 工作日
*
* @type {any}
* @memberof Day
*/
public work: number = 0;
/**
* 最后
*
* @type {any}
* @memberof Day
*/
public last: number = 0;
/**
* 指定
*
* @type {any}
* @memberof Day
*/
public appoint: any = [];
/**
* 获取Cron表达式
*
* @returns
* @memberof Day
*/
get value_() {
let result = []
switch (this.type) {
case '1': // 每秒
result.push('*')
break
case '2': // 年期
result.push(`${this.cycle.start}-${this.cycle.end}`)
break
case '3': // 循环
result.push(`${this.loop.start}/${this.loop.end}`)
break
case '4': // 指定
result.push(this.appoint.join(','))
break
case '6': // 最后
result.push(`${this.last === 0 ? '' : this.last}L`)
break
default: // 不指定
result.push('?')
break
}
this.$emit('input', result.join(''))
return result.join('')
}
/**
* 数据值变化
*
* @returns
* @memberof Day
*/
@Watch('value')
public updateVal() {
if (!this.value) {
return
}
if (this.value === '?') {
this.type = '5'
} else if (this.value.indexOf('-') !== -1) { // 2周期
if (this.value.split('-').length === 2) {
this.type = '2'
this.cycle.start = this.value.split('-')[0]
this.cycle.end = this.value.split('-')[1]
}
} else if (this.value.indexOf('/') !== -1) { // 3循环
if (this.value.split('/').length === 2) {
this.type = '3'
this.loop.start = this.value.split('/')[0]
this.loop.end = this.value.split('/')[1]
}
} else if (this.value.indexOf('*') !== -1) { // 1每
this.type = '1'
} else if (this.value.indexOf('L') !== -1) { // 6最后
this.type = '6'
this.last = this.value.replace('L', '')
} else if (this.value.indexOf('#') !== -1) { // 7指定周
if (this.value.split('#').length === 2) {
this.type = '7'
this.week.start = this.value.split('#')[0]
this.week.end = this.value.split('#')[1]
}
} else if (this.value.indexOf('W') !== -1) { // 8工作日
this.type = '8'
this.work = this.value.replace('W', '')
} else { // *
this.type = '4'
this.appoint = this.value.split(',')
}
}
public created() {
this.updateVal();
}
}
</script>
<style lang="css">
.el-checkbox+.el-checkbox {
margin-left: 10px;
}
</style>
......@@ -360,6 +360,8 @@ export default class MDViewEngine extends ViewEngine {
this.calcToolbarItemState(state);
if(args && args.length > 0){
this.calcToolbarItemAuthState(this.transformData(args[0]));
}else{
this.calcToolbarItemAuthState(null);
}
}
......@@ -383,6 +385,7 @@ export default class MDViewEngine extends ViewEngine {
this.view.$emit('viewload', args);
}
this.calcToolbarItemState(true);
this.calcToolbarItemAuthState(null);
}
/**
......
......@@ -190,8 +190,15 @@ export default class ViewEngine {
return;
}
const _item = _this.view.toolBarModels[key];
if(_item && _item['dataaccaction'] && _this.view.appUIService && data && Object.keys(data).length >0){
let dataActionResult:any = _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']];
if(_item && _item['dataaccaction'] && _this.view.appUIService){
let dataActionResult:any;
if (_item.uiaction && (Object.is(_item.uiaction.target, 'NONE'))){
dataActionResult = _this.view.appUIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
......
......@@ -25,6 +25,9 @@ export default class WFDynaExpGridViewEngine extends GridViewEngine {
*/
public load(opts: any = {},isnotify:boolean=false): void {
this.view.getWFStepModel().then((res:any) =>{
if(!res || res.length === 0) {
return;
}
if(!this.view.isformDruipart){
super.load(opts);
}else{
......@@ -73,4 +76,37 @@ export default class WFDynaExpGridViewEngine extends GridViewEngine {
public GridLoad(args: any[]) {
this.view.getWFStepModel();
}
/**
* 选中变化
*
* @param {any[]} args
* @memberof WFDynaExpGridViewEngine
*/
public selectionChange(args: any[]): void {
if (this.view) {
this.view.selectedData = args;
this.view.$emit('viewdataschange', args);
}
const state = args.length > 0 && !Object.is(args[0].srfkey, '') ? false : true;
this.calcToolbarItemState(state);
}
/**
* 计算工具栏状态
*
* @param {boolean} state
* @param {*} [dataaccaction]
* @memberof WFDynaExpGridViewEngine
*/
public calcToolbarItemState(state: boolean, dataaccaction?: any) {
const _this: any = this;
if (!_this.view.linkModel || Object.keys(_this.view.linkModel).length === 0) {
return;
}
_this.view.linkModel.forEach((item:any) => {
item.disabled = state;
});
this.view.$forceUpdate();
}
}
\ No newline at end of file
......@@ -258,6 +258,75 @@ export default {
prompt:'prompt',
confirmButtonText:'determine',
cancelButtonText:'cancel',
},
cronEditor: {
label: {
second: 'Second',
minute: 'Minute',
hour: 'Hour',
day: 'Day',
week: 'Week',
month: 'Month',
year: 'Year',
},
public : {
specify: 'Specify',
notSpecify: 'Not specify',
cycle: 'Cycle',
from: 'From',
to: 'to',
loop: 'Loop',
every: 'Every',
once: 'execute once',
},
second: 'second',
minute: 'minute',
hour: {
title: 'hour',
everyHour: 'Every hour',
hourStart: "o'clock start, every ",
onceAHour: "o'clock to execute once.",
},
day: {
title: 'day',
daily: 'Every day',
workDay: 'Working day',
dayStart: 'rd start, every ',
onceADay: 'rd to execute once',
thisMonth: 'this month',
lastWorkDay: 'rd, Recent working day',
lastDayOfMonth: 'Last day of the month',
},
month: {
title: 'month',
everyMonth: 'Every month',
monthStart: ' month start, every',
onceAMonth: ' month to execute once',
},
week: {
title: 'week',
everyWeek: 'Every week',
from: '',
to: 'from weekday',
start: 'start, every',
onceADay: 'days to execute once',
specifyWeek: 'Specify week',
weekOfMonth: 'this month',
weekWeek: 'week, weekday',
lastOfMonth: 'Last of the month',
week: 'weekday',
},
year: {
title: 'year',
everyYear: 'Every year',
},
message: {
error1: 'Date and day of the week cannot be "not specified" at the same time',
error2: 'Both the date and the day of the week must be "not specified"',
},
},
appMessagePopover: {
loadMore: 'Load more',
noMore: 'No more'
}
};
\ No newline at end of file
......@@ -259,5 +259,75 @@ export default {
prompt:'提示',
confirmButtonText:'确定',
cancelButtonText:'取消',
},
cronEditor: {
label: {
second: '秒',
minute: '分',
hour: '时',
day: '日',
week: '周',
month: '月',
year: '年',
},
public : {
specify: '指定',
notSpecify: '不指定',
cycle: '周期',
from: '从',
to: '至',
loop: '循环',
every: '每',
once: '执行一次',
},
second: '秒',
minute: '分',
hour: {
title: '时',
everyHour: '每时',
hourStart: '时开始,每',
onceAHour: '时执行一次',
},
day: {
title: '日',
daily: '每日',
workDay: '工作日',
dayStart: '日开始,每',
onceADay: '日执行一次',
thisMonth: '本月',
lastWorkDay: '号,最近的工作日',
lastDayOfMonth: '本月最后一天',
},
month: {
title: '月',
everyMonth: '每月',
monthStart: '月开始,每',
onceAMonth: '月执行一次',
},
week: {
title: '周',
everyWeek: '每周',
from: '从星期',
to: '至星期',
start: '开始,每',
onceADay: '天执行一次',
specifyWeek: '指定周',
weekOfMonth: '本月第',
weekWeek: '周,星期',
lastOfMonth: '本月最后一个',
week: '星期',
},
year: {
title: '年',
everyYear: '每年',
},
message: {
error1: '日期与星期不可以同时为“不指定”',
error2: '日期与星期必须有一个为“不指定”',
},
},
appMessagePopover: {
loadMore: '加载更多',
noMore: '没有更多了'
}
};
\ No newline at end of file
......@@ -433,6 +433,9 @@ export default class SDFileEditViewBase extends Vue {
for(let key in this.context){
delete this.context[key];
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
Object.assign(this.context, JSON.parse(this.viewdata));
if(this.context && this.context.srfparentdename){
......@@ -441,9 +444,6 @@ export default class SDFileEditViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......@@ -462,9 +462,6 @@ export default class SDFileEditViewBase extends Vue {
if(inputvalue){
Object.assign(this.context,{'sdfile':inputvalue});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
//初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
this.handleCustomViewData();
......
......@@ -468,6 +468,9 @@ export default class SDFileGridViewBase extends Vue {
for(let key in this.context){
delete this.context[key];
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
Object.assign(this.context, JSON.parse(this.viewdata));
if(this.context && this.context.srfparentdename){
......@@ -476,9 +479,6 @@ export default class SDFileGridViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......@@ -497,9 +497,6 @@ export default class SDFileGridViewBase extends Vue {
if(inputvalue){
Object.assign(this.context,{'sdfile':inputvalue});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
//初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
this.handleCustomViewData();
......
......@@ -136,5 +136,10 @@ const router = new Router({
},
],
});
// 解决路由跳转路由重复时报错
const originalPush = Router.prototype.push
Router.prototype.push = function push(location: any) {
let result: any = originalPush.call(this, location);
return result.catch((err: any) => err);
}
export default router;
......@@ -44,6 +44,7 @@
<app-lang style='font-size: 15px;padding: 0 10px;'></app-lang>
<app-orgsector></app-orgsector>
<app-user></app-user>
<app-message-popover></app-message-popover>
<app-lock-scren />
<app-full-scren />
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
......@@ -297,6 +298,9 @@ export default class SDIndexViewBase extends Vue {
for(let key in this.context){
delete this.context[key];
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
if (!this.viewDefaultUsage && this.viewdata && !Object.is(this.viewdata, '')) {
Object.assign(this.context, JSON.parse(this.viewdata));
if(this.context && this.context.srfparentdename){
......@@ -305,9 +309,6 @@ export default class SDIndexViewBase extends Vue {
if(this.context && this.context.srfparentkey){
Object.assign(this.viewparams,{srfparentkey:this.context.srfparentkey});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
return;
}
......@@ -323,9 +324,6 @@ export default class SDIndexViewBase extends Vue {
});
});
this.$viewTool.formatRouteParams(tempValue,this.$route,this.context,this.viewparams);
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
//初始化导航数据
this.initNavDataWithRoute();
......
......@@ -829,6 +829,32 @@ export default class EntityService {
return Http.getInstance().get(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/${context[this.APPLYDEKEY]}/usertasks/${data['taskDefinitionKey']}/ways`);
}
/**
* GetWFLinks接口方法(根据当前步骤和任务获取批量操作路径)
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async getWFLinks(context: any = {},data: any = {}, isloading?: boolean):Promise<any>{
return Http.getInstance().get(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/process-definitions/${data['processDefinitionKey']}/usertasks/${data['userTaskId']}/ways`);
}
/**
* wfSubmitBatch接口方法(批量提交)
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async wfSubmitBatch(context: any = {},data: any = {},localdata:any,isloading?: boolean):Promise<any>{
return Http.getInstance().post(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/process-definitions/${localdata['processDefinitionKey']}/usertasks/${localdata['taskDefinitionKey']}/ways/${localdata['sequenceFlowId']}/submit`,data);
}
/**
* GetWFHistory接口方法(根据业务主键获取工作流程记录)
*
......
......@@ -11,7 +11,7 @@ export const commitAuthData = ({ commit, state }: { commit: any, state: any }, {
if(appmenu && appmenu.length >0){
commit('setMenuData', appmenu);
}
if(enablepermissionvalid){
if(enablepermissionvalid === true || enablepermissionvalid === false){
commit('setEnablePermissionValid', enablepermissionvalid);
}
}
\ No newline at end of file
......@@ -98,7 +98,10 @@ export const addPage = (state: any, arg: any) => {
if (!arg) {
return;
}
if (Object.is(arg.meta.viewType, 'APPINDEX')) {
// 视图类型为REDIRECTVIEW和NOTAB的视图不添加缓存
if(Object.is(arg.meta.viewType, 'REDIRECTVIEW') || Object.is(arg.meta.viewType, 'NOTAB')){
return;
}else if(Object.is(arg.meta.viewType, 'APPINDEX')) {
window.sessionStorage.setItem(Environment.AppName, arg.fullPath);
} else {
const page: any = {};
......
......@@ -167,15 +167,14 @@ export default class SDFileUIServiceBase extends UIService {
// 判断数据是否在流程中
}
//多表单,todo
const isEnableMultiForm:boolean = false;
const multiFormDEField:string|null =null;
if (isEnableMultiForm && multiFormDEField) {
if (multiFormDEField) {
const objFormValue:string = curData[multiFormDEField];
if(!Environment.isAppMode){
return 'MOBEDITVIEW'+objFormValue;
return 'MOBEDITVIEW:'+objFormValue;
}
return 'EDITVIEW'+objFormValue;
return 'EDITVIEW:'+objFormValue;
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
......
......@@ -56,5 +56,16 @@ export default class UIService {
return (window as any)['uiServiceRegister'].getService(name);
}
/**
* 获取资源标识是否有权限(无数据目标)
*
* @param tag 资源标识
* @memberof UIService
*/
public getResourceOPPrivs(tag:any){
return this.authService.getResourcePermission(this.authService.sysOPPrivsMap.get(tag))?1:0;
}
}
\ No newline at end of file
......@@ -257,8 +257,15 @@ export class ViewTool {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService && data && Object.keys(data).length >0){
let dataActionResult:any = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
......
......@@ -214,6 +214,10 @@ export default class ControlService {
dataItems.forEach((item:any) =>{
if(item && item.prop){
requestData[item.prop] = data[item.name];
}else{
if(item && item.dataType && Object.is(item.dataType,"FORMITEM")){
requestData[item.name] = data[item.name]
}
}
});
if(isMerge && (data.viewparams && Object.keys(data.viewparams).length > 0)){
......
......@@ -99,7 +99,7 @@ export default class DefaultService extends ControlService {
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
......@@ -157,11 +157,12 @@ export default class DefaultService extends ControlService {
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {boolean} [isWorkflow] 是否在工作流中添加数据
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public add(action: string, context: any = {},data: any = {}, isloading?: boolean,isWorkflow?:boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
......@@ -172,8 +173,12 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
if(isWorkflow){
resolve(response);
}else{
this.handleResponse(action, response);
resolve(response);
}
}).catch(response => {
reject(response);
});
......@@ -216,11 +221,12 @@ export default class DefaultService extends ControlService {
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {boolean} [isWorkflow] 是否在工作流中修改数据
* @returns {Promise<any>}
* @memberof DefaultService
*/
@Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public update(action: string, context: any = {},data: any = {}, isloading?: boolean,isWorkflow?:boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
......@@ -231,8 +237,12 @@ export default class DefaultService extends ControlService {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
if(isWorkflow){
resolve(response);
}else{
this.handleResponse(action, response);
resolve(response);
}
}).catch(response => {
reject(response);
});
......
......@@ -1856,13 +1856,35 @@ export default class MainBase extends Vue implements ControlInterface {
public async wfstart(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const _this: any = this;
const post: Promise<any> = _this.save({},false);
const formData:any = this.getData();
const copyData:any = Util.deepCopy(formData);
const post: Promise<any> = Object.is(formData.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),formData, this.showBusyIndicator,true):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),formData, this.showBusyIndicator,true);
post.then((response:any) =>{
const arg:any = response.data;
const responseData:any = response.data;
let tempResponseData:any = Util.deepCopy(response);
this.service.handleResponse('save', tempResponseData);
const arg:any = tempResponseData.data;
// 保存完成UI处理
this.onFormLoad(arg,'save');
this.$emit('save', arg);
AppCenterService.notifyMessage({name:"SDFile",action:'appRefresh',data:data});
this.$nextTick(() => {
this.formState.next({ type: 'save', data: arg });
});
// 准备工作流数据,填充未存库数据
Object.assign(arg,this.getData());
Object.assign(arg,copyData);
// 准备提交参数
if(this.viewparams){
Object.assign(arg,{viewparams:this.viewparams});
let copyViewParams:any = Util.deepCopy(this.viewparams);
if(copyViewParams.w){
delete copyViewParams.w;
}
Object.assign(responseData,copyViewParams);
}
Object.assign(arg,{viewparams:responseData});
// 强制补充srfwfmemo
if(this.srfwfmemo){
Object.assign(arg,{srfwfmemo:this.srfwfmemo});
}
const result: Promise<any> = this.service.wfstart(_this.WFStartAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
result.then((response: any) => {
......@@ -1915,13 +1937,17 @@ export default class MainBase extends Vue implements ControlInterface {
return new Promise((resolve: any, reject: any) => {
const _this: any = this;
const arg: any = data[0];
const copyData:any = Util.deepCopy(arg);
Object.assign(arg,{viewparams:this.viewparams});
if (!arg.sdfile || Object.is(arg.sdfile, '')) {
return;
}
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
const post: Promise<any> = Object.is(arg.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,true):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,true);
post.then((response:any) =>{
const arg:any = response.data;
const responseData:any = response.data;
let tempResponseData:any = Util.deepCopy(response);
this.service.handleResponse('save', tempResponseData);
const arg:any = tempResponseData.data;
// 保存完成UI处理
this.onFormLoad(arg,'save');
this.$emit('save', arg);
......@@ -1930,11 +1956,12 @@ export default class MainBase extends Vue implements ControlInterface {
this.formState.next({ type: 'save', data: arg });
});
// 准备工作流数据,填充未存库数据
Object.assign(arg,this.getData());
Object.assign(arg,copyData);
// 准备提交参数
if(this.viewparams){
Object.assign(arg,{viewparams:this.viewparams});
Object.assign(responseData,this.viewparams);
}
Object.assign(arg,{viewparams:responseData});
// 强制补充srfwfmemo
if(this.srfwfmemo){
Object.assign(arg,{srfwfmemo:this.srfwfmemo});
......
......@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_zh_CN" at line 349, column 14]
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_zh_CN" at line 359, column 14]
----
\ No newline at end of file
......@@ -99,32 +99,38 @@ export default class MainModel {
{
name: 'n_filename_like',
prop: 'n_filename_like',
dataType: 'TEXT',
dataType: 'QUERYPARAM'
},
{
name:'size',
prop:'size'
prop:'size',
dataType: 'QUERYPARAM'
},
{
name:'query',
prop:'query'
prop:'query',
dataType: 'QUERYPARAM'
},
{
name:'filter',
prop:'filter'
prop:'filter',
dataType: 'QUERYPARAM'
},
{
name:'page',
prop:'page'
prop:'page',
dataType: 'QUERYPARAM'
},
{
name:'sort',
prop:'sort'
prop:'sort',
dataType: 'QUERYPARAM'
},
{
name:'srfparentdata',
prop:'srfparentdata'
prop:'srfparentdata',
dataType: 'QUERYPARAM'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
......
......@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_zh_CN" at line 359, column 35]
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_zh_CN" at line 368, column 35]
----
\ No newline at end of file
......@@ -37,11 +37,6 @@
git clone -b master $para2 ibzdisk/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzdisk/
mvn clean package -Papi
cd ibzdisk-provider/ibzdisk-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzdisk-provider-api.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzdisk-provider-api.jar
EXPOSE 40006
EXPOSE 8081
ADD ibzdisk-provider-api.jar /ibzdisk-provider-api.jar
......@@ -3,22 +3,9 @@ services:
ibzdisk-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzdisk-provider-api:latest
ports:
- "40006:40006"
- "8081:8081"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=40006
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211: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
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
- NACOS=172.16.102.211:8848
deploy:
resources:
limits:
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册