提交 4d77b9f2 编写于 作者: ibizdev's avatar ibizdev

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

上级 4f7e772e
......@@ -7,5 +7,8 @@ export default {
ibizappviewid: "应用视图标识",
updateman: "更新人",
updatedate: "更新时间",
ibizappviewtype: "应用视图类型",
documentaddress: "文档地址",
instanceaddress: "示例地址",
},
};
\ No newline at end of file
......@@ -6,5 +6,8 @@ export default {
ibizappviewid: "应用视图标识",
updateman: "更新人",
updatedate: "更新时间",
ibizappviewtype: "应用视图类型",
documentaddress: "文档地址",
instanceaddress: "示例地址",
},
};
\ No newline at end of file
......@@ -2,33 +2,16 @@
<div :class="['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]">
<div v-if="items.length > 0">
<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)">
<div class="app-list-item-content">
<div class="item-icon">
<template v-if="item.srficon">
<img :src="item.srficon" />
</template>
<template v-else>
<img src="/assets/img/noimage.png"/>
</template>
</div>
<template>
<div class="item-content-text">
<span class="item-text">{{item.srfmajortext}}</span>
<span v-if="item.srfdescription" class="item-subtext">{{ item.srfdescription }}</span>
</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>
<layout_list_itempanel
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:parentRef="thisRef"
:inputData="item"
@panelDataChange="($event)=>{onPanelDataChange(item,$event)}"
name="list_itempanel"
ref='list_itempanel'>
</layout_list_itempanel>
</div>
<template v-if="isScrollBar">
<div v-if="totalRecord>items.length" class="loadmore">{{ this.$t('app.commonWords.loadmore') }}</div>
......
......@@ -2,9 +2,11 @@
import { Component } from 'vue-property-decorator';
import UsrBase from './usr-list-base.vue';
import layout_list_itempanel from '@widgets/ibizbook/usr-panel/usr-panel.vue';
@Component({
components: {
layout_list_itempanel,
}
})
......
<template>
<row class="app-layoutpanel " style="width:100%;height:100%;">
</row>
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util,ViewTool } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
import AppCenterService from "@service/app/app-center-service";
import IBIZBOOKService from '@/service/ibizbook/ibizbook-service';
import UsrService from './usr-panel-service';
import IBIZBOOKUIService from '@/uiservice/ibizbook/ibizbook-ui-service';
import { PanelDetailModel,PanelRawitemModel,PanelTabPanelModel,PanelTabPageModel,PanelFieldModel,PanelContainerModel,PanelControlModel,PanelUserControlModel,PanelButtonModel } from '@/model/panel-detail';
import UsrModel from './usr-panel-model';
import CodeListService from "@/codelist/codelist-service";
import UIService from '@/uiservice/ui-service';
@Component({
components: {
}
})
export default class UsrBase extends Vue implements ControlInterface {
/**
* 名称
*
* @type {string}
* @memberof UsrBase
*/
@Prop() public name?: string;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof UsrBase
*/
@Prop() public viewState!: Subject<ViewState>;
/**
* 应用上下文
*
* @type {*}
* @memberof UsrBase
*/
@Prop() public context!: any;
/**
* 视图参数
*
* @type {*}
* @memberof UsrBase
*/
@Prop() public viewparams!: any;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof UsrBase
*/
public viewStateEvent: Subscription | undefined;
/**
* 获取部件类型
*
* @returns {string}
* @memberof UsrBase
*/
public getControlType(): string {
return 'PANEL'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof UsrBase
*/
public counterServiceArray:Array<any> = [];
/**
* 建构部件服务对象
*
* @type {UsrService}
* @memberof UsrBase
*/
public service: UsrService = new UsrService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {IBIZBOOKService}
* @memberof UsrBase
*/
public appEntityService: IBIZBOOKService = new IBIZBOOKService({ $store: this.$store });
/**
* 转化数据
*
* @param {any} args
* @memberof UsrBase
*/
public transformData(args: any) {
let _this: any = this;
if(_this.service && _this.service.handleRequestData instanceof Function && _this.service.handleRequestData('transform',_this.context,args)){
return _this.service.handleRequestData('transform',_this.context,args)['data'];
}
}
/**
* 关闭视图
*
* @param {any} args
* @memberof UsrBase
*/
public closeView(args: any): void {
let _this: any = this;
_this.$emit('closeview', [args]);
}
/**
* 计数器刷新
*
* @memberof UsrBase
*/
public counterRefresh(){
const _this:any =this;
if(_this.counterServiceArray && _this.counterServiceArray.length >0){
_this.counterServiceArray.forEach((item:any) =>{
if(item.refreshData && item.refreshData instanceof Function){
item.refreshData();
}
})
}
}
/**
* 接口实现
*
* @returns {any[]}
* @memberof UsrBase
*/
getDatas(): any[] {
if (!this.panelData) {
return [];
}
return [this.panelData];
}
/**
* 接口实现
*
* @returns {*}
* @memberof UsrBase
*/
getData() {
return this.panelData;
}
/**
* 父级部件引用
*
* @type {*}
* @memberof UsrBase
*/
@Prop() public parentRef?: any;
/**
* 面板数据对象
*
* @type {*}
* @memberof UsrBase
*/
@Prop() public inputData?: any;
/**
* UI数据对象
*
* @type {*}
* @memberof UsrBase
*/
public data:any = {};
/**
* 面板数据对象
*
* @type {*}
* @memberof UsrBase
*/
public panelData:any = null;
/**
* 数据模型对象
*
* @type {UsrModel}
* @memberof UsrBase
*/
public dataModel:UsrModel = new UsrModel();
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof UsrBase
*/
public codeListService:CodeListService = new CodeListService({ $store:this.$store });
/**
* 界面UI服务对象
*
* @type {IBIZBOOKUIService}
* @memberof UsrBase
*/
public appUIService:IBIZBOOKUIService = new IBIZBOOKUIService(this.$store);
/**
* 详情模型集合
*
* @type {*}
* @memberof UsrBase
*/
public detailsModel: any = {
};
/**
* 值规则对象
*
* @type {*}
* @memberof UsrBase
*/
public rules:any={
};
/**
* 监听数据对象
*
* @memberof UsrBase
*/
@Watch('inputData',{immediate:true,deep: true})
public onInputDataChange(newVal: any, oldVal: any){
if(newVal){
this.computedUIData(newVal);
this.panelData = Util.deepCopy(newVal);
this.computeButtonState(newVal);
this.panelLogic({ name: '', newVal: null, oldVal: null });
this.$forceUpdate();
}
}
/**
* 计算UI展示数据
*
* @param codelistArray 代码表模型数组
* @memberof UsrBase
*/
public computedUIData(newVal:any){
if((this.dataModel.getDataItems instanceof Function) && this.dataModel.getDataItems().length >0){
this.dataModel.getDataItems().forEach((item:any) =>{
this.data[item.name] = newVal[item.prop];
})
}
}
/**
* 计算面板按钮权限状态
*
* @param {*} [data] 传入数据
* @memberof UsrBase
*/
public computeButtonState(data:any){
// 若为项布局面板,存在parentRef
if(this.parentRef){
let targetData:any = this.parentRef.transformData(data);
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].itemType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService?this.appUIService:null);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
}
}
/**
* 界面行为
*
* @param {*} row
* @param {*} tag
* @param {*} $event
* @memberof UsrBase
*/
public uiAction(row: any, tag: any, $event: any) {
}
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof UsrBase
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any){
if (this.parentRef.opendata && this.parentRef.opendata instanceof Function) {
this.parentRef.opendata(args,fullargs,params, $event, xData);
}
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof UsrBase
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
if (this.parentRef.newdata && this.parentRef.newdata instanceof Function) {
this.parentRef.newdata(args,fullargs,params, $event, xData);
}
}
/**
* 删除
*
* @param {any[]} datas
* @returns {Promise<any>}
* @memberof UsrBase
*/
public async remove(datas: any[]): Promise<any> {
if (this.parentRef.remove && this.parentRef.remove instanceof Function) {
return this.parentRef.remove(datas);
}
}
/**
* 刷新
*
* @param {*} [args={}]
* @memberof UsrBase
*/
public refresh(args: any = {}) {
if (this.parentRef.refresh && this.parentRef.refresh instanceof Function) {
this.parentRef.refresh(args);
}
}
/**
* 设置变更面板编辑项的值
*
* @param data 面板数据
* @param {{ name: string, value: any }} $event
* @returns {void}
* @memberof UsrBase
*/
public onPanelItemValueChange(data: any,$event: { name: string, value: any }): void {
if (!$event) {
return;
}
if (!$event.name || Object.is($event.name, '') || !data.hasOwnProperty($event.name)) {
return;
}
data[$event.name] = $event.value;
this.panelEditItemChange(data, $event.name, $event.value);
}
/**
* 面板编辑项值变化后续操作
*
* @public
* @param data 面板数据
* @param property 编辑项名
* @param value 编辑项值
* @returns {void}
* @memberof UsrBase
*/
public panelEditItemChange(data: any, property: string, value: any){
// 面板数据变化事件
if((this.dataModel.getDataItems instanceof Function) && this.dataModel.getDataItems().length >0){
let modelitem =this.dataModel.getDataItems().find((item:any) =>{
return item.name === property;
})
if(modelitem){
this.$emit('panelDataChange',{[modelitem.prop]: value});
}
}
}
/**
* 分页切换事件
*
* @memberof UsrBase
*/
public handleTabPanelClick(name:string,$event:any){
this.detailsModel[name].clickPage($event.name);
}
/**
* 面板逻辑
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof UsrBase
*/
public panelLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
}
}
</script>
<style lang='less'>
@import './usr-panel.less';
</style>
/**
* Usr 部件模型
*
* @export
* @class UsrModel
*/
export default class UsrModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof UsrModel
*/
public getDataItems(): any[] {
return [
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* Usr 部件服务对象
*
* @export
* @class UsrService
*/
export default class UsrService extends ControlService {
}
\ No newline at end of file
// this is less
.app-layoutpanel {
height: 100%;
.app-layoutpanel-container {
padding: 6px;
}
.app-layoutpanel-tabpanel{
>.el-tabs {
>.el-.el-tabs__header{
margin: 0 0 10px;
}
.app-layoutpanel-tabpage{
padding: 6px;
}
}
}
.app-layoutpanel-button,.app-layoutpanel-conctrl,.app-layoutpanel-ctrlpos,.app-layoutpanel-field,.app-layoutpanel-rowitem,.app-layoutpanel-usercontrol{
padding: 6px;
}
.item-field{
padding: 0 4px;
display: flex;
>.item-field-label{
padding: 0 8px;
}
}
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import UsrBase from './usr-panel-base.vue';
@Component({
components: {
}
})
export default class Usr extends UsrBase {
}
</script>
\ No newline at end of file
......@@ -92,6 +92,27 @@ public class IBIZAPPVIEW extends EntityMP implements Serializable {
@JSONField(name = "updatedate", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 应用视图类型
*/
@TableField(value = "ibizappviewtype")
@JSONField(name = "ibizappviewtype")
@JsonProperty("ibizappviewtype")
private String ibizappviewtype;
/**
* 文档地址
*/
@TableField(value = "documentaddress")
@JSONField(name = "documentaddress")
@JsonProperty("documentaddress")
private String documentaddress;
/**
* 示例地址
*/
@TableField(value = "instanceaddress")
@JSONField(name = "instanceaddress")
@JsonProperty("instanceaddress")
private String instanceaddress;
......@@ -103,6 +124,30 @@ public class IBIZAPPVIEW extends EntityMP implements Serializable {
this.modify("ibizappviewname", ibizappviewname);
}
/**
* 设置 [应用视图类型]
*/
public void setIbizappviewtype(String ibizappviewtype) {
this.ibizappviewtype = ibizappviewtype;
this.modify("ibizappviewtype", ibizappviewtype);
}
/**
* 设置 [文档地址]
*/
public void setDocumentaddress(String documentaddress) {
this.documentaddress = documentaddress;
this.modify("documentaddress", documentaddress);
}
/**
* 设置 [示例地址]
*/
public void setInstanceaddress(String instanceaddress) {
this.instanceaddress = instanceaddress;
this.modify("instanceaddress", instanceaddress);
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
......
......@@ -19,6 +19,12 @@
</column>
<column name="UPDATEDATE" remarks="" type="DATETIME">
</column>
<column name="IBIZAPPVIEWTYPE" remarks="" type="VARCHAR(100)">
</column>
<column name="DOCUMENTADDRESS" remarks="" type="VARCHAR(100)">
</column>
<column name="INSTANCEADDRESS" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
......
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="IBIZAPPVIEWResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZAPPVIEWID`, t1.`IBIZAPPVIEWNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZAPPVIEW` t1 ) t1 where ibizappviewid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DOCUMENTADDRESS`, t1.`IBIZAPPVIEWID`, t1.`IBIZAPPVIEWNAME`, t1.`IBIZAPPVIEWTYPE`, t1.`INSTANCEADDRESS`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZAPPVIEW` t1 ) t1 where ibizappviewid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
......@@ -27,12 +27,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZAPPVIEWID`, t1.`IBIZAPPVIEWNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZAPPVIEW` t1
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DOCUMENTADDRESS`, t1.`IBIZAPPVIEWID`, t1.`IBIZAPPVIEWNAME`, t1.`IBIZAPPVIEWTYPE`, t1.`INSTANCEADDRESS`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZAPPVIEW` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`IBIZAPPVIEWID`, t1.`IBIZAPPVIEWNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZAPPVIEW` t1
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DOCUMENTADDRESS`, t1.`IBIZAPPVIEWID`, t1.`IBIZAPPVIEWNAME`, t1.`IBIZAPPVIEWTYPE`, t1.`INSTANCEADDRESS`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZAPPVIEW` t1
]]>
</sql>
</mapper>
......
......@@ -101,6 +101,48 @@
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"IBIZAPPVIEWTYPE" ,
"codename":"Ibizappviewtype",
"field_logic_name":"应用视图类型",
"entity_name":"IBIZAPPVIEW",
"field_type":"TEXT",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"DOCUMENTADDRESS" ,
"codename":"Documentaddress",
"field_logic_name":"文档地址",
"entity_name":"IBIZAPPVIEW",
"field_type":"TEXT",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"INSTANCEADDRESS" ,
"codename":"Instanceaddress",
"field_logic_name":"示例地址",
"entity_name":"IBIZAPPVIEW",
"field_type":"TEXT",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
}
],
"subEntitys":[
......
......@@ -83,6 +83,33 @@ public class IBIZAPPVIEWDTO extends DTOBase implements Serializable {
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [IBIZAPPVIEWTYPE]
*
*/
@JSONField(name = "ibizappviewtype")
@JsonProperty("ibizappviewtype")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String ibizappviewtype;
/**
* 属性 [DOCUMENTADDRESS]
*
*/
@JSONField(name = "documentaddress")
@JsonProperty("documentaddress")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String documentaddress;
/**
* 属性 [INSTANCEADDRESS]
*
*/
@JSONField(name = "instanceaddress")
@JsonProperty("instanceaddress")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String instanceaddress;
/**
* 设置 [IBIZAPPVIEWNAME]
......@@ -92,6 +119,30 @@ public class IBIZAPPVIEWDTO extends DTOBase implements Serializable {
this.modify("ibizappviewname",ibizappviewname);
}
/**
* 设置 [IBIZAPPVIEWTYPE]
*/
public void setIbizappviewtype(String ibizappviewtype){
this.ibizappviewtype = ibizappviewtype ;
this.modify("ibizappviewtype",ibizappviewtype);
}
/**
* 设置 [DOCUMENTADDRESS]
*/
public void setDocumentaddress(String documentaddress){
this.documentaddress = documentaddress ;
this.modify("documentaddress",documentaddress);
}
/**
* 设置 [INSTANCEADDRESS]
*/
public void setInstanceaddress(String instanceaddress){
this.instanceaddress = instanceaddress ;
this.modify("instanceaddress",instanceaddress);
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册