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

ShineKOT 发布系统代码 [后台服务,演示应用]

上级 544eae86
...@@ -326,6 +326,7 @@ export default class CtrlChartBase extends Vue implements ControlInterface { ...@@ -326,6 +326,7 @@ export default class CtrlChartBase extends Vue implements ControlInterface {
* @memberof Db_sysportlet3_chartBase * @memberof Db_sysportlet3_chartBase
*/ */
public chartUserParams:any ={ public chartUserParams:any ={
color:["#CAAC32","#0075A9","#22AC38","#2B4D6D",'#FF9100','#FF3D00','#F57F17','#00E5FF','#00B0FF','#2979FF','#3D5AFE','#651FFF','#D500F9']
}; };
/** /**
......
<template> <template>
<div :class="['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]"> <div :class="['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]">
<div v-if="items.length > 0"> <div v-if="items.length > 0">
<el-collapse> <div v-for = "item in items" :key="item.srfkey" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<el-collapse-item v-for="(group,index) in groupData" :key="index"> <div class="app-list-item-content">
<template slot="title"> <div class="item-icon">
<div style="margin: 0 0 0 12px;"><b>{{group.group}}</b></div> <template v-if="item.srficon">
</template> <img :src="item.srficon" />
<div v-if="group.children.length > 0" style="margin: 0 0 0 32px;"> </template>
<div v-for="item in group.children" :key="item.srfkey" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)"> <template v-else>
<div class="app-list-item-content">{{item.srfmajortext}}</div> <img src="/assets/img/noimage.png"/>
<div calss="app-list-item-action"> </template>
<template v-for="(action,index) in Object.keys(actionModel)">
<a :key="index" style="display: inline-block;margin: 0 12px;" @click="uiAction(item, action, $event)">
<i :class="actionModel[action].icon" style="margin-right:2px;"></i>
<span>{{actionModel[action].caption}}</span>
</a>
</template>
</div>
</div>
</div> </div>
<div v-else style="text-align: center;"> <template>
{{ $t('entities.ibizappctrl.ctrllist_list.nodata') }} <div class="item-content-text">
</div> <span class="item-text">{{item.srfmajortext}}</span>
</el-collapse-item> <span v-if="item.srfdescription" class="item-subtext">{{ item.srfdescription }}</span>
</el-collapse> </div>
</template>
</div>
<div v-if="item.srfdate" class="app-list-item-date">
<span class="date">{{ item.srfdate }}</span>
</div>
<div class="app-list-item-action">
<template v-for="(action,index) in Object.keys(actionModel)">
<a :key="index" style="display: inline-block;margin: 0 12px;" @click="uiAction(item, action, $event)">
<i :class="actionModel[action].icon" style="margin-right:2px;"></i>
<span>{{actionModel[action].caption}}</span>
</a>
</template>
</div>
</div>
<template v-if="isScrollBar"> <template v-if="isScrollBar">
<div v-if="totalRecord>items.length" class="loadmore">{{ this.$t('app.commonWords.loadmore') }}</div> <div v-if="totalRecord>items.length" class="loadmore">{{ this.$t('app.commonWords.loadmore') }}</div>
<div v-else class="loadmore">{{ this.$t('app.commonWords.nomore') }}</div> <div v-else class="loadmore">{{ this.$t('app.commonWords.nomore') }}</div>
...@@ -276,117 +282,7 @@ export default class CtrlListBase extends Vue implements ControlInterface { ...@@ -276,117 +282,7 @@ export default class CtrlListBase extends Vue implements ControlInterface {
*/ */
public thisRef: any = this; public thisRef: any = this;
/**
* 分组属性
*
* @type {string}
* @memberof CtrlListBase
*/
public groupField: string = "ibizappctrltype";
/**
* 分组属性是否配置代码表
*
* @type {string}
* @memberof CtrlListBase
*/
public groupFieldCodelist: boolean = true;
/**
* 分组数据
*
* @type {Array<any>}
* @memberof CtrlListBase
*/
public groupData: Array<any> = [];
/**
* 分组模式
*
* @type {string}
* @memberof CtrlListBase
*/
public groupMode: string = "CODELIST";
/**
* 分组方法
*
* @memberof CtrlListBase
*/
public group(){
let _this:any = this;
if(_this.drawGroup && _this.drawGroup instanceof Function && Object.is(_this.groupMode,"AUTO")){
_this.drawGroup();
}else if(_this.drawCodelistGroup && _this.drawCodelistGroup instanceof Function && Object.is(_this.groupMode,"CODELIST")){
_this.drawCodelistGroup();
}
}
/**
* 分组代码表
*
* @type {string}
* @memberof CtrlListBase
*/
public groupCodelist: any = {type:'STATIC',tag:'AppCtrlType'};
/**
* 根据分组代码表绘制分组列表
*
* @memberof CtrlListBase
*/
public async drawCodelistGroup(){
let groups: Array<any> = [];
let fields: Array<any> = [];
let groupTree:Array<any> = [];
let data:Array<any> = [...this.items];
if(Object.keys(this.groupCodelist).length > 0){
let groupCodelist: any = await this.codeListService.getDataItems(this.groupCodelist);
groups = Util.deepCopy(groupCodelist);
}
if(groups.length == 0){
console.warn("分组数据无效");
}
groups.forEach((group: any,i: number)=>{
let children:Array<any> = [];
data.forEach((item: any,j: number)=>{
if(this.groupFieldCodelist){
if(Object.is(group.label,item[this.groupField])) {
children.push(item);
}
}else if(Object.is(group.value,item[this.groupField])){
children.push(item);
}
});
const tree: any ={
group: group.label,
children: children
}
groupTree.push(tree);
});
let child:Array<any> = [];
data.forEach((item: any)=>{
let i: number = 0;
if(this.groupFieldCodelist){
i = groups.findIndex((group: any)=>Object.is(group.label,item[this.groupField]));
}else{
i = groups.findIndex((group: any)=>Object.is(group.value,item[this.groupField]));
}
if(i < 0){
child.push(item);
}
})
const Tree: any = {
group: this.$t('app.commonWords.other'),
children: child
}
if(child && child.length > 0){
groupTree.push(Tree);
}
this.groupData = [...groupTree];
}
...@@ -663,7 +559,6 @@ export default class CtrlListBase extends Vue implements ControlInterface { ...@@ -663,7 +559,6 @@ export default class CtrlListBase extends Vue implements ControlInterface {
this.handleClick(this.items[0]); this.handleClick(this.items[0]);
} }
} }
this.group();
}, (response: any) => { }, (response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
...@@ -765,7 +660,6 @@ export default class CtrlListBase extends Vue implements ControlInterface { ...@@ -765,7 +660,6 @@ export default class CtrlListBase extends Vue implements ControlInterface {
this.items.some((item:any,index:number)=>{ this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){ if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1); this.items.splice(index,1);
this.group();
return true; return true;
} }
}); });
......
...@@ -323,6 +323,7 @@ export default class EditorChartBase extends Vue implements ControlInterface { ...@@ -323,6 +323,7 @@ export default class EditorChartBase extends Vue implements ControlInterface {
* @memberof Db_sysportlet4_chartBase * @memberof Db_sysportlet4_chartBase
*/ */
public chartUserParams:any ={ public chartUserParams:any ={
color:["#CAAC32","#0075A9","#22AC38","#2B4D6D",'#FF9100','#FF3D00','#F57F17','#00E5FF','#00B0FF','#2979FF','#3D5AFE','#651FFF','#D500F9']
}; };
/** /**
......
<template> <template>
<div :class="['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]"> <div :class="['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]">
<div v-if="items.length > 0"> <div v-if="items.length > 0">
<el-collapse> <div v-for = "item in items" :key="item.srfkey" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<el-collapse-item v-for="(group,index) in groupData" :key="index"> <div class="app-list-item-content">
<template slot="title"> <div class="item-icon">
<div style="margin: 0 0 0 12px;"><b>{{group.group}}</b></div> <template v-if="item.srficon">
</template> <img :src="item.srficon" />
<div v-if="group.children.length > 0" style="margin: 0 0 0 32px;"> </template>
<div v-for="item in group.children" :key="item.srfkey" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)"> <template v-else>
<div class="app-list-item-content">{{item.srfmajortext}}</div> <img src="/assets/img/noimage.png"/>
<div calss="app-list-item-action"> </template>
<template v-for="(action,index) in Object.keys(actionModel)">
<a :key="index" style="display: inline-block;margin: 0 12px;" @click="uiAction(item, action, $event)">
<i :class="actionModel[action].icon" style="margin-right:2px;"></i>
<span>{{actionModel[action].caption}}</span>
</a>
</template>
</div>
</div>
</div> </div>
<div v-else style="text-align: center;"> <template>
{{ $t('entities.ibizappeditor.editorlist_list.nodata') }} <div class="item-content-text">
</div> <span class="item-text">{{item.srfmajortext}}</span>
</el-collapse-item> <span v-if="item.srfdescription" class="item-subtext">{{ item.srfdescription }}</span>
</el-collapse> </div>
</template>
</div>
<div v-if="item.srfdate" class="app-list-item-date">
<span class="date">{{ item.srfdate }}</span>
</div>
<div class="app-list-item-action">
<template v-for="(action,index) in Object.keys(actionModel)">
<a :key="index" style="display: inline-block;margin: 0 12px;" @click="uiAction(item, action, $event)">
<i :class="actionModel[action].icon" style="margin-right:2px;"></i>
<span>{{actionModel[action].caption}}</span>
</a>
</template>
</div>
</div>
<template v-if="isScrollBar"> <template v-if="isScrollBar">
<div v-if="totalRecord>items.length" class="loadmore">{{ this.$t('app.commonWords.loadmore') }}</div> <div v-if="totalRecord>items.length" class="loadmore">{{ this.$t('app.commonWords.loadmore') }}</div>
<div v-else class="loadmore">{{ this.$t('app.commonWords.nomore') }}</div> <div v-else class="loadmore">{{ this.$t('app.commonWords.nomore') }}</div>
...@@ -276,117 +282,7 @@ export default class EditorListBase extends Vue implements ControlInterface { ...@@ -276,117 +282,7 @@ export default class EditorListBase extends Vue implements ControlInterface {
*/ */
public thisRef: any = this; public thisRef: any = this;
/**
* 分组属性
*
* @type {string}
* @memberof EditorListBase
*/
public groupField: string = "ibizappeditortype";
/**
* 分组属性是否配置代码表
*
* @type {string}
* @memberof EditorListBase
*/
public groupFieldCodelist: boolean = true;
/**
* 分组数据
*
* @type {Array<any>}
* @memberof EditorListBase
*/
public groupData: Array<any> = [];
/**
* 分组模式
*
* @type {string}
* @memberof EditorListBase
*/
public groupMode: string = "CODELIST";
/**
* 分组方法
*
* @memberof EditorListBase
*/
public group(){
let _this:any = this;
if(_this.drawGroup && _this.drawGroup instanceof Function && Object.is(_this.groupMode,"AUTO")){
_this.drawGroup();
}else if(_this.drawCodelistGroup && _this.drawCodelistGroup instanceof Function && Object.is(_this.groupMode,"CODELIST")){
_this.drawCodelistGroup();
}
}
/**
* 分组代码表
*
* @type {string}
* @memberof EditorListBase
*/
public groupCodelist: any = {type:'STATIC',tag:'AppEditorType'};
/**
* 根据分组代码表绘制分组列表
*
* @memberof EditorListBase
*/
public async drawCodelistGroup(){
let groups: Array<any> = [];
let fields: Array<any> = [];
let groupTree:Array<any> = [];
let data:Array<any> = [...this.items];
if(Object.keys(this.groupCodelist).length > 0){
let groupCodelist: any = await this.codeListService.getDataItems(this.groupCodelist);
groups = Util.deepCopy(groupCodelist);
}
if(groups.length == 0){
console.warn("分组数据无效");
}
groups.forEach((group: any,i: number)=>{
let children:Array<any> = [];
data.forEach((item: any,j: number)=>{
if(this.groupFieldCodelist){
if(Object.is(group.label,item[this.groupField])) {
children.push(item);
}
}else if(Object.is(group.value,item[this.groupField])){
children.push(item);
}
});
const tree: any ={
group: group.label,
children: children
}
groupTree.push(tree);
});
let child:Array<any> = [];
data.forEach((item: any)=>{
let i: number = 0;
if(this.groupFieldCodelist){
i = groups.findIndex((group: any)=>Object.is(group.label,item[this.groupField]));
}else{
i = groups.findIndex((group: any)=>Object.is(group.value,item[this.groupField]));
}
if(i < 0){
child.push(item);
}
})
const Tree: any = {
group: this.$t('app.commonWords.other'),
children: child
}
if(child && child.length > 0){
groupTree.push(Tree);
}
this.groupData = [...groupTree];
}
...@@ -663,7 +559,6 @@ export default class EditorListBase extends Vue implements ControlInterface { ...@@ -663,7 +559,6 @@ export default class EditorListBase extends Vue implements ControlInterface {
this.handleClick(this.items[0]); this.handleClick(this.items[0]);
} }
} }
this.group();
}, (response: any) => { }, (response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
...@@ -765,7 +660,6 @@ export default class EditorListBase extends Vue implements ControlInterface { ...@@ -765,7 +660,6 @@ export default class EditorListBase extends Vue implements ControlInterface {
this.items.some((item:any,index:number)=>{ this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){ if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1); this.items.splice(index,1);
this.group();
return true; return true;
} }
}); });
......
...@@ -325,6 +325,7 @@ export default class ViewChartBase extends Vue implements ControlInterface { ...@@ -325,6 +325,7 @@ export default class ViewChartBase extends Vue implements ControlInterface {
* @memberof Db_sysportlet2_chartBase * @memberof Db_sysportlet2_chartBase
*/ */
public chartUserParams:any ={ public chartUserParams:any ={
color:["#CAAC32","#0075A9","#22AC38","#2B4D6D",'#FF9100','#FF3D00','#F57F17','#00E5FF','#00B0FF','#2979FF','#3D5AFE','#651FFF','#D500F9']
}; };
/** /**
......
<template> <template>
<div :class="['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]"> <div :class="['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]">
<div v-if="items.length > 0"> <div v-if="items.length > 0">
<el-collapse> <div v-for = "item in items" :key="item.srfkey" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<el-collapse-item v-for="(group,index) in groupData" :key="index"> <div class="app-list-item-content">
<template slot="title"> <div class="item-icon">
<div style="margin: 0 0 0 12px;"><b>{{group.group}}</b></div> <template v-if="item.srficon">
</template> <img :src="item.srficon" />
<div v-if="group.children.length > 0" style="margin: 0 0 0 32px;"> </template>
<div v-for="item in group.children" :key="item.srfkey" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)"> <template v-else>
<div class="app-list-item-content">{{item.srfmajortext}}</div> <img src="/assets/img/noimage.png"/>
<div calss="app-list-item-action"> </template>
<template v-for="(action,index) in Object.keys(actionModel)">
<a :key="index" style="display: inline-block;margin: 0 12px;" @click="uiAction(item, action, $event)">
<i :class="actionModel[action].icon" style="margin-right:2px;"></i>
<span>{{actionModel[action].caption}}</span>
</a>
</template>
</div>
</div>
</div> </div>
<div v-else style="text-align: center;"> <template>
{{ $t('entities.ibizappview.viewlist_list.nodata') }} <div class="item-content-text">
</div> <span class="item-text">{{item.srfmajortext}}</span>
</el-collapse-item> <span v-if="item.srfdescription" class="item-subtext">{{ item.srfdescription }}</span>
</el-collapse> </div>
</template>
</div>
<div v-if="item.srfdate" class="app-list-item-date">
<span class="date">{{ item.srfdate }}</span>
</div>
<div class="app-list-item-action">
<template v-for="(action,index) in Object.keys(actionModel)">
<a :key="index" style="display: inline-block;margin: 0 12px;" @click="uiAction(item, action, $event)">
<i :class="actionModel[action].icon" style="margin-right:2px;"></i>
<span>{{actionModel[action].caption}}</span>
</a>
</template>
</div>
</div>
<template v-if="isScrollBar"> <template v-if="isScrollBar">
<div v-if="totalRecord>items.length" class="loadmore">{{ this.$t('app.commonWords.loadmore') }}</div> <div v-if="totalRecord>items.length" class="loadmore">{{ this.$t('app.commonWords.loadmore') }}</div>
<div v-else class="loadmore">{{ this.$t('app.commonWords.nomore') }}</div> <div v-else class="loadmore">{{ this.$t('app.commonWords.nomore') }}</div>
...@@ -276,117 +282,7 @@ export default class ViewListBase extends Vue implements ControlInterface { ...@@ -276,117 +282,7 @@ export default class ViewListBase extends Vue implements ControlInterface {
*/ */
public thisRef: any = this; public thisRef: any = this;
/**
* 分组属性
*
* @type {string}
* @memberof ViewListBase
*/
public groupField: string = "ibizappviewtype";
/**
* 分组属性是否配置代码表
*
* @type {string}
* @memberof ViewListBase
*/
public groupFieldCodelist: boolean = true;
/**
* 分组数据
*
* @type {Array<any>}
* @memberof ViewListBase
*/
public groupData: Array<any> = [];
/**
* 分组模式
*
* @type {string}
* @memberof ViewListBase
*/
public groupMode: string = "CODELIST";
/**
* 分组方法
*
* @memberof ViewListBase
*/
public group(){
let _this:any = this;
if(_this.drawGroup && _this.drawGroup instanceof Function && Object.is(_this.groupMode,"AUTO")){
_this.drawGroup();
}else if(_this.drawCodelistGroup && _this.drawCodelistGroup instanceof Function && Object.is(_this.groupMode,"CODELIST")){
_this.drawCodelistGroup();
}
}
/**
* 分组代码表
*
* @type {string}
* @memberof ViewListBase
*/
public groupCodelist: any = {type:'STATIC',tag:'AppViewType'};
/**
* 根据分组代码表绘制分组列表
*
* @memberof ViewListBase
*/
public async drawCodelistGroup(){
let groups: Array<any> = [];
let fields: Array<any> = [];
let groupTree:Array<any> = [];
let data:Array<any> = [...this.items];
if(Object.keys(this.groupCodelist).length > 0){
let groupCodelist: any = await this.codeListService.getDataItems(this.groupCodelist);
groups = Util.deepCopy(groupCodelist);
}
if(groups.length == 0){
console.warn("分组数据无效");
}
groups.forEach((group: any,i: number)=>{
let children:Array<any> = [];
data.forEach((item: any,j: number)=>{
if(this.groupFieldCodelist){
if(Object.is(group.label,item[this.groupField])) {
children.push(item);
}
}else if(Object.is(group.value,item[this.groupField])){
children.push(item);
}
});
const tree: any ={
group: group.label,
children: children
}
groupTree.push(tree);
});
let child:Array<any> = [];
data.forEach((item: any)=>{
let i: number = 0;
if(this.groupFieldCodelist){
i = groups.findIndex((group: any)=>Object.is(group.label,item[this.groupField]));
}else{
i = groups.findIndex((group: any)=>Object.is(group.value,item[this.groupField]));
}
if(i < 0){
child.push(item);
}
})
const Tree: any = {
group: this.$t('app.commonWords.other'),
children: child
}
if(child && child.length > 0){
groupTree.push(Tree);
}
this.groupData = [...groupTree];
}
...@@ -663,7 +559,6 @@ export default class ViewListBase extends Vue implements ControlInterface { ...@@ -663,7 +559,6 @@ export default class ViewListBase extends Vue implements ControlInterface {
this.handleClick(this.items[0]); this.handleClick(this.items[0]);
} }
} }
this.group();
}, (response: any) => { }, (response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
...@@ -765,7 +660,6 @@ export default class ViewListBase extends Vue implements ControlInterface { ...@@ -765,7 +660,6 @@ export default class ViewListBase extends Vue implements ControlInterface {
this.items.some((item:any,index:number)=>{ this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){ if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1); this.items.splice(index,1);
this.group();
return true; return true;
} }
}); });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册