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

chitanda 发布系统代码

上级 60e993e5
......@@ -43,7 +43,7 @@ export class ViewTool {
// 视图常规参数
Object.assign(viewdata, data);
// 传入父视图的srfsessionid
Object.assign(viewdata, {srfsessionid:viewParam['srfsessionid']});
Object.assign(viewdata, { srfsessionid: viewParam['srfsessionid'] });
return viewdata;
}
......@@ -63,7 +63,7 @@ export class ViewTool {
public static buildUpRoutePath(route: Route, viewParam: any = {}, deResParameters: any[], parameters: any[], args: any[], data: any): string {
const indexRoutePath = this.getIndexRoutePath(route);
const deResRoutePath = this.getDeResRoutePath(viewParam, deResParameters, args);
const deRoutePath = this.getActiveRoutePath(parameters, args, data,viewParam);
const deRoutePath = this.getActiveRoutePath(parameters, args, data, viewParam);
return `${indexRoutePath}${deResRoutePath}${deRoutePath}`;
}
......@@ -79,10 +79,10 @@ export class ViewTool {
const { parameters: _parameters }: { parameters: any[] } = route.meta;
const { pathName: _pathName, parameterName: _parameterName }: { pathName: string, parameterName: string } = _parameters[0];
const param = route.params[_parameterName];
if (param && !Object.is(param, '')) {
if (isExistAndNotEmpty(param)) {
return `/${_pathName}/${param}`;
}
return `/${_pathName}/null`;
return `/${_pathName}`;
}
/**
......@@ -99,15 +99,15 @@ export class ViewTool {
let routePath: string = '';
let [arg] = args;
arg = arg ? arg : {};
if(deResParameters && deResParameters.length >0){
if (deResParameters && deResParameters.length > 0) {
deResParameters.forEach(({ pathName, parameterName }: { pathName: string, parameterName: string }) => {
let value:any = null;
let value: any = null;
if (viewParam[parameterName] && !Object.is(viewParam[parameterName], '') && !Object.is(viewParam[parameterName], 'null')) {
value = viewParam[parameterName];
} else if (arg[parameterName] && !Object.is(arg[parameterName], '') && !Object.is(arg[parameterName], 'null')) {
value = arg[parameterName];
}
routePath = `${routePath}/${pathName}/${value}`;
routePath = `${routePath}/${pathName}` + (isExistAndNotEmpty(value) ? `/${value}` : '');
});
}
return routePath;
......@@ -123,10 +123,10 @@ export class ViewTool {
* @returns {string}
* @memberof ViewTool
*/
public static getActiveRoutePath(parameters: any[], args: any[], data: any,viewParam: any = {}): string {
public static getActiveRoutePath(parameters: any[], args: any[], data: any, viewParam: any = {}): string {
let routePath: string = '';
// 不存在应用实体
if(parameters && parameters.length >0){
if (parameters && parameters.length > 0) {
if (parameters.length === 1) {
const [{ pathName, parameterName }] = parameters;
routePath = `/${pathName}`;
......@@ -138,7 +138,7 @@ export class ViewTool {
arg = arg ? arg : {};
const [{ pathName: _pathName, parameterName: _parameterName }, { pathName: _pathName2, parameterName: _parameterName2 }] = parameters;
const _value: any = arg[_parameterName] || viewParam[_parameterName] || null;
routePath = `/${_pathName}/${_value}/${_pathName2}`;
routePath = `/${_pathName}${isExistAndNotEmpty(_value) ? `/${_value}` : ''}/${_pathName2}`;
if (Object.keys(data).length > 0) {
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
}
......@@ -155,8 +155,8 @@ export class ViewTool {
* @returns {*}
* @memberof ViewTool
*/
public static formatRouteParams(params: any,route:any,context:any,viewparams:any): void {
Object.keys(params).forEach((key: string,index:number) => {
public static formatRouteParams(params: any, route: any, context: any, viewparams: any): void {
Object.keys(params).forEach((key: string, index: number) => {
const param: string | null | undefined = params[key];
if (!param || Object.is(param, '') || Object.is(param, 'null')) {
return;
......@@ -168,11 +168,11 @@ export class ViewTool {
Object.assign(context, { [key]: param });
}
});
if(route && route.fullPath && route.fullPath.indexOf("?") > -1){
const _viewparams:any = route.fullPath.slice(route.fullPath.indexOf("?")+1);
const _viewparamArray:Array<string> = decodeURIComponent(_viewparams).split(";")
if(_viewparamArray.length > 0){
_viewparamArray.forEach((item:any) =>{
if (route && route.fullPath && route.fullPath.indexOf("?") > -1) {
const _viewparams: any = route.fullPath.slice(route.fullPath.indexOf("?") + 1);
const _viewparamArray: Array<string> = decodeURIComponent(_viewparams).split(";")
if (_viewparamArray.length > 0) {
_viewparamArray.forEach((item: any) => {
Object.assign(viewparams, qs.parse(item));
})
}
......@@ -251,30 +251,30 @@ export class ViewTool {
* @param {*} [UIService] 界面行为服务
* @memberof ViewTool
*/
public static calcActionItemAuthState(data:any,ActionModel:any,UIService:any){
public static calcActionItemAuthState(data: any, ActionModel: any, UIService: any) {
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
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 && data && Object.keys(data).length > 0) {
let dataActionResult: any = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
// 无权限:0;有权限:1
if(!dataActionResult){
if (!dataActionResult) {
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
if (_item.noprivdisplaymode === 1) {
_item.disabled = true;
}
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
if ((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)) {
_item.visabled = false;
}else{
} else {
_item.visabled = true;
}
}else{
} else {
_item.visabled = true;
_item.disabled = false;
}
}
}
}
}
}
\ No newline at end of file
......@@ -2757,7 +2757,7 @@
<!--输出实体[CONTACT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-contact-352-38">
<changeSet author="a_LAB01_e85d8801c" id="tab-contact-354-38">
<createTable tableName="CONTACT">
<column name="ADDRESS1_FREIGHTTERMSCODE" remarks="" type="VARCHAR(30)">
</column>
......@@ -11186,25 +11186,25 @@
<addForeignKeyConstraint baseColumnNames="BUSINESSUNITID" baseTableName="CONSTRAINTBASEDGROUP" constraintName="DER1N_CONSTRAINTBASEDGROUP__BU" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="BUSINESSUNITID" referencedTableName="BUSINESSUNIT" validate="true"/>
</changeSet>
<!--输出实体[CONTACT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-352-199">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-354-199">
<addForeignKeyConstraint baseColumnNames="CUSTOMERID" baseTableName="CONTACT" constraintName="DER1N_CONTACT_ACCOUNT_CUSTOMER" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-352-200">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-354-200">
<addForeignKeyConstraint baseColumnNames="PREFERREDEQUIPMENTID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__EQUIPMENT__PREF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EQUIPMENTID" referencedTableName="EQUIPMENT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-352-201">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-354-201">
<addForeignKeyConstraint baseColumnNames="ORIGINATINGLEADID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__LEAD__ORIGINATI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="LEADID" referencedTableName="LEAD" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-352-202">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-354-202">
<addForeignKeyConstraint baseColumnNames="DEFAULTPRICELEVELID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__PRICELEVEL__DEF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-352-203">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-354-203">
<addForeignKeyConstraint baseColumnNames="PREFERREDSERVICEID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__SERVICE__PREFER" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-352-204">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-354-204">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-352-205">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-354-205">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__TRANSACTIONCURR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[CONTRACT]外键关系 -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册