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

zhujiamin 发布系统代码 [TrainSys,网页端]

上级 60202905
......@@ -94,8 +94,9 @@ export class DataPanelEngine extends ViewEngine {
if (this.dataPanel) {
if (Object.is(this.dataPanel.controlType, 'FORM')) {
if (data && data.data) {
this.dataPanel.fillForm(data.data);
this.dataPanel.formLogic({ name: '', newVal: null, oldVal: null });
this.dataPanel.fillForm(data.data).then(() =>{
this.dataPanel.formLogic({ name: '', newVal: null, oldVal: null });
})
}
} else if (Object.is(this.dataPanel.controlType, 'PANEL')) {
if (data && data.data) {
......
......@@ -41,6 +41,7 @@ export class OptionViewEngine extends EditViewEngine {
* @memberof OptionViewEngine
*/
public cancel() {
this.view.$store.commit('viewAction/setViewDataChange', { viewTag: this.view.viewtag, viewDataChange: false });
this.emitViewEvent('close', null);
}
}
\ No newline at end of file
import { IPSAppCodeList } from '@ibiz/dynamic-model-api';
import { FormDetailModel } from './form-detail';
/**
......@@ -44,7 +45,7 @@ export class FormItemModel extends FormDetailModel {
* @type {boolean}
* @memberof FormItemModel
*/
public required:boolean = false;
public required: boolean = false;
/**
* @description 忽略输入值
......@@ -53,6 +54,22 @@ export class FormItemModel extends FormDetailModel {
*/
public ignoreInput?: number | null;
/**
* 是否转化为代码项文本
*
* @type {boolean}
* @memberof FormItemModel
*/
public convertToCodeItemText: boolean = false;
/**
* 代码表对象
*
* @type {(IPSAppCodeList | null)}
* @memberof FormItemModel
*/
public codelist: IPSAppCodeList | null = null;
/**
* @description 动态值项名称
* @type {string}
......@@ -74,6 +91,8 @@ export class FormItemModel extends FormDetailModel {
this.required = opts.required;
this.ignoreInput = opts.ignoreInput;
this.captionItemName = opts.captionItemName;
this.convertToCodeItemText = opts.convertToCodeItemText;
this.codelist = opts.codelist;
}
/**
......
<template>
<codelist
v-if="codeList"
v-if="codeList && !showSourceMode"
:codeList="codeList"
:value="value"
:data="data"
......@@ -91,6 +91,14 @@ export default class AppSpan extends Vue {
*/
@Prop() public codeList?: any;
/**
* 显示模式(为true不做翻译,直接显示值,配合codelist使用)
*
* @type {string}
* @memberof AppSpan
*/
@Prop({default:false}) public showSourceMode?: boolean;
/**
* 传入表单数据
*
......@@ -188,7 +196,7 @@ export default class AppSpan extends Vue {
* @memberof AppSpan
*/
public load() {
if (this.codeList) {
if (this.codeList && !this.showSourceMode) {
return; //代码表走codelist组件
} else if (this.editorType === 'ADDRESSPICKUP') {
if (this.$util.isEmpty(this.value)) {
......
......@@ -113,6 +113,10 @@ export default class SpanEditor extends EditorBase {
public async initSpan(){
let codeList: IPSAppCodeList | null = (this.editorInstance as IPSCodeListEditor)?.getPSAppCodeList?.();
this.customProps.codeList = codeList;
// 父项转换为代码项文本为true时,显示原值模式为true
if(this.parentItem && this.parentItem.convertToCodeItemText){
this.customProps.showSourceMode = true;
}
this.customProps.context = this.context;
this.customProps.viewparams = this.viewparams;
this.initFormatParams();
......
......@@ -148,19 +148,6 @@ export default class AppModalCompponent extends Vue {
return this.subject;
}
/**
* 监控模态展示状态变更
*
* @memberof AppModal
*/
@Watch('isShow')
public isShowWatch(newVal: boolean, oldVal: boolean): void {
if (newVal !== oldVal && newVal === false) {
this.zIndex -= 100;
this.$store.commit('updateZIndex', this.zIndex);
}
}
/**
* Vue生命周期created
*
......@@ -216,7 +203,12 @@ export default class AppModalCompponent extends Vue {
*
* @memberof AppModal
*/
public beforeDestroy() {}
public beforeDestroy() {
if (this.zIndex) {
const zIndex: any = this.zIndex;
this.$store.commit('updateZIndex', zIndex - 100);
}
}
/**
* 视图关闭
......@@ -225,10 +217,6 @@ export default class AppModalCompponent extends Vue {
*/
public close(result: any) {
if (result && Array.isArray(result) && result.length > 0) {
if (this.zIndex) {
const zIndex: any = this.zIndex;
this.$store.commit('updateZIndex', zIndex - 100);
}
Object.assign(this.tempResult, { ret: 'OK' }, { datas: JSON.parse(JSON.stringify(result)) });
}
this.isShow = false;
......
......@@ -91,7 +91,6 @@ export class WFActionViewBase extends MainViewBase implements WFActionViewInterf
if (!response || response.status !== 200) {
return;
}
// this.$store.commit('viewAction/setViewDataChange', { viewTag: this.viewtag, viewDataChange: false });
this.$emit('view-event', { viewName: this.viewInstance.name, action: 'viewdataschange', data: [{ ...response.data }] });
this.$emit('view-event', { viewName: this.viewInstance.name, action: 'close', data: null });
})
......@@ -103,6 +102,7 @@ export class WFActionViewBase extends MainViewBase implements WFActionViewInterf
* @memberof WFActionViewBase
*/
public onClickCancel(): void {
this.$store.commit('viewAction/setViewDataChange', { viewTag: this.viewtag, viewDataChange: false });
this.$emit('view-event', { viewName: this.viewInstance.name, action: 'close', data: null });
}
}
\ No newline at end of file
......@@ -102,6 +102,7 @@ export class WFDynaActionViewBase extends MainViewBase implements WFDynaActionVi
let preFormData: any = form.getData();
let nextFormData: any = form.transformData(preFormData);
Object.assign(preFormData, nextFormData);
this.$store.commit('viewAction/setViewDataChange', { viewTag: this.viewtag, viewDataChange: false });
this.$emit("view-event", { action: "viewdataschange", data: [preFormData] });
this.$emit("view-event", { action: "close", data: null });
}
......@@ -114,6 +115,7 @@ export class WFDynaActionViewBase extends MainViewBase implements WFDynaActionVi
* @memberof WFDynaActionViewBase
*/
public onClickCancel() {
this.$store.commit('viewAction/setViewDataChange', { viewTag: this.viewtag, viewDataChange: false });
this.$emit("view-event", { action: "close", data: null });
}
......
......@@ -87,6 +87,7 @@ export class WFDynaStartViewBase extends MainViewBase implements WFDynaStartView
let preFormData: any = xData.getData();
let nextFormData: any = xData.transformData(preFormData);
Object.assign(preFormData, nextFormData);
this.$store.commit('viewAction/setViewDataChange', { viewTag: this.viewtag, viewDataChange: false });
this.$emit("view-event", { action: "viewdataschange", data: [preFormData] });
this.$emit("view-event", { action: "close", data: null });
}
......@@ -98,6 +99,7 @@ export class WFDynaStartViewBase extends MainViewBase implements WFDynaStartView
* @memberof WFDynaStartViewBase
*/
public onClickCancel() {
this.$store.commit('viewAction/setViewDataChange', { viewTag: this.viewtag, viewDataChange: false });
this.$emit("view-event", { action: "close", data: null });
}
......
......@@ -168,7 +168,7 @@ export class FormControlBase extends MainControlBase implements FormControlInter
* @param {string} [action] 行为标识
* @memberof FormControlBase
*/
public onFormLoad(data: any = {}, action: string): void { }
public async onFormLoad(data: any = {}, action: string): Promise<void> { }
/**
* 值填充
......@@ -177,7 +177,7 @@ export class FormControlBase extends MainControlBase implements FormControlInter
* @param {string} [action] 行为标识
* @memberof FormControlBase
*/
public fillForm(_datas: any = {}, action: string): void {
public async fillForm(_datas: any = {}, action: string) {
this.ignorefieldvaluechange = true;
Object.keys(_datas).forEach((name: string) => {
if (this.data.hasOwnProperty(name)) {
......@@ -665,4 +665,4 @@ export class FormControlBase extends MainControlBase implements FormControlInter
}
}
}
}
}
\ No newline at end of file
......@@ -1103,16 +1103,20 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
if (!Object.is(dataInfo, '')) {
dataInfo += '、';
}
dataInfo += srfmajortext;
dataInfo += srfmajortext ? srfmajortext : '';
} else {
return false;
}
});
if (_datas.length < 5) {
dataInfo = dataInfo + ' ' + (this.$t('app.grid.totle') as string) + _datas.length + (this.$t('app.grid.records') as string) + (this.$t('app.grid.data') as string);
} else {
dataInfo = ' ... ' + (this.$t('app.grid.totle') as string) + _datas.length + (this.$t('app.grid.records') as string) + (this.$t('app.grid.data') as string);
if(!dataInfo){
dataInfo = (this.$t('app.grid.selected') as string) + _datas.length + (this.$t('app.grid.records') as string) + (this.$t('app.grid.data') as string);
}else{
if (_datas.length < 5) {
dataInfo = dataInfo + ' ' + (this.$t('app.grid.totle') as string) + _datas.length + (this.$t('app.grid.records') as string) + (this.$t('app.grid.data') as string);
} else {
dataInfo = ' ... ' + (this.$t('app.grid.totle') as string) + _datas.length + (this.$t('app.grid.records') as string) + (this.$t('app.grid.data') as string);
}
}
const removeData = async () => {
......@@ -1140,6 +1144,7 @@ export class GridControlBase extends MDControlBase implements GridControlInterfa
if (this.viewparams && Object.keys(this.viewparams).length) {
Object.assign(arg, { viewparams: this.viewparams });
}
Object.assign(arg, { [this.appDeCodeName.toLowerCase()]: ele });
promiseArr.push(this.service.delete(_removeAction, tempContext, arg, this.showBusyIndicator));
})
promises = Promise.all(promiseArr);
......
......@@ -214,7 +214,7 @@ export class SearchFormControlBase extends EditFormControlBase implements Search
return;
}
this.resetDraftFormStates();
this.onFormLoad(data, 'loadDraft');
await this.onFormLoad(data, 'loadDraft');
setTimeout(() => {
const form: any = this.$refs[this.name];
if (form) {
......@@ -269,9 +269,9 @@ export class SearchFormControlBase extends EditFormControlBase implements Search
* @param {string} action
* @memberof SearchFormControlBase
*/
public onFormLoad(data: any = {}, action: string): void {
public async onFormLoad(data: any = {}, action: string): Promise<void> {
this.setFormEnableCond(data);
this.fillForm(data, action);
await this.fillForm(data, action)
this.formLogic({ name: '' });
}
......
......@@ -86,7 +86,7 @@ export const Environment = {
// Debug栏模型配置工具地址
dynamicConfigToolUrl: process.env.VUE_APP_DYNAMICCONFIGTOOLURL,
// 应用是否支持多语言
isEnableMultiLan:false,
isEnableMultiLan:true,
// 是否启用修复
enableIssue:true,
// 刷新token即将到期时间间隔(默认10分钟,单位:ms)
......
......@@ -51,6 +51,7 @@ function getAppLocale(){
show: "Show",
records: "records",
totle: "totle",
selected: "selected ",
valuevail: "Value cannot be empty",
group:"Group",
other:"Other",
......
......@@ -50,6 +50,7 @@ function getAppLocale(){
show: "显示",
records: "条",
totle: "共",
selected: "所选中的",
valuevail: "值不能为空",
group:"分组",
other:"其他",
......
#简体中文
#中文简体
PAGE.HEADER.WFEXPLORERVIEW=\u5de5\u4f5c\u6d41\u5bfc\u822a\u89c6\u56fe
PAGE.COMMON.EDITVIEW.DER.FA=\u6587\u4ef6\u9644\u4ef6
PAGE.HEADER.UPLOADVIEW=\u4e0a\u4f20\u6587\u4ef6\u89c6\u56fe
......
......@@ -2,7 +2,7 @@
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<!--输出实体[BOOK]数据结构 -->
<changeSet author="root" id="tab-book-49-1">
<changeSet author="root" id="tab-book-53-1">
<createTable tableName="T_BOOK">
<column name="BOOKNAME" remarks="" type="VARCHAR(200)">
</column>
......
......@@ -322,6 +322,21 @@
"name" : "FIELD",
"codeName" : "Field"
},
"getPSDEFDGroupLogics" : [ {
"groupOP" : "AND",
"logicCat" : "ITEMENABLE",
"logicType" : "GROUP",
"name" : "表单成员[field][表单项启用]逻辑",
"getPSDEFDLogics" : [ {
"condOP" : "EQ",
"dEFDName" : "bookname",
"logicType" : "SINGLE",
"name" : "bookname 等于(=) (4444)",
"value" : "4444"
} ],
"relatedDetailNames" : [ "bookname" ],
"notMode" : false
} ],
"getPSEditor" : {
"editorType" : "TEXTBOX",
"maxLength" : 100,
......@@ -350,6 +365,21 @@
"name" : "FIELD2",
"codeName" : "Field2"
},
"getPSDEFDGroupLogics" : [ {
"groupOP" : "AND",
"logicCat" : "ITEMBLANK",
"logicType" : "GROUP",
"name" : "表单成员[field2][表单项空输入]逻辑",
"getPSDEFDLogics" : [ {
"condOP" : "EQ",
"dEFDName" : "bookname",
"logicType" : "SINGLE",
"name" : "bookname 等于(=) (5555)",
"value" : "5555"
} ],
"relatedDetailNames" : [ "bookname" ],
"notMode" : false
} ],
"getPSEditor" : {
"editorType" : "TEXTBOX",
"maxLength" : 100,
......@@ -360,7 +390,7 @@
"colMD" : 8,
"layout" : "TABLE_24COL"
},
"allowEmpty" : true,
"allowEmpty" : false,
"showCaption" : true
} ],
"getPSLayout" : {
......@@ -493,6 +523,27 @@
"name" : "FIELD5",
"codeName" : "Field5"
},
"getPSDEFDGroupLogics" : [ {
"groupOP" : "AND",
"logicCat" : "PANELVISIBLE",
"logicType" : "GROUP",
"name" : "表单成员[field5][面板显示]逻辑",
"getPSDEFDLogics" : [ {
"condOP" : "EQ",
"dEFDName" : "bookname",
"logicType" : "SINGLE",
"name" : "bookname 等于(=) (333)",
"value" : "333"
}, {
"condOP" : "EQ",
"dEFDName" : "bookname",
"logicType" : "SINGLE",
"name" : "bookname 等于(=) (222)",
"value" : "222"
} ],
"relatedDetailNames" : [ "bookname" ],
"notMode" : false
} ],
"getPSEditor" : {
"editorType" : "TEXTBOX",
"maxLength" : 100,
......
......@@ -1308,6 +1308,21 @@
"name" : "FIELD",
"codeName" : "Field"
},
"getPSDEFDGroupLogics" : [ {
"groupOP" : "AND",
"logicCat" : "ITEMENABLE",
"logicType" : "GROUP",
"name" : "表单成员[field][表单项启用]逻辑",
"getPSDEFDLogics" : [ {
"condOP" : "EQ",
"dEFDName" : "bookname",
"logicType" : "SINGLE",
"name" : "bookname 等于(=) (4444)",
"value" : "4444"
} ],
"relatedDetailNames" : [ "bookname" ],
"notMode" : false
} ],
"getPSEditor" : {
"editorType" : "TEXTBOX",
"maxLength" : 100,
......@@ -1336,6 +1351,21 @@
"name" : "FIELD2",
"codeName" : "Field2"
},
"getPSDEFDGroupLogics" : [ {
"groupOP" : "AND",
"logicCat" : "ITEMBLANK",
"logicType" : "GROUP",
"name" : "表单成员[field2][表单项空输入]逻辑",
"getPSDEFDLogics" : [ {
"condOP" : "EQ",
"dEFDName" : "bookname",
"logicType" : "SINGLE",
"name" : "bookname 等于(=) (5555)",
"value" : "5555"
} ],
"relatedDetailNames" : [ "bookname" ],
"notMode" : false
} ],
"getPSEditor" : {
"editorType" : "TEXTBOX",
"maxLength" : 100,
......@@ -1346,7 +1376,7 @@
"colMD" : 8,
"layout" : "TABLE_24COL"
},
"allowEmpty" : true,
"allowEmpty" : false,
"showCaption" : true
} ],
"getPSLayout" : {
......@@ -1479,6 +1509,27 @@
"name" : "FIELD5",
"codeName" : "Field5"
},
"getPSDEFDGroupLogics" : [ {
"groupOP" : "AND",
"logicCat" : "PANELVISIBLE",
"logicType" : "GROUP",
"name" : "表单成员[field5][面板显示]逻辑",
"getPSDEFDLogics" : [ {
"condOP" : "EQ",
"dEFDName" : "bookname",
"logicType" : "SINGLE",
"name" : "bookname 等于(=) (333)",
"value" : "333"
}, {
"condOP" : "EQ",
"dEFDName" : "bookname",
"logicType" : "SINGLE",
"name" : "bookname 等于(=) (222)",
"value" : "222"
} ],
"relatedDetailNames" : [ "bookname" ],
"notMode" : false
} ],
"getPSEditor" : {
"editorType" : "TEXTBOX",
"maxLength" : 100,
......
{
"dynaModelFilePath" : "PSSYSAPPS/Web/PSAPPLANS/ZH_CN.json",
"language" : "ZH_CN",
"name" : "网页端-中文简体"
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册