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

ibiz4j 发布系统代码 [ibz-ou,统一组织单位]

上级 20e93db9
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<template v-else> <template v-else>
<i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i> <i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i>
</template> </template>
<span ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> <span ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span>
</template> </template>
<app-menu-item :isCollapse="isCollapse" :menus="item.items" :ctrlName="ctrlName" :isFirst="false" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item> <app-menu-item :isCollapse="isCollapse" :menus="item.items" :ctrlName="ctrlName" :isFirst="false" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item>
</el-submenu> </el-submenu>
...@@ -23,18 +23,18 @@ ...@@ -23,18 +23,18 @@
<el-menu-item :class="[{'isFirst' : isFirst},item.textcls]" v-show="!item.hidden" :index="item.name" :key="item.id"> <el-menu-item :class="[{'isFirst' : isFirst},item.textcls]" v-show="!item.hidden" :index="item.name" :key="item.id">
<template v-if="item.icon && item.icon != ''"> <template v-if="item.icon && item.icon != ''">
<img :src="item.icon" class='app-menu-icon' /> <img :src="item.icon" class='app-menu-icon' />
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> <span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span>
</template> </template>
<template v-else-if="item.iconcls && item.iconcls != ''"> <template v-else-if="item.iconcls && item.iconcls != ''">
<i :class="[item.iconcls, 'app-menu-icon']"></i> <i :class="[item.iconcls, 'app-menu-icon']"></i>
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> <span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span>
</template> </template>
<template v-else> <template v-else>
<i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i> <i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i>
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> <span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span>
</template> </template>
<template slot="title"> <template slot="title">
<span :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> <span :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span>
<template v-if="counterdata && counterdata[item.counterid] && counterdata[item.counterid] > 0"> <template v-if="counterdata && counterdata[item.counterid] && counterdata[item.counterid] > 0">
<span class="pull-right"> <span class="pull-right">
<badge :count="counterdata[item.counterid]" :overflow-count="9999"></badge> <badge :count="counterdata[item.counterid]" :overflow-count="9999"></badge>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" /> <img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" />
<i class="fa fa-cogs" v-else></i> <i class="fa fa-cogs" v-else></i>
</span> </span>
<span>{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> <span>{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span>
<span class="line"></span> <span class="line"></span>
</p> </p>
<p style=" display: 'flex' "> <p style=" display: 'flex' ">
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" /> <img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" />
<i class="fa fa-cogs" v-else></i> <i class="fa fa-cogs" v-else></i>
</span> </span>
<h4>{{$t(`app.menus.${ctrlName}.${item.name}`)}}</h4> <h4>{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</h4>
</div> </div>
</card> </card>
</template> </template>
......
...@@ -9,14 +9,6 @@ import GridViewEngine from './grid-view-engine'; ...@@ -9,14 +9,6 @@ import GridViewEngine from './grid-view-engine';
*/ */
export default class GridView8Engine extends GridViewEngine { export default class GridView8Engine extends GridViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof GridView8Engine
*/
protected grid: any;
/** /**
* 表格部件 * 表格部件
* *
......
...@@ -36,6 +36,8 @@ function getAppLocale(){ ...@@ -36,6 +36,8 @@ function getAppLocale(){
nomore:"དེ་ལས་མང་བ་མི་འདུག", nomore:"དེ་ལས་མང་བ་མི་འདུག",
other:"གཞན་དག", other:"གཞན་དག",
valueNotEmpty:"སྟོང་མི་ཆོག", valueNotEmpty:"སྟོང་མི་ཆོག",
createFailed:"གསར་འཛུགས་ཕམ་པ།",
isExist:"གནས་པ་",
}, },
local:{ local:{
new: "གསར་འཛུགས།", new: "གསར་འཛུགས།",
......
...@@ -36,6 +36,8 @@ function getAppLocale(){ ...@@ -36,6 +36,8 @@ function getAppLocale(){
nomore:"No more", nomore:"No more",
other:"other", other:"other",
valueNotEmpty:"The value cannot be null", valueNotEmpty:"The value cannot be null",
createFailed:"Create Failed",
isExist:"Exist",
}, },
local:{ local:{
new: "New", new: "New",
......
...@@ -36,6 +36,8 @@ function getAppLocale(){ ...@@ -36,6 +36,8 @@ function getAppLocale(){
nomore:"没有更多了", nomore:"没有更多了",
other:"其他", other:"其他",
valueNotEmpty:"值不能为空", valueNotEmpty:"值不能为空",
createFailed:"创建失败",
isExist:"已存在",
}, },
local:{ local:{
new: "新建", new: "新建",
......
...@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/sysorganizations\/batch$/)).reply((config: any) => ...@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/sysorganizations\/batch$/)).reply((config: any) =>
return [status, {}]; return [status, {}];
}); });
// Select // CheckKey
mock.onGet(new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/sysorganizations\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:sysorganization 方法: Select"); console.groupCollapsed("实体:sysorganization 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
return [status, null]; return [status, null];
} }
const paramArray:Array<any> = ['orgid']; const paramArray:Array<any> = ['orgid'];
const matchArray:any = new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url); const matchArray:any = new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {}; let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){ if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => { paramArray.forEach((item: any, index: number) => {
...@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})\/select$/)). ...@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).
}); });
}); });
} }
let items = mockDatas ? mockDatas : []; //let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.orgid, tempValue.orgid)); //let _items = items.find((item: any) => Object.is(item.orgid, tempValue.orgid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['orgid'] == tempValue['orgid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: "); console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items); console.table(data);
console.groupEnd(); console.groupEnd();
console.groupEnd(); console.groupEnd();
return [status, _items]; return [status, data];
}); });
// Create // Create
...@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/sysorganizations\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply( ...@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/sysorganizations\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply(
console.groupEnd(); console.groupEnd();
return [status, mockDatas[0]]; return [status, mockDatas[0]];
}); });
// Update
mock.onPut(new RegExp(/^\/sysorganizations\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysorganization 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['orgid'];
const matchArray:any = new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.orgid, tempValue.orgid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['orgid'] == tempValue['orgid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft // GetDraft
mock.onGet(new RegExp(/^\/sysorganizations\/getdraft$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/sysorganizations\/getdraft$/)).reply((config: any) => {
...@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/sysorganizations\/getdraft$/)).reply((config: any) => ...@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/sysorganizations\/getdraft$/)).reply((config: any) =>
return [status, {}]; return [status, {}];
}); });
// CheckKey // Save
mock.onPost(new RegExp(/^\/sysorganizations\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/sysorganizations\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:sysorganization 方法: CheckKey"); console.groupCollapsed("实体:sysorganization 方法: Save");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
return [status, null]; return [status, null];
} }
const paramArray:Array<any> = ['orgid']; const paramArray:Array<any> = ['orgid'];
const matchArray:any = new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url); const matchArray:any = new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {}; let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){ if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => { paramArray.forEach((item: any, index: number) => {
...@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/sysorganizations\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$ ...@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/sysorganizations\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$
return [status, data]; return [status, data];
}); });
// Save // Update
mock.onPost(new RegExp(/^\/sysorganizations\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => { mock.onPut(new RegExp(/^\/sysorganizations\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysorganization 方法: Save"); console.groupCollapsed("实体:sysorganization 方法: Update");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
return [status, null]; return [status, null];
} }
const paramArray:Array<any> = ['orgid']; const paramArray:Array<any> = ['orgid'];
const matchArray:any = new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url); const matchArray:any = new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {}; let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){ if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => { paramArray.forEach((item: any, index: number) => {
...@@ -366,10 +338,38 @@ mock.onGet(new RegExp(/^\/sysorganizations\/fetchtoporg(\?[\w-./?%&=,]*)*$/)).re ...@@ -366,10 +338,38 @@ mock.onGet(new RegExp(/^\/sysorganizations\/fetchtoporg(\?[\w-./?%&=,]*)*$/)).re
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:sysorganization 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['orgid'];
const matchArray:any = new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.orgid, tempValue.orgid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => { // Get
console.groupCollapsed("实体:sysorganization 方法: Remove"); mock.onGet(new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysorganization 方法: Get");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
...@@ -395,9 +395,9 @@ mock.onDelete(new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})$/)).reply ...@@ -395,9 +395,9 @@ mock.onDelete(new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})$/)).reply
return [status, _items?_items:{}]; return [status, _items?_items:{}];
}); });
// Get // Remove
mock.onGet(new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => { mock.onDelete(new RegExp(/^\/sysorganizations\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysorganization 方法: Get"); console.groupCollapsed("实体:sysorganization 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
......
...@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/sysposts\/batch$/)).reply((config: any) => { ...@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/sysposts\/batch$/)).reply((config: any) => {
return [status, {}]; return [status, {}];
}); });
// Select // CheckKey
mock.onGet(new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/sysposts\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:syspost 方法: Select"); console.groupCollapsed("实体:syspost 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
return [status, null]; return [status, null];
} }
const paramArray:Array<any> = ['postid']; const paramArray:Array<any> = ['postid'];
const matchArray:any = new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url); const matchArray:any = new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {}; let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){ if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => { paramArray.forEach((item: any, index: number) => {
...@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c ...@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
}); });
}); });
} }
let items = mockDatas ? mockDatas : []; //let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.postid, tempValue.postid)); //let _items = items.find((item: any) => Object.is(item.postid, tempValue.postid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['postid'] == tempValue['postid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: "); console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items); console.table(data);
console.groupEnd(); console.groupEnd();
console.groupEnd(); console.groupEnd();
return [status, _items]; return [status, data];
}); });
// Create // Create
...@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/sysposts\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: ...@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/sysposts\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console.groupEnd(); console.groupEnd();
return [status, mockDatas[0]]; return [status, mockDatas[0]];
}); });
// Update
mock.onPut(new RegExp(/^\/sysposts\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:syspost 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['postid'];
const matchArray:any = new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.postid, tempValue.postid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['postid'] == tempValue['postid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft // GetDraft
mock.onGet(new RegExp(/^\/sysposts\/getdraft$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/sysposts\/getdraft$/)).reply((config: any) => {
...@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/sysposts\/getdraft$/)).reply((config: any) => { ...@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/sysposts\/getdraft$/)).reply((config: any) => {
return [status, {}]; return [status, {}];
}); });
// CheckKey // Save
mock.onPost(new RegExp(/^\/sysposts\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/sysposts\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:syspost 方法: CheckKey"); console.groupCollapsed("实体:syspost 方法: Save");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
return [status, null]; return [status, null];
} }
const paramArray:Array<any> = ['postid']; const paramArray:Array<any> = ['postid'];
const matchArray:any = new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url); const matchArray:any = new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {}; let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){ if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => { paramArray.forEach((item: any, index: number) => {
...@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/sysposts\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl ...@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/sysposts\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return [status, data]; return [status, data];
}); });
// Save // Update
mock.onPost(new RegExp(/^\/sysposts\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => { mock.onPut(new RegExp(/^\/sysposts\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:syspost 方法: Save"); console.groupCollapsed("实体:syspost 方法: Update");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
return [status, null]; return [status, null];
} }
const paramArray:Array<any> = ['postid']; const paramArray:Array<any> = ['postid'];
const matchArray:any = new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url); const matchArray:any = new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {}; let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){ if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => { paramArray.forEach((item: any, index: number) => {
...@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/sysposts\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co ...@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/sysposts\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:syspost 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['postid'];
const matchArray:any = new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.postid, tempValue.postid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => { // Get
console.groupCollapsed("实体:syspost 方法: Remove"); mock.onGet(new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:syspost 方法: Get");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
...@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config ...@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config
return [status, _items?_items:{}]; return [status, _items?_items:{}];
}); });
// Get // Remove
mock.onGet(new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => { mock.onDelete(new RegExp(/^\/sysposts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:syspost 方法: Get"); console.groupCollapsed("实体:syspost 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
......
...@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/systeams\/batch$/)).reply((config: any) => { ...@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/systeams\/batch$/)).reply((config: any) => {
return [status, {}]; return [status, {}];
}); });
// Select // CheckKey
mock.onGet(new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/systeams\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:systeam 方法: Select"); console.groupCollapsed("实体:systeam 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
return [status, null]; return [status, null];
} }
const paramArray:Array<any> = ['teamid']; const paramArray:Array<any> = ['teamid'];
const matchArray:any = new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url); const matchArray:any = new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {}; let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){ if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => { paramArray.forEach((item: any, index: number) => {
...@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c ...@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
}); });
}); });
} }
let items = mockDatas ? mockDatas : []; //let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.teamid, tempValue.teamid)); //let _items = items.find((item: any) => Object.is(item.teamid, tempValue.teamid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['teamid'] == tempValue['teamid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: "); console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items); console.table(data);
console.groupEnd(); console.groupEnd();
console.groupEnd(); console.groupEnd();
return [status, _items]; return [status, data];
}); });
// Create // Create
...@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/systeams\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: ...@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/systeams\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console.groupEnd(); console.groupEnd();
return [status, mockDatas[0]]; return [status, mockDatas[0]];
}); });
// Update
mock.onPut(new RegExp(/^\/systeams\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:systeam 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['teamid'];
const matchArray:any = new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.teamid, tempValue.teamid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['teamid'] == tempValue['teamid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft // GetDraft
mock.onGet(new RegExp(/^\/systeams\/getdraft$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/systeams\/getdraft$/)).reply((config: any) => {
...@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/systeams\/getdraft$/)).reply((config: any) => { ...@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/systeams\/getdraft$/)).reply((config: any) => {
return [status, {}]; return [status, {}];
}); });
// CheckKey // Save
mock.onPost(new RegExp(/^\/systeams\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/systeams\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:systeam 方法: CheckKey"); console.groupCollapsed("实体:systeam 方法: Save");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
return [status, null]; return [status, null];
} }
const paramArray:Array<any> = ['teamid']; const paramArray:Array<any> = ['teamid'];
const matchArray:any = new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url); const matchArray:any = new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {}; let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){ if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => { paramArray.forEach((item: any, index: number) => {
...@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/systeams\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl ...@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/systeams\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return [status, data]; return [status, data];
}); });
// Save // Update
mock.onPost(new RegExp(/^\/systeams\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => { mock.onPut(new RegExp(/^\/systeams\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:systeam 方法: Save"); console.groupCollapsed("实体:systeam 方法: Update");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
return [status, null]; return [status, null];
} }
const paramArray:Array<any> = ['teamid']; const paramArray:Array<any> = ['teamid'];
const matchArray:any = new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url); const matchArray:any = new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {}; let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){ if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => { paramArray.forEach((item: any, index: number) => {
...@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/systeams\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co ...@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/systeams\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:systeam 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['teamid'];
const matchArray:any = new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.teamid, tempValue.teamid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => { // Get
console.groupCollapsed("实体:systeam 方法: Remove"); mock.onGet(new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:systeam 方法: Get");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
...@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config ...@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config
return [status, _items?_items:{}]; return [status, _items?_items:{}];
}); });
// Get // Remove
mock.onGet(new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => { mock.onDelete(new RegExp(/^\/systeams\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:systeam 方法: Get"); console.groupCollapsed("实体:systeam 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data}); console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
if (status !== 200) { if (status !== 200) {
......
...@@ -843,7 +843,7 @@ export default class SysDepartmentMPickupViewBase extends Vue { ...@@ -843,7 +843,7 @@ export default class SysDepartmentMPickupViewBase extends Vue {
} }
if(model.datas.length>0){ if(model.datas.length>0){
model.datas.forEach((data:any,index:any)=>{ model.datas.forEach((data:any,index:any)=>{
Object.assign(data,{srfmajortext: data['deptname']}); Object.assign(data,{srfmajortext: data.hasOwnProperty('srfmajortext') ? data['srfmajortext'] : data['deptname']});
}) })
} }
model.datas.forEach((item: any) => { model.datas.forEach((item: any) => {
......
...@@ -884,6 +884,8 @@ export default class SysDeptMemberGridViewBase extends Vue { ...@@ -884,6 +884,8 @@ export default class SysDeptMemberGridViewBase extends Vue {
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) { public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null; let localContext:any = null;
let localViewParam:any =null; let localViewParam:any =null;
let tempContext:any = this.$util.deepCopy(this.context);
let data:any = this.$util.deepCopy(args[0]);
let batchAddPSAppViews:Array<any>=[]; let batchAddPSAppViews:Array<any>=[];
batchAddPSAppViews=[ batchAddPSAppViews=[
{view:{viewname:'sys-employee-mpickup-view',height: 0,width: 0,title: '人员数据多项选择视图'}, {view:{viewname:'sys-employee-mpickup-view',height: 0,width: 0,title: '人员数据多项选择视图'},
...@@ -903,7 +905,7 @@ export default class SysDeptMemberGridViewBase extends Vue { ...@@ -903,7 +905,7 @@ export default class SysDeptMemberGridViewBase extends Vue {
let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{ let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] == this.context.srfparentdename)); return (item.res && (item.res[0] == this.context.srfparentdename));
}) })
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]); let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, tempContext, data);
container.subscribe((result: any) => { container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
......
...@@ -843,7 +843,7 @@ export default class SysEmployeeMPickupViewBase extends Vue { ...@@ -843,7 +843,7 @@ export default class SysEmployeeMPickupViewBase extends Vue {
} }
if(model.datas.length>0){ if(model.datas.length>0){
model.datas.forEach((data:any,index:any)=>{ model.datas.forEach((data:any,index:any)=>{
Object.assign(data,{srfmajortext: data['personname']}); Object.assign(data,{srfmajortext: data.hasOwnProperty('srfmajortext') ? data['srfmajortext'] : data['personname']});
}) })
} }
model.datas.forEach((item: any) => { model.datas.forEach((item: any) => {
......
...@@ -39,7 +39,7 @@ export default class SysDepartmentServiceBase extends EntityService { ...@@ -39,7 +39,7 @@ export default class SysDepartmentServiceBase extends EntityService {
// 实体接口 // 实体接口
/** /**
* Select接口方法 * CheckKey接口方法
* *
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
...@@ -47,14 +47,15 @@ export default class SysDepartmentServiceBase extends EntityService { ...@@ -47,14 +47,15 @@ export default class SysDepartmentServiceBase extends EntityService {
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof SysDepartmentServiceBase * @memberof SysDepartmentServiceBase
*/ */
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysorganization && context.sysdepartment){ if(context.sysorganization && context.sysdepartment){
let res:any = Http.getInstance().get(`/sysorganizations/${context.sysorganization}/sysdepartments/${context.sysdepartment}/select`,isloading); let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysorganizations/${context.sysorganization}/sysdepartments/${context.sysdepartment}/checkkey`,data,isloading);
return res; return res;
} }
let res:any = Http.getInstance().get(`/sysdepartments/${context.sysdepartment}/select`,isloading); let res:any = Http.getInstance().post(`/sysdepartments/${context.sysdepartment}/checkkey`,data,isloading);
return res; return res;
} }
...@@ -100,48 +101,6 @@ export default class SysDepartmentServiceBase extends EntityService { ...@@ -100,48 +101,6 @@ export default class SysDepartmentServiceBase extends EntityService {
return res; return res;
} }
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysDepartmentServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysorganization && context.sysdepartment){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/sysorganizations/${context.sysorganization}/sysdepartments/${context.sysdepartment}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/sysdepartments/${context.sysdepartment}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysDepartmentServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysorganization && context.sysdepartment){
let res:any = Http.getInstance().delete(`/sysorganizations/${context.sysorganization}/sysdepartments/${context.sysdepartment}`,isloading);
return res;
}
let res:any = Http.getInstance().delete(`/sysdepartments/${context.sysdepartment}`,isloading);
return res;
}
/** /**
* Get接口方法 * Get接口方法
* *
...@@ -185,7 +144,7 @@ export default class SysDepartmentServiceBase extends EntityService { ...@@ -185,7 +144,7 @@ export default class SysDepartmentServiceBase extends EntityService {
} }
/** /**
* CheckKey接口方法 * Remove接口方法
* *
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
...@@ -193,15 +152,12 @@ export default class SysDepartmentServiceBase extends EntityService { ...@@ -193,15 +152,12 @@ export default class SysDepartmentServiceBase extends EntityService {
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof SysDepartmentServiceBase * @memberof SysDepartmentServiceBase
*/ */
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysorganization && context.sysdepartment){ if(context.sysorganization && context.sysdepartment){
let masterData:any = {}; let res:any = Http.getInstance().delete(`/sysorganizations/${context.sysorganization}/sysdepartments/${context.sysdepartment}`,isloading);
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysorganizations/${context.sysorganization}/sysdepartments/${context.sysdepartment}/checkkey`,data,isloading);
return res; return res;
} }
let res:any = Http.getInstance().post(`/sysdepartments/${context.sysdepartment}/checkkey`,data,isloading); let res:any = Http.getInstance().delete(`/sysdepartments/${context.sysdepartment}`,isloading);
return res; return res;
} }
...@@ -229,6 +185,30 @@ export default class SysDepartmentServiceBase extends EntityService { ...@@ -229,6 +185,30 @@ export default class SysDepartmentServiceBase extends EntityService {
return res; return res;
} }
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysDepartmentServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysorganization && context.sysdepartment){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/sysorganizations/${context.sysorganization}/sysdepartments/${context.sysdepartment}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/sysdepartments/${context.sysdepartment}`,data,isloading);
return res;
}
/** /**
* FetchDefault接口方法 * FetchDefault接口方法
* *
...@@ -266,4 +246,24 @@ export default class SysDepartmentServiceBase extends EntityService { ...@@ -266,4 +246,24 @@ export default class SysDepartmentServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysdepartments/searchdefault`,tempData,isloading); return await Http.getInstance().post(`/sysdepartments/searchdefault`,tempData,isloading);
} }
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysDepartmentServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysorganization && context.sysdepartment){
let res:any = Http.getInstance().get(`/sysorganizations/${context.sysorganization}/sysdepartments/${context.sysdepartment}/select`,isloading);
return res;
}
let res:any = Http.getInstance().get(`/sysdepartments/${context.sysdepartment}/select`,isloading);
return res;
}
} }
\ No newline at end of file
...@@ -39,7 +39,7 @@ export default class SysOrganizationServiceBase extends EntityService { ...@@ -39,7 +39,7 @@ export default class SysOrganizationServiceBase extends EntityService {
// 实体接口 // 实体接口
/** /**
* Select接口方法 * CheckKey接口方法
* *
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
...@@ -47,9 +47,8 @@ export default class SysOrganizationServiceBase extends EntityService { ...@@ -47,9 +47,8 @@ export default class SysOrganizationServiceBase extends EntityService {
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof SysOrganizationServiceBase * @memberof SysOrganizationServiceBase
*/ */
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysorganizations/${context.sysorganization}/select`,isloading); let res:any = Http.getInstance().post(`/sysorganizations/${context.sysorganization}/checkkey`,data,isloading);
return res; return res;
} }
...@@ -79,37 +78,6 @@ export default class SysOrganizationServiceBase extends EntityService { ...@@ -79,37 +78,6 @@ export default class SysOrganizationServiceBase extends EntityService {
return res; return res;
} }
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysOrganizationServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/sysorganizations/${context.sysorganization}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysOrganizationServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysorganizations/${context.sysorganization}`,isloading);
return res;
}
/** /**
* Get接口方法 * Get接口方法
* *
...@@ -142,7 +110,7 @@ export default class SysOrganizationServiceBase extends EntityService { ...@@ -142,7 +110,7 @@ export default class SysOrganizationServiceBase extends EntityService {
} }
/** /**
* CheckKey接口方法 * Remove接口方法
* *
* @param {*} [context={}] * @param {*} [context={}]
* @param {*} [data={}] * @param {*} [data={}]
...@@ -150,8 +118,8 @@ export default class SysOrganizationServiceBase extends EntityService { ...@@ -150,8 +118,8 @@ export default class SysOrganizationServiceBase extends EntityService {
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof SysOrganizationServiceBase * @memberof SysOrganizationServiceBase
*/ */
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysorganizations/${context.sysorganization}/checkkey`,data,isloading); let res:any = Http.getInstance().delete(`/sysorganizations/${context.sysorganization}`,isloading);
return res; return res;
} }
...@@ -172,6 +140,23 @@ export default class SysOrganizationServiceBase extends EntityService { ...@@ -172,6 +140,23 @@ export default class SysOrganizationServiceBase extends EntityService {
return res; return res;
} }
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysOrganizationServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/sysorganizations/${context.sysorganization}`,data,isloading);
return res;
}
/** /**
* FetchDefault接口方法 * FetchDefault接口方法
* *
...@@ -229,4 +214,19 @@ export default class SysOrganizationServiceBase extends EntityService { ...@@ -229,4 +214,19 @@ export default class SysOrganizationServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysorganizations/searchtoporg`,tempData,isloading); return await Http.getInstance().post(`/sysorganizations/searchtoporg`,tempData,isloading);
} }
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysOrganizationServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysorganizations/${context.sysorganization}/select`,isloading);
return res;
}
} }
\ No newline at end of file
...@@ -786,8 +786,8 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -786,8 +786,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); let post: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
......
...@@ -479,7 +479,7 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt ...@@ -479,7 +479,7 @@ export default class TreeExpViewtreeexpbarBase extends Vue implements ControlInt
this.split = this.$store.getters.getViewSplit(this.viewUID); this.split = this.$store.getters.getViewSplit(this.viewUID);
}else{ }else{
let containerWidth:number = (document.getElementById("treeexpviewtreeexpbar") as any).offsetWidth; let containerWidth:number = (document.getElementById("treeexpviewtreeexpbar") as any).offsetWidth;
if(this.ctrlWidth){ if(this.ctrlWidth && containerWidth != 0){
this.split = this.ctrlWidth/containerWidth; this.split = this.ctrlWidth/containerWidth;
} }
this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split}); this.$store.commit("setViewSplit",{viewUID:this.viewUID,viewSplit:this.split});
......
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册