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

ibiz4j 发布系统代码 [ibz-dict,字典]

上级 f458cd58
......@@ -41,7 +41,7 @@
"vue-amap": "^0.5.10",
"vue-class-component": "^7.0.2",
"vue-grid-layout": "^2.3.7",
"vue-i18n": "^8.15.3",
"vue-i18n": "^8.23.0",
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.1.3",
"vuex": "^3.1.2",
......
......@@ -159,7 +159,7 @@ export default class AppMpicker extends Vue {
}
});
} catch (error) {
if(error.name === 'SyntaxError'){
if((error as any).name === 'SyntaxError'){
let srfkeys:any = newVal.split(',');
let srfmajortexts:any = null;
if(this.valueitem && this.activeData[this.valueitem]){
......
......@@ -229,9 +229,9 @@ export default class AppSpan extends Vue {
public dateFormat(){
if(this.valueFormat){
if(this.valueFormat.indexOf('%1$t') !== -1){
this.text= moment(this.data).format("YYYY-MM-DD HH:mm:ss");
this.text= moment(this.value).format("YYYY-MM-DD HH:mm:ss");
}else if(this.valueFormat.indexOf('%1$s') == -1){
this.text= moment(this.data).format(this.valueFormat);
this.text= moment(this.value).format(this.valueFormat);
}else{
this.text= this.value;
}
......
......@@ -41,7 +41,7 @@ export default class TabExpViewEngine extends ViewEngine {
if (!Object.is(_item.type, 'TABEXPPANEL')) {
return;
}
if(this.view.context && this.view.context[(this.keyPSDEField as string)]){
if(this.view.context && !this.view.context[(this.keyPSDEField as string)]){
return;
}
this.setViewState2({ tag: _item.name, action: 'load', viewdata: this.view.context });
......
......@@ -36,6 +36,7 @@ function getLocaleResourceBase(){
group1: commonLogic.appcommonhandle("字典基本信息",null),
druipart1: commonLogic.appcommonhandle("字典项",null),
formpage1: commonLogic.appcommonhandle("基本信息",null),
formpage2: commonLogic.appcommonhandle("扩展",null),
srfupdatedate: commonLogic.appcommonhandle("最后修改时间",null),
srforikey: commonLogic.appcommonhandle("",null),
srfkey: commonLogic.appcommonhandle("标识",null),
......@@ -48,6 +49,7 @@ function getLocaleResourceBase(){
cname: commonLogic.appcommonhandle("名称",null),
cgroup: commonLogic.appcommonhandle("分组",null),
memo: commonLogic.appcommonhandle("备注",null),
extparams: commonLogic.appcommonhandle("扩展参数",null),
cid: commonLogic.appcommonhandle("标识",null),
},
uiactions: {
......
......@@ -36,6 +36,7 @@ function getLocaleResourceBase(){
group1: commonLogic.appcommonhandle("字典基本信息",null),
druipart1: commonLogic.appcommonhandle("字典项",null),
formpage1: commonLogic.appcommonhandle("基本信息",null),
formpage2: commonLogic.appcommonhandle("扩展",null),
srfupdatedate: commonLogic.appcommonhandle("最后修改时间",null),
srforikey: commonLogic.appcommonhandle("",null),
srfkey: commonLogic.appcommonhandle("标识",null),
......@@ -48,6 +49,7 @@ function getLocaleResourceBase(){
cname: commonLogic.appcommonhandle("名称",null),
cgroup: commonLogic.appcommonhandle("分组",null),
memo: commonLogic.appcommonhandle("备注",null),
extparams: commonLogic.appcommonhandle("扩展参数",null),
cid: commonLogic.appcommonhandle("标识",null),
},
uiactions: {
......
......@@ -36,6 +36,7 @@ function getLocaleResourceBase(){
group1: commonLogic.appcommonhandle("字典基本信息",null),
druipart1: commonLogic.appcommonhandle("字典项",null),
formpage1: commonLogic.appcommonhandle("基本信息",null),
formpage2: commonLogic.appcommonhandle("扩展",null),
srfupdatedate: commonLogic.appcommonhandle("最后修改时间",null),
srforikey: commonLogic.appcommonhandle("",null),
srfkey: commonLogic.appcommonhandle("标识",null),
......@@ -48,6 +49,7 @@ function getLocaleResourceBase(){
cname: commonLogic.appcommonhandle("名称",null),
cgroup: commonLogic.appcommonhandle("分组",null),
memo: commonLogic.appcommonhandle("备注",null),
extparams: commonLogic.appcommonhandle("扩展参数",null),
cid: commonLogic.appcommonhandle("标识",null),
},
uiactions: {
......
......@@ -1303,25 +1303,122 @@ export default class DictCatalogEditViewBase extends Vue {
* @memberof DictCatalogEditViewBase
*/
public SaveAndStart(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const that: any = this;
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
let validateStatus: boolean = true;
if (xData.formValidateStatus && xData.formValidateStatus instanceof Function) {
validateStatus = xData.formValidateStatus();
}
if (!validateStatus) {
if(xData.errorMessages && xData.errorMessages.length > 0) {
let descMessage: string = '';
xData.errorMessages.forEach((message: any) => {
descMessage = descMessage + '<p>' + message.error + '<p>';
})
xData.$Notice.error({ title: (xData.$t('app.commonWords.wrong') as string), desc: descMessage });
} else {
xData.$Notice.error({ title: (xData.$t('app.commonWords.wrong') as string), desc: (xData.$t('app.formpage.valuecheckex') as string) });
}
const { data: _data } = response;
if(window.parent){
window.parent.postMessage({ ..._data },'*');
return;
}
const startWorkFlow: Function = (param: any, localdata: any) => {
xData.wfstart(args).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
that.closeView(_data);
});
}
const openStartView: Function = async (item: any, localdata: any) => {
if (item['wfversion']) {
const targetView: any = that.viewRefData ? that.viewRefData[`WFSTART@${item['wfversion']}`] : null;
if (targetView) {
const tempContext = Util.deepCopy(that.context);
const tempViewParams = { actionView: `WFSTART@${item['wfversion']}`, actionForm: item['process-form'] };
const container: Subject<any> = that.$appmodal.openModal(targetView, tempContext, tempViewParams);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
const tempSubmitData: any = Util.deepCopy(args[0]);
if (result.datas && result.datas[0]) {
const resultData: any = result.datas[0];
if (Object.keys(resultData).length > 0) {
let tempData: any = {};
Object.keys(resultData).forEach((key: any) => {
if (resultData[key] || (resultData[key] === 0) || (resultData[key] === false)) {
tempData[key] = resultData[key];
}
})
Object.assign(tempSubmitData, tempData);
}
}
startWorkFlow([tempSubmitData], localdata);
})
} else {
startWorkFlow(args, localdata);
}
} else {
startWorkFlow(args, localdata);
}
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
let localData: any;
const localContext = Util.deepCopy(that.context);
const requestResult: Promise<any> = that.appEntityService.getStandWorkflow(localContext);
requestResult.then((response: any) => {
const { data: targetData, status } = response;
if (status !== 200 || targetData.length === 0) {
return;
}
});
if (targetData && targetData.length > 1) {
const h = that.$createElement;
targetData.forEach((element: any) => {
Object.assign(element, { value: element.definitionkey, label: element.definitionname });
})
that.$msgbox({
title: '请选择流程版本',
message: h('i-select', {
key: Util.createUUID(),
props: {
value: localData,
placeholder: "请选择流程版本...",
transfer: true,
transferClassName: "start-workflow-select-wraper"
},
on: {
'on-change': ($event: any) => {
localData = { processDefinitionKey: $event };
}
}
}, targetData.map((item: any) => {
return h('i-option', {
key: item.value,
props: {
value: item.value,
label: item.label
}
})
})),
showCancelButton: true,
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then((action: string) => {
if (Object.is(action, 'confirm') && localData && Object.keys(localData).length > 0) {
let targetItem: any = targetData.find((item: any) => {
return item.definitionkey === localData.processDefinitionKey;
})
openStartView(targetItem, localData);
}
})
} else {
localData = { processDefinitionKey: targetData[0]['definitionkey'] }
targetData[0]['process-view'] = "WFSTART@1";
openStartView(targetData[0], localData);
}
})
}
/**
* 当前流程步骤
......
......@@ -1276,6 +1276,18 @@ export default class DictCatalogGridViewBase extends Vue {
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
if (fullargs && fullargs.length > 0) {
const _args = fullargs[0];
if (_args['srfprocessdefinitionkey'] && _args['srftaskdefinitionkey']) {
Object.assign(data, {
processDefinitionKey: _args['srfprocessdefinitionkey'],
taskDefinitionKey: _args['srftaskdefinitionkey']
});
if (_args['srftaskid']) {
Object.assign(data, { 'srftaskid': _args['srftaskid'] });
}
}
}
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
......
......@@ -902,6 +902,23 @@ export default class EntityService {
}
}
/**
* 获取标准工作流版本信息
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async getStandWorkflow(context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(
`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/process-definitions`,
isloading,
);
}
/**
* WFGetProxyData接口方法
*
......
......@@ -274,6 +274,11 @@
}
}
// 工作流流程版本选择
.start-workflow-select-wraper {
z-index: 3000 !important;
}
/*** END:多数据视图属性布局 ***/
// 看板视图,卡片模式
......
......@@ -17,7 +17,7 @@ export declare interface Http {
* @returns {Promise<any>}
* @memberof Http
*/
post(url: string, params: any, isloading?: boolean, serialnumber?: number): Promise<any>;
post(url: string, params?: any, isloading?: boolean, serialnumber?: number): Promise<any>;
/**
* 获取
*
......@@ -27,7 +27,7 @@ export declare interface Http {
* @returns {Promise<any>}
* @memberof Http
*/
get(url: string, isloading?: boolean, serialnumber?: number): Promise<any>;
get(url: string, params?: any, isloading?: boolean, serialnumber?: number): Promise<any>;
/**
* 删除
*
......
......@@ -76,7 +76,7 @@ export class ViewTool {
* @memberof ViewTool
*/
public static getIndexRoutePath(route: Route): string {
const { parameters: _parameters }: { parameters: any[] } = route.meta;
const { parameters: _parameters }: { parameters: any[] } = route.meta as any;
const { pathName: _pathName, parameterName: _parameterName }: { pathName: string, parameterName: string } = _parameters[0];
const param = route.params[_parameterName];
if (param && !Object.is(param, '')) {
......
......@@ -2,7 +2,17 @@
<i-form :model="this.data" class='app-form' ref='form' id='dictcatalog_main' style="" @on-validate="formItemValidate">
<input style="display:none;" />
<row >
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<tabs :animated="false" name='main' :value="detailsModel.form.activiedPage"
@on-click="detailsModel.form.clickPage($event)">
<tab-pane v-show="detailsModel.formpage1.visible" name='formpage1' :index="0" tab='main' class=''
:label="(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.dictcatalog.main_form.details.formpage1')
])
}">
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :uiService="appUIService" :data="transformData(data)" :manageContainerStatus="detailsModel.group1.manageContainerStatus" :isManageContainer="detailsModel.group1.isManageContainer" @managecontainerclick="manageContainerClick('group1')" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.dictcatalog.main_form.details.group1')" :isShowCaption="false" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
<i-col v-show="detailsModel.ccode.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 8, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
......@@ -95,6 +105,26 @@
</i-col>
</tab-pane>
<tab-pane v-show="detailsModel.formpage2.visible" name='formpage2' :index="1" tab='main' class=''
:label="(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.dictcatalog.main_form.details.formpage2')
])
}">
<i-col v-show="detailsModel.extparams.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='extparams' :itemRules="this.rules().extparams" class='' :caption="$t('entities.dictcatalog.main_form.details.extparams')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.extparams.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box v-model="data.extparams" :textareaId="this.$util.createUUID()" :disabled="detailsModel.extparams.disabled" type='textarea' textareaStyle="height:200px;" ></input-box>
</app-form-item>
</i-col>
</tab-pane>
</tabs>
</row>
</i-form>
</template>
......@@ -501,6 +531,7 @@ export default class MainBase extends Vue implements ControlInterface {
cname: null,
cgroup: null,
memo: null,
extparams: null,
cid: null,
dictcatalog:null,
};
......@@ -569,6 +600,10 @@ export default class MainBase extends Vue implements ControlInterface {
{ required: this.detailsModel.memo.required, type: 'string', message: '备注 值不能为空', trigger: 'change' },
{ required: this.detailsModel.memo.required, type: 'string', message: '备注 值不能为空', trigger: 'blur' },
],
extparams: [
{ required: this.detailsModel.extparams.required, type: 'string', message: '扩展参数 值不能为空', trigger: 'change' },
{ required: this.detailsModel.extparams.required, type: 'string', message: '扩展参数 值不能为空', trigger: 'blur' },
],
}
}
......@@ -681,6 +716,8 @@ export default class MainBase extends Vue implements ControlInterface {
druipart1: new FormDRUIPartModel({ caption: '字典项', detailType: 'DRUIPART', name: 'druipart1', visible: true, isShowCaption: true, form: this, isControlledContent: false })
,
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, isControlledContent: false })
,
formpage2: new FormPageModel({ caption: '扩展', detailType: 'FORMPAGE', name: 'formpage2', visible: true, isShowCaption: true, form: this, isControlledContent: false })
,
srfupdatedate: new FormItemModel({ caption: '最后修改时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
......@@ -705,9 +742,12 @@ export default class MainBase extends Vue implements ControlInterface {
cgroup: new FormItemModel({ caption: '分组', detailType: 'FORMITEM', name: 'cgroup', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
memo: new FormItemModel({ caption: '备注', detailType: 'FORMITEM', name: 'memo', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
extparams: new FormItemModel({ caption: '扩展参数', detailType: 'FORMITEM', name: 'extparams', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
cid: new FormItemModel({ caption: '标识', detailType: 'FORMITEM', name: 'cid', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
form: new FormTabPanelModel({ caption: 'form', detailType: 'TABPANEL', name: 'form', visible: true, isShowCaption: true, form: this, tabPages: [{ name: 'formpage1', index: 0, visible: true }, { name: 'formpage2', index: 1, visible: true }] }),
};
/**
......@@ -854,6 +894,18 @@ export default class MainBase extends Vue implements ControlInterface {
this.formDataChange({ name: 'memo', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 extparams 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.extparams')
onExtparamsChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'extparams', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 cid 值
*
......@@ -936,6 +988,8 @@ export default class MainBase extends Vue implements ControlInterface {
}
/**
......
......@@ -75,6 +75,11 @@ export default class MainModel {
prop: 'memo',
dataType: 'TEXT',
},
{
name: 'extparams',
prop: 'ext_params',
dataType: 'LONGTEXT',
},
{
name: 'cid',
prop: 'id',
......
......@@ -123,6 +123,22 @@ export default class MainModel {
prop: 'srffrontuf',
dataType: 'TEXT',
},
// 预置工作流数据字段
{
name: 'srfprocessdefinitionkey',
prop: 'srfprocessdefinitionkey',
dataType: 'TEXT'
},
{
name: 'srftaskdefinitionkey',
prop: 'srftaskdefinitionkey',
dataType: 'TEXT'
},
{
name: 'srftaskid',
prop: 'srftaskid',
dataType: 'TEXT'
}
]
}
}
......
......@@ -175,6 +175,22 @@ export default class MainModel {
prop: 'srffrontuf',
dataType: 'TEXT',
},
// 预置工作流数据字段
{
name: 'srfprocessdefinitionkey',
prop: 'srfprocessdefinitionkey',
dataType: 'TEXT'
},
{
name: 'srftaskdefinitionkey',
prop: 'srftaskdefinitionkey',
dataType: 'TEXT'
},
{
name: 'srftaskid',
prop: 'srftaskid',
dataType: 'TEXT'
}
]
}
}
......
......@@ -170,6 +170,22 @@ export default class OptionsModel {
prop: 'srffrontuf',
dataType: 'TEXT',
},
// 预置工作流数据字段
{
name: 'srfprocessdefinitionkey',
prop: 'srfprocessdefinitionkey',
dataType: 'TEXT'
},
{
name: 'srftaskdefinitionkey',
prop: 'srftaskdefinitionkey',
dataType: 'TEXT'
},
{
name: 'srftaskid',
prop: 'srftaskid',
dataType: 'TEXT'
}
]
}
}
......
......@@ -9,6 +9,7 @@
"esModuleInterop": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
......
......@@ -31,6 +31,7 @@ import cn.ibizlab.core.dict.service.IDictCatalogService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -38,7 +39,6 @@ import cn.ibizlab.core.dict.mapper.DictCatalogMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
......@@ -223,6 +223,8 @@ public class DictCatalogServiceImpl extends ServiceImpl<DictCatalogMapper, DictC
public IDictCatalogService getProxyService() {
return cn.ibizlab.util.security.SpringContextHolder.getBean(this.getClass());
}
......
......@@ -31,6 +31,7 @@ import cn.ibizlab.core.dict.service.IDictOptionService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -38,7 +39,6 @@ import cn.ibizlab.core.dict.mapper.DictOptionMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
......@@ -255,6 +255,8 @@ public class DictOptionServiceImpl extends ServiceImpl<DictOptionMapper, DictOpt
public IDictOptionService getProxyService() {
return cn.ibizlab.util.security.SpringContextHolder.getBean(this.getClass());
}
......
......@@ -4,7 +4,7 @@
<!--输出实体[DICT_CATALOG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dict_catalog-7-1">
<changeSet author="root" id="tab-dict_catalog-8-1">
<createTable tableName="IBZDICTCATALOG">
<column name="CID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DICT_CATALOG_CID"/>
......@@ -30,7 +30,7 @@
<!--输出实体[DICT_OPTION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dict_option-17-2">
<changeSet author="root" id="tab-dict_option-17-2">
<createTable tableName="IBZDICTOPTION">
<column name="VKEY" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DICT_OPTION_VKEY"/>
......@@ -68,7 +68,7 @@
<!--输出实体[DICT_CATALOG]外键关系 -->
<!--输出实体[DICT_OPTION]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-dict_option-17-3">
<changeSet author="root" id="fk-dict_option-17-3">
<addForeignKeyConstraint baseColumnNames="CID" baseTableName="IBZDICTOPTION" constraintName="DER1N_DICT_OPTION_DICT_CATALOG" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CID" referencedTableName="IBZDICTCATALOG" validate="true"/>
</changeSet>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册